MIDISynth.Command (midi_synth v0.4.1) View Source
Convert MIDI commands to raw bytes
Link to this section Summary
Types
A MIDI channel number
The duration in milliseconds for which to hold down a note.
A 7-bit integer
A MIDI note
A MIDI program
The velocity to strike the note.
A channel volume
Functions
Change the MIDI controller value of a channel.
Change the current program (e.g. instrument) of a channel.
Change the sound bank of a channel.
Change the volume of a MIDI channel. This change is applied to all playing and future notes.
Turn a note in a channel off.
Turn all active notes in a channel off.
Turn a note in a channel on.
Change the panoramic (pan) of a channel. This shifts the sound from the left or right ear in when playing stereo. Values below 64 moves the sound to the left, and above to the right.
Bend the pitch of notes playing in a channel. Values below 0x2000 will decrease the pitch, and higher values will increase it.
Link to this section Types
Specs
channel() :: 0..15
A MIDI channel number
Specs
duration() :: non_neg_integer()
The duration in milliseconds for which to hold down a note.
Specs
int7() :: 0..127
A 7-bit integer
Specs
note() :: int7()
A MIDI note
For non-percussion instruments, the frequency of a note
is 440 * 2^((n − 69) / 12)
where n
is the note number.
Middle C is 60
Specs
program() :: int7()
A MIDI program
Specs
velocity() :: int7()
The velocity to strike the note.
127 = maximum velocity
Specs
volume() :: int7()
A channel volume
Link to this section Functions
Specs
Change the MIDI controller value of a channel.
Specs
Change the current program (e.g. instrument) of a channel.
Specs
Change the sound bank of a channel.
Specs
Change the volume of a MIDI channel. This change is applied to all playing and future notes.
Specs
Turn a note in a channel off.
Specs
note_off_all(channel()) :: <<_::24>>
Turn all active notes in a channel off.
Specs
Turn a note in a channel on.
Specs
Change the panoramic (pan) of a channel. This shifts the sound from the left or right ear in when playing stereo. Values below 64 moves the sound to the left, and above to the right.
Specs
Bend the pitch of notes playing in a channel. Values below 0x2000 will decrease the pitch, and higher values will increase it.