shiftPitch: Pitch shifter

View source: R/effects.R

shiftPitchR Documentation

Pitch shifter

Description

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.

Usage

shiftPitch(sample, n)

Arguments

sample

Sound sample object.

n

numeric, number of semitones.

Value

A sound sample object.

Examples

# 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)

benRenard/sequenceR documentation built on Jan. 11, 2025, 2:33 a.m.