How to use the mido.messages.MessageSpec function in mido

To help you get started, we’ve selected a few mido examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github mido / mido / mido / messages.py View on Github external
# System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
        MessageSpec(0xfa, 'start', (), 1),
        MessageSpec(0xfb, 'continue', (), 1),
        MessageSpec(0xfc, 'stop', (), 1),
        # 0xfd is undefined.
        MessageSpec(0xfe, 'active_sensing', (), 1),
        MessageSpec(0xff, 'reset', (), 1),
    ]
github mido / mido / mido / messages.py View on Github external
def get_message_specs():
    return [
        # Channel messages
        MessageSpec(0x80, 'note_off', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0x90, 'note_on', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0xa0, 'polytouch', ('channel', 'note', 'value'), 3),
        MessageSpec(0xb0, 'control_change',
                    ('channel', 'control', 'value'), 3),
        MessageSpec(0xc0, 'program_change', ('channel', 'program',), 2),
        MessageSpec(0xd0, 'aftertouch', ('channel', 'value',), 2),
        MessageSpec(0xe0, 'pitchwheel', ('channel', 'pitch',), 3),

        # System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
        MessageSpec(0xfa, 'start', (), 1),
        MessageSpec(0xfb, 'continue', (), 1),
github mido / mido / mido / messages.py View on Github external
MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
        MessageSpec(0xfa, 'start', (), 1),
        MessageSpec(0xfb, 'continue', (), 1),
        MessageSpec(0xfc, 'stop', (), 1),
        # 0xfd is undefined.
        MessageSpec(0xfe, 'active_sensing', (), 1),
        MessageSpec(0xff, 'reset', (), 1),
    ]
github mido / mido / mido / messages.py View on Github external
def get_message_specs():
    return [
        # Channel messages
        MessageSpec(0x80, 'note_off', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0x90, 'note_on', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0xa0, 'polytouch', ('channel', 'note', 'value'), 3),
        MessageSpec(0xb0, 'control_change',
                    ('channel', 'control', 'value'), 3),
        MessageSpec(0xc0, 'program_change', ('channel', 'program',), 2),
        MessageSpec(0xd0, 'aftertouch', ('channel', 'value',), 2),
        MessageSpec(0xe0, 'pitchwheel', ('channel', 'pitch',), 3),

        # System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
        MessageSpec(0xfa, 'start', (), 1),
github mido / mido / mido / messages.py View on Github external
def get_message_specs():
    return [
        # Channel messages
        MessageSpec(0x80, 'note_off', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0x90, 'note_on', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0xa0, 'polytouch', ('channel', 'note', 'value'), 3),
        MessageSpec(0xb0, 'control_change',
                    ('channel', 'control', 'value'), 3),
        MessageSpec(0xc0, 'program_change', ('channel', 'program',), 2),
        MessageSpec(0xd0, 'aftertouch', ('channel', 'value',), 2),
        MessageSpec(0xe0, 'pitchwheel', ('channel', 'pitch',), 3),

        # System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.
github mido / mido / mido / messages.py View on Github external
def get_message_specs():
    return [
        # Channel messages
        MessageSpec(0x80, 'note_off', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0x90, 'note_on', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0xa0, 'polytouch', ('channel', 'note', 'value'), 3),
        MessageSpec(0xb0, 'control_change',
                    ('channel', 'control', 'value'), 3),
        MessageSpec(0xc0, 'program_change', ('channel', 'program',), 2),
        MessageSpec(0xd0, 'aftertouch', ('channel', 'value',), 2),
        MessageSpec(0xe0, 'pitchwheel', ('channel', 'pitch',), 3),

        # System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.
github mido / mido / mido / messages.py View on Github external
MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
        MessageSpec(0xfa, 'start', (), 1),
        MessageSpec(0xfb, 'continue', (), 1),
        MessageSpec(0xfc, 'stop', (), 1),
        # 0xfd is undefined.
        MessageSpec(0xfe, 'active_sensing', (), 1),
        MessageSpec(0xff, 'reset', (), 1),
    ]
github mido / mido / mido / messages.py View on Github external
def get_message_specs():
    return [
        # Channel messages
        MessageSpec(0x80, 'note_off', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0x90, 'note_on', ('channel', 'note', 'velocity'), 3),
        MessageSpec(0xa0, 'polytouch', ('channel', 'note', 'value'), 3),
        MessageSpec(0xb0, 'control_change',
                    ('channel', 'control', 'value'), 3),
        MessageSpec(0xc0, 'program_change', ('channel', 'program',), 2),
        MessageSpec(0xd0, 'aftertouch', ('channel', 'value',), 2),
        MessageSpec(0xe0, 'pitchwheel', ('channel', 'pitch',), 3),

        # System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
github mido / mido / mido / messages.py View on Github external
MessageSpec(0xc0, 'program_change', ('channel', 'program',), 2),
        MessageSpec(0xd0, 'aftertouch', ('channel', 'value',), 2),
        MessageSpec(0xe0, 'pitchwheel', ('channel', 'pitch',), 3),

        # System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
        MessageSpec(0xfa, 'start', (), 1),
        MessageSpec(0xfb, 'continue', (), 1),
        MessageSpec(0xfc, 'stop', (), 1),
        # 0xfd is undefined.
        MessageSpec(0xfe, 'active_sensing', (), 1),
        MessageSpec(0xff, 'reset', (), 1),
    ]
github mido / mido / mido / messages.py View on Github external
MessageSpec(0xe0, 'pitchwheel', ('channel', 'pitch',), 3),

        # System common messages
        MessageSpec(0xf0, 'sysex', ('data',), float('inf')),
        MessageSpec(0xf1, 'quarter_frame', ('frame_type', 'frame_value'), 2),
        MessageSpec(0xf2, 'songpos', ('pos',), 3),
        MessageSpec(0xf3, 'song_select', ('song',), 2),
        # 0xf4 is undefined.
        # 0xf5 is undefined.
        MessageSpec(0xf6, 'tune_request', (), 1),
        # 0xf7 is the stop byte for sysex messages, so should not be a message.

        # System real time messages
        MessageSpec(0xf8, 'clock', (), 1),
        # 0xf9 is undefined.
        MessageSpec(0xfa, 'start', (), 1),
        MessageSpec(0xfb, 'continue', (), 1),
        MessageSpec(0xfc, 'stop', (), 1),
        # 0xfd is undefined.
        MessageSpec(0xfe, 'active_sensing', (), 1),
        MessageSpec(0xff, 'reset', (), 1),
    ]