Components

Fabric components are the building blocks that allow you to create sophisticated audio designs using any combination of the following available components:

Fabric provides a menu option that allows to automatically create a new component node in the Fabric hiearchy saving time.

Component Menu Bar

Every component comes with a menu bar that provides a number of options,

Component Menu Bar

Every component comes with a menu bar that provides a number of options,

  • Save: Will export the component node into an XML file
  • Load: Will load an XML file on top of the component or underneath into a new child
  • ?     : Opens a URL link to the online manual for the selected component
  • >>   : Opens a pull down menu with a number of options:

Component Properties

All components come with a custom inspector UI that allows modifying their properties according to their position in the hierarchy.

A component displays different properties according to their position in the hierarchy or if they have a listener attached.

The node info provides an overview of the component internal state and properties such as: the number of instances used/exist, volume and pitch with their randomisation offsets as well as CPU current/max usage.

Component Properties

Top Node

All components that are just below the FabricManager are “top nodes” so they don’t provide any override options.

Top Node

Child Node

When a component is located as a child of another component it allows to override most of the parent properties.

Child Node

Propagation of component properties

All of the component properties are propagated through their hierarchy and are either added or multiplied with their parent properties. However, it is possible to override some of the parent properties and use their own values instead. 

Max Instance

Any component that has an event listener attached will allow to set the number of maximum instances that can be played along with the priority and stealing behaviour that will be used if all instances are playing and a play sound event has been requested.

 

Properties

Description

Enable Virtualization

When enabled the component will keep track all events with an EventAction.Play and start/stop them according to their distance from the listener and the max distance property

Max Instances

Number of maximum instances that can be played. Note: Only used when the component has an Event Listener attached to it and therefore can be triggered.

AllowMultiObjectInst

Allows to play multiple instances (if max instances>1) on the same game object. Any event action will affect all instances at the same time.

Priority

Determines how important this component is.

Stealing

Stealing behaviour when max instances is reached:

  • Oldest
  • Newest
  • Farthest
  • None

Virtualization

The virtualization option allows the component to store all the PlaySound event requests and track their distance from the listener. When an event is within the max distance property the component will allocate and play an instance. If the event moves outside the max distance value it will stop playing it release the instance but keep tracking it. The event will be released when an EventAction.StopSound has been received. This is a great method to start a large number of ambient sources (i.e. torches, forests, birds) each having their own unique audio position but only use a small number of audio resources.

The component virtualization allows you to define different types of behaviors such as:

- Resume: When the component turns virtual the position of the audio components are paused and then resumed when they turned physical

- Play From Start: All audio components will start from the beginning when they become physical

- Play From Elapsed Time: In this behavior Fabric tracks the time of the audio components whilst they are virtual and sets them at the elapsed time when they turn physical again.

Virtualization

AudioMixer Group (Unity 5 only)

The component allows you to set the audio mixer group that all the audio sources in the hierarchy will be routed through.  

Audio Bus

To assign a bus into a component just select the name of the bus from the drop down menu in the component inspector,

Audio Bus

Fade Properties

The fade properties are only used when the component is played either through the event system or as part of a child component (i.e. sequence, switch etc).

Properties

Description

FadeInTime

Sets the fade in time of this node

FadeInCurve

Sets the fade in curve type ( 0.5 = linear, log < 0.5 > Exp

FadeOutTime

Sets the fade out time of this node

FadeOutCurve

Sets the fade out curve type ( 0.5 = linear, log < 0.5 > Exp

Volume / Pitch properties

The component volume and pitch properties by default are always multiplied with its parent volume and pitch properties unless the override tick box is selected which then uses the node’s properties.

Properties

Description

Override Parent Volume

Overrides the parent volume.

Volume

Volume of the component multiplied with its parent volume.

Volume Randomization

Amount of volume randomization to be added.

Override Parent Pitch

Overrides the parent pitch. (If not top node)

Pitch

Pitch value of the component multiplied with its parent pitch.

Pitch Randomization

Amount of pitch randomization to be added.

3D/2D Properties

The default behaviour of these properties is to passed down from their parent unmodified. When the override tick box is selected for either property then they become the properties that are going to be propagated down the hierarchy.

Properties

Description

Override 2D Properties

Override parent 2D properties. (If not top node)

Pan Stereo

Sets a channel pan position linearly. Only works on 2D clips.

Pan Stereo Rand

Amount of pan randomization. Only works on 2D clips

Override 3D Properties

Override parent 3D properties. (If not top node)

Spatial Blend (2D/3D)

Sets how much the 3D engine has an effect on the component.

Spread Level

Sets the spread angle a 3D stereo or multichannel sound.

NOTE: In Unity 5.0 when the value is 0 the sound is fully 2D

Doppler Level

Sets the Doppler level of the component.

Min Distance

Min audible distance.

Max Distance

Max audible distance.

Rolloff Mode

Determines how fast the sounds fades over distance:

  • Logarithmic
  • Linear
  • Custom

Import Selected Audio Clips

Fabric provides a method to quickly import a selection of audio clips as audio components or dialog audio components. This is particularly useful when it is necessary to import a large number of audio such as dialog files into a random component etc.

Import Selected Audio Clips

In order to import multiple audio clips first the inspector UI needs to be locked by pressing the small lock icon located on the top right hand corner (red circle).

 

This allows the selection of multiple audio clips without the inspector view loosing focus.

The audio clips are selected in the project tab view can be simply dragged and dropped in the drop box area and for each clip an audio component will be created according to the type selected.