MIDI Keyboard Node

Listens to an external MIDI keyboard and outputs a live Melody with notes generated from each keypress. This Node can also be used with a standard computer keyboard (see the Virtual Keyboard section of this documentation).

You can connect to a synthesizer Node (such as the Melodic Oscillator Node) to produce audio, connect to a Piano Roll Node to record, or connect to a MIDI Monitor Node to display the currently pressed note(s).

Settings

DeviceSets the MIDI device to use, or a virtual keyboard controlled by a standard computer keyboard.
Buffer durationAdds an artificial delay to notes, in milliseconds. Larger values can eliminate rhythmic inaccuracies if your machine can’t keep up with processing audio, but will introduce a constant delay.

Outputs

MelodyThe live Melody from the selected device.

Virtual keyboard

If no external MIDI hardware is available, a standard computer keyboard can be used instead. This has a fixed layout resembling that of a MIDI keyboard:

Keyboard keyPitch interpretation
AC
WC#
SD
ED#
DE
FF
TF#
GG
Y (Z on qwertz)G#
HA
UA#
JB
KC (one octave up)

Additionally, the following command keys are supported by the virtual keyboard:

Keyboard keyCommand
XOctave up
Z (Y on qwertz)Octave down
VIncrease keypress velocity by 0.1
CDecrease keypress velocity by 0.1

Recording

To record keyboard play, a Piano Roll Node can be used. See its documentation for more information.

Technical details

Many MIDI keyboards use the same MIDI message for key-press and key-release. AudioNodes keeps track of which keys are pressed and releases them accordingly, effectively implementing a “key-toggle” system. Occasionally it may happen (often due to a non-fatal hardware fault) that a corresponding key-release message fails to reach AudioNodes and a note gets “stuck”. When this happens, the Unstuck button can be used to release all keys (make sure all keys are released before using it for correct results).

Remarks

Melody preprocessing

Keyboard play can also be run through Melody preprocessing. For example, a Component Extension Node can be used to convert single notes to chords.

Additional controls

MIDI Keyboards often have a “Pitch Bend” and a “Modulate” control (using MIDI channels 224 and 176, respectively). The values from these controls are not exposed in this Node, as the exact controls available vary from keyboard to keyboard. To access these controls, use a MIDI Input Node.