elementary
Search…
MIDI
The midi event fires on the core Renderer interface any time the runtime receives a MIDI event from any connected and enabled device. By default, the runtime will be listening to any such device, which may yield frequent MIDI events. Note: this event is currently only supported by the Elementary Command line tool.
The 'midi' event is fired with a single argument: an object describing the event. For example:
1
// A noteOn event
2
{
3
bytes: '90456a',
4
noteFrequency: 440,
5
noteName: 'A3',
6
noteNumber: 69,
7
source: 'Moog Grandmother',
8
type: 'noteOn'
9
}
10
11
// A noteOff event
12
{
13
bytes: '80456a',
14
noteFrequency: 440,
15
noteName: 'A3',
16
noteNumber: 69,
17
source: 'Moog Grandmother',
18
type: 'noteOff'
19
}
20
21
// A controller event
22
{
23
bytes: 'b0082d',
24
channel: 1,
25
source: 'Moog Grandmother',
26
target: 8,
27
type: 'controller',
28
value: 45
29
}
Copied!
Note: all MIDI events are enumerated with at least a source, type, and bytes property. Events for which the runtime could not derive a helpful type will show type: "raw". The bytes property is a hexidecimal string containing the raw MIDI payload for further deserialization in such cases.
Supported events:
  • NoteOn
  • NoteOff
  • ProgramChange
  • PitchWheel
  • Aftertouch
  • ChannelPressure
  • AllNotesOff
  • AllSoundOff
  • MetaEvent
  • Controller
  • Raw
Last modified 1mo ago
Copy link