tone: Produce a synthesized sound

Description Usage Arguments Details Value

View source: R/tone.R

Description

Wrapper to seewave::synth() function to produce a pure sine-wave tone. Additional parameters available for different wave forms, soon to be implemented.

Usage

1
tone(midi, rhythm, harmonics = 1, n = 4, bpm = 120, sampleRate = 48000)

Arguments

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

Details

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.

Value

numeric vector


shill1729/synthesizer documentation built on July 9, 2020, 12:52 a.m.