rez • on • ant
- continuing to sound.
- capable of inducing.
- marked by grandiloquence.
Resonant is a powerful modular audio manager and sound randomizer. Leveraging capabilities for randomized, looping sound clips, randomized volume and pitch modulation, and customizable audio events/reactions, Resonant is extendable and multi-purposed. Though it's powerful trigger/reaction system, design audio events and reactions to real-time code.
- Install the latest release from the GitHub repository, unzip it, and place the folder into your Unity project's
Packagesfolder. - Return to Unity, and the package should automatically be recognized and visible in the Package Manager.
- A sample scene can be found at:
Resonant/Example/Example.unity. - Opening this scene may prompt you to install Text Mesh Pro. Simply click on Import TMP Essentials to do so.
- Resonant is built on top of Unity's
AudioSource/AudioClipsystem.AudioSources can be controlled through the Resonant system usingResonantSource,ResonantRandomizer, orResonantSoundbankComponents. - All three Resonant components require an
AudioSource, and may modify it's parameters (e.g. volume) at runtime. However, otherAudioClipsettings (e.g. 3D sound, mixers, etc.) can still be changed to improve or customize your audio setup. - The only Resonant component that does not require a
ResonantBehaviour/ResonantManagerto function is aResonantRandomizer. ResonantBehaviourscan be used to create complex reaction setups when certain states are triggered. All reactions can be found inResonant/Runtime/Reactions, and are fully documented.
- Add a
ResonantRandomizerComponentto aGameObject. - Assign it the
AudioCLipsyou wish to play. Delay Modulationrepresents the randomly-choen amount of time between each looping clip.Volume Modulationrepresents the range away from the starting volume that theAudioSource's volume can be randomly set to whenAudioClipsare randomly played.Pitch Modulationrepresents the range away from the starting pitch that theAudioSource's pitch can be randomly set to whenAudioClipsare randomly played.- If you want the
ResonantRandomizerto start playing when the game begins, turn onLoop On Start.
ResonantBehaviourdata is saved asScriptableObjects, which can be created withCreate/Resonant Behaviour.- Rename your newly created behaviour, then right click on it and select
Edit Resonant Behaviour. This will open the Resonant Editor window. - Click on the Add trigger button to add a new trigger, and give it an ID. This trigger will be called by you through your code. (Click on the '-' button to delete this trigger)
- Select the
ResonantReactionof your choice from the dropdown next to the Add reaction button, and add it. (Click on the '-' button to delete this reaction) ResonantReactionscan have many fields and functionalities. All reactions can be found inResonant/Runtime/Reactions, and are fully documented.- Assign the
ResonantReaction'sID. This ID should match the ID(s) of theResonantSources,ResonantRandomizers, and/orResonantSoundbanks in your scene that you want it to affect. - Don't forget to save with the Save button!
- In your scene add a
ResonantManagerto aGameObject, and assign it theResonantBehaviourthat you just created. - At runtime, call
ResonantManager.Trigger, and pass it the ID of the trigger you created. (Note:ResonantTriggerIDs are not the same asResonantReactionIDs)
