library(soundgen) library(seewave) s1 = soundgen( sylLen = 315, pitch = c(350, 320), rolloff = c(-7, -5), jitterDep = c(0, .3, .6), temperature = 0.05, formants = list( f1 = c(850, 700, 850), f2 = c(1700, 1000, 1300), f3 = c(2400, 3100), f4 = 3800, f5 = 5000, f6 = 5700, f7 = 6500 ), noise = data.frame(time = c(0, 200, 370), value = c(-40, -30, -25)), attackLen = c(20, 50), addSilence = 0, samplingRate = 22050, pitchSamplingRate = 22050, play = T, plot = T, osc = T, ylim = c(0, 8) ) s2 = soundgen( sylLen = 1000, pitch = data.frame(time = c(0, .1, 1), value = c(500, 970, 770)), vibratoDep = .5, ampl = data.frame(time = c(0, .1, 1), value = c(-30, 0, -60)), rolloff = -25, subFreq = 230, subDep = 100, subWidth = 150, jitterDep = 1, shimmerDep = 20, formants = c(850, 1400, 2300, 3200), mouth = c(.4, .55), noise = c(-10, -30, -50), formantsNoise = c(1000, 1300, 3200, 4000, 5000, 6000, 7000, 8000), rolloffNoise = 0, addSilence = 0, samplingRate = 22050, pitchSamplingRate = 22050, play = T, plot = T, osc = T, ylim = c(0, 8) ) s3 = soundgen( nSyl = 4, sylLen = 120, pauseLen = 120, pitch = data.frame(time = c(0, .2, .3, .31, 1), value = c(330, 510, 470, 350, 320)), vibratoFreq = 9, vibratoDep = 1, amplGlobal = c(0, -10), pitchGlobal = c(0, -3), rolloff = -10, temperature = 0.05, formants = c(900, 1350, 3000, 4100, 4900), mouth = c(.4, .6), noise = data.frame(time = c(0, 15, 30, 120, 140), value = c(-30, -20, -30, -20, -30) + 10), formantsNoise = c(1000, 1300, 3200, 4000, 5000, 6000, 7000, 8000), rolloffNoise = 0, addSilence = 0, samplingRate = 22050, pitchSamplingRate = 22050, play = T, plot = T, osc = T, ylim = c(0, 8) ) s = addVectors(s1, s2 / 5, insertionPoint = length(s1) - 22050 * 0.15) s = addVectors(s, s3, insertionPoint = length(s1) + 22050 * .14) playme(s, 22050) savewav(s, f = 22050, filename = 'laugh_316_soundgen.wav')