oscillator_pattern | R Documentation |
Creates a soundSample by repeating a user-provided pattern.
oscillator_pattern(pattern, freq = 440, duration = 1, rate = 44100)
pattern |
Numeric vector, pattern. |
freq |
Numeric, note frequency in Hz |
duration |
Numeric, note duration in second |
rate |
Numeric, sampling rate in Hz |
An object of class 'soundSample'.
sam <- oscillator_pattern(pattern=airquality$Ozone,freq=110,duration=0.1)
plot(sam)
## Not run:
# This line of code is wrapped in \dontrun{} since it relies
# on an external audio player to listen to the audio sample.
# See ?tuneR::setWavPlayer for setting a default player.
listen(sam)
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.