setPitch()
Set the sample's playback pitch, pitch-shifting it from its base pitch.
audiosample.setPitch(pitch)
Parameters
audiosample.setPitch(pitch, voice=0)
| Parameter | Type | Default | Description |
|---|---|---|---|
pitch |
int or float |
required | The new playback pitch, as a MIDI pitch from 0 to 127. |
voice |
int |
0 |
Which voice to set, from 0 to one less than the number of voices. |