View source: R/class_soundSample.R
soundSample | R Documentation |
Creates a new instance of a 'soundSample' object. A sound sample can be viewed as a minimalistic version of an "audio wave" object (see package tuneR for instance). It is necessarily mono and the wave time series is normalized between -1 and 1.
soundSample(wave, rate = 44100)
wave |
Numeric vector, wave time series |
rate |
Numeric, sampling rate (default 44100 Hz) |
An object of class 'soundSample'.
sam <- soundSample(sin(2*pi*seq(0,1,,44100)*440)) # 1-second A (440 Hz)
sam <- soundSample(sin(2*pi*seq(0,1,,44100)*440)+0.1*rnorm(44100)) # 1-second noisy A
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.