示例#1
0
    def __init__(self, builder):
        self.builder = builder
        self.cardstring = "front:CARD=CODEC,DEV=0"

        self.controller = LED_Controller(10, "192.168.4.1", 5555)

        self.fft_bars = [builder.get_object("fft_bar_" + str(i)) for i in range(40)]

        self.fft_timeout = GObject.timeout_add(50, self.fft_callback, None)
        self.state_timeout = GObject.timeout_add(30, self.state_update, None)

        self.fft_darea = self.builder.get_object("fft_drawing_area")
        self.state_darea = self.builder.get_object("state_drawing_area")
        self.chart = None
        self.strip_display = None

        self.provider = None

        self.relaxation_box = self.builder.get_object("relaxation_frame_count")

        self.pcm_chooser = builder.get_object("pcm_combo_box")
        for pcm in FFT.available_pcms():
            self.pcm_chooser.append_text(pcm)

        self.grouper = Grouper(self.controller.strips, self)

        self.strobes = [Strobe(self)]

        self.fft_effect_chooser = builder.get_object("fft_effect_combo")
        self.effects = {cls.__name__: cls for cls in ToStateProcessor.__subclasses__()}
        for effect in self.effects.keys():
            self.fft_effect_chooser.append_text(effect)
        self.fft_effect_chooser.set_entry_text_column(0)
        self.fft_effect_chooser.set_active(0)
        self.builder.get_object("fft_rescale_button").set_sensitive(False)
        self.builder.get_object("fft_channel_scale").set_sensitive(True)

        self.send_static()
示例#2
0
 def pcm_chooser_clicked(self, button):
     for pcm in FFT.available_pcms():
         self.pcm_chooser.append_text(pcm)