# Path: mididings/units/base.py
# _UNIT_TYPES = (_Unit, list, dict, _constants._EventType)
# 
# Path: mididings/scene.py
# _SCENE_TYPES = (Scene, SceneGroup) + _UNIT_TYPES


import _mididings
import mididings.patch as _patch
import mididings.scene as _scene
import mididings.util as _util
import mididings.misc as _misc
import mididings.setup as _setup
import mididings.constants as _constants
import mididings.overload as _overload
import mididings.arguments as _arguments
import time as _time
import weakref as _weakref
import threading as _threading
import gc as _gc
import atexit as _atexit
import os as _os
import sys as _sys
    import smf
from mididings.units.base import _UNIT_TYPES
from mididings.scene import _SCENE_TYPES
        # run the same interpreter with the same arguments again
        _os.execl(_sys.executable, _sys.executable, *_sys.argv)

    def quit(self):
        self._quit.set()



@_overload.mark(
    """
    run(patch)
    run(scenes=..., control=None, pre=None, post=None)

    Start the MIDI processing. This is usually the last function called by a
    mididings script.
    The first version just runs a single patch, while the second version
    allows switching between multiple scenes.

    :param patch: a single patch.
    :param scenes: a dictionary with program numbers as keys, and
        :class:`Scene` objects, :class:`SceneGroup` objects or plain patches
        as values.
    :param control: an optional "control" patch, which is always active, and
        runs in parallel to the current scene.
    :param pre: an optional patch that allows common processing to take place
        before every scene. Does not affect the control patch.
    :param post: an optional patch that allows common processing to take place
        after every scene. Does not affect the control patch.
    """
)

# Path: mididings/units/base.py
# _UNIT_TYPES = (_Unit, list, dict, _constants._EventType)
# 
# Path: mididings/scene.py
# _SCENE_TYPES = (Scene, SceneGroup) + _UNIT_TYPES


# Path: mididings/engine.py
import _mididings
import mididings.patch as _patch
import mididings.scene as _scene
import mididings.util as _util
import mididings.misc as _misc
import mididings.setup as _setup
import mididings.constants as _constants
import mididings.overload as _overload
import mididings.arguments as _arguments
import time as _time
import weakref as _weakref
import threading as _threading
import gc as _gc
import atexit as _atexit
import os as _os
import sys as _sys
    import smf
from mididings.units.base import _UNIT_TYPES
from mididings.scene import _SCENE_TYPES

        # run the same interpreter with the same arguments again
        _os.execl(_sys.executable, _sys.executable, *_sys.argv)

    def quit(self):
        self._quit.set()



@_overload.mark(
    """
    run(patch)
    run(scenes=..., control=None, pre=None, post=None)

    Start the MIDI processing. This is usually the last function called by a
    mididings script.
    The first version just runs a single patch, while the second version
    allows switching between multiple scenes.

    :param patch: a single patch.
    :param scenes: a dictionary with program numbers as keys, and
        :class:`Scene` objects, :class:`SceneGroup` objects or plain patches
        as values.
    :param control: an optional "control" patch, which is always active, and
        runs in parallel to the current scene.
    :param pre: an optional patch that allows common processing to take place
        before every scene. Does not affect the control patch.
    :param post: an optional patch that allows common processing to take place
        after every scene. Does not affect the control patch.
    """
)

@_arguments.accept(_UNIT_TYPES)