Esempio n. 1
0
 def __init__(self,editor):
     frame = editor.create_tab(self.NAME,self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame,736,604,self.IMAGE_FILE)
     canvas.pack()
     TkSubEditor.__init__(self,canvas,editor,self.NAME)
     editor.add_child_editor(self.NAME, self)
     x0 = 75
     xlfo = x0+180
     xmix = xlfo + 320
     y0=75
     y1=340
     for n,y in ((1,y0),(2,y1)):
         def param(prefix):
             return "%s%d" % (prefix,n)
         self.linear_slider(param("delay"),(0,0.01),x0,y)
         self.exp_slider(param("depth"),1.0,x0+60,y)
         self.exp_slider(param("xmod"),1.0,x0+120,y)
         msb = self.msb(param("lfoRatio"),len(LFO_RATIOS),xlfo,y)
         for i,pair in enumerate(LFO_RATIOS):
             val,text = pair
             self.msb_aspect(msb,i,val,text=text)
         msb.update_aspect()
         self.linear_slider(param("feedback"),(-1,1),xlfo+100,y)
         self.linear_slider(param("xfeedback"),(-1,1),xlfo+160,y)
         self.exp_slider(param("lowpass"),16000,xlfo+220,y)
         self.volume_slider(param("dryMix"),xmix,y,height=100)
         self.linear_slider(param("dryPan"),(-1,1),xmix,y+130,height=75)
         self.volume_slider(param("efxMix"),xmix+60,y,height=100)
         self.linear_slider(param("efxPan"),(-1,1),xmix+60,y+130,height=75)
     self.tumbler("timebase",5,0.001,xlfo-7,y0+100)
Esempio n. 2
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1500, 708, self.IMAGE_FILE)
     canvas.pack()
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0, y1 = 105,358
     x_delay = 105
     x_wow = x_delay + 60
     x_wfreq = x_wow + 60
     x_flutter = x_wfreq + 60
     x_xdelay = x_flutter + 60
     x_fb = x_xdelay + 90
     x_gain = x_fb + 60
     x_threshold = x_gain + 60
     x_low = x_threshold + 60
     x_high = x_low + 60
     x_mix = x_high + 90
     x_xmix = x_mix + 60
     x_amp = x_xmix + 90
     self.linear_slider("delayTime",(0,MAX_DELAY),x_delay,y0,height=200)
     self.exp_slider("wow",1.0,x_wow,y0,height=200)
     self.exp_slider("wowFreq",5.0,x_wfreq,y0,height=200)
     self.exp_slider("flutter",1.0,x_flutter,y0,height=200)
     self.exp_slider("xDelayMod",1.0,x_xdelay,y0,height=200)
     self.norm_slider("feedback",x_fb,y0,height=200)
     self.linear_slider("gain",(0.5,2.0),x_gain,y0,height=200)
     self.exp_slider("threshold",1.0,x_threshold,y0,height=200)
     self.third_octave_slider("lowcut",x_low,y0,height=200)
     self.third_octave_slider("highcut",x_high,y0,height=200)
     self.norm_slider("efxMix",x_mix,y0,height=200)
     self.norm_slider("xEfxMix",x_xmix,y0,height=200)
     self.volume_slider("amp",x_amp,y0,height=200)
Esempio n. 3
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        w = 900
        h = 300
        
        y0 = 50
        x0 = 50
        xmsb = w/2
        ymsb = h-50
        
        for i,prefix in enumerate("ab"):
            x = x0
            y = y0 + i*(300+25)
            paramlist = []
            for s in ("Attack","Decay1","Decay2","Release","Breakpoint",
                      "Sustain","Envmode"):
                paramlist.append("%s%s" % (prefix,s))
            env = ADDSREditor(canvas,i,(x,y),(w,h),paramlist,editor,12)
            self.add_child_editor("ENV%s" % prefix, env)
            env.sync()
            param = "%sInvert" % prefix
            msb = ToggleButton(canvas,param,editor,["+Pos","-Inv"])
            self.add_control(param,msb)
            msb.layout((x+xmsb,y+ymsb))
            msb.update_aspect()
Esempio n. 4
0
    def __init__(self,editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,740,343,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self,canvas,editor,self.NAME)
        editor.add_child_editor(self.NAME, self)
        x0,y0 = 75,75
        x_tone = x0
        x_feedback = x_tone+60
        x_bandpass = x_feedback+90
        x_filter = x_bandpass
        x_mod = x_filter+60
        x_xmod = x_mod+60
        x_res = x_xmod+60

        x_lfo = x_res+90

        x_mix = x_lfo+90
        x_amp = x_mix+60
        
        self.norm_slider("tone",x_tone,y0)
        self.linear_slider("feedback",(-1.0,1.0),x_feedback,y0)

        self.norm_slider("filter",x_filter,y0)
        self.norm_slider("modDepth",x_mod,y0)
        self.norm_slider("xmodDepth",x_xmod,y0)
        self.norm_slider("res",x_res,y0)
        self.exp_slider("lfoFreq",16,x_lfo,y0,degree=3)


        self.norm_slider("efxmix",x_mix,y0)
        self.volume_slider("amp",x_amp,y0)
Esempio n. 5
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME,self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1400, 700, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     x0 = 75
     xdelay = x0+220
     xmixer = xdelay+350
     y0,y1 = 75,260
     self.tumbler("pitchRatio",4,0.001,x0,y0,range_=(0,4000))
     self.norm_slider("pitchDispersion",x0+80,y0)
     self.norm_slider("timeDispersion",x0+140,y0)
     self.toggle("delayInSelect",xdelay,y0,off=(0,"P.Shifter"),on=(1,"Drysig"))
     self.exp_slider("delay",1,xdelay+80,y0)
     self.exp_slider("delayMod",1,xdelay+140,y0)
     self.tumbler("lfoFreq",5,0.001,xdelay+110,y1)
     self.linear_slider("feedback",(-1,1),xdelay+200,y0)
     self.exp_slider("lowpass",16000,xdelay+260,y0)
     self.volume_slider("dryAmp",xmixer,y0)
     self.volume_slider("psAmp",xmixer+60,y0)
     self.volume_slider("delayAmp",xmixer+120,y0)
     self.linear_slider("dryPan",(-1,1),xmixer,y1)
     self.linear_slider("psPan",(-1,1),xmixer+60,y1)
     self.linear_slider("delayPan",(-1,1),xmixer+120,y1)
     self.toggle("feedbackDestination",xdelay,y1,off=(0,"P.shifter"),on=(1,"Delay"))
Esempio n. 6
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 696, 361, self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        y0 = 75
        x0 = 100
        xmix = x0 + 150
        xsaw = xmix
        xnoise = xsaw + 64
        xexternal = xnoise + 60
        xlag = xexternal + 90

        def tumbler(param, x, y):
            t = Tumbler(canvas,
                        param,
                        editor,
                        digits=5,
                        scale=0.001,
                        outline='#a5a08a',
                        foreground='#a5a08a',
                        fill='black')
            self.add_control(param, t)
            t.layout((x, y))
            return y

        def norm(param, x):
            s = cf.normalized_slider(canvas, param, editor)
            self.add_control(param, s)
            s.widget().place(x=x, y=y0)
            return s

        def linear_slider(param, x, range_):
            s = cf.linear_slider(canvas, param, editor, range_=range_)
            self.add_control(param, s)
            s.widget().place(x=x, y=y0)

        tumbler("clockRate", x0, y0)
        tumbler("sawFreq", xsaw - 30, y0 + 160)

        tog = ToggleButton(canvas,
                           "clockSource",
                           editor,
                           text=["Internal", "External"],
                           fill='black',
                           foreground='#007d47',
                           selected_fill='black',
                           selected_foreground='#007d47')
        self.add_control("clockSource", tog)
        tog.layout((x0 + 8, y0 + 36))
        tog.update_aspect()
        norm("sawMix", xsaw)
        norm("noiseMix", xnoise)
        norm("externalMix", xexternal)
        norm("lag", xlag)
        norm("scale", xlag + 60)
        linear_slider("bias", xlag + 120, (-4, 4))
Esempio n. 7
0
    def __init__(self,stack,editor):
        self.name = "Sol %s" % stack
        self.image_file = "resources/Sol/editor_%s.png" % stack
        self.tab_file = "resources/Sol/tab_%s.png" % stack
        frame = editor.create_tab(self.name,self.tab_file)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,900,550,self.image_file)
        canvas.pack()
        TkSubEditor.__init__(self,canvas,editor,self.name)
        editor.add_child_editor(self.name, self)

        x0 = 50
        xop = x0
        xfilter = 640
        y0 = 75
        y1 = 300

        if stack == 'x':
            self.init_fm_op('a',xop,y0)
            self.init_fm_op('b',xop,y1)
        else:
            self.init_wv_op('c',xop,y0)
            self.init_wv_op('d',xop,y1)

        self.init_stack_filter(stack,xfilter,y0,y1)
Esempio n. 8
0
    def __init__(self,editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,1000,700,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self,canvas,editor,self.NAME)
        editor.add_child_editor(self.NAME, self)

        x0 = 75
        y0 = 75
        y1 = 380

        self.norm_slider("spread_external",x0,y0)
        self.norm_slider("cluster_external",x0+60,y0)

        msb_harm = self.msb("harm2_external",len(POLAR_HARMONIC_MOD_RANGE),x0+120,y0)
        msb_filter = self.msb("f1_freq_external",len(FILTER_MOD_VALUES),x0+120,y0+122)
        for i,n in enumerate(POLAR_HARMONIC_MOD_RANGE):
            fg = None
            self.msb_aspect(msb_harm,i,n,foreground=fg)
        for i,n in enumerate(FILTER_MOD_VALUES):
            fg = None
            self.msb_aspect(msb_filter,i,n,foreground=fg)
        msb_harm.update_aspect()
        msb_filter.update_aspect()
Esempio n. 9
0
 def __init__(self,editor):
     frame = editor.create_tab(self.NAME,self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame,565,478,self.IMAGE_FILE)
     canvas.pack()
     TkSubEditor.__init__(self,canvas,editor,self.NAME)
     editor.add_child_editor(self.NAME, self)
     x0,y0 = 150, 75
     x_scale = x0
     x_delay = x0+22
     x_phase = x_scale+75
     x_wetamp = x_phase+108
     x_amp = x_wetamp+75
     y_scale = y0+150
     y_delay = y_scale+50
     y_phase = y_scale
     y_wetamp = y_delay
     y_amp = y_wetamp
     msb_scale = self.msb("delayScale",3,x_scale,y_scale)
     self.norm_slider("delay",x_delay,y_delay)
     msb_phase =self.msb("phase",2,x_phase,y_phase)
     self.volume_slider("wet",x_wetamp,y_wetamp)
     self.volume_slider("amp",x_amp,y_amp)
     self.msb_aspect(msb_scale, 0, 0.001, "x1")
     self.msb_aspect(msb_scale, 1, 0.010, "x2")
     self.msb_aspect(msb_scale, 2, 0.100, "x3")
     msb_scale.update_aspect()
     self.msb_aspect(msb_phase, 0, -1, "-")
     self.msb_aspect(msb_phase, 1, 1, "+")
     msb_phase.update_aspect()
Esempio n. 10
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1400, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        y0 = 50
        x0 = 75
        xim = x0 + 120
        xxm = xim + 90
        xxbleed = xxm + 60
        xcbleed = xxbleed + 90
        xamp = xcbleed + 90

        def vslider(param, x):
            s = cf.volume_slider(canvas, param, editor)
            self.add_control(param, s)
            s.widget().place(x=x, y=y0)
            return s

        tfreq = Tumbler(canvas, "imodfreq", editor, digits=5, scale=1)
        self.add_control("imodfreq", tfreq)
        tfreq.layout((x0, y0))
        vslider("imodamp", xim)
        vslider("xmodamp", xxm)
        vslider("xmodbleed", xxbleed)
        vslider("carbleed", xcbleed)
        vslider("amp", xamp)
