playNote | R Documentation |
Play Note
playNote( note, oscillator = "sine", duration = rep(1, length(note)), BPM = 120, sample.rate = 44100, attack.time = 50, inner.release.time = 50, A4 = 440, plot = FALSE, ... )
note |
String, Vector: Note(s) to be played, e.g. c("Ab4", "B4") |
oscillator |
String: "sine", "square", "saw". Default = "sine" |
duration |
Float: Note duration in beats. Default = 1 |
BPM |
Integer: Beats per minute. Default = 120 |
sample.rate |
Integer: Sample rate. Default = 44100 |
attack.time |
Integer: Attack time. Default = 50 (Helps prevent popping) |
inner.release.time |
Integer: Release time, that ends on note OFF (instead of beginning at note OFF). Default = 50 (Also helps prevent popping) |
A4 |
Float: Frequency for A4 in Hz. Default = 440 |
plot |
Logical: If TRUE, plot notes using cplot.piano. This support only two octaves; do not try plotting if your notes span more than two octaves. |
... |
Additional arguments to pass to note2freq |
E.D. Gennatas
## Not run: playNote("B4") ## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.