9009a7c5bc
- Created type stubs for various modules in the mido library including messages, midifiles, parser, ports, sockets, syx, tokenizer, and version. - Implemented type hints for functions and classes to improve type checking and code clarity. - Added support for MIDI over TCP/IP in sockets module. - Included methods for reading and writing SYX files in syx module. - Enhanced the parser functionality with a dedicated Parser class for MIDI byte streams. - Established a structure for MIDI file handling with MidiFile and MidiTrack classes.
15 lines
362 B
Python
15 lines
362 B
Python
from collections.abc import Callable
|
|
|
|
from .specs import MsgDict
|
|
|
|
_SPECIAL_CASES: dict[str, Callable[[MsgDict], list[object]]]
|
|
|
|
def encode_message(msg: MsgDict) -> list[int]:
|
|
"""Encode msg dict as a list of bytes.
|
|
|
|
TODO: Add type and value checking.
|
|
(Can be turned off with keyword argument.)
|
|
|
|
This is not a part of the public API.
|
|
"""
|