1. Home
  2. Docs
  3. Nodes
  4. Melody Sources
  5. MIDI Keyboard Node

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).


Device Sets the MIDI device to use, or a virtual keyboard controlled by a standard computer keyboard.
Buffer duration Adds 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.


Melody The 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 key Pitch interpretation
W C#
E D#
T F#
Y (Z on qwertz) G#
U A#
K C (one octave up)

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

Keyboard key Command
X Octave up
Z (Y on qwertz) Octave down
V Increase keypress velocity by 0.1
C Decrease keypress velocity by 0.1


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).


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.

Was this article helpful to you? Yes No