Esempio n. 11
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME,self.TAB_FILE)
     frame.config(background=factory.bg())
     TkSubEditor.__init__(self, frame, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     lab_panel = factory.image_label(frame, self.IMAGE_FILE)
     lab_panel.pack(anchor="nw", expand=False)
     s_pos = cf.bipolar_slider(frame, "pos", editor)
     s_lfo_freq = ExpSlider(frame, "lfoFreq", editor, range_=100, degree=3)
     s_lfo_depth = cf.normalized_slider(frame, "lfoDepth", editor)
     s_xscale = cf.linear_slider(frame, "xscale", editor, range_=(-2, 2))
     s_xbias = cf.linear_slider(frame, "xbias", editor, range_=(-2,2))
     s_amp = cf.volume_slider(frame, "amp", editor)
     self.add_control("pos", s_pos)
     self.add_control("lfoFreq", s_lfo_freq)
     self.add_control("lfoDepth", s_lfo_depth)
     self.add_control("xscale", s_xscale)
     self.add_control("xbias", s_xbias)
     self.add_control("amp", s_amp)
     y0 = 60
     x0 = 120
     x_lfo_freq = x0 + 90
     x_lfo_depth = x_lfo_freq + 60
     x_xscale = x_lfo_depth + 90
     x_xbias = x_xscale + 60
     x_amp = x_xbias + 90
     s_pos.widget().place(x=x0, y=y0, height=200)
     s_lfo_freq.layout(offset=(x_lfo_freq, y0), height=200, checkbutton_offset=None)
     s_lfo_depth.widget().place(x=x_lfo_depth, y=y0, height=200)
     s_xscale.widget().place(x=x_xscale, y=y0, height=200)
     s_xbias.widget().place(x=x_xbias, y=y0, height=200)
     s_amp.widget().place(x=x_amp, y=y0, height=200)
Esempio n. 12
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 465, 478, self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        x0, y0 = 150, 75

        x_scale = x0
        x_delay = x0 + 22
        x_phase = x_scale + 75
        x_wetamp = x_phase + 108

        y_scale = y0 + 150
        y_delay = y_scale + 50
        y_phase = y_scale
        y_wetamp = y_delay

        msb_scale = self.msb("delayScale", 3, x_scale, y_scale)
        self.norm_slider("delay", x_delay, y_delay)

        msb_phase = self.msb("phase", 2, x_phase, y_phase)
        self.volume_slider("wet", x_wetamp, y_wetamp)

        self.msb_aspect(msb_scale, 0, 0.001, "x1")
        self.msb_aspect(msb_scale, 1, 0.010, "x2")
        self.msb_aspect(msb_scale, 2, 0.100, "x3")
        msb_scale.update_aspect()

        self.msb_aspect(msb_phase, 0, -1, "-")
        self.msb_aspect(msb_phase, 1, 1, "+")
        msb_phase.update_aspect()
Esempio n. 13
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     TkSubEditor.__init__(self, frame, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     lab_panel = factory.image_label(frame, self.IMAGE_FILE)
     lab_panel.pack(anchor="nw", expand=False)
     s_pos = cf.bipolar_slider(frame, "pos", editor)
     s_lfo_freq = ExpSlider(frame, "lfoFreq", editor, range_=100, degree=3)
     s_lfo_depth = cf.normalized_slider(frame, "lfoDepth", editor)
     s_xscale = cf.linear_slider(frame, "xscale", editor, range_=(-2, 2))
     s_xbias = cf.linear_slider(frame, "xbias", editor, range_=(-2, 2))
     s_amp = cf.volume_slider(frame, "amp", editor)
     self.add_control("pos", s_pos)
     self.add_control("lfoFreq", s_lfo_freq)
     self.add_control("lfoDepth", s_lfo_depth)
     self.add_control("xscale", s_xscale)
     self.add_control("xbias", s_xbias)
     self.add_control("amp", s_amp)
     y0 = 60
     x0 = 120
     x_lfo_freq = x0 + 90
     x_lfo_depth = x_lfo_freq + 60
     x_xscale = x_lfo_depth + 90
     x_xbias = x_xscale + 60
     x_amp = x_xbias + 90
     s_pos.widget().place(x=x0, y=y0, height=200)
     s_lfo_freq.layout(offset=(x_lfo_freq, y0),
                       height=200,
                       checkbutton_offset=None)
     s_lfo_depth.widget().place(x=x_lfo_depth, y=y0, height=200)
     s_xscale.widget().place(x=x_xscale, y=y0, height=200)
     s_xbias.widget().place(x=x_xbias, y=y0, height=200)
     s_amp.widget().place(x=x_amp, y=y0, height=200)
Esempio n. 14
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        y0 = 75
        y_tumbler = y0 + 50

        x0 = 75
        x_port = x0
        x_lfo = x_port + 75
        x_delay = x_lfo + 100
        x_vsens = x_delay + 60
        x_vdepth = x_vsens + 60
        x_xpitch = x_vdepth + 60
        x_moddepth = x_xpitch + 90
        x_xmod = x_moddepth + 60
        x_xscale = x_xmod + 90
        x_amp = x_xscale + 90

        def norm_slider(param, x):
            s = cf.normalized_slider(canvas, param, editor)
            self.add_control(param, s)
            s.widget().place(x=x, y=y0)
            return s

        def linear_slider(param, x, range_=(0, 4)):
            s = cf.linear_slider(canvas, param, editor, range_=range_)
            self.add_control(param, s)
            s.widget().place(x=x, y=y0)
            return s

        def volume_slider(param, x):
            s = cf.volume_slider(canvas, param, editor)
            self.add_control(param, s)
            s.widget().place(x=x, y=y0)
            return s

        def tumbler(param, x):
            t = Tumbler(canvas, param, editor, digits=5, scale=0.001)
            self.add_control(param, t)
            t.layout((x, y_tumbler))
            t.update_aspect()
            return t

        norm_slider("port", x_port)
        tumbler("lfov_freq", x_lfo)
        linear_slider("lfov_delay", x_delay)
        norm_slider("vsens", x_vsens)
        norm_slider("vdepth", x_vdepth)
        norm_slider("xpitch", x_xpitch)
        norm_slider("modDepth", x_moddepth)
        norm_slider("xmod", x_xmod)
        linear_slider("xscale", x_xscale, (0, 2))
        volume_slider("amp", x_amp)
Esempio n. 15
0
    def __init__(self,editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME,self)
        
        y0 = 75
        y_tumbler = y0 + 50

        x0 = 75
        x_port = x0
        x_lfo = x_port + 75
        x_delay = x_lfo + 100
        x_vsens = x_delay + 60
        x_vdepth = x_vsens + 60
        x_xpitch= x_vdepth + 60
        x_moddepth = x_xpitch + 90
        x_xmod = x_moddepth + 60
        x_xscale = x_xmod + 90
        x_amp = x_xscale + 90
        
        def norm_slider(param,x):
            s = cf.normalized_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y0)
            return s

        def linear_slider(param,x,range_=(0,4)):
            s = cf.linear_slider(canvas,param,editor,range_=range_)
            self.add_control(param,s)
            s.widget().place(x=x,y=y0)
            return s

        def volume_slider(param,x):
            s = cf.volume_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y0)
            return s

        def tumbler(param,x):
            t = Tumbler(canvas,param,editor,digits=5,scale=0.001)
            self.add_control(param,t)
            t.layout((x,y_tumbler))
            t.update_aspect()
            return t

        norm_slider("port",x_port)
        tumbler("lfov_freq",x_lfo)
        linear_slider("lfov_delay",x_delay)
        norm_slider("vsens",x_vsens)
        norm_slider("vdepth",x_vdepth)
        norm_slider("xpitch",x_xpitch)
        norm_slider("modDepth",x_moddepth)
        norm_slider("xmod",x_xmod)
        linear_slider("xscale",x_xscale,(0,2))
        volume_slider("amp",x_amp)
Esempio n. 16
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,735,510,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        def linear_slider(param, range_, x, y):
            s = cf.linear_slider(canvas,param,editor,range_=range_)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)

        def norm_slider(param,x,y):
            s = cf.normalized_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)

        def eq_slider(param,x,y):
            s = cf.third_octave_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)

        def amp_slider(param,x,y):
            s = cf.volume_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)

        def pan_slider(param,x,y):
            s = cf.bipolar_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)

        y0 = 50
        x0 = 75
        x1 = x0 + 60
        x2 = x1 + 60
        x3 = x2 + 60
        xeq = x3 + 75
        xlp = xeq
        xhp = xlp+60
        xdry = xhp+75
        xwet = xdry+120
        
        linear_slider("preDelay",(0.0,0.333),x0,y0)
        norm_slider("roomSize",x1,y0)
        norm_slider("damp",x2,y0)
        norm_slider("modDepth",x3,y0)
        eq_slider("lpcutoff",xlp,y0)
        eq_slider("hpcutoff",xhp,y0)
        amp_slider("dryAmp", xdry,y0)
        pan_slider("dryPan", xdry+60,y0)
        amp_slider("wetAmp", xwet,y0)
        pan_slider("wetPan", xwet+60,y0)
        
        msb_gate = ToggleButton(canvas,"gatted",editor,)
        self.add_control("gatted", msb_gate)
        msb_gate.layout((x0+157,y0+200))
        msb_gate.update_aspect()
Esempio n. 17
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        y0 = 75
        yfreq = y0
        ygain = yfreq + 50
        yq = ygain + 180
        y_enable = yq + 180
        x0 = 75
        x_shelf = x0

        def tumbler(param, x, y=yfreq):
            t = Tumbler(canvas, param, editor, digits=5, scale=1)
            self.add_control(param, t)
            t.layout((x, y))
            return t

        def q_slider(param, x, y=yq):
            s = cf.linear_slider(canvas, param, editor, range_=(1.0, 0.0))
            self.add_control(param, s)
            s.widget().place(x=x, y=y)
            return s

        def gain_slider(param, x, y=ygain):
            s = cf.linear_slider(canvas, param, editor, range_=(-36, 36))
            self.add_control(param, s)
            s.widget().place(x=x, y=y)
            return s

        tumbler("hp", x_shelf, y=y0)
        tumbler("lp", x_shelf, y=y0 + 60)
        for i in (1, 2, 3, 4):
            x = x_shelf + i * 100
            tumbler("f%d" % i, x + 6)
            gain_slider("gain%d" % i, x + 37)
            q_slider("q%d" % i, x + 37)
            p_enable = "enable%d" % i
            m_enable = ToggleButton(canvas,
                                    p_enable,
                                    editor,
                                    text=("Mute", "On"))
            self.add_control(p_enable, m_enable)
            m_enable.layout((x + 14, y_enable))
            m_enable.update_aspect()
        x_bleed = x + 150
        s = cf.normalized_slider(canvas, "bleed", editor)
        self.add_control("bleed", s)
        s.widget().place(x=x_bleed, y=ygain, height=150)
        x_amp = x_bleed + 60
        gs = cf.linear_slider(canvas, "amp", editor, range_=(-12, 12))
        self.add_control("amp", gs)
        gs.widget().place(x=x_amp, y=ygain)
