powered by
Play frequency
playFreq( frequency, oscillator = "sine", duration = rep(1, length(frequency)), BPM = 120, sample.rate = 44100, attack.time = 50, inner.release.time = 50, plot = FALSE )
Numeric, Vector: Frequency / frequencies to play
String: "sine", "square", "saw". Default = "sine"
Float: Note duration in beats. Default = 1
Integer: Beats per minute. Default = 120
Integer: Sample rate. Default = 44100
Integer: Attack time. Default = 50 (Helps prevent popping)
Integer: Release time, that ends on note OFF (instead of beginning at note OFF). Default = 50 (Also helps prevent popping)
Logical: If TRUE, plot waveform
E.D. Gennatas
if (FALSE) { playFreq(440) }
Run the code above in your browser using DataLab