Skip to content

Frequency to MIDI

Description

Converts MIDI note values to Frequency values in Hz.

(freq-to-midi ... )

Lisp Syntax and Default Values

The (freq-to-midi ... ) function can be created using the following Lisp syntax:

(freq-to-midi value)

Parameters

The (freq-to-midi ... ) function takes one argument:

  • value: a numerical value to convert from a Frequency in Hertz to a MIDI note value

The numerical value returned may be a floating-point MIDI value. It is up to you to truncate or round the value as necessary.

Discussion

The (freq-to-midi ... ) function is a handy built-in tool to convert from Frequency values in Hertz to MIDI note values (linear octaves, log frequency).

Options

There are no special options for this function.