Esempio n. 18
0
 def __init__(self,editor):
     self.name = "Sol Mod"
     self.image_file = "resources/Sol/editor_mod.png" 
     self.tab_file = "resources/Sol/tab_mod.png"
     frame = editor.create_tab(self.name,self.tab_file)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame,1100,580,self.image_file)
     canvas.pack()
     TkSubEditor.__init__(self,canvas,editor,self.name)
     editor.add_child_editor(self.name, self)
     x0 = 50
     y0 = 75
     y1 = 330
     self.tumbler("timebase",5,0.001,x0,y0)
     self.norm_slider("port",x0+30,y1)
     xvib = x0+100
     msb_vratio = self.msb("vratio",len(LFO_RATIOS),xvib,y0)
     self.linear_slider("vdelay",(0,MAX_LFO_DELAY),xvib+100,y0)
     self.norm_slider("vsens",xvib+160,y0)
     self.norm_slider("vdepth",xvib+220,y0)
     self.norm_slider("pitch_ctrlbus",xvib+280,y0)
     msb_aratio = self.msb("alfo_ratio",len(LFO_RATIOS),xvib,y1)
     self.linear_slider("alfo_delay",(0,MAX_LFO_DELAY),xvib+100,y1)
     msb_bratio = self.msb("blfo_ratio",len(LFO_RATIOS),xvib+180,y1)
     self.linear_slider("blfo_delay",(0,MAX_LFO_DELAY),xvib+280,y1)
     lfo_ratio_msblist = (msb_vratio,msb_aratio,msb_bratio)
     for i,r in enumerate(LFO_RATIOS):
         n,d = r.numerator,r.denominator
         if d == 1:
             txt = "%d" % n
         else:
             txt = "%d/%d" % (n,d)
         for msb in lfo_ratio_msblist:
             self.msb_aspect(msb,i,float(r),text=txt)
     for msb in lfo_ratio_msblist:
         msb.update_aspect()
     def env_slider(param,x,y):
         self.exp_slider(param,MAX_ENV_SEGMENT_TIME,x,y)
     xenv = xvib+340
     for q in "ab":
         if q == 'a':
             y = y0
         else:
             y = y1
         env_slider("%senv_attack" % q,xenv,y)
         env_slider("%senv_decay" % q,xenv+40,y)
         self.norm_slider("%senv_sustain" % q,xenv+80,y)
         env_slider("%senv_release" % q,xenv+120,y)
         self.toggle("%senv_lfo_trig" % q,xenv,y+175)
     xcenv = xenv+170
     cenv = ADDSREditor(canvas,1,(xcenv,y0),(400,400),
                        ("cenv_attack","cenv_decay1","cenv_decay2",
                         "cenv_release","cenv_breakpoint","cenv_sustain",
                         "cenv_trig_mode"),
                        self,MAX_ENV_SEGMENT_TIME)
     self.add_child_editor("Cenv",cenv)
     cenv.sync()
Esempio n. 19
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        y0 = 75
        y1 = y0 + 180
        x0 = 75
        xlow = x0
        xcenter = xlow + 54
        xhigh = xcenter + 100

        def gain_slider(param, x):
            range_ = (-12, 12)
            s = cf.linear_slider(canvas, param, editor, range_=range_)
            self.add_control(param, s)
            s.widget().place(x=x, y=y1, height=125)
            return s

        def frequency_slider(param, x):
            s = ExpSlider(canvas, param, editor, range_=20000, degree=3)
            self.add_control(param, s)
            s.layout((x, y0), checkbutton_offset=None)
            return s

        frequency_slider("fLow", xlow)
        frequency_slider("fHigh", xhigh)
        bwscales = ((0.333, "1/3"), (0.667, "2/3"), (1.000, "1"),
                    (1.333, "1 1/3"), (1.667, "1 2/3"), (2.00, "2"))
        param = "bwScale"
        m = MSB(canvas, param, editor, len(bwscales))
        for i, p in enumerate(bwscales):
            v, txt = p
            if v >= 1:
                cfill = "green"
            else:
                cfill = "red"
            d = {
                "fill": "black",
                "foreground": cfill,
                "outline": "gray",
                "value": v,
                "text": txt
            }
            m.define_aspect(i, v, d)
        m.layout((xcenter, y0 + 50))
        m.update_aspect()
        gain_slider("gainLow", xlow)
        gain_slider("gainCenter", xcenter + 23)
        gain_slider("gainHigh", xhigh)
Esempio n. 20
0
 def __init__(self,editor):
     frame = editor.create_tab(_NAME, _TAB_FILE)
     frame.config(background=factory.bg())
     self.editor = editor
     TkSubEditor.__init__(self,frame,editor,_NAME)
     editor.add_child_editor(_NAME,self)
     self._layout_engion_selection(frame)
     self._layout_env_type(frame)
     self._layout_env_time(frame)
     self._layout_slider_panel(frame)
     lab_help = factory.label(frame,_BLURB)
     lab_help.grid(row=2,column=0,rowspan=3,columnspan=4)
Esempio n. 21
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILENAME)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 946, 777, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 50
     y1 = y0 + 230
     xfreq1, yfreq_offset = 50, 0
     xamp1 = xfreq1 + 90
     xfreq2 = xamp1 + 60
     xamp2 = xfreq2 + 90
     xattack = xamp2 + 75
     xdecay = xattack + 60
     xsustain = xdecay + 60
     xrelease = xsustain + 60
     xmod = xrelease + 75
     xexternmod = xmod + 60
     xexternpitch = xexternmod + 60
     xchorus = xexternpitch + 75
     xchorus_delay = xchorus + 60
     xvfreq = xmod
     xvdelay = xvfreq + 60
     xvdepth = xvdelay + 60
     xamp = xchorus_delay
     self.tumbler("r2", xfreq1, y0 + yfreq_offset)
     self.norm_slider("amp2", xamp1, y0)
     self.tumbler("r4", xfreq2, y0 + yfreq_offset)
     self.norm_slider("amp4", xamp2, y0)
     self.env_time_slider("mattack", xattack, y0)
     self.env_time_slider("mdecay", xdecay, y0)
     self.env_time_slider("msustain", xsustain, y0)
     self.env_time_slider("mrelease", xrelease, y0)
     self.norm_slider("modulationDepth", xmod, y0)
     self.norm_slider("xToModulationDepth", xexternmod, y0)
     self.norm_slider("xToPitch", xexternpitch, y0)
     self.norm_slider("chorus", xchorus, y0)
     self.linear_slider("chorusDelay", (0, 4), xchorus_delay, y0)
     self.tumbler("r1", xfreq1, y1 + yfreq_offset)
     self.volume_slider("amp1", xamp1, y1)
     self.tumbler('r3', xfreq2, y1 + yfreq_offset)
     self.volume_slider("amp3", xamp2, y1)
     self.env_time_slider("cattack", xattack, y1)
     self.env_time_slider("cdecay", xdecay, y1)
     self.env_time_slider("csustain", xsustain, y1)
     self.env_time_slider("crelease", xrelease, y1)
     self.linear_slider("vfreq", (0, 8), xvfreq, y1)
     self.linear_slider("vdelay", (0, 4), xvdepth, y1)
     self.norm_slider("vdepth", xvdelay, y1)
     self.volume_slider("amp", xamp, y1)
Esempio n. 22
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME,self.TAB_FILENAME)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 946,777, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 50
     y1 = y0 + 230
     xfreq1, yfreq_offset = 50, 0
     xamp1 = xfreq1+90
     xfreq2 = xamp1+60
     xamp2 = xfreq2+90
     xattack = xamp2+75
     xdecay = xattack+60
     xsustain = xdecay+60
     xrelease = xsustain+60
     xmod = xrelease+75
     xexternmod = xmod + 60
     xexternpitch = xexternmod + 60
     xchorus = xexternpitch + 75
     xchorus_delay = xchorus+60
     xvfreq = xmod
     xvdelay = xvfreq+60
     xvdepth = xvdelay+60
     xamp = xchorus_delay
     self.tumbler("r2", xfreq1, y0+yfreq_offset)
     self.norm_slider("amp2",xamp1,y0)
     self.tumbler("r4", xfreq2,y0+yfreq_offset)
     self.norm_slider("amp4",xamp2,y0) 
     self.env_time_slider("mattack", xattack, y0)
     self.env_time_slider("mdecay", xdecay, y0)
     self.env_time_slider("msustain", xsustain, y0)
     self.env_time_slider("mrelease", xrelease, y0)
     self.norm_slider("modulationDepth", xmod, y0)
     self.norm_slider("xToModulationDepth", xexternmod, y0)
     self.norm_slider("xToPitch", xexternpitch, y0)
     self.norm_slider("chorus", xchorus, y0)
     self.linear_slider("chorusDelay",(0,4),xchorus_delay, y0)
     self.tumbler("r1", xfreq1, y1+yfreq_offset)
     self.volume_slider("amp1", xamp1, y1)
     self.tumbler('r3', xfreq2, y1+yfreq_offset)
     self.volume_slider("amp3", xamp2, y1)
     self.env_time_slider("cattack", xattack, y1)
     self.env_time_slider("cdecay", xdecay, y1)
     self.env_time_slider("csustain", xsustain, y1)
     self.env_time_slider("crelease", xrelease, y1)
     self.linear_slider("vfreq", (0,8), xvfreq, y1)
     self.linear_slider("vdelay", (0,4), xvdepth, y1)
     self.norm_slider("vdepth", xvdelay, y1)
     self.volume_slider("amp", xamp, y1)
Esempio n. 23
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1400, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        y,ypan = 50,250
        x0 = 100
        x1 = x0+90
        x2 = x1+60
        x3 = x2+60
        x4 = x3+60
        x5 = x4+90
        x6 = x5+60
        x7 = x6+60
        
        def norm_slider(param,x,y):
            s = cf.normalized_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y,width=14, height=150)

        def bipolar_slider(param,x,y):
            s = cf.bipolar_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y,width=14, height=75)

        def amp_slider(param,x,y):
            s = cf.volume_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y,width=14,height=150)
            
        tratio = Tumbler(canvas,"pitchRatio",editor,
                         sign=False,digits=4,scale=0.001,
                         range_=(0,4000))
        self.add_control("pitchRatio", tratio)
        tratio.layout((x0,y))
        norm_slider("pitchDispersion",x1,y)
        norm_slider("timeDispersion",x2,y)
        norm_slider("delay",x3,y)
        norm_slider("feedback",x4,y)
        amp_slider("dryAmp",x5,y)
        amp_slider("psAmp",x6,y)
        amp_slider("delayAmp",x7,y)
        bipolar_slider("dryPan",x5,ypan)
        bipolar_slider("psPan",x6,ypan)
        bipolar_slider("delayPan",x7,ypan)
        
            
Esempio n. 24
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas=factory.canvas(frame,696,361,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        y0 = 75
        x0 = 100
        xmix = x0 + 150
        xsaw = xmix
        xnoise = xsaw+64
        xexternal = xnoise + 60
        xlag = xexternal+90
        
        def tumbler(param,x,y):
            t = Tumbler(canvas,param,editor,digits=5,scale=0.001,
                        outline='#a5a08a',
                        foreground='#a5a08a',
                        fill='black')
            self.add_control(param,t)
            t.layout((x,y))
            return y

        def norm(param,x):
            s = cf.normalized_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y0)
            return s

        def linear_slider(param,x,range_):
            s = cf.linear_slider(canvas,param,editor,range_=range_)
            self.add_control(param,s)
            s.widget().place(x=x,y=y0)
        
        tumbler("clockRate",x0,y0)
        tumbler("sawFreq",xsaw-30,y0+160)

        tog = ToggleButton(canvas,"clockSource",editor,
                           text=["Internal","External"],
                           fill='black',foreground='#007d47',
                           selected_fill='black',selected_foreground='#007d47')
        self.add_control("clockSource", tog)
        tog.layout((x0+8,y0+36))
        tog.update_aspect()
        norm("sawMix",xsaw)
        norm("noiseMix",xnoise)
        norm("externalMix",xexternal)
        norm("lag",xlag)
        norm("scale",xlag+60)
        linear_slider("bias",xlag+120,(-4,4))
