# an example of pitch vibrato using ideas from class.
library(tuneR) # need to like with the sound library
f = 440 # our base frequency
sr = 16000 # sampling rate
bits = 16 # bit depth
T = 5 # length of note
v = 5 # rate of vibrato
df = 5 # vib width in Hz
t = seq(0,T,1/sr) # the time points we create samples for
y = sin(2*pi*f*t + (df/v)*cos(2*pi*v*t))
u = Wave(round(2^(bits-5)*y), samp.rate = sr, bit=16) # make wave struct
play(u,"play") # play it