playChord {music} | R Documentation |
Play Chord
Description
Play Chord
Usage
playChord(
chord,
type = c("harmonic", "ascending", "descending"),
oscillator = "sine",
duration = 1,
sample.rate = 44100,
attack.time = 50,
inner.release.time = 50,
A4 = 440,
plot = FALSE,
...
)
Arguments
chord |
String, vector: Notes making up chord. e.g. c("A4", "C5", "E5"). e.g. output of buildChord |
type |
String: "harmonic", "ascending", "descending". Default = "harmonic" |
oscillator |
String: "sine", "square", "saw". Default = "sine" |
duration |
Float: Note duration in beats. Default = 1 |
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 chord using cplot.piano |
... |
Additional arguments to pass to note2freq |
Value
The constructed waveform (invisibly)
Author(s)
E.D. Gennatas
Examples
## Not run:
playChord(buildChord("E4", "minor"))
## End(Not run)
[Package music version 0.1.2 Index]