powered by
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)
A sound sample object.
Sound sample object.
numeric, number of semitones.
# 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)
Run the code above in your browser using DataLab