MidiProto.Message protocol (midi_proto v0.2.1)

Copy Markdown

Common behaviour for all MIDI message types.

Allows you to check the capabilities of a MIDI message or encode it into a message for transmission.

Summary

Types

t()

All the types that implement this protocol.

Functions

Is the message a active sense message?

Is the message a channel pressure message?

Is the message a continue message?

Is the message a control change message?

Encode the message into a binary for sending.

Is the message a note-off message?

Is the message a note-on message?

Is the message a pitch bend message?

Is the message a polyphonic pressure message?

Is the message a program change message?

Is the message a realtime message?

Is the message a song position message?

Is the message a song select message?

Is the message a start message?

Is the message a stop message?

Is the message a system message?

Is the message a system reset message?

Is the message a time code quarter frame message?

Is the message a timing clock message?

Is the message a tune request message?

Types

t()

@type t() :: term()

All the types that implement this protocol.

Functions

active_sense?(message)

@spec active_sense?(t()) :: boolean()

Is the message a active sense message?

channel_pressure?(message)

@spec channel_pressure?(t()) :: boolean()

Is the message a channel pressure message?

continue?(message)

@spec continue?(t()) :: boolean()

Is the message a continue message?

control_change?(message)

@spec control_change?(t()) :: boolean()

Is the message a control change message?

encode(message)

@spec encode(t()) :: binary()

Encode the message into a binary for sending.

note_off?(message)

@spec note_off?(t()) :: boolean()

Is the message a note-off message?

note_on?(message)

@spec note_on?(t()) :: boolean()

Is the message a note-on message?

pitch_bend?(message)

@spec pitch_bend?(t()) :: boolean()

Is the message a pitch bend message?

polyphonic_pressure?(message)

@spec polyphonic_pressure?(t()) :: boolean()

Is the message a polyphonic pressure message?

program_change?(message)

@spec program_change?(t()) :: boolean()

Is the message a program change message?

realtime?(message)

@spec realtime?(t()) :: boolean()

Is the message a realtime message?

song_position?(message)

@spec song_position?(t()) :: boolean()

Is the message a song position message?

song_select?(message)

@spec song_select?(t()) :: boolean()

Is the message a song select message?

start?(message)

@spec start?(t()) :: boolean()

Is the message a start message?

stop?(message)

@spec stop?(t()) :: boolean()

Is the message a stop message?

system?(message)

@spec system?(t()) :: boolean()

Is the message a system message?

system_reset?(message)

@spec system_reset?(t()) :: boolean()

Is the message a system reset message?

time_code_quarter_frame?(message)

@spec time_code_quarter_frame?(t()) :: boolean()

Is the message a time code quarter frame message?

timing_clock?(message)

@spec timing_clock?(t()) :: boolean()

Is the message a timing clock message?

tune_request?(message)

@spec tune_request?(t()) :: boolean()

Is the message a tune request message?