public class : MonoBehaviour
The Audio controller for in-game sounds.
public static MAudio
AudioInstance
A unique reference to the only Audio object in the scene.
public MSound[]
Sounds
Every sound that this Audio object will control.
public virtual void
Summary:
Populates the Sounds array to match the settings.
Remarks:
If a duplicate name is detected, a failure will occur. In this case, check the names of the MSounds array.
Params:
Sounds:
The sounds to initialise into the game.
public void
Summary:
Plays the sound named Name.
Params:
Name:
The name of the requested sound to play.
public void
Summary:
Plays the sound named Name from Emitter.
Remarks:
An AudioSource component will be added to Emitter. The clip will inherit settings from the MSound named Name.
Params:
Name:
The name of the requested sound to play from Emitter.
Emitter:
The GameObject playing the sound.
public bool
Summary:
Plays the sound named Name from Emitter.
Remarks:
An AudioSource component will be added to Emitter. The clip will inherit settings from the MSound named Name.
Params:
Name:
The name of the requested sound to play from Emitter.
Emitter:
The GameObject playing the sound.
EmitterSource:
The AudioSource that was added to Emitter.
Returns:
If the sound could be played.
public void
Summary:
Plays the sound named Name from Emitter.
Remarks:
An AudioSource component will be added to Emitter.
Params:
Name:
The name of the requested sound to play from Emitter.
Emitter:
The GameObject playing the sound.
OverrideVolume:
The volume to use, instead of the volume setting defined in AudioInstance.
OverridePitch:
The pitch to use, instead of the pitch setting defined in AudioInstance.
OverrideLoop:
Should this sound loop?
public void
Summary:
Pauses the sound named Name.
Params:
Name:
The name of the requested sound to pause.
public MArray<MSound>
Summary:
Pauses every sound that is playing in the game.
Returns:
An MArray of all sounds that were previously playing and affected by the pause.
public void
Summary:
Stops the sound named Name.
Params:
Name:
The name of the requested sound to stop playing.
public void
Summary:
Stop every sound in the game.
public bool
Summary:
Returns a sound in the Sounds array.
Params:
Name:
The name of the requested sound.
MSound:
The out MSound parameter for the sound named Name, if found, null otherwise.
Returns:
The MSound of the requested sound. Null if Name could not be found.
public bool
Summary:
Whether or not sound of name n is playing.
Params:
Name:
The name of the sound to query.
[Serializable] public class
The settings for audio.
public AudioClip
Clip
The source of this sound.
public string
Name
The name of this sound.
[Range(0, 1)] public float
Volume
Sound settings.
[Range(0, 1)] public float
Pitch
Sound settings.
public bool
bLoop
Should this sound loop?
public bool
bPlayOnAwake
Should this audio clip automatically play on awake?
public bool
bMute
Should this audio clip mute?
public static class
Notes on a standard piano from Octaves 0 - 8.
public struct
A Note on a standard piano.
public byte
MIDI
MIDI Number.
public string
NoteName
The name of this Note.
public float
FrequencyHz
The frequency of this Note in Hertz.
public float
PeriodMS
The period of this Note in milliseconds.
[RequireComponent<AudioSource>] public class : MonoBehaviour
An audio synthesiser.
[SerializeField] float
Gain
The volume of this Synthesiser
[SerializeField] ESampleRate
SampleRate
The Sample Frequency in System Sample Rate. (Default is 48,000)
public IEnumerator
Summary:
Play Notes from Starting Note.
Params:
StartingNote:
The Note to begin with in Notes. Default is zero.
Returns:
The IEnumerator that plays the Notes.
[Serializable] public struct
The frequency and duration of a synthesised sound.
public float
Frequency
The frequency in Hertz of this key.
public float
Duration
The time this key will play in seconds.
Summary:
Makes a Key out of a Note.
Params:
Note:
The Note on a piano.
Duration:
The time this key will play.
Summary:
Makes a Key out of a frequency in Hertz.
Params:
Frequency:
The frequency in Hertz of this Key.
Duration:
The time this frequency will play.
public enum : int
SR_24K
24KHz Sample Rate.
SR_48K
48KHz Sample Rate.
SR_96K
96KHz Sample Rate.
public class
A Sound Visualiser.
public int
Samples
The number of samples in the audio clip.
public AudioSource
Source
The source of the sound.
public EComponentAxis
PositiveVisualiserAxis
How to visualise the sound in Visualiser.
Summary:
Constructs a new Audio Visualiser.
Params:
Source:
The source of the sound to visualise.
Samples:
The number of samples to visualise.
PositiveVisualiserAxis:
Defines axis/es the visualisation is displayed. This takes affect only when Analysed using an MVector[] or a LineRenderer.
public VisualInformation
Summary:
Visualises sound emitted by an AudioSource.
Returns:
VisualInformation. Notably, decibels and pitch of the analysed sound.
public VisualInformation
Summary:
Visualises sound emitted by an AudioSource.
Params:
Visualiser:
The sound visualiser displayed as an array of MVectors. Where left indices are low frequencies and right indices are high.
Returns:
VisualInformation. Notably, decibels and pitch of the analysed sound.
public VisualInformation
Summary:
Visualises sound emitted by an AudioSource using a LineRenderer.
Remarks:
Uses decibels to visualise.
Params:
LineRenderer:
The LineRenderer to display the visualisation of the AudioSource.
Modifier:
The height multiplier for the LineRenderer. Negative points downwards.
Smooth:
The inverse interpolation strength for the LineRenderer as sounds change.
MaxHeight:
The maximum height that can be displayed with the LineRenderer.
DeltaTime:
Time.deltaTime. For interpolating the LineRenderer as sounds change.
Returns:
VisualInformation. Notably, decibels and pitch of the analysed sound.
public struct
Visualiser information for a analysed sound.
public float
RootMeanSquare
public float
Decibels
public float
Pitch