setFrequency()
Set the sample's playback frequency, pitch-shifting it.
audiosample.setFrequency(freq)
Like setPitch(), but finer. This lets the sound land between the standard pitches. For example, frequency 440 Hz is the same as pitch A4.
Parameters
audiosample.setFrequency(freq, voice=0)
| Parameter | Type | Default | Description |
|---|---|---|---|
freq |
int or float |
required | The new playback frequency, in hertz (8.17 to 12600.0). |
voice |
int |
0 |
Which voice to set, from 0 to one less than the number of voices. |