tones: Synthesize a melody or chord given a sequence of midi notes...

Description Usage Arguments Details Value

View source: R/tones.R

Description

Synthesizes many sounds and strings them together for a melody or combine them for a chord

Usage

1
2
3
4
5
6
7
8
9
tones(
  midi,
  rhythms,
  harmonics = c(1, 0.5, 0.25),
  type = "melody",
  n = 4,
  bpm = 120,
  sampleRate = 48000
)

Arguments

midi

vector of midi notes in 0-127

rhythms

vector of rhythms in fractions of a measure, can be a constant rhythm

harmonics

vector of harmonics or list of vectors of harmonics (of possibly different lengths)

type

melody or chord

n

number of beats in a measure

bpm

the beats per minute

sampleRate

the sample rate of the device

Details

Harmonics may either be a single vector or a list of vectors of different lengths. The first entry must be unity and the rest must be in the unit interval.

Value

vector


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