Description Usage Arguments Details Value
Wrapper to seewave::synth() function to produce a pure sine-wave tone. Additional parameters available for different wave forms, soon to be implemented.
1  | tone(midi, rhythm, harmonics = 1, n = 4, bpm = 120, sampleRate = 48000)
 | 
midi | 
 the midi note number for the tone to produce  | 
rhythm | 
 the duration of the note in fractions of a measure  | 
harmonics | 
 the amplitude of the harmonics  | 
n | 
 number of beats in a measure  | 
bpm | 
 the beats per minute  | 
sampleRate | 
 the sample rate of the device typically windows is 48000 and mac osX is 44100  | 
The rhythms are converted to seconds via the number of beats per measure and bpm. Midi notes in 0-127 are converted to frequencies in Hertz. The harmonics may either be a vector with leading component unity followed by amplitudes in the interval (0,1) or simply the number one.
numeric vector
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.