Method | Description | |
---|---|---|
Awake ( ) : void | ||
BeginProceduralSound ( IProceduralSoundWave waveGen, float frequency, float duration, float volume = 1f ) : bool |
Begin a single note from a ProceduralSoundWave reference sample. You can pass in a frequency and it will "stretch" the reference sample to make it fit the given frequency.
|
|
BeginProceduralSound ( float frequency, float duration, float volume = 1f ) : bool |
Begin a single note. You can pass in a frequency and it will "stretch" the reference sample to make it fit the given frequency.
|
|
ChangeFrequency ( float newFrequency ) : void |
Change the frequency of the note in mid-note (for slide effects).
|
|
SetWave ( IProceduralSoundWave waveGen ) : void | ||
Stop ( ) : void | ||
Update ( ) : void |
Maintains the volume level in accordance to the ADSR envelope rules, and the note's holding duration.
|
Method | Description | |
---|---|---|
InitNote ( ) : void |
Called whenever a new note starts, to get the AudioSource and ProceduralSoundWave to use the note's values, and then start the note.
|
public BeginProceduralSound ( IProceduralSoundWave waveGen, float frequency, float duration, float volume = 1f ) : bool | ||
waveGen | IProceduralSoundWave | a procedural sound wave loaded and prepped ahead of time |
frequency | float | the note, expressed in Hertz (not musical scales) |
duration | float | the note's duration, in seconds. |
volume | float | the note's volume, from 0.0 up to 1.0 |
return | bool |
public BeginProceduralSound ( float frequency, float duration, float volume = 1f ) : bool | ||
frequency | float | the note, expressed in Hertz (not musical scales) |
duration | float | the note's duration, in seconds. |
volume | float | the note's volume, from 0.0 up to 1.0 |
return | bool |
public ChangeFrequency ( float newFrequency ) : void | ||
newFrequency | float | |
return | void |
public SetWave ( IProceduralSoundWave waveGen ) : void | ||
waveGen | IProceduralSoundWave | |
return | void |