Functions

atodb(amplitude) convert amplitude (0..1) to decibels:
dbtoa(db) convert amplitude (0..1) to decibels:
ftom(frequency) convert frequency to MIDI note number
mtof(notenumber) convert MIDI note number to frequency
ntom(n) convert note name to note number (chroma)

Functions

atodb(amplitude)

convert amplitude (0..1) to decibels:

Parameters:

amplitude (0..1)

Return:

  • decibels
dbtoa(db)

convert amplitude (0..1) to decibels:

Parameters:

db decibels

Return:

  • amplitude (0..1)
ftom(frequency)

note: assumes middle A4 is freq 440Hz and MIDI note 69

Parameters:

frequency in Hertz

Return:

  • notenumber MIDI note number
mtof(notenumber)

note: assumes middle A4 is freq 440Hz and MIDI note 69

Parameters:

notenumber MIDI note number

Return:

  • frequency in Hertz
ntom(n)

Valid names: C, C#, c, c#, etc.

Parameters:

n note number

Return:

  • note name