Esempio n. 25
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1100,617, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 100
     y1 = y0 + 250
     y_ratio_offset = 25
     y_bias_offset = 85
     x0 = 100
     xa = x0
     xatone = xa+100
     xaattack = xatone+60
     xadecay = xaattack+60
     xabend = xadecay+60
     xavelocity = xabend+60
     xaamp = xavelocity+60
     xnoise = xaamp+90
     xnseRes = xnoise+90
     xnseAttack = xnseRes+60
     xnseDecay = xnseAttack+60
     xnseBend = xnseDecay+60
     xnseVelocity = xnseBend+60
     xnseAmp = xnseVelocity+60
     self.tumbler("aRatio",5,0.001,xa,y0+y_ratio_offset)
     self.norm_slider("aTone",xatone,y0)
     self.time_slider("aAttack",xaattack,y0)
     self.time_slider("aDecay",xadecay,y0)
     self.bipolar_slider("aBend",xabend,y0)
     self.norm_slider("aVelocity",xavelocity,y0)
     self.amp_slider("aAmp",xaamp,y0)
     self.tumbler("bRatio",5,0.001,xa,y1+y_ratio_offset)
     self.linear_slider("bTune",xatone,y1)
     self.time_slider("bAttack",xaattack,y1)
     self.time_slider("bDecay",xadecay,y1)
     self.bipolar_slider("bBend",xabend,y1)
     self.norm_slider("bVelocity",xavelocity,y1)
     self.amp_slider("bAmp",xaamp,y1)
     self.tumbler("noiseRatio",5,0.001,xnoise,y0+y_ratio_offset)
     self.tumbler("noiseBias",5,1,xnoise,y0+y_bias_offset)
     self.norm_slider("noiseRes",xnseRes, y0)
     self.time_slider("noiseAttack",xnseAttack,y0)
     self.time_slider("noiseDecay",xnseDecay,y0)
     self.bipolar_slider("noiseBend",xnseBend,y0)
     self.norm_slider("noiseVelocity",xnseVelocity,y0)
     self.amp_slider("noiseAmp",xnseAmp,y0)
     self.amp_slider("amp",xnseAmp,y1)
Esempio n. 26
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1100, 617, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 100
     y1 = y0 + 250
     y_ratio_offset = 25
     y_bias_offset = 85
     x0 = 100
     xa = x0
     xatone = xa + 100
     xaattack = xatone + 60
     xadecay = xaattack + 60
     xabend = xadecay + 60
     xavelocity = xabend + 60
     xaamp = xavelocity + 60
     xnoise = xaamp + 90
     xnseRes = xnoise + 90
     xnseAttack = xnseRes + 60
     xnseDecay = xnseAttack + 60
     xnseBend = xnseDecay + 60
     xnseVelocity = xnseBend + 60
     xnseAmp = xnseVelocity + 60
     self.tumbler("aRatio", 5, 0.001, xa, y0 + y_ratio_offset)
     self.norm_slider("aTone", xatone, y0)
     self.time_slider("aAttack", xaattack, y0)
     self.time_slider("aDecay", xadecay, y0)
     self.bipolar_slider("aBend", xabend, y0)
     self.norm_slider("aVelocity", xavelocity, y0)
     self.amp_slider("aAmp", xaamp, y0)
     self.tumbler("bRatio", 5, 0.001, xa, y1 + y_ratio_offset)
     self.linear_slider("bTune", xatone, y1)
     self.time_slider("bAttack", xaattack, y1)
     self.time_slider("bDecay", xadecay, y1)
     self.bipolar_slider("bBend", xabend, y1)
     self.norm_slider("bVelocity", xavelocity, y1)
     self.amp_slider("bAmp", xaamp, y1)
     self.tumbler("noiseRatio", 5, 0.001, xnoise, y0 + y_ratio_offset)
     self.tumbler("noiseBias", 5, 1, xnoise, y0 + y_bias_offset)
     self.norm_slider("noiseRes", xnseRes, y0)
     self.time_slider("noiseAttack", xnseAttack, y0)
     self.time_slider("noiseDecay", xnseDecay, y0)
     self.bipolar_slider("noiseBend", xnseBend, y0)
     self.norm_slider("noiseVelocity", xnseVelocity, y0)
     self.amp_slider("noiseAmp", xnseAmp, y0)
     self.amp_slider("amp", xnseAmp, y1)
Esempio n. 27
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1400, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        y,ypan = 50,250
        x0 = 100
        x1 = x0+90
        x2 = x1+60
        x3 = x2+60
        x4 = x3+60
        x5 = x4+90
        x6 = x5+60
        x7 = x6+60
        
        def norm_slider(param,x,y):
            s = cf.normalized_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y,width=14, height=150)

        def bipolar_slider(param,x,y):
            s = cf.bipolar_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y,width=14, height=75)

        def amp_slider(param,x,y):
            s = cf.volume_slider(canvas,param,editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y,width=14,height=150)
            
        tratio = Tumbler(canvas,"pitchRatio",editor,
                         sign=False,digits=4,scale=0.001,
                         range_=(0,4000))
        self.add_control("pitchRatio", tratio)
        tratio.layout((x0,y))
        norm_slider("pitchDispersion",x1,y)
        norm_slider("timeDispersion",x2,y)
        norm_slider("delay",x3,y)
        norm_slider("feedback",x4,y)
        amp_slider("dryAmp",x5,y)
        amp_slider("psAmp",x6,y)
        amp_slider("delayAmp",x7,y)
        bipolar_slider("dryPan",x5,ypan)
        bipolar_slider("psPan",x6,ypan)
        bipolar_slider("delayPan",x7,ypan)
Esempio n. 28
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     TkSubEditor.__init__(self, frame, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     self.pack(expand=True, fill="both")
     lab_panel = factory.image_label(self, self.IMAGE_FILE)
     lab_panel.pack(anchor="nw", expand=False)
     s_delay = cf.normalized_slider(frame, "delay", editor)
     s_mod_depth = ExpSlider(frame, "imodDepth", editor, range_=1, degree=2)
     s_mod_freq = ExpSlider(frame, "imodFreq", editor, range_=10, degree=3)
     s_xmod_depth = ExpSlider(frame, "xmodDepth", editor, range_=1, degree=2)
     s_feedback = cf.bipolar_slider(frame, "feedback", editor)
     s_low_eq = cf.third_octave_slider(frame, "feedbackLowpass", editor)
     s_high_eq = cf.third_octave_slider(frame, "feedbackHighpass", editor)
     s_mix = cf.normalized_slider(frame, "efxMix", editor)
     s_xmix = cf.normalized_slider(frame, "xmixScale", editor)
     s_amp = cf.volume_slider(frame, "amp", editor)
     self.add_control("delay", s_delay)
     self.add_control("imodDepth", s_mod_depth)
     self.add_control("imodFreq", s_mod_freq)
     self.add_control("xmodDepth", s_xmod_depth)
     self.add_control("feedback", s_feedback)
     self.add_control("feedbackLowpass", s_low_eq)
     self.add_control("feedbackHighpass", s_high_eq)
     self.add_control("efxMix", s_mix)
     self.add_control("xmixScale", s_xmix)
     self.add_control("amp", s_amp)
     y0 = 120
     x0 = 120
     x1 = x0 + 90
     x2 = x1 + 60
     x3 = x2 + 60
     xfb = x3 + 90
     x4 = xfb
     x5 = x4 + 60
     x6 = x5 + 60
     xmix = x6 + 90
     x7 = xmix
     x8 = x7+60
     xamp = x8+90
     s_delay.widget().place(x=x0, y=y0, height=175)
     s_mod_depth.layout(offset=(x1,y0), height=175, checkbutton_offset=None)
     s_mod_freq.layout(offset=(x2,y0), height = 175, checkbutton_offset=None)
     s_xmod_depth.layout(offset=(x3, y0), height=175, checkbutton_offset=None)
     s_feedback.widget().place(x=x4, y=y0, height=175)
     s_low_eq.widget().place(x=x5, y=y0, height=175)
     s_high_eq.widget().place(x=x6, y=y0, height=175)
     s_mix.widget().place(x=x7, y=y0, height=175)
     s_xmix.widget().place(x=x8, y=y0, height=175)
     s_amp.widget().place(x=xamp, y=y0, height=175)
Esempio n. 29
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1200, 600, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 60
     y1 = 300
     yfreq_offset = 0
     ybias_offset = 100
     x0, xosc_offset = 50, 225
     x_wave_offset = 105
     x_amp_offset = x_wave_offset + 60
     x_env1_wave_offset = x_wave_offset - 60
     x_lfo_wave_offset = x_wave_offset
     x_env1_amp_offset = x_amp_offset
     for i, osc in enumerate(("osc1", "osc2", "osc3")):
         x = x0 + (i * xosc_offset)
         tumbler = Tumbler(canvas,
                           osc + "Freq",
                           editor,
                           digits=5,
                           scale=0.001)
         self.add_control(osc + "Freq", tumbler)
         tumbler.layout((x, y0 + yfreq_offset))
         self.norm_slider(osc + "Wave", x + x_wave_offset, y0)
         self.volume_slider(osc + "Amp", x + x_amp_offset, y0)
         self.exp_slider(osc + "Wave_env1", x + x_env1_wave_offset, y1)
         self.exp_slider(osc + "Wave_lfo", x + x_lfo_wave_offset, y1)
         self.exp_slider(osc + "Amp_env1", x + x_env1_amp_offset, y1)
         xosc3 = x
     tumbler = Tumbler(canvas, "osc3Bias", editor, digits=5, scale=0.01)
     self.add_control("osc3Bias", tumbler)
     tumbler.layout((xosc3, y0 + ybias_offset))
     self.norm_slider("osc3WaveLag",
                      xosc3 + x_wave_offset + 25,
                      y0,
                      width=10,
                      height=75)
     xnoise = xosc3 + xosc_offset + 30
     self.linear_slider("noiseFreq", xnoise, y0)
     self.volume_slider("noiseAmp", xnoise + 60, y0)
     self.norm_slider("noiseBW", xnoise, y1)
     self.exp_slider("noiseAmp_env1", xnoise + 60, y1)
     xpitch = xnoise + 150
     self.linear_slider("port", xpitch, y0, range_=(0, 2))
     self.norm_slider("xToPitch", xpitch, y1)
Esempio n. 30
0
    def __init__(self,editor):
        self.name = "Sol Vector"
        self.image_file = "resources/Sol/editor_vector.png" 
        self.tab_file = "resources/Sol/tab_vector.png"
        frame = editor.create_tab(self.name,self.tab_file)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,820,570,self.image_file)
        canvas.pack()
        TkSubEditor.__init__(self,canvas,editor,self.name)
        editor.add_child_editor(self.name, self)
        x0 = 50
        y0 = 75
        y1 = 330

        def env_slider(param,x,y):
            self.exp_slider(param,MAX_ENV_SEGMENT_TIME,x,y)
        
        for v in "xy":
            if v=='x':
                y = y0
            else:
                y = y1
            msb = self.msb("%slfo_ratio" % v, len(LFO_RATIOS),x0,y)
            for i,r in enumerate(LFO_RATIOS):
                n,d = r.numerator,r.denominator
                if d == 1:
                    txt = "%d" % n
                else:
                    txt = "%d/%d" % (n,d)
                self.msb_aspect(msb,i,float(r),text=txt)
            msb.update_aspect()
            self.norm_slider("%slfo_wave" % v,x0+100,y)
            self.linear_slider("%slfo_delay" % v,(0,MAX_LFO_DELAY),x0+160,y)
            xenv = x0+220
            env_slider("%senv_attack" % v,xenv,y)
            env_slider("%senv_decay" % v, xenv+40,y)
            self.norm_slider("%senv_sustain" % v, xenv+80,y)
            env_slider("%senv_release" % v, xenv+120,y)
            self.toggle("%senv_lfo_trig" % v,xenv,y+175)

            xpos = xenv+180
            self.linear_slider("%spos" % v, (-1,1),xpos,y)
            self.linear_slider("%spos_%senv" % (v,v),(-1,1),xpos+60,y)
            self.linear_slider("%spos_%slfo" % (v,v),(-1,1),xpos+120,y)
            self.linear_slider("%spos_v%sbus" % (v,v),(-1,1),xpos+180,y)
            self.volume_slider("%samp" % v,xpos+240,y)

        self.volume_slider("amp",x0+720,(y0+y1)/2)
Esempio n. 31
0
 def __init__(self,stack_id,name,imagefile,editor):
     tab_image = "resources/Algo/tab_stack_%s.png" % stack_id.lower()
     frame = editor.create_tab(name,tab_image)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1050, 700, imagefile)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, name)
     editor.add_child_editor(name, self)
     carrier = {"A":1,"B":5,"C":7}[stack_id]
     mod1 = {"A":2,"B":4,"C":8}[stack_id]
     mod2 = {"A":3,"B":6,"C":None}[stack_id]
     self.layout_operator(carrier)
     self.layout_operator(mod1)
     if mod2: self.layout_operator(mod2)
     self.layout_stack(stack_id,carrier)
