Module el.midi
MIDI factories and utilities.
Functions in this module **do not** check arguments. It is the responsibility of calling code to ensure correct data is passed.
Info:
- Author: Michael Fisher
Messages
controller (channel, controller, value) | Make a controller message |
noteon (channel, note, velocity) | Make a note on message |
noteoff (channel, note) | Make a regular note off message |
noteoff (channel, note, velocity) | Make a note off message with velocity |
program (channel, program) | Make a program change message. |
pitch (channel, position) | Make a pitch wheel message. |
aftertouch (channel, note, value) | Make an after touch message. |
channelpressure (channel, value) | Make a channel-pressure message. |
allnotesoff (channel) | Make an all notes off message. |
allsoundsoff (channel) | Make an all sounds off message. |
allcontrollersoff (channel) | Make an all controllers off message. |
clock () | Make a clock message. |
start () | Make a start message. |
stop () | Make a stop message. |
continue () | Make a continue message. |
Utils
tohertz (note) | Convert a MIDI note to hertz. |
clamp (value) | Clamp to a valid MIDI value (0 - 127) |
Messages
- controller (channel, controller, value)
-
Make a controller message
Parameters:
- channel int MIDI Channel
- controller int Controller number
- value int Controller Value
Returns:
-
MIDI message packed as Integer
- noteon (channel, note, velocity)
-
Make a note on message
Parameters:
- channel int MIDI Channel
- note int Note number 0-127
- velocity int Note velocity 0-127
Returns:
-
MIDI message packed as Integer
- noteoff (channel, note)
-
Make a regular note off message
Parameters:
- channel int MIDI Channel
- note int Note number
Returns:
-
MIDI message packed as Integer
- noteoff (channel, note, velocity)
-
Make a note off message with velocity
Parameters:
- channel int MIDI Channel
- note int Note number
- velocity int Note velocity
Returns:
-
MIDI message packed as Integer
- program (channel, program)
-
Make a program change message.
Parameters:
- channel int The midi channel (1 to 16)
- program int Program number
Returns:
-
MIDI message packed as Integer
- pitch (channel, position)
-
Make a pitch wheel message.
Parameters:
- channel int The midi channel (1 to 16)
- position int The wheel position, in the range 0 to 16383
Returns:
-
MIDI message packed as Integer
- aftertouch (channel, note, value)
-
Make an after touch message.
Parameters:
- channel int The midi channel (1 to 16)
- note int The midi note, in the range 0 to 127
- value int The after touch value.
Returns:
-
MIDI message packed as Integer
- channelpressure (channel, value)
-
Make a channel-pressure message.
Parameters:
- channel int The midi channel (1 to 16)
- value int The pressure value (0 to 127)
Returns:
-
MIDI message packed as Integer
- allnotesoff (channel)
-
Make an all notes off message.
Parameters:
- channel int The midi channel (1 to 16)
Returns:
-
MIDI message packed as Integer
- allsoundsoff (channel)
-
Make an all sounds off message.
Parameters:
- channel int The midi channel (1 to 16)
Returns:
-
MIDI message packed as Integer
- allcontrollersoff (channel)
-
Make an all controllers off message.
Parameters:
- channel int The midi channel (1 to 16)
Returns:
-
MIDI message packed as Integer
- clock ()
-
Make a clock message.
Returns:
-
MIDI message packed as Integer
- start ()
-
Make a start message.
Returns:
-
MIDI message packed as Integer
- stop ()
-
Make a stop message.
Returns:
-
MIDI message packed as Integer
- continue ()
-
Make a continue message.
Returns:
-
MIDI message packed as Integer