ExMidi.MidiMsg (ex_midi v0.1.0)

Copy Markdown View Source

MIDI message constructors.

All functions return {:midi, payload} tuples that serve as the lingua franca for MIDI message representation. These terms can be encoded to binary with ExMidi.MidiBin.encode/1 and decoded from binary with ExMidi.MidiBin.decode/1.

Summary

Functions

Create an aftertouch (channel pressure) message.

Create a batch message from a list of {:midi, _} messages.

Create a control change (CC) message.

Create a copyright meta message.

Create a cue point meta message.

Create a device port meta message.

Create an instrument name meta message.

Create a key signature meta message.

Create a lyric meta message.

Create a marker meta message.

Create a time signature meta message (numerator/denominator).

Create a note off message.

Create a note on message.

Create a pitch bend message.

Create a polyphonic aftertouch message.

Create a program meta message.

Create a program change message.

MIDI clock (24 per quarter note).

MIDI continue.

MIDI reset.

MIDI start.

MIDI stop.

MIDI tick.

Create a sequence number meta message.

Create a sequencer-specific data meta message.

Create a system exclusive message.

Create a tempo meta message from BPM.

Create a text meta message.

Create a track/sequence name meta message.

Create an undefined meta message.

Functions

aftertouch(pressure)

Create an aftertouch (channel pressure) message.

aftertouch(channel, pressure)

batch(msgs)

Create a batch message from a list of {:midi, _} messages.

batch(msgs, metadata)

cc(control, value)

Create a control change (CC) message.

cc(channel, control, value)

copyright(text)

Create a copyright meta message.

cuepoint(text)

Create a cue point meta message.

device(port)

Create a device port meta message.

instrument(name)

Create an instrument name meta message.

keysig(key, is_major, accidental_count, is_flat)

Create a key signature meta message.

lyric(text)

Create a lyric meta message.

marker(text)

Create a marker meta message.

meter(numerator, denominator)

Create a time signature meta message (numerator/denominator).

note_off(pitch)

Create a note off message.

note_off(pitch, velocity)

note_off(channel, pitch, velocity)

note_on(pitch, velocity)

Create a note on message.

note_on(channel, pitch, velocity)

pitch_bend(value)

Create a pitch bend message.

pitch_bend(channel, value)

pitch_bend(channel, msb, lsb)

poly_aftertouch(pitch, pressure)

Create a polyphonic aftertouch message.

poly_aftertouch(channel, pitch, pressure)

program(text)

Create a program meta message.

program_change(program)

Create a program change message.

program_change(channel, program)

rt_clock()

MIDI clock (24 per quarter note).

rt_continue()

MIDI continue.

rt_reset()

MIDI reset.

rt_start()

MIDI start.

rt_stop()

MIDI stop.

rt_tick()

MIDI tick.

sequence_number(n)

Create a sequence number meta message.

sequencer_data(bytes)

Create a sequencer-specific data meta message.

smpte(hour, minute, second, frame, fractional_frame)

Create a SMPTE meta message.

sys_ex(data)

Create a system exclusive message.

tempo_bpm(bpm)

Create a tempo meta message from BPM.

text(text)

Create a text meta message.

time_sig(numerator, denominator, clocks_per_click, demi_semi_quaver_per_quarter)

Create a time signature meta message.

track_sequence_name(text)

Create a track/sequence name meta message.

undefined(bytes)

Create an undefined meta message.