shiftPitch | R Documentation |
Shift the pitch of a sound sample by n semitones. Note that the duration of the resulting sample is not the same as that of the original.
shiftPitch(sample, n)
sample |
Sound sample object. |
n |
numeric, number of semitones. |
A sound sample object.
# Define a A sound sample and get a D by adding 5 semitones
A <- soundSample(sin(2*pi*seq(0,0.5,1/44100)*220)) # 0.5-second A (220 Hz)
D <- shiftPitch(A,5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.