MIDI.SendNoteOn(number channel, number note, number velocity)
Send a MIDI Note-On Message.
Parameters:
Name | Type | Description |
---|---|---|
channel | number | The MIDI channel [0-15] |
note | number | The Note, [0-127] |
velocity | number | The note velocity [0-127] |
Usage
---@type number
local channel;
---@type number
local note;
---@type number
local velocity;
MIDI:SendNoteOn(channel, note, velocity)
Extra Detail
The MIDI notes usually start from number 21 for note A0 and end in 108 for note C8, considering an 88 key piano. However, you can send 0 for note C0 and 127 for note G9. The velocity dictates how hard/fast the specific key is pressed for piano. When a note pressed fast, the mechanical hammer also hits hard on that note’s string. Which results in louder sound. Similar comparisons can be made for other instruments as well. Like, how hard a Guitar string is pulled, or how fast a bow of violin is moved over a string.