Sound Group
Sound Groups are the basic sound effect unit in Master Audio. Each Sound Group is made up of 1 or more Variations. Each Sound Group appears as a child game object of the Master Audio game object. There are quite a few options for Sound Groups and Variations so refer back to this page whenever you want to know if a feature exists!
The image above shows a Sound Group with a single Variation called "arrow". All the Variations in the Sound Group can be viewed at once from the Sound Group's Inspector and are each collapsible, although to tweak the actual Audio Source of each Variation, you need to navigate to the Variation (click its gear icon here). The controls in a Sound Group are as follows:
Top section
- Master Audio Logo: Notice the Master Audio logo up top in most Inspectors. You can click on it to quickly navigate to the Master Audio game object in the Scene.
- Toolbar: Here there are some buttons that let you preview / stop / pause / unpause the Sound Group. Pause and unpause only appear at runtime.
- Group Master Volume: This allows you to make all clips under this Sound Group quieter without having to go into each Variation (containing an audio file each) and adjust. Its default setting of 1 is full volume. This is the same volume control that shows up on the Group Mixer for each Sound Group row. There's also a mute and solo button to the right of the slider.
-
Spatial Blend Rule: Only visible when Group Spatial Blend Rule in the Group Mixer is set to Allow Different Per Group. There are several choices here:
- Force To 2D: All Audio Sources in the Sound Group will be forced to fully 2D (Spatial Blend: 0).
- Force To 3D: All Audio Sources in the Sound Group will be forced to fully 3D (Spatial Blend: 1).
- Force To Custom: All Audio Sources in the Sound Group will be forced to the Spatial Blend value in the field below.
- Spatial Blend: Only visible when Force To Custom is chosen. Set the Spatial Blend to use on all Variations in this Sound Group with the slider here.
- Use Curve From Audio Source: Keep the curve from all Audio Sources in the Sound Group so any custom rolloff and Spatial Blend curves are left intact.
-
Caller Despawned Mode: This allows you to control what happens to currently playing Audio Clips when the object "making the sound" is despawned or destroyed. There are several options here.
- None: Nothing happens. The sound will play until finished, or will loop indefinitely if you have Loop Clip selected.
- Stop: The sound will instantly stop.
-
Fade Out: (The default uses this and a fade of 0.3 seconds) The sound will fade out over a period of X seconds.
- Fade Out Time: Only appears if Fade Out is selected. Here you specify the fade time.
- Unused Addressable Life (sec): Only appears if you have the Addressable feature enabled from the Welcome Window. This lets you specify to keep the Addressables in your Variations around for an extra X seconds after it's no longer used. The default is 0 seconds. This will avoid having to load it again in that time frame since we cache the loaded Addressables on our side.
- Comments (For You): This field is for your own use, to remind you what the Sound Group's usage or purpose is.
- Ignore Listener Pause: Checking this will allow this Sound Group to still play even if the Audio Listener is paused. Event Sounds has a no-code way to pause and unpause the Listener.
- Use Clip Age Priority: This is the same as the setting of the same name under Advanced Settings, but this is for this Sound Group alone. Turn this on if you wish to periodically update the priority of a 3D sound effect based on its "oldness" as well. Only appears if Use Distance Priority is checked in Advanced Settings.
- Always Highest Priority: Checking this makes the priority of this Sound Group always highest priority (not calculated based on distance or clip age). Only appears if Use Distance Priority is checked in Advanced Settings.
- Use Occlusion: Defaults to off. Only visible if you have enabled occlusion in Advanced Settings and chosen "Turn On Per Group" for Sound Group Usage. This will turn on occlusion for this Sound Group.
- Log Sounds: There is a global Log Sounds checkbox in Advanced Settings, which is the same as checking this one under each Sound Group. You can choose to only log certain Sound Group events using this checkbox instead, if the one in Advanced Settings is unchecked.
Bordered Sections
-
Occlusion: Appears if Occlusion is enabled on the Master Audio Game Object. There are some global Occlusion settings that can be overridden per group.
- Override Ray Cast Offset: Check this box to make the next field appear and override the global setting.
- Ray Cast Origin Offset: Controls how much closer the Ray Cast starts toward the Audio Listener from the Audio Source.
- Override Frequencies: Check this box to make the next field appear and override the global Min / Max Occlusion Cutoff Frequency settings.
- Max Occl. Cutoff Frequency: Same as the global setting, but just for this Sound Group.
- Min Occl. Cutoff Frequency: Same as the global setting, but just for this Sound Group.
-
Variation Sequence: This is the order in which Variations will be played when you repeatedly tell the Sound Group to play. There are two choices.
-
Random: (The default) Variations are played randomly from a pool and refilled after all have been played. This uses true no-repeat, so even when the pool refills it will not play the previous sound again on the next play. Even when using the Random setting, you can have specific Variations play by specifying the Variation name in Event Sounds or API.
- No-Repeat On Refill: Here you can disable No-Repeat optionally. Turned on by default.
- No-Repeat On Refill: Here you can disable No-Repeat optionally. Turned on by default.
-
Top To Bottom: If you choose this, the Variations are played in alphabetical order and the pool refilled after all have been played. If you have chosen this option, additional fields appear with more options.
-
Refill Variation Pool After Inactive Time: If you check this box, the next field will be used to refill the pool after X seconds of not playing a sound from this Group. Only visible if Top To Bottom is chosen.
- Inactive Time (sec): This is how long the pool will wait without any sound being played before it automatically refills the pool (and starts at the top Variation again next time it's played). Note that the time is measure from the time a sound starts to play, not when it ends.
-
Refill Variation Pool After Inactive Time: If you check this box, the next field will be used to refill the pool after X seconds of not playing a sound from this Group. Only visible if Top To Bottom is chosen.
-
Random: (The default) Variations are played randomly from a pool and refilled after all have been played. This uses true no-repeat, so even when the pool refills it will not play the previous sound again on the next play. Even when using the Random setting, you can have specific Variations play by specifying the Variation name in Event Sounds or API.
-
Variation Mode: This establish the use case and function of the Sound Group. Is it for dialog, random ambience, or other? This is the most complex setting and has 3 options, all with different sub-options:
-
Normal: (The default) All Variations can be played simultaneously. There are additional voice and time limiting controls in this mode, described below.
The following additional fields appear only for Normal mode:
-
Retrigger Percentage: This setting will control the percentage of each clip in this Group that must be played before re-using the Variation is allowed. Anything lower than this percentage and the Variation is considered "busy" and cannot be used. 100% is the default (Variation cannot be interrupted). For example: If you set this to 50%, clips can be interrupted if more than 50% of the clip has been played.
-
Limit Polyphony: This is an optional setting to limit the number of simultaneous Variations that can be played in this Sound Group. If you check this setting, the next setting will appear.
- Polyphony Voice Limit: This is only visible and active if Limit Polyphony is checked. This limits the number of simultaneously playing Variations in the Sound Group. i.e. you can set this to 3 even though you have 5 Variations each with a Weight of 2, totalling 10 possible voices. In that case, only 3 can play at the same time.
-
Replay Limit Mode: This can be used to limit the amount of retriggers of this Sound Group, either by time or frames since the last trigger by Master Audio. It has 3 modes:
- None: (The default) Does nothing to limit retriggers.
- Frame Based: This will let you choose the number of frames to wait before retriggering is allowed.
- Time Based: This will let you set the amount of time to wait before retriggering is allowed.
-
Retrigger Percentage: This setting will control the percentage of each clip in this Group that must be played before re-using the Variation is allowed. Anything lower than this percentage and the Variation is considered "busy" and cannot be used. 100% is the default (Variation cannot be interrupted). For example: If you set this to 50%, clips can be interrupted if more than 50% of the clip has been played.
-
Looped Chain: With a looped chain, the Sound Group becomes something of a mini-Playlist. When you play a Variation, and it reaches the end of the clip, another Variation in this Sound Group will be played. It will continue to play Variations until you stop the Sound Group. In this mode, only one Variation can be played at a time. Any attempt to play another Variation during the same time will stop the other chain that's already going so it can safely start a new chain. All Variation clips will automatically turn off their loop setting in this mode. This is useful for ambient sound sequences and other effects. Chained Loops will be played seamlessly with no gap between clips!
-
Loop Mode: How many times should all Variations in the Sound Group be played? This has two choices.
- Endless: (Default) Repeats forever.
-
Number of Loops: This will use the next field to choose the number of loops.
- Number of Loops: Only visible if you chose Number of Loops. Specify the number of times the entire Group shall be played. The Group will stop playing after this number of loops.
- Clip Change Delay Min / Clip Change Delay Max: If you change these to non-zero, they will specify a range of random pausing before each subsequent chained clip is played.
-
Loop Mode: How many times should all Variations in the Sound Group be played? This has two choices.
-
Dialog: This setting will also stop all other Variations in its Sound Group every time you play one (there is a Custom Fade Out Time setting that doesn't get cut off though), but with no other restrictions or side effects. Useful for a single character's dialog, to make sure he never says more than one thing at a time without you having to call
MasterAudio.StopAllOfSound
every time you play something from the Sound Group.- Dialog Custom Fade: Checking box will show and use the next field.
- Custom Fade Out Time: The amount of seconds to fade out a Variation when another Variation is played.
-
Normal: (The default) All Variations can be played simultaneously. There are additional voice and time limiting controls in this mode, described below.
The following additional fields appear only for Normal mode:
-
Linked Group Settings: This lets you set up other sounds to be played whenever this Sound Group starts and/or stops playing, for cool combos. There are 2 sections:
- Groups to play when Variations start play: In this section you can add one or more Sound Groups to play whenever a Variation in this Sound Group starts playing. To prevent an endless loop, when a Group is played as a 'Start' Linked Group from another, none of that Group's 'Start' Linked Groups will be played.
- Linked Groups To Play: If you have more than one 'Start' Linked Group, this dropdown will appear. There are 2 choices:
- All: the default. All 'Start' Linked Groups will play.
- One At Random: One of the 'Start' Linked Groups will be selected at random to play.
- Groups to play when Variations stop: In this section you can add one or more Sound Groups to play whenever a Variation in this Sound Group stops playing. 'Stop' Linked Groups have no restrictions, so you can use this to chain as many Sound Groups together as you like. They will be played seamlessly with no gap between!
- Linked Groups To Play: If you have more than one 'Stop' Linked Group, this dropdown will appear. There are 2 choices:
- All: the default. All 'Stop' Linked Groups will play.
- One At Random: One of the 'Stop' Linked Groups will be selected at random to play.
- Group Played Event: This allows you to fire a Custom Event whenever the Group is played (not when *requested to play*). It has to actually play. This is good for creating complex sound behavior. The game object that listens to that Custom Event may play other Sound Groups or perform other actions.
-
Copy Settings: If you have more than one Variation, you can expand this section to make bulk changes to any number of checked Variations. A real time-saver! The steps are below.
- Check the Bulk Edit checkbox here.
-
A checkbox will appear on all Variations as long as Bulk Edit is checked.
- Check all the Variations you want to make bulk changes to. It's good to click the Collapse All button so you can see them all on one screen. Also use the Check All or Uncheck All buttons in this section if you like.
- Make a change to any field in one of the checked Variations, and all checked Variations will change to the same value. Audio Origin and Audio Clip do not bulk edit because that's not deemed useful.
- Don't forget to uncheck the Bulk Edit checkbox in Copy Settings when you're done doing bulk changes.
-
Actions: Several buttons appear here:
- Expand All / Collapse all: This button text will change depending on how many Variations are collapsed. Click this to collapse or expand all the Variations. This helps if you want to preview or copy to several without scrolling vertically.
- Equalize Voices button ("Eq. Voices"): This will set the Voices of all Variations in this Sound Group to 1 (equal weight). Voices controls how often each Variation will be triggered in relation to the other Variations.
-
Equalize Variation Volumes ("Eq. Volumes"): Clicking this button will mathematically even the volume of all Variations in the Sound Group based on their average volume. It will move the volume sliders of the Variations to do this. No alteration of the Audio Clips themselves is done.
- Localization buttons: All Use Loc. / None Use Loc. This will check or uncheck all "Use Localized Folder" checkboxes for Variations that use Resource Files. Variations that do not will be unaffected.
- Variation Create Mode: This lets you choose between the different Audio Origins, which affect memory usage and latency. Read about the options on that page.
- Yellow Drag Area: Drag Audio Clips here to create new Variations. You drag 1 or more Audio clips into the yellow rectangle to add Variations to the Sound Group. You can click the lock icon at the very top right of the Inspector to enable selection of multiple clips from Project View without losing focus on the Inspector so you can drag in several at once.
Variations Section
Each Variation is displayed in the lower portion of the Sound Group Inspector. Here you can quickly compare and fine tune your Variations without going into each Variation game object. Each one has a row with the following icons and controls:
- Arrow icon: Clicking this will collapse / expand the Variation settings.
- Settings (gear icon): Takes you to the Variation game object in the Hierarchy, so you can tweak additional settings. If you wish to modify the Audio Source itself, this is the place to go. The other settings can be done from the Sound Group's Inspector.
- Clone (copy icon): Click this to create another copy of the Variation in this same Sound Group.
- Preview (speaker icon): This will play the audio of the Variation for preview purposes. Fading and random settings besides volume and pitch are ignored while in edit mode.
- Stop: Stops the audio, whether it triggered from preview or another method.
- Delete button: Deletes the Variation.
- Playing status: A green or red bar appears in the 2nd row (visible in the screen shot at top of this page), indicating whether the Variation is currently playing or idle. This is useful for figuring out which of many Variations is the one playing. This shows even if the Variation is collapsed.
Note: Read about the rest of the settings for each Variation on the page dedicated to them. Although most of those settings appear in the Sound Group Inspector, there is no need to list them twice.