The
Sampler is a type of instrument that has a collection of audio samples to play and will play them at different rates to change the pitch for different notes. A list of keyzones define what samples play when what notes are hit.
More...
|
List< Keyzone > | keyzones = new List<Keyzone>() { new Keyzone() } |
| List of all the keyzones in the sampler. More...
|
|
float | velocityTracking = 1.0f |
| How much the velocity of a note on event affects the volume of the samples. 0.0 for no effect and 1.0 for full effect. More...
|
|
int | numVoices = 8 |
| Total number of concurrently playing sounds from this Sampler (polyphony). Increase this if your voices are cutting out from new voices coming in. More...
|
|
|
bool | useNoteOff [get, set] |
| Does a voice silence when it gets a note off event? More...
|
|
The Sampler is a type of instrument that has a collection of audio samples to play and will play them at different rates to change the pitch for different notes. A list of keyzones define what samples play when what notes are hit.
◆ AddKeyzone()
Keyzone AudioHelm.Sampler.AddKeyzone |
( |
| ) |
|
Adds an empty keyzone to the Sampler.
- Returns
- The keyzone created.
◆ AllNotesOff()
void AudioHelm.Sampler.AllNotesOff |
( |
| ) |
|
◆ GetMaxKey()
int AudioHelm.Sampler.GetMaxKey |
( |
| ) |
|
Gets the highest midi key that the sampler responds to.
- Returns
- The highest valid midi key.
◆ GetMinKey()
int AudioHelm.Sampler.GetMinKey |
( |
| ) |
|
Gets the lowest midi key that the sampler responds to.
- Returns
- The lowest valid midi key.
◆ NoteOff()
void AudioHelm.Sampler.NoteOff |
( |
int |
note | ) |
|
◆ NoteOn()
void AudioHelm.Sampler.NoteOn |
( |
int |
note, |
|
|
float |
velocity = 1.0f |
|
) |
| |
Triggers a note on event for the Sampler. If the AudioSource is set to loop, you must trigger a note off event later for this note by calling NoteOff.
- Parameters
-
note | The MIDI keyboard note to play. [0, 127] |
velocity | How hard you hit the key. [0.0, 1.0] |
Implements AudioHelm.NoteHandler.
◆ NoteOnScheduled()
void AudioHelm.Sampler.NoteOnScheduled |
( |
int |
note, |
|
|
float |
velocity, |
|
|
double |
timeToStart, |
|
|
double |
timeToEnd |
|
) |
| |
Triggers a note on event for the Sampler at the givent time and turns it off at the given time.
- Parameters
-
note | The MIDI keyboard note to play. [0, 127] |
velocity | How hard you hit the key. [0.0, 1.0] |
timeToStart | DSP time to start the note. |
timeToEnd | DSP time to end the note. |
◆ RemoveKeyzone()
int AudioHelm.Sampler.RemoveKeyzone |
( |
Keyzone |
keyzone | ) |
|
Removes a keyzone from the Sampler.
- Returns
- The removed keyzones index. -1 if it doesnt exist.
- Parameters
-
keyzone | The keyzone to remove. |
◆ keyzones
List of all the keyzones in the sampler.
◆ numVoices
int AudioHelm.Sampler.numVoices = 8 |
Total number of concurrently playing sounds from this Sampler (polyphony). Increase this if your voices are cutting out from new voices coming in.
◆ velocityTracking
float AudioHelm.Sampler.velocityTracking = 1.0f |
How much the velocity of a note on event affects the volume of the samples. 0.0 for no effect and 1.0 for full effect.
◆ useNoteOff
bool AudioHelm.Sampler.useNoteOff |
|
getset |
Does a voice silence when it gets a note off event?
The documentation for this class was generated from the following file:
- AudioHelm/Scripts/Sampler.cs