Esempio n. 32
0
 def __init__(self, stack_id, name, imagefile, editor):
     tab_image = "resources/Algo/tab_stack_%s.png" % stack_id.lower()
     frame = editor.create_tab(name, tab_image)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1050, 700, imagefile)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, name)
     editor.add_child_editor(name, self)
     carrier = {"A": 1, "B": 5, "C": 7}[stack_id]
     mod1 = {"A": 2, "B": 4, "C": 8}[stack_id]
     mod2 = {"A": 3, "B": 6, "C": None}[stack_id]
     self.layout_operator(carrier)
     self.layout_operator(mod1)
     if mod2: self.layout_operator(mod2)
     self.layout_stack(stack_id, carrier)
Esempio n. 33
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME,self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 900, 600, self.IMAGE_FILE)
     canvas.pack()
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0,y1 = 50,364
     x0 = 100
     for i,d in enumerate("ABCD "):
         x = x0 + (70 * i)
         if d == ' ':
             d == ''
             x += 50
         param = ("gain%s" % d).strip()
         vs = self.volume_slider(param,x,y0,height=300)
         self.mute_button(d, x,y1)
Esempio n. 34
0
File: envedit.py Progetto: kaos/Llia
    def __init__(self,stack_id,editor):
        name = "Env %s" % stack_id
        image_file = "resources/Algo/envelope_editor_%s.png" % (stack_id.lower())
        tab_image = "resources/Algo/tab_env_%s.png" % (stack_id.lower())
        frame = editor.create_tab(name,tab_image)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, image_file)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, name)
        editor.add_child_editor(name, self)
        
        carrier = {"A":1,"B":5,"C":7}[stack_id]
        mod1 = {"A":2,"B":4,"C":8}[stack_id]
        mod2 = {"A":3,"B":6,"C":None}[stack_id]
        ec = ADDSREditor(canvas,
                         carrier,
                         self.coords(carrier),
                         (WIDTH,HEIGHT),
                         self.env_parameters(carrier),
                         self.editor,
                         acon.MAX_ENV_SEGMENT)
        self.add_child_editor("OP%sENV" % carrier, ec)
        ec.sync()

        e1 = ADDSREditor(canvas,
                         mod1,
                         self.coords(mod1),
                         (WIDTH,HEIGHT),
                         self.env_parameters(mod1),
                         self.editor,
                         acon.MAX_ENV_SEGMENT)
        self.add_child_editor("OP%sENV" % mod1, e1)
        e1.sync()

        if mod2:
            e2 = ADDSREditor(canvas,
                             mod2,
                             self.coords(mod2),
                             (WIDTH,HEIGHT),
                             self.env_parameters(mod2),
                             self.editor,
                             acon.MAX_ENV_SEGMENT)
            self.add_child_editor("OP%sENV" % mod2, e2)
            e2.sync()
Esempio n. 35
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1000, 600, self.IMAGE_FILE)
     canvas.pack()
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 75
     x0 = 75
     x1 = x0 + 160
     xdelta = 75
     x_tog_offset = -23
     y_tog_offset = 160
     self.tumbler("hold", 5, 0.001, x0, y0 + 160)
     self.tumbler("clkfreq", 5, 0.001, x0, y0)
     self.toggle("clksrc",
                 x0 + 7,
                 y0 + 40,
                 off=(0, "Internal"),
                 on=(1, "External"))
     b_half_hold = factory.button(canvas, "1/2", self.half_hold_callback)
     b_half_hold.place(x=x0 + 13, y=y0 + 194)
     for i in range(6):
         j = i + 1
         x = x1 + i * xdelta
         self.norm_slider("amp%d" % j, x, y0)
         self.toggle("gate%d" % j,
                     x + x_tog_offset,
                     y0 + y_tog_offset,
                     off=[0, "On"],
                     on=[1, "Gate"])
     xn = x + xdelta
     self.norm_slider("ampn", xn, y0)
     self.toggle("gaten",
                 xn + x_tog_offset,
                 y0 + y_tog_offset,
                 off=[0, "On"],
                 on=[1, "Gate"])
     y_tumbler_n = y0 + y_tog_offset
     self.tumbler("n", 2, 1, xn - 8, y_tumbler_n + 40)
     xlag = x + 170
     xscale = xlag + 60
     xbias = xscale + 60
     self.norm_slider("lag", xlag, y0)
     self.norm_slider("scale", xscale, y0)
     self.linear_slider("bias", (-4, 4), xbias, y0)
Esempio n. 36
0
    def __init__(self,editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,1000,700,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self,canvas,editor,self.NAME)
        editor.add_child_editor(self.NAME, self)
        x0,y0 = 75,75
        
        # Top row
        x_in = x0
        
        self.volume_slider("inputGain",x_in,y0)
        
        x_env = x_in+90
        self.linear_slider("envGain",(1,100),x_env,y0)
        self.linear_slider("attack",(0,2),x_env+60,y0)
        self.linear_slider("release",(0,2),x_env+120,y0)

        x_clip = x_env+210
        self.norm_slider("clipDrive",x_clip,y0)
        self.norm_slider("clipLfo1",x_clip+60,y0)
        self.norm_slider("clipMix",x_clip+120,y0)

        x_filter = x_clip+210        
        for i,p in enumerate(("Freq","Env","Lfo2","Res","Mix")):
            param = "filter%s" % p
            x = x_filter+(60*i)
            self.norm_slider(param,x,y0)
        
        # 2nd row
        y1 = 300
        x_lfo = x_env
        self.tumbler("lfo1Freq",5,0.001,x_lfo,y1)
        self.norm_slider("lfo2Mod",x_lfo+120,y1)
        self.tumbler("lfo2Freq",5,0.001,x_lfo+180,y1)
        
        x_flanger = x_filter
        for i,p in enumerate(("Delay1","Delay2","Lfo1","Feedback","Mix")):
            param = "flanger%s" % p
            x = x_flanger+(60*i)
            if p != "Feedback":
                self.norm_slider(param,x,y1)
            else:
                self.linear_slider(param,(-1,1),x,y1)
Esempio n. 37
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 626, 562,self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 50
     x0 = 50
     x_delay = x0+90
     x_sens = x_delay+60
     x_depth = x_sens+60
     x_xpitch = x_depth+90
     x_xmod = x_xpitch+60
     x_amp = x_xmod+90
     def tumbler(param,digits,scale,x,y):
         t = Tumbler(canvas,param,editor,digits=digits,scale=scale)
         self.add_control(param,t)
         t.layout((x,y))
         return y
     def norm_slider(param,x,y,height=150):
         s = cf.normalized_slider(canvas,param,editor)
         self.add_control(param,s)
         s.widget().place(x=x,y=y,height=height)
         return s
     def linear_slider(param,range_,x,y,height=150):
         s = cf.linear_slider(canvas,param,editor,range_=range_)
         self.add_control(param,s)
         s.widget().place(x=x,y=y,height=height)
         return s
     def volume_slider(param,x,y):
         s = cf.volume_slider(canvas,param,editor)
         self.add_control(param,s)
         s.widget().place(x=x,y=y)
         return s
     tumbler("lfoFreq",5,0.001,x0,y0)
     linear_slider("lfoDelay",(0,4),x_delay,y0)
     norm_slider("vsens",x_sens,y0)
     norm_slider("vdepth",x_depth,y0)
     norm_slider("xPitch",x_xpitch,y0)
     norm_slider("xModDepth",x_xmod,y0)
     volume_slider("amp",x_amp,y0)
Esempio n. 38
0
    def __init__(self,editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,803,343,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self,canvas,editor,self.NAME)
        editor.add_child_editor(self.NAME, self)
        x0,y0 = 75,75

        x_tab= x0
        y_tab = y0
        for i,param in enumerate(("reed16","reed8","flute8","flute4","flute3","flute2")):
            msb = self.msb(param,3,x_tab,y_tab)
            for j, value in enumerate(((0, "Off"),(1, "1"),(2,"2"))):
                mag,label = value
                self.msb_aspect(msb,j,mag,text=label)
            x_tab += 65
            if i==1: x_tab += 170
            msb.update_aspect()
        x_wave = x0 + 130
        msb = self.msb("reedWave",2,x_wave,y_tab)
        self.msb_aspect(msb,0,0.0,"Brass")
        self.msb_aspect(msb,1,1.0,"Reed")
        msb.update_aspect()
        x_chorus = x_wave+65
        self.toggle("chorus",x_chorus, y_tab,(0.0, "Off"),(1.0,"On"))
        
        x_vib = x0
        y_vib = 200
        for i,param in enumerate(("vspeed","vdepth")):
            msb = self.msb(param,3,x_vib,y_vib)
            if i == 0:
                plist = ((0.0, "Slow"),(0.5,"Med"),(1.0,"Fast"))
            else:
                plist = ((0.0, "Off"),(0.5, "Light"),(1.0, "Deep"))
            for j,value in enumerate(plist):
                mag,label = value
                self.msb_aspect(msb,j,mag,text=label)
            x_vib += 65
            msb.update_aspect()

        x_amp = x_tab+65
        self.volume_slider("amp",x_amp,y_tab)
Esempio n. 39
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1200, 600, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 60
     y1 = 300
     yfreq_offset = 0
     ybias_offset = 100
     x0, xosc_offset = 50, 225
     x_wave_offset = 105
     x_amp_offset = x_wave_offset+60
     x_env1_wave_offset = x_wave_offset-60
     x_lfo_wave_offset = x_wave_offset
     x_env1_amp_offset = x_amp_offset
     for i, osc in enumerate(("osc1", "osc2", "osc3")):
         x = x0 + (i * xosc_offset)
         tumbler = Tumbler(canvas,osc+"Freq",editor,digits=5, scale=0.001)
         self.add_control(osc+"Freq", tumbler)
         tumbler.layout((x, y0+yfreq_offset))
         self.norm_slider(osc+"Wave", x+x_wave_offset, y0)
         self.volume_slider(osc+"Amp", x+x_amp_offset, y0)
         self.exp_slider(osc+"Wave_env1", x+x_env1_wave_offset, y1)
         self.exp_slider(osc+"Wave_lfo", x+x_lfo_wave_offset, y1)
         self.exp_slider(osc+"Amp_env1", x+x_env1_amp_offset, y1)
         xosc3 = x
     tumbler = Tumbler(canvas,"osc3Bias",editor,digits=5,scale=0.01)
     self.add_control("osc3Bias", tumbler)
     tumbler.layout((xosc3,y0+ybias_offset))
     self.norm_slider("osc3WaveLag", xosc3+x_wave_offset+25, y0, width=10, height=75)
     xnoise = xosc3 + xosc_offset + 30
     self.linear_slider("noiseFreq", xnoise, y0)
     self.volume_slider("noiseAmp", xnoise+60, y0)
     self.norm_slider("noiseBW", xnoise, y1)
     self.exp_slider("noiseAmp_env1", xnoise+60, y1)
     xpitch = xnoise+150
     self.linear_slider("port", xpitch, y0, range_=(0,2))
     self.norm_slider("xToPitch", xpitch, y1)
