# 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
                (scene in self._scenes and len(self._scenes[scene][1]))):
            number = "%d.%d" % (scene, subscene)
        else:
            number = str(scene)

        if not _setup.get_config('silent'):
            if found:
                # get scene/subscene name
                scene_data = self._scenes[scene]
                if scene_data[1]:
                    name = "%s - %s" % (scene_data[0],
                                        scene_data[1][subscene_index])
                else:
                    name = scene_data[0]

                scene_desc = (("%s: %s" % (number, name)) if name
                                else str(number))
                print("switching to scene %s" % scene_desc)
            else:
                print("no such scene: %s" % number)

        if found:
            self._call_hooks('on_switch_scene', scene, subscene)

    def _call_hooks(self, name, *args):
        for hook in _setup.get_hooks():
            if hasattr(hook, name):
                f = getattr(hook, name)
                f(*args)


# 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

                (scene in self._scenes and len(self._scenes[scene][1]))):
            number = "%d.%d" % (scene, subscene)
        else:
            number = str(scene)

        if not _setup.get_config('silent'):
            if found:
                # get scene/subscene name
                scene_data = self._scenes[scene]
                if scene_data[1]:
                    name = "%s - %s" % (scene_data[0],
                                        scene_data[1][subscene_index])
                else:
                    name = scene_data[0]

                scene_desc = (("%s: %s" % (number, name)) if name
                                else str(number))
                print("switching to scene %s" % scene_desc)
            else:
                print("no such scene: %s" % number)

        if found:
            self._call_hooks('on_switch_scene', scene, subscene)

    def _call_hooks(self, name, *args):
        for hook in _setup.get_hooks():
            if hasattr(hook, name):
                f = getattr(hook, name)
                f(*args)


    def switch_scene(self, scene, subscene=None):