def __init__(self, app): self._app = app self._playlist = [] self._shuffle_list = [] self.active_preset = None self.next_preset = None self._playlist_data = None self._loader = PatternLoader(self) self.available_pattern_classes = self._loader.all_patterns() self.last_active_preset = self._app.settings.get("last-preset", None) self.active_preset = None self.next_preset = None self._shuffle = self._app.settings['mixer']['shuffle'] self._shuffle_list = [] self.name = app.args.playlist if self.name is None: self.name = self._app.settings.get("mixer").get( "last_playlist", None) if self.name is None or self.name == "": self.filetype = "playlist" self.filename = "" self.initialized = False else: filepath = os.path.join(os.getcwd(), "data", "playlists", "".join([self.name, ".json"])) JSONDict.__init__(self, 'playlist', filepath, True) self.open()
def __init__(self, app): self._app = app self._playlist = [] self._shuffle_list = [] self.active_preset = None self.next_preset = None self._playlist_data = None self._loader = PatternLoader(self) self.available_pattern_classes = self._loader.all_patterns() self.last_active_preset = self._app.settings.get("last-preset", None) self.active_preset = None self.next_preset = None self._shuffle = self._app.settings['mixer']['shuffle'] self._shuffle_list = [] self.name = app.args.playlist if self.name is None: self.name = self._app.settings.get("mixer").get("last_playlist", None) if self.name is None or self.name == "": self.filetype = "playlist" self.filename = "" self.initialized = False else: filepath = os.path.join(os.getcwd(), "data", "playlists", "".join([self.name, ".json"])) JSONDict.__init__(self, 'playlist', filepath, True) self.open()
def __init__(self, app): self._app = app self._name = app.args.scene self._filepath = os.path.join(os.getcwd(), "data", "scenes", "".join([self._name, ".json"])) JSONDict.__init__(self, 'scene', self._filepath, False) self._fixtures = None self._fixture_dict = {} self._fixture_hierarchy = None self._colliding_fixtures_cache = {} self._pixel_neighbors_cache = {} self._pixel_locations_cache = {} self._pixel_distance_cache = {} self._intersection_points = None self._all_pixels = None self._all_pixel_locations = None log.info("Warming up scene caches...") fh = self.fixture_hierarchy() for strand in fh: for fixture in fh[strand]: self.get_colliding_fixtures(strand, fixture) for pixel in range(self.fixture(strand, fixture).pixels): neighbors = self.get_pixel_neighbors((strand, fixture, pixel)) self.get_pixel_location((strand, fixture, pixel)) for neighbor in neighbors: self.get_pixel_distance((strand, fixture, pixel), neighbor) self.get_fixture_bounding_box() self.get_intersection_points() self.get_all_pixels() self.get_all_pixel_locations() log.info("Done")
def __init__(self, app): self._app = app self.name = app.args.playlist if self.name is None: self.name = self._app.settings.get("mixer").get("last_playlist", "default") filepath = os.path.join(os.getcwd(), "data", "playlists", "".join([self.name, ".json"])) JSONDict.__init__(self, 'playlist', filepath, True) self.open()
def __init__(self, app, name, last_playlist_settings_key): self._app = app self._notifier = Playlist.Notifier() self._last_playlist_settings_key = last_playlist_settings_key self.name = name if self.name is None: self.name = self._app.settings.get("mixer").get( self.last_playlist_settings_key, "default") filepath = os.path.join(os.getcwd(), "data", "playlists", "".join([self.name, ".json"])) JSONDict.__init__(self, 'playlist', filepath, True) self.open()
def __init__(self, app, slug=""): self._app = app self._ticks = 0 self._elapsed_time = 0 self._parameters = {} self._watches = {} self._instance_name = "" self._instance_slug = slug self.initialized = False self.disabled = False filepath = os.path.join(os.getcwd(), "data", "presets", "".join([slug, ".json"])) JSONDict.__init__(self, 'preset', filepath, True) self.open()
def __init__(self, app): self._app = app self._name = app.args.scene self._filepath = os.path.join(os.getcwd(), "data", "scenes", "".join([self._name, ".json"])) JSONDict.__init__(self, 'scene', self._filepath, False) self._fixtures = None self._fixture_dict = {} self._fixture_hierarchy = None self._colliding_fixtures_cache = {} self._pixel_neighbors_cache = {} self._pixel_locations_cache = {} self._pixel_distance_cache = {} self._intersection_points = None self._all_pixels = None self._all_pixel_locations = None self._all_pixels_raw = None
def __init__(self, app): self._app = app self._name = app.args.playlist self._filepath = os.path.join(os.getcwd(), "data", "playlists", "".join([self._name, ".json"])) JSONDict.__init__(self, 'playlist', self._filepath, True) self._loader = PresetLoader() self._preset_classes = self._loader.load() self._playlist_data = self.data.get('playlist', []) self._playlist = [] self._active_index = 0 self._next_index = 0 self._shuffle = self._app.settings['mixer']['shuffle'] self._shuffle_list = [] self.generate_playlist()
def __init__(self, app): self._app = app self._playlist = [] self._shuffle_list = [] self.active_preset = None self.next_preset = None self._playlist_data = None self.name = app.args.playlist if self.name is None: self.name = self._app.settings.get("mixer").get("last_playlist", None) if self.name is None or self.name == "": self.filetype = "playlist" self.filename = "" self.initialized = False else: filepath = os.path.join(os.getcwd(), "data", "playlists", "".join([self.name, ".json"])) JSONDict.__init__(self, 'playlist', filepath, True) self.open()
def __init__(self, app): self._app = app self._playlist = [] self._shuffle_list = [] self.active_preset = None self.next_preset = None self._playlist_data = None self.name = app.args.playlist if self.name is None: self.name = self._app.settings.get("mixer").get( "last_playlist", None) if self.name is None or self.name == "": self.filetype = "playlist" self.filename = "" self.initialized = False else: filepath = os.path.join(os.getcwd(), "data", "playlists", "".join([self.name, ".json"])) JSONDict.__init__(self, 'playlist', filepath, True) self.open()
def __init__(self, app): filename = app.args.scene self._filename = os.path.join(os.getcwd(), "data", "scenes", "".join([filename, ".json"])) JSONDict.__init__(self, 'scene', self._filename, False) self.data["filepath"] = self._filename
def __init__(self): filepath = os.path.join(os.getcwd(), "data", "settings.json") JSONDict.__init__(self, 'settings', filepath, False)