Esempio n. 40
0
    def __init__(self,editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,847,620,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self,canvas,editor,self.NAME)
        editor.add_child_editor(self.NAME, self)
        x0 = 75
        xmod = x0+100
        xfb = xmod+130
        xclip = xfb+240
        xmix = xclip+130
        y0 = 75
        y1 = 340
        for n,y in ((1,y0),(2,y1)):
            def param(prefix):
                return "%s%d" % (prefix,n)
            self.tumbler(param("delayTime"),4,0.0001,x0,y)
            msb = self.msb(param("lfoRatio"),len(LFO_RATIOS),x0-7,y+60)
            for i,pair in enumerate(LFO_RATIOS):
                value,text = pair
                self.msb_aspect(msb,i,value,text=text)
            msb.update_aspect()
            # self.norm_slider(param("modDepth"),xmod,y)
            # self.norm_slider(param("xmodDepth"),xmod+60,y)

            self.exp_slider(param("modDepth"),1.0,xmod,y,degree=3)
            self.exp_slider(param("xmodDepth"),1.0,xmod+60,y,degree=3)
            
            self.linear_slider(param("feedback"),(-1,1),xfb,y)
            self.linear_slider(param("xfeedback"),(-1,1),xfb+60,y)
            self.exp_slider(param("lowcut"),16000,xfb+120,y,degree=3)
            self.exp_slider(param("highcut"),16000,xfb+180,y,degree=3)
            self.toggle(param("clipEnable"),xclip,y,off=(0,"Off"),on=(1,"On"))
            self.linear_slider(param("clipGain"),(0,4),xclip,y+60,height=100)
            self.norm_slider(param("clipThreshold"),xclip+47,y+60,height=100)
            self.volume_slider(param("dryMix"),xmix,y,height=100)
            self.linear_slider(param("dryPan"),(-1,1),xmix,y+130, height=75)
            self.volume_slider(param("efxMix"),xmix+60,y,height=100)
            self.linear_slider(param("efxPan"),(-1,1),xmix+60,y+130, height=75)
        self.tumbler("timebase",5,0.001,x0-14,y1+190)
Esempio n. 41
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME,self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame,1000,700)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self,canvas,editor,self.NAME)
     self.mutation_object = self.synth.specs["mutation"]
     self._strips = {}
     for k,v in self.mutation_object.items():
         strip = TkMutationStrip(canvas,v)
         self._strips[k] = strip
     self._var_fill_start = StringVar()
     self._var_fill_start.set(127)
     self._var_fill_end = StringVar()
     self._var_fill_end.set(128)
     self._var_progressive_fill = StringVar()
     self._var_progressive_fill.set(0)
     
     self._layout_common_widgets()
Esempio n. 42
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame,1000,600,self.IMAGE_FILE)
     canvas.pack()
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 75
     x0 = 75
     x1 = x0 + 160
     xdelta = 75
     x_tog_offset = -23
     y_tog_offset = 160
     self.tumbler("hold",5,0.001,x0,y0+160)
     self.tumbler("clkfreq",5,0.001,x0,y0)
     self.toggle("clksrc",x0+7,y0+40,
                 off = (0, "Internal"),
                 on = (1, "External"))
     b_half_hold = factory.button(canvas,"1/2",self.half_hold_callback)
     b_half_hold.place(x=x0+13,y=y0+194)
     for i in range(6):
         j = i+1
         x = x1 + i*xdelta
         self.norm_slider("amp%d"%j,x,y0)
         self.toggle("gate%d"%j,x+x_tog_offset,y0+y_tog_offset,
                     off = [0,"On"],
                     on = [1,"Gate"])
     xn = x + xdelta
     self.norm_slider("ampn",xn,y0)
     self.toggle("gaten",xn+x_tog_offset,y0+y_tog_offset,
                 off = [0,"On"],
                 on = [1,"Gate"])
     y_tumbler_n = y0+y_tog_offset
     self.tumbler("n",2,1,xn-8,y_tumbler_n+40)
     xlag = x+170
     xscale = xlag+60
     xbias = xscale+60
     self.norm_slider("lag",xlag,y0)
     self.norm_slider("scale",xscale,y0)
     self.linear_slider("bias",(-4,4),xbias,y0)
Esempio n. 43
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        TkSubEditor.__init__(self, frame, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        lab_panel = factory.image_label(frame, self.IMAGE_FILE)
        lab_panel.pack(anchor="nw", expand=False)

        y0, y1, y2 = 60, 170, 280
        x0, xdelta = 60, 30        
        for i in range(9):
            j = i+1
            x = x0+i*xdelta
            pa = "a%d" % j
            self.norm_slider(pa,x,y0,height=100)
            pp = "p%d" % j
            self.norm_slider(pp,x,y1,height=100)
            px = "x%d" % j
            self.norm_slider(px,x,y2,height=100)

        # Envelope
        xenv = x0+(xdelta*10)
        self.exp_slider("attack",1.0,xenv,y0+30,height=100)
        self.exp_slider("decay",1.0,xenv,y2-30,height=100)
   
        # Vibrato
        xvib=xenv+120
        self.exp_slider("vfreq",8.0,xvib,y0)
        self.linear_slider("vdelay",(0,4),xvib+60,y0)
        self.norm_slider("vsens",xvib+120,y0)
        self.norm_slider("vdepth",xvib+180,y0)
   
        # X Bus
        xx = xvib
        self.linear_slider("xBias",(-2,2),xx,y2)
        self.linear_slider("xScale",(0,2),xx+60,y2)
        self.exp_slider("xToFreq",1.0,xx+120,y2)

        # Amp
        self.volume_slider("amp",xx+188,y2)
Esempio n. 44
0
File: editor2.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 900, 600, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        y0 = 50
        y1 = 250
        x0 = 100
        x_port = x0
        x_lfo = x_port + 90
        x_delay = x_lfo
        x_vsens = x_delay + 60
        x_vdepth = x_vsens + 60

        x_extern = x_vdepth + 90
        x_xpitch = x_extern
        x_xdepth = x_xpitch + 60
        x_xscale = x_xdepth + 60
        x_xbias = x_xscale + 60

        x_amp = x_xbias + 90

        self.norm_slider("port", x0, y0)
        self.tumbler("lfoFreq", x_lfo, y1)
        self.linear_slider("lfoDelay", (0, 4), x_delay, y0)
        self.norm_slider("vsens", x_vsens, y0)
        self.norm_slider("vdepth", x_vdepth, y0)
        self.norm_slider("xPitch", x_xpitch, y0)
        self.norm_slider("xModDepth", x_xdepth, y0)
        self.linear_slider("xScale", (0, 4), x_xscale, y0)
        self.linear_slider("xBias", (-4, 4), x_xbias, y0)
        svol = cf.volume_slider(self.canvas, "amp", editor)
        self.add_control("amp", svol)
        svol.widget().place(x=x_amp, y=y0, width=14, height=150)
Esempio n. 45
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 660, 360, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 75
     x0 = 75
     self.exp_slider("cFreq",20000,x0,y0,degree=3)
     self.exp_slider("cFreqLfo",2000,x0+60,y0,degree=3)
     self.exp_slider("cFreqX",2000,x0+120,y0,degree=3)
     x_res = x0+210
     self.exp_slider("q", 100,x_res,y0,degree=3)
     self.exp_slider("qLfo",100,x_res+60,y0,degree=3)
     self.exp_slider("qX", 100,x_res+120,y0,degree=3)
     x_out = x_res+210
     self.linear_slider("filterGain",(-12,12),x_out,y0)
     self.norm_slider("bleed",x_out+60,y0)
     self.tumbler("lfoFreq",5,0.001,x0,y0+180)
Esempio n. 46
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        y0 = 10

        def y(n, delta=230):
            return y0 + (n * delta)
            y_lfo = y0 + 55

        x0 = 75
        for i, n in enumerate("abc"):
            params = ("%sAttack" % n, "%sDecay1" % n, "%sDecay2" % n,
                      "%sRelease" % n, "%sBreakpoint" % n, "%sSustain" % n,
                      "%sTrigMode" % n)
            ed = ADDSREditor(canvas, i, (x0, y(i)), (900, 230), params, editor)
            self.add_child_editor("env_%s" % n, ed)
Esempio n. 47
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 848, 729, self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        x0, y0 = 75, 75

        # LFO
        x_lfo = x0
        x_wave = x_lfo + 100
        x_depth = x_wave + 60
        x_xdepth = x_depth + 60
        y_tumbler = y0 + 50

        self.tumbler("scanRate", 5, 0.001, x_lfo, y_tumbler)
        self.norm_slider("wave", x_wave, y0)
        self.norm_slider("modDepth", x_depth, y0)
        self.norm_slider("xmodDepth", x_xdepth, y0)

        # Delay
        x_delay = x_xdepth + 90
        x_feedback = x_delay + 60
        x_lowpass = x_feedback + 60

        self.linear_slider("delay", (0.0, 0.05), x_delay, y0)
        self.linear_slider("feedback", (-0.99, 0.99), x_feedback, y0)
        self.exp_slider("lowpass", 16000, x_lowpass, y0, degree=4)

        # Mixer
        x_dry = x_lowpass + 90
        x_wet1 = x_dry + 60
        x_wet2 = x_wet1 + 60

        self.volume_slider("dryMix", x_dry, y0)
        self.volume_slider("wet1Mix", x_wet1, y0)
        self.volume_slider("wet2Mix", x_wet2, y0)
Esempio n. 48
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1500, 708, self.IMAGE_FILE)
     canvas.pack()
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0, y1 = 105,358
     x_delay = 105
     x_wow = x_delay + 60
     x_wfreq = x_wow + 60
     x_flutter = x_wfreq + 60
     x_xdelay = x_flutter + 60
     x_fb = x_xdelay + 90
     x_gain = x_fb + 60
     x_threshold = x_gain + 60
     x_low = x_threshold + 60
     x_high = x_low + 60
     x_mix = x_high + 90
     x_xmix = x_mix + 60
     x_amp = x_xmix + 90
     self.linear_slider("delayTime",(0,MAX_DELAY),x_delay,y0,height=200)
     self.exp_slider("wow",1.0,x_wow,y0,height=200)
     self.exp_slider("wowFreq",5.0,x_wfreq,y0,height=200)
     self.exp_slider("flutter",1.0,x_flutter,y0,height=200)
     self.exp_slider("xDelayMod",1.0,x_xdelay,y0,height=200)
     self.norm_slider("feedback",x_fb,y0,height=200)
     self.linear_slider("gain",(0.5,2.0),x_gain,y0,height=200)
     self.exp_slider("threshold",1.0,x_threshold,y0,height=200)
     s_lowcut = cf.third_octave_slider(frame, "lowcut", editor)
     s_highcut = cf.third_octave_slider(frame, "highcut", editor)
     self.norm_slider("efxMix",x_mix,y0,height=200)
     self.norm_slider("xEfxMix",x_xmix,y0,height=200)
     self.volume_slider("amp",x_amp,y0,height=200)
     self.add_control("lowcut",s_lowcut)
     self.add_control("highcut",s_highcut)
     s_lowcut.widget().place(x=x_low, y=y0, height=200)
     s_highcut.widget().place(x=x_high, y=y0, height=200)
Esempio n. 49
0
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     frame.config(background=factory.bg())
     canvas = factory.canvas(frame, 1000, 650, self.IMAGE_FILE)
     canvas.pack()
     self.canvas = canvas
     self.editor = editor
     TkSubEditor.__init__(self, canvas, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     y0 = 25
     x0 = 75
     dx = 200
     size = (900, dx)
     for i, prefix in enumerate(("op2", "efx", "op1")):
         paramlist = []
         for p in ("Attack", "Decay1", "Decay2", "Release", "Breakpoint",
                   "Sustain", "GateHold"):
             paramlist.append("%s%s" % (prefix, p))
         x = x0
         y = y0 + (i * dx)
         ed = ADDSREditor(canvas, i, (x, y), size, paramlist, editor)
         self.add_child_editor(prefix, ed)
         ed.sync()
Esempio n. 50
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     TkSubEditor.__init__(self, frame, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     self.pack(expand=True, fill="both")
     lab_panel = factory.image_label(self, self.IMAGE_FILE)
     lab_panel.pack(anchor="nw", expand=False)
     s_freq = ExpSlider(frame, "lfoFreq", editor, range_=10)
     s_depth = cf.normalized_slider(frame, "modDepth", editor)
     s_xdepth = cf.normalized_slider(frame, "xDepth", editor)
     s_xam = cf.normalized_slider(frame, "xLfoAmp", editor)
     s_xfm = ExpSlider(frame, "xLfoFreq", editor, range_=30)
     s_limit = cf.linear_slider(frame, "limit", editor, range_=(0,2))
     s_amp = cf.volume_slider(frame, "amp", editor)
     self.add_control("lfoFreq",s_freq)
     self.add_control("modDepth",s_depth)
     self.add_control("xDepth",s_xdepth)
     self.add_control("xLfoAmp",s_xam)
     self.add_control("xLfoFreq",s_xfm)
     self.add_control("limit",s_limit)
     self.add_control("amp",s_amp)
     y0 = 90
     x0 = 90
     x1 = x0 + 60
     x2 = x1 + 90
     x3 = x2 + 60
     x4 = x3 + 60
     x5 = x4 + 90
     x6 = x5 + 90
     s_freq.layout(offset=(x0, y0), checkbutton_offset=None)
     s_depth.widget().place(x=x1, y=y0)
     s_xdepth.widget().place(x=x2, y=y0)
     s_xam.widget().place(x=x3, y=y0)
     s_xfm.layout(offset=(x4, y0), checkbutton_offset=None)
     s_limit.widget().place(x=x5, y=y0)
     s_amp.widget().place(x=x6, y=y0)
Esempio n. 51
0
    def __init__(self, stack_id, editor):
        name = "Env %s" % stack_id
        image_file = "resources/Algo/envelope_editor_%s.png" % (
            stack_id.lower())
        tab_image = "resources/Algo/tab_env_%s.png" % (stack_id.lower())
        frame = editor.create_tab(name, tab_image)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 700, image_file)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, name)
        editor.add_child_editor(name, self)

        carrier = {"A": 1, "B": 5, "C": 7}[stack_id]
        mod1 = {"A": 2, "B": 4, "C": 8}[stack_id]
        mod2 = {"A": 3, "B": 6, "C": None}[stack_id]
        ec = ADDSREditor(canvas, carrier,
                         self.coords(carrier), (WIDTH, HEIGHT),
                         self.env_parameters(carrier), self.editor,
                         acon.MAX_ENV_SEGMENT)
        self.add_child_editor("OP%sENV" % carrier, ec)
        ec.sync()

        e1 = ADDSREditor(canvas, mod1, self.coords(mod1), (WIDTH, HEIGHT),
                         self.env_parameters(mod1), self.editor,
                         acon.MAX_ENV_SEGMENT)
        self.add_child_editor("OP%sENV" % mod1, e1)
        e1.sync()

        if mod2:
            e2 = ADDSREditor(canvas, mod2, self.coords(mod2), (WIDTH, HEIGHT),
                             self.env_parameters(mod2), self.editor,
                             acon.MAX_ENV_SEGMENT)
            self.add_child_editor("OP%sENV" % mod2, e2)
            e2.sync()
Esempio n. 52
0
File: editor.py Progetto: kaos/Llia
 def __init__(self, editor):
     frame = editor.create_tab(self.NAME, self.TAB_FILE)
     TkSubEditor.__init__(self, frame, editor, self.NAME)
     editor.add_child_editor(self.NAME, self)
     self.pack(expand=True, fill="both")
     lab_panel = factory.image_label(self, self.IMAGE_FILE)
     lab_panel.pack(anchor="nw", expand=False)
     s_spread = cf.linear_slider(frame, "spread", editor, range_=(0, 4))
     s_cluster = cf.linear_slider(frame, "cluster", editor, range_=(0, 16))
     s_pw = cf.normalized_slider(frame, "pw", editor)
     s_noise = cf.normalized_slider(frame, "noiseAmp", editor)
     xs_filter = ExpSlider(frame, "filterFreq", editor, range_=16000)
     s_res = cf.normalized_slider(frame, "res", editor)
     s_filter_mix = cf.normalized_slider(frame, "filterMix", editor)
     s_amp = cf.volume_slider(frame, "amp", editor)
     s_spread_env = cf.linear_slider(frame,
                                     "spreadEnv",
                                     editor,
                                     range_=(0, 4))
     s_spread_lfo = cf.linear_slider(frame,
                                     "spreadLfo",
                                     editor,
                                     range_=(0, 4))
     s_cluster_env = cf.linear_slider(frame,
                                      "clusterEnv",
                                      editor,
                                      range_=(-16, 16))
     s_cluster_lfo = cf.linear_slider(frame,
                                      "clusterLfo",
                                      editor,
                                      range_=(0, 16))
     s_cluster_lag = cf.normalized_slider(frame, "clusterLag", editor)
     s_pw_lfo = cf.normalized_slider(frame, "pwLfo", editor)
     xs_filter_env = ExpSlider(frame, "filterEnv", editor, range_=9999)
     xs_filter_lfo = ExpSlider(frame, "filterLfo", editor, range_=9999)
     s_filter_lag = cf.normalized_slider(frame, "filterLag", editor)
     self.add_control("spread", s_spread)
     self.add_control("cluster", s_cluster)
     self.add_control("pw", s_pw)
     self.add_control("noiseAmp", s_noise)
     self.add_control("filterFreq", xs_filter)
     self.add_control("res", s_res)
     self.add_control("filterMix", s_filter_mix)
     self.add_control("amp", s_amp)
     self.add_control("spreadEnv", s_spread_env)
     self.add_control("spreadLfo", s_spread_lfo)
     self.add_control("clusterEnv", s_cluster_env)
     self.add_control("clusterLfo", s_cluster_lfo)
     self.add_control("clusterLag", s_cluster_lag)
     self.add_control("pwLfo", s_pw_lfo)
     self.add_control("filterEnv", xs_filter_env)
     self.add_control("filterLfo", xs_filter_lfo)
     self.add_control("filterLag", s_filter_lag)
     y0 = 90
     x0 = 90
     x1 = x0 + 60
     x2 = x1 + 60
     x3 = x2 + 60
     x4 = x3 + 60
     xnoise = x4 + 75
     xfilter = xnoise + 75
     x5 = xfilter + 60
     x6 = x5 + 60
     xamp = x6 + 75
     s_spread.widget().place(x=x0, y=y0)
     s_cluster.widget().place(x=x2, y=y0)
     s_pw.widget().place(x=x4, y=y0)
     s_noise.widget().place(x=xnoise, y=y0)
     xs_filter.layout(offset=(xfilter, y0), checkbutton_offset=None)
     s_res.widget().place(x=x5, y=y0)
     s_filter_mix.widget().place(x=x6, y=y0)
     s_amp.widget().place(x=xamp, y=y0)
     y1 = 320
     s_spread_env.widget().place(x=x0, y=y1)
     s_spread_lfo.widget().place(x=x1, y=y1)
     s_cluster_env.widget().place(x=x2, y=y1)
     s_cluster_lfo.widget().place(x=x3, y=y1)
     s_cluster_lag.widget().place(x=x3 + 30, y=y1, width=10, height=75)
     s_pw_lfo.widget().place(x=x4 + 30, y=y1)
     xs_filter_env.layout(offset=(xfilter, y1),
                          checkbutton_offset=(-4, -20))
     xs_filter_lfo.layout(offset=(x5, y1), checkbutton_offset=(-4, -20))
     s_filter_lag.widget().place(x=x5 + 30, y=y1, width=10, height=75)
Esempio n. 53
0
    def __init__(self, editor):
        name = "Misc"
        image_file = "resources/Corvus/editor_misc.png"
        tab_file = "resources/Tabs/misc.png"
        frame = editor.create_tab(name, tab_file)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1000, 750, image_file)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, name)
        editor.add_child_editor(name, self)
        self.op = n
        y0 = 50
        y_msb = 230
        x0 = 50
        x_port = x0
        x_vib = x_port + 90
        x_vdelay = x_vib + 90
        x_vsens = x_vdelay + 60
        x_vdepth = x_vsens + 60
        x_xpitch = x_vdepth + 60
        x_lfo1 = x_xpitch + 90
        x_lfo2 = x_lfo1 + 90
        x_amp = x_lfo2 + 90

        def norm_slider(param, x, y, height=150):
            s = cf.normalized_slider(canvas, param, editor)
            self.add_control(param, s)
            s.widget().place(x=x, y=y, height=height)
            return s

        def volume_slider(param, x, y, height=150):
            s = cf.volume_slider(canvas, param, editor)
            self.add_control(param, s)
            s.widget().place(x=x, y=y, height=height)
            return s

        def linear_slider(param, range_, x, y):
            s = cf.linear_slider(canvas, param, editor, range_=range_)
            self.add_control(param, s)
            s.widget().place(x=x, y=y)
            return s

        def tumbler(param, digits, scale, x, y):
            t = Tumbler(canvas, param, editor, digits=digits, scale=scale)
            self.add_control(param, t)
            t.layout((x, y))
            t.update_aspect()
            return t

        def msb_ratio(n, x):
            param = "lfo%d_ratio" % n
            count = len(LFO_RATIOS)
            msb = MSB(canvas, param, editor, count)
            for i, pair in enumerate(LFO_RATIOS):
                value, txt = pair
                d = {
                    "fill": CFILL,
                    "foreground": CFOREGROUND,
                    "outline": COUTLINE,
                    "value": value,
                    "text": txt
                }
                msb.define_aspect(i, value, d)
            self.add_control(param, msb)
            msb.layout((x, y_msb))
            msb.update_aspect()
            return msb

        norm_slider("port", x_port, y0)
        tumbler("vfreq", 5, 0.001, x_vib, y0)
        linear_slider("vdelay", (0, 4), x_vdelay, y0)
        norm_slider("vsens", x_vsens, y0)
        norm_slider("vdepth", x_vdepth, y0)
        norm_slider("xpitch", x_xpitch, y0)
        linear_slider("lfo1_delay", (0, 4), x_lfo1, y0)
        msb_ratio(1, x_lfo1 - 22)
        linear_slider("lfo2_delay", (0, 4), x_lfo2, y0)
        msb_ratio(2, x_lfo2 - 22)
        volume_slider("amp", x_amp, y0)

        y_penv = 375
        y_buttons = y_penv + 200
        x_penv = x0
        for a in (0, 1, 2, 3, 4):
            x = x_penv + a * 60
            linear_slider("pe_a%d" % a, (-1.0, 1.0), x, y_penv)
        x += 60
        for t in (1, 2, 3, 4):
            x = x + 60
            linear_slider("pe_t%d" % t, (0, MAX_ENV_SEGMENT), x, y_penv)
        x += 60
        x_send = x
        for i in (1, 2, 3, 4):
            x += 60
            linear_slider("op%d_pe" % i, (-1, 1), x, y_penv)
        count = len(PENV_HOLD_NODES)
        msb_loop = MSB(canvas, "pe_loop", editor, count)
        for i, v in enumerate(PENV_LOOP_NODES):
            d = {
                "fill": CFILL,
                "foreground": CFOREGROUND,
                "outline": COUTLINE,
                "value": v,
                "text": str(v)
            }
            msb_loop.define_aspect(i, v, d)
        self.add_control("pe_loop", msb_loop)
        msb_loop.layout((x_penv, y_buttons))
        msb_loop.update_aspect()

        def zero_levels():
            for a in (0, 1, 2, 3, 4):
                p = "pe_a%d" % a
                self.set_value(p, 0.0)
            self.sync()

        def zero_sends():
            for a in (1, 2, 3, 4):
                p = "op%d_pe" % a
                self.set_value(p, 0.0)
            self.sync()

        b1 = factory.button(canvas, "0", command=zero_levels)
        b1.place(x=x_penv + 120, y=y_buttons)
        b2 = factory.button(canvas, "0", command=zero_sends)
        b2.place(x=x_send + 49, y=y_buttons)
Esempio n. 54
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        TkSubEditor.__init__(self, frame, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        lab_panel = factory.image_label(frame, self.IMAGE_FILE)
        lab_panel.pack(anchor="nw", expand=False)

        y0, y1, y2 = 60, 170, 280
        x0, xdelta = 60, 30
        for i in range(9):
            j = i + 1
            x = x0 + i * xdelta
            pa = "a%d" % j
            sa = cfactory.normalized_slider(frame, pa, editor)
            self.add_control(pa, sa)
            sa.widget().place(x=x, y=y0, height=100, width=10)
            pp = "p%d" % j
            sp = cfactory.normalized_slider(frame, pp, editor)
            self.add_control(pp, sp)
            sp.widget().place(x=x, y=y1, height=100, width=10)
            px = "x%d" % j
            sx = cfactory.normalized_slider(frame, px, editor)
            self.add_control(px, sx)
            sx.widget().place(x=x, y=y2, height=100, width=10)
        # Envelope
        xenv = x0 + (xdelta * 10)
        s_attack = ExpSlider(frame, "attack", editor, range_=1)
        s_decay = ExpSlider(frame, "decay", editor, range_=1)
        self.add_control("attack", s_attack)
        self.add_control("decay", s_decay)
        s_attack.layout(offset=(xenv, y0 + 30),
                        height=100,
                        width=14,
                        checkbutton_offset=None)
        s_decay.layout(offset=(xenv, y2 - 30),
                       height=100,
                       width=14,
                       checkbutton_offset=None)
        # Vibrato
        xvib = xenv + 120
        s_vfreq = ExpSlider(frame, "vfreq", editor, range_=8, degree=2)
        s_vdelay = cfactory.linear_slider(frame,
                                          "vdelay",
                                          editor,
                                          range_=(0, 4))
        s_vsens = cfactory.normalized_slider(frame, "vsens", editor)
        s_vdepth = cfactory.normalized_slider(frame, "vdepth", editor)
        self.add_control("vfreq", s_vfreq)
        self.add_control("vdelay", s_vfreq)
        self.add_control("vdepth", s_vdepth)
        s_vfreq.layout(offset=(xvib, y0), checkbutton_offset=None)
        s_vdelay.widget().place(x=xvib + 60, y=y0)
        s_vsens.widget().place(x=xvib + 120, y=y0)
        s_vdepth.widget().place(x=xvib + 180, y=y0)

        # X Bus
        xx = xvib
        s_xbias = cfactory.linear_slider(frame,
                                         "xBias",
                                         editor,
                                         range_=(-2, 2))
        s_xscale = cfactory.linear_slider(frame,
                                          "xScale",
                                          editor,
                                          range_=(0, 2))
        s_xfreq = ExpSlider(frame, "xToFreq", editor, range_=1)
        self.add_control("xBias", s_xbias)
        self.add_control("xScale", s_xscale)
        self.add_control("xToFreq", s_xfreq)
        s_xbias.widget().place(x=xx, y=y2)
        s_xscale.widget().place(x=xx + 60, y=y2)
        s_xfreq.layout(offset=(xx + 120, y2), checkbutton_offset=None)

        # AMP
        s_amp = cfactory.volume_slider(frame, "amp", editor)
        self.add_control("amp", s_amp)
        s_amp.widget().place(x=xx + 188, y=y2)
Esempio n. 55
0
File: editor.py Progetto: kaos/Llia
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME,self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame, 1400, 700, self.IMAGE_FILE)
        canvas.pack()
        self.canvas = canvas
        self.editor = editor
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        y = [50,275]
        x0 = 100
        xdelay = x0 + 180
        xmod = xdelay+90
        xfeedback = xmod+120
        xeq = xfeedback+60
        xmixer = xeq+150
        
        def add_slider(param,s,x,y,width=14,height=150):
            self.add_control(param,s)
            s.widget().place(x=x,y=y,width=width,height=height)
        
        def amp_slider(param,x,y):
            s = cf.volume_slider(canvas,param,editor)
            add_slider(param,s,x,y)

        def bipolar_slider(param,x,y, width=14, height=150):
            s = cf.bipolar_slider(canvas,param,editor)
            add_slider(param,s,x,y,width,height)

        def eq_slider(param,x,y):
            s = cf.third_octave_slider(canvas,param,editor)
            add_slider(param,s,x,y)

        def norm_slider(param,x,y):
            s = cf.normalized_slider(canvas,param,editor)
            add_slider(param,s,x,y)

        def linear_slider(param,x,y,range_=(0.0,1.0)):
            s = cf.linear_slider(canvas,param,editor,range_=range_)
            add_slider(param,s,x,y)
            
        for i in (0,1):
            n = i+1
            for j, p in enumerate(('d%dDry1In','d%dDry2In')):
                x = x0 + j*60
                param = p % n
                amp_slider(param,x,y[i])
            amp_slider('d2Delay1In',x0+60*2, y[1])
            param = 'd%dDelayTime' % n
            tumbler_delay = Tumbler(canvas, param, editor,
                                    sign=False, digits=4,scale = 0.001,
                                    range_ = (0,2000))
            self.add_control(param,tumbler_delay)
            tumbler_delay.layout((xdelay, y[i]))
            param = 'd%dLfoRatio' % n
            msb_lfo_ratio = MSB(canvas,param,editor,len(LFO_RATIOS))
            self.add_control(param, msb_lfo_ratio)
            for k,pair in enumerate(LFO_RATIOS):
                adict = {'text' : pair[0],
                         'font' : ('Times', 12),
                         'fill' : 'black',
                         'foreground' : 'white',
                         'outline' : 'white',
                         'active-fill' : 'black',
                         'active-foreground' : 'yellow',
                         'active-outline' : 'yellow'}
                msb_lfo_ratio.define_aspect(k,pair[1],adict)
                msb_lfo_ratio.layout((xdelay, y[i]+75))
                msb_lfo_ratio.update_aspect()
            norm_slider('d%dLfoModDepth' % n, xmod,y[i])
            norm_slider('d%dExternalModDepth' % n, xmod+60,y[i]) 
            bipolar_slider('d%dFeedback' % n, xfeedback,y[i])
            eq_slider('d%dLowpass' % n, xeq,y[i])
            eq_slider('d%dHighpass' % n, xeq+60,y[i])

        # Mixer
        amp_slider("dry1Amp", xmixer, y[0])
        amp_slider("dry2Amp", xmixer+60, y[0])
        amp_slider("d1Amp", xmixer+120, y[0])
        amp_slider("d2Amp", xmixer+180, y[0])

        bipolar_slider("dry1Pan", xmixer, y[1],height=75)
        bipolar_slider("dry2Pan", xmixer+60, y[1],height=75)
        bipolar_slider("d1Pan", xmixer+120, y[1],height=75)
        bipolar_slider("d2Pan", xmixer+180, y[1],height=75)

        msb_lfo_preset = MSB(canvas,"",None,7)
        for i in range(len(msb_lfo_preset)):
            adict = {'fill' : 'black',
                     'foreground' : 'white',
                     'outline' : 'white',
                     'active-fill' : 'black',
                     'active-foregeround' : 'yellow',
                     'active-outline' : 'yellow',
                     'text' : str(i+1),
                     'fomt' : ('Times', 8)}
            msb_lfo_preset.define_aspect(i,i+1,adict)
        msb_lfo_preset.layout((xmixer+160, y[1]+143),width=18,height=18)
        msb_lfo_preset.update_aspect()
        def lfo_preset_freq(*_):
            v = msb_lfo_preset.value()
            synth = self.editor.synth
            synth.x_param_change("lfoCommonFreq",v)
            synth.bank()[None]["lfoCommonFreq"] = float(v)
            tumbler_lfo.value(v)
        msb_lfo_preset.tag_bind("<Button-1>", lfo_preset_freq)
        msb_lfo_preset.tag_bind("<Button-3>", lfo_preset_freq)
            
        tumbler_lfo = Tumbler(canvas,"lfoCommonFreq",editor,
                              sign=False,digits=5, scale=0.001,
                              range_=(0,16999))
        self.add_control("lfoCommonFreq", tumbler_lfo)
        tumbler_lfo.layout((xmixer+60, y[1]+143))
Esempio n. 56
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,1000,700,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)
        y0 = 75
        y1 = y0+60
        y2 = y1+60 
        y3 = y2+70
        x0=90
        x1 = x0+100
        x2 = x1+60
        x3 = x2+60
        x4 = x3+60
        x5 = x4+75
        x6 = x5+60
        xlfo = x6+75
        xmix = x6+196
        
        def norm_slider(param, x, y):
            s = cf.normalized_slider(canvas, param, editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)
            return s

        def bipolar_slider(param, x, y, height=150):
            s = cf.bipolar_slider(canvas, param, editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y,height=height)
            return s
            
        def amp_slider(param, x, y):
            s = cf.volume_slider(canvas, param, editor)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)
            return s

        def linear_slider(param, x, y, range_):
            s = cf.linear_slider(canvas, param, editor, range_=range_)
            self.add_control(param,s)
            s.widget().place(x=x,y=y)
            return s
     
        msb_xover = MSB(canvas,"xover",editor,len(xcon.CROSSOVER_FREQUENCIES))
        for i,v in enumerate(xcon.CROSSOVER_FREQUENCIES):
            d = _msb_aspect(v,str(v))
            msb_xover.define_aspect(i,v,d)
        self.add_control("xover", msb_xover)
        msb_xover.layout((x0,y0))
        msb_xover.update_aspect()
        msb_maxxover = MSB(canvas,"maxXover",editor,len(xcon.CROSSOVER_FREQUENCIES))
        for i,v in enumerate(xcon.CROSSOVER_FREQUENCIES):
            d = _msb_aspect(v,str(v))
            msb_maxxover.define_aspect(i,v,d)
        self.add_control("maxXover", msb_maxxover)
        msb_maxxover.layout((x0,y1))
        msb_maxxover.update_aspect()
        msb_minxover = MSB(canvas,"minXover",editor,len(xcon.CROSSOVER_FREQUENCIES))
        for i,v in enumerate(xcon.CROSSOVER_FREQUENCIES):
            d = _msb_aspect(v,str(v))
            msb_minxover.define_aspect(i,v,d)
        self.add_control("minXover",msb_minxover)
        msb_minxover.layout((x0,y2))
        msb_minxover.update_aspect()
        norm_slider("lfoToXover", x1,y0)
        msb_lforatio = MSB(canvas,"lfo2Ratio",editor,len(xcon.LFO_RATIOS))
        for i,p in enumerate(xcon.LFO_RATIOS):
            ratio, text = p
            d = _msb_aspect(ratio,text)
            msb_lforatio.define_aspect(i,ratio,d)
        self.add_control("lfo2Ratio", msb_lforatio)
        msb_lforatio.layout((x1-22,y3))
        msb_lforatio.update_aspect()
        norm_slider("lfo2Wave",x2,y0)
        norm_slider("externToXover",x3,y0)
        norm_slider("res",x4,y0)
        norm_slider("filterBMix",x5,y0)
        norm_slider("filterBLag",x6,y0)
        msb_b_ratio = MSB(canvas,"filterBRatio",editor,len(xcon.FILTER_B_RATIOS))
        for i,p in enumerate(xcon.FILTER_B_RATIOS):
            ratio,text = p
            d = _msb_aspect(ratio,text)
            msb_b_ratio.define_aspect(i,ratio,d)
        self.add_control("filterBRatio", msb_b_ratio)
        msb_b_ratio.layout((x5+6,y3))
        msb_b_ratio.update_aspect()
        tumbler = Tumbler(canvas,"lfoFreq",editor,digits=4,scale=0.01)
        self.add_control("lfoFreq", tumbler)
        tumbler.layout((xlfo, y1))
        msb_lfo_enable = ToggleButton(canvas,"lfoEnable",editor,
                                      fill='',foreground='#c29378',outline='#c29378',
                                      active_color='yellow',
                                      selected_fill='#825151', selected_foreground='white')
        self.add_control("lfoEnable",msb_lfo_enable)
        msb_lfo_enable.layout((xlfo, y2))
        msb_lfo_enable.update_aspect()
        amp_slider("dryAmp", xmix, y0)
        amp_slider("filterAAmp", xmix+60, y0)
        amp_slider("filterBAmp", xmix+120, y0)
        amp_slider("amp", xmix+180,y0)
        bipolar_slider("dryPan", xmix, y3)
        bipolar_slider("filterAPan", xmix+60, y3)
        bipolar_slider("filterBPan", xmix+120, y3)
        linear_slider("xscale", xlfo-7, y3, (0,4))
        linear_slider("xbias", xlfo+53, y3, (-4,4))