InAudio Documentation

Advanced Audio Plugin for Unity

User Tools

Site Tools


audio

Audio

Overview

To open the audio creation window, Window/InAudio/Audio Window in Unity (or press alt+shift+1). The window mimics the Unity project and scene hierarchy.

Audio creation in InAudio is only the first step. It is not played by itself, but played and stopped via events. To see how to create events, see the Event page or the Quickstart.

The audio design is hierarchical where every parent affects all of its children. For instance if you create random footstep with a small variance in volume, each of the possible footstep clips will be played with this slight volume variation.

Played audio is always controlled by a game object, usually the one creating the sound.

Seamless playblack

All audio playback is sample accurate. Both looping and sequences, no matter if they are nested in other nodes or not, is sample accurate resulting in seamless lopping if Unity supports it.

Creating

The below picture shows the two parts of the audio creation window.

  1. Shows the audio hierarchy
  2. Shows the selected “Hello” nodes settings

Creating audio is easy, all you need to do is drag a audio clip on any node (except audio nodes). Multiple audio clips can be added at the same time if more than one is selected.

And Power Pick Up now has its own node with the clip attached.


The other way is to right click on a node and use the context menu. The different options are

  • Duplicate - Duplicates the entire hierarchy from this node and its children
  • Create Child - Creates a child node of the ones described in this document.
  • Add Parent - Adds a parent node to this. Does not change any reference to the node.
  • Convert To - Change a node between the different types if possible.
  • Delete - Deletes the node and all children. Any references to this node will now be missing the reference.

Node Types

Common

Some settings are common to all nodes like the name and ID. In addition does the nodes in the audio window, except folders, share a lot of settings as pictured below. From top-to-bottom, the items are

  • Name - Used only to name thing, the name is not unique nor an id of any sorts.
  • ID - The unique ID number of this node, cannot be changed.
  • Volume - Volume as you know it from Unity. Enabling random volume will select a random volume every time the node is played.
  • Pitch - Pitch as in Unity. Cannot be negative.
  • Spatial Blend - 2D or 3D. Defaults to 3D sound.
  • Delay - How many seconds the audio should be delayed before played. No maximum limit.
  • Audio Mixer - The mixer used for this and every child node, unless overriden.
    • Override Parent Audio Mixer - Should this node override the mixer used?
  • Loop - Should the audio loop?
    • Loop Infinite - If it should loop forever. Can be stopped or break the loop with an event.
    • Loop Count - How many times it should loop if it does not loop forever.
  • Limit Instances - Set a limit to the number of concurrent plays of this node
    • Max Instance Count - The max number of concurrent nodes
    • Stealing Type - If the limit is reached, what should happen?
      • No Stealing - The node trying to be played will not be played
      • Oldest - The oldest instance of this node playing will stopped and replaced.
      • Newest - The newest instance of this node playing will stopped and replaced.
  • Priority - The priority of the sound. See Unity Audio Source Priority
  • Sample offset - The amount of samples to offset this clip with. Inherits, but does not roll over to next clip.

Attenuation is the Unity roll-off settings. It defaults to the same settings as an audio source would.

Audio

The audio node the one that specifies an audio clip should be played. Just drag an audio clip on the field below the Name and everything works.

Random

Random will choose a random one of its children and play that one. In the hierarchy its three children is showed in the first picture and the respective weights on the next picture.

The Do Not Repeat Last # option will avoid selecting the last # number of nodes.

The weight is between 0-100 for each and the higher the number compared to the other nodes, the more likely it is to be played.

In this case all three nodes are equally like to be played. If the weight instead was 100, 50 and 50 the first node in average play twice as often as the other two. If the weight is zero a node is never played.

Sequence

The sequence node plays its children in sequence of each other. In the example shown it will play a short sequence of someone ringing the doorball, the door is opened and hello is said.

Multi

Multi is different from the other nodes as it played all children simultaneously.

In this example a footstep is played alongside with a creak which could be used to add variety to a footstep cycle.

Folder

Folders behave as a regular folder would. It cannot be played nor be parented under a non-folder.

  1. The bank that is used for all audio nodes in the folder. As with buses, it does not override the parent, so it will show which bank is used.
  2. The Audio Mixer used. This will affect all nodes in the folder.
  3. “Find” button will open the respective windows the bank or bus and filter the list to that single bank.
  4. Drag a new bank or bus to override the current
  5. “Node Bank” shows which bank it will use if it overrides the parent.

audio.txt · Last modified: 2015/03/28 23:10 by peterolsted