Wave object of special waveform such as
silcence, (white/pink) noise, sawtooth, sine, and square.noise(kind = c("white", "pink"), duration = samp.rate,
samp.rate = 44100, bit = 1, stereo = FALSE,
xunit = c("samples", "time"), ...)
sawtooth(freq, duration = samp.rate, from = 0, samp.rate = 44100, bit = 1,
stereo = FALSE, xunit = c("samples", "time"), reverse = FALSE, ...)
silence(duration = samp.rate, from = 0, samp.rate = 44100, bit = 1,
stereo = FALSE, xunit = c("samples", "time"), ...)
sine(freq, duration = samp.rate, from = 0, samp.rate = 44100, bit = 1,
stereo = FALSE, xunit = c("samples", "time"), ...)
square(freq, duration = samp.rate, from = 0, samp.rate = 44100, bit = 1,
stereo = FALSE, xunit = c("samples", "time"), up = 0.5, ...)Wave in xunit.Wave in xunit.Wave.Wave and rescaling unit. This may be
1 (default) for rescaling to real values in [-1,1],
8 (i.e. 8-bit) for rescaling to integers in [0, 254],
16 (i.e. 16-bit) for rescaling to integersTRUE, a stereo sample will be generated.
The right channel is identical to the left one for sawtooth, silence,
sine, and square. For noise, both channel arduration and from).
If xunit = "time", the unit is time in seconds, otherwise the number of samples.TRUE, the waveform will be mirrored vertically.Wave through the internal function postWaveform.Wave object.Wave, normalize, noSilenceWobj <- sine(440, bit = 16, duration = 1000)
Wobj2 <- noise(bit = 16, duration = 1000)
plot(Wobj)
plot(Wobj2)Run the code above in your browser using DataLab