
    ̺i#                         S r SSKJrJr  SSKJr  SSKJrJrJ	r	J
r
JrJrJrJr  SSKJrJrJrJrJrJrJrJrJrJr  SSKJrJrJr  SSKJrJ r   SSK!J"r"  / S	Qr#SS jr$\$" 5         g
)a
  
MIDI Objects for Python

Mido is a library for working with MIDI messages and ports. It's
designed to be as straight forward and Pythonic as possible.

Creating messages:

    Message(type, **parameters) -- create a new message
    MetaMessage(type, **parameters) -- create a new meta message
    UnknownMetaMessage(type_byte, data=None, time=0)

Ports:

    open_input(name=None, virtual=False, callback=None) -- open an input port
    open_output(name=None, virtual=False,               -- open an output port
                autoreset=False)
    open_ioport(name=None, virtual=False,        -- open an I/O port (capable
                callback=None, autoreset=False)     of both input and output)

    get_input_names() -- return a list of names of available input ports
    get_output_names() -- return a list of names of available output ports
    get_ioport_names() -- return a list of names of available I/O ports

MIDI files:

    MidiFile(filename, **kwargs) -- open a MIDI file
    MidiTrack()  -- a MIDI track
    bpm2tempo()  -- convert beats per minute to MIDI file tempo
    tempo2bpm()  -- convert MIDI file tempo to beats per minute
    merge_tracks(tracks)  -- merge tracks into one track

SYX files:

    read_syx_file(filename)  -- read a SYX file
    write_syx_file(filename, messages,
                   plaintext=False)  -- write a SYX file
Parsing MIDI streams:

    parse(bytes) -- parse a single message bytes
                    (any iterable that generates integers in 0..127)
    parse_all(bytes) -- parse all messages bytes
    Parser -- MIDI parser class

Parsing objects serialized with str(message):

    parse_string(string) -- parse a string containing a message
    parse_string_stream(iterable) -- parse strings from an iterable and
                                     generate messages

Sub modules:

    ports -- useful tools for working with ports

For more on MIDI, see:

    http://www.midi.org/


Getting started:

    >>> import mido
    >>> m = mido.Message('note_on', note=60, velocity=64)
    >>> m
    <message note_on channel=0, note=60, velocity=64, time=0>
    >>> m.type
    'note_on'
    >>> m.channel = 6
    >>> m.note = 19
    >>> m.copy(velocity=120)
    <message note_on channel=0, note=60, velocity=64, time=0>
    >>> s = mido.Message('sysex', data=[byte for byte in range(5)])
    >>> s.data
    (0, 1, 2, 3, 4)
    >>> s.hex()
    'F0 00 01 02 03 04 F7'
    >>> len(s)
    7

    >>> default_input = mido.open_input()
    >>> default_input.name
    'MPK mini MIDI 1'
    >>> output = mido.open_output('SD-20 Part A')
    >>>
    >>> for message in default_input:
    ...     output.send(message)

    >>> get_input_names()
    ['MPK mini MIDI 1', 'SH-201']
   )portssockets)Backend)MAX_PITCHWHEELMAX_SONGPOSMIN_PITCHWHEELMIN_SONGPOSMessageformat_as_stringparse_stringparse_string_stream)
KeySignatureErrorMetaMessageMidiFile	MidiTrackUnknownMetaMessage	bpm2tempomerge_trackssecond2tick	tempo2bpmtick2second)Parserparse	parse_all)read_syx_filewrite_syx_file)version_info)r   r   r   r   r	   r
   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   r   Nc                     [        5       n[        U [        5      (       a  U nO
[        XSS9nX2S'   [        U5       H*  n U R	                  S5      S   S;   d  M  [        X05      X '   M,     g)a=  Set current backend.

name can be a module name like 'mido.backends.rtmidi' or
a Backend object.

If no name is passed, the default backend will be used.

This will replace all the open_*() and get_*_name() functions
in top level mido module. The module will be loaded the first
time one of those functions is called.T)loaduse_environbackend_    )opengetN)globals
isinstancer   dirsplitgetattr)namer   globr!   s       L/var/www/piano.thomer.com/venv/lib/python3.13/site-packages/mido/__init__.pyset_backendr.      s_     9D$  $t<OG::c?10 /DJ     )NF)%__doc__ r   r   backends.backendr   messagesr   r   r   r	   r
   r   r   r   	midifilesr   r   r   r   r   r   r   r   r   r   parserr   r   r   syxr   r   versionr   __all__r.    r/   r-   <module>r:      sS   
Yv  %	 	 	   - , . !<02 r/   