Reference midiToFreq()

midiToFreq()

Returns the frequency value of a MIDI note value. General MIDI treats notes as integers where middle C is 60, C# is 61, D is 62 etc. Useful for generating musical frequencies with oscillators.

Examples

Syntax

midiToFreq(midiNote)

Parameters

midiNote
Number:

The number of a MIDI note

Returns

Number: Frequency value of the given MIDI note
Notice any errors or typos? Please let us know. Please feel free to edit lib/addons/p5.sound.js and open a pull request!

Related References