Exemple #1
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)
     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)
Exemple #2
0
 def exp_slider(self, param, x, y, width=14, height=150, button_offset=(-5, -28)):
     s = ExpSlider(self.canvas, param, self.editor,
                   range_ = 1, degree=2)
     self.add_control(param, s)
     s.layout(offset=(x,y), width=width, height=height,
              checkbutton_offset = button_offset)
     return s
Exemple #3
0
 def env_time_slider(self, param, x, y):
     s = ExpSlider(self.canvas, param, self.editor,
                   range_ = 4, degree=2)
     self.add_control(param, s)
     s.layout((x,y), width=14, height=150,
              checkbutton_offset=None)
     return s
Exemple #4
0
 def exp_slider(self,
                param,
                mx,
                x,
                y,
                degree=2,
                height=150,
                checkbutton=None):
     s = ExpSlider(self.canvas,
                   param,
                   self.parent,
                   range_=mx,
                   degree=degree)
     '''
     Adds slider with exponetial response to canvas.
     
     ARGS:
       param  - String, synth parameter
       mx     - float, maximum slider value, mx > 0.
       x      - int, x coordinate
       y      - int, y coordinate
       degree - int, exponential degree, default 2
       height - int, slider height, default 150     
       checkbutton - Tuple, spcifies locatin of optional checkbutton.
                     The checkbutton is used to invert the sign of the 
                     slider value.  If used it should be a tuple
                     (x-offset,y-offset), typical values for default
                     slider height is (-15,150)
    
     RETURNS: ExpSlider
     '''
     self.add_control(param, s)
     s.layout((x, y), height=height, checkbutton_offset=checkbutton)
     return s
Exemple #5
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)
     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)
Exemple #6
0
 def envtime_slider(param, x, y, height=200):
     s = ExpSlider(canvas,
                   param,
                   editor,
                   range_=MAX_ENV_SEGMENT_TIME,
                   degree=3)
     self.add_control(param, s)
     s.layout(offset=(x, y), checkbutton_offset=None, height=height)
     return s
Exemple #7
0
 def exp_slider(self,
                param,
                x,
                y,
                width=14,
                height=150,
                button_offset=(-5, -28)):
     s = ExpSlider(self.canvas, param, self.editor, range_=1, degree=2)
     self.add_control(param, s)
     s.layout(offset=(x, y),
              width=width,
              height=height,
              checkbutton_offset=button_offset)
     return s
Exemple #8
0
 def exp_slider(self,param,mx,x,y,degree=2,height=150,checkbutton=None):
     s = ExpSlider(self.canvas,param,self.parent,
                   range_=mx,degree=degree)
     '''
     Adds slider with exponential response to canvas.
     
     ARGS:
       param  - String, synth parameter
       mx     - float, maximum slider value, mx > 0.
       x      - int, x coordinate
       y      - int, y coordinate
       degree - int, exponential degree, default 2
       height - int, slider height, default 150     
       checkbutton - Tuple, specifies location of optional checkbutton.
                     The checkbutton is used to invert the sign of the 
                     slider value.  If used it should be a tuple
                     (x-offset,y-offset), typical values for default
                     slider height is (-15,150)
    
     RETURNS: ExpSlider
     '''
     self.add_control(param,s)
     s.layout((x,y),height=height,checkbutton_offset=checkbutton)
     return s
Exemple #9
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_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)
Exemple #10
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_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)
Exemple #11
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)

        xs_attack = ExpSlider(frame, "attack", editor, range_=32)
        xs_decay = ExpSlider(frame, "decay", editor, range_=32)
        s_sustain = cf.normalized_slider(frame, "sustain", editor)
        xs_release = ExpSlider(frame, "release", editor, range_=32)
        cb_envmode = cf.ControlCheckbutton(frame,
                                           "envMode",
                                           editor,
                                           values=(0, 1))

        xs_lfo_freq = ExpSlider(frame, "lfoFreq", editor, range_=100)
        ds_lfo_ratios = cf.discrete_slider(frame,
                                           "lfo2FreqRatio",
                                           editor,
                                           values=LFO_RATIOS)
        xs_lfo_xmod = ExpSlider(frame, "lfoXMod", editor, range_=100)
        s_lfo_delay = cf.linear_slider(frame,
                                       "lfoDelay",
                                       editor,
                                       range_=(0, 8))
        s_lfo_depth = cf.normalized_slider(frame, "lfoDepth", editor)
        s_vibrato = cf.normalized_slider(frame, "vibrato", editor)

        s_xspread = cf.normalized_slider(frame, "xToSpread", editor)
        s_xnoise = cf.normalized_slider(frame, "xToNoise", editor)
        s_xfilter = cf.normalized_slider(frame, "xToFilter", editor)
        s_xscale = cf.linear_slider(frame, "xScale", editor, range_=(0, 4))

        self.add_control("attack", xs_attack)
        self.add_control("decay", xs_decay)
        self.add_control("sustain", s_sustain)
        self.add_control("release", xs_release)
        self.add_control("envMode", cb_envmode)
        self.add_control("lfoFreq", xs_lfo_freq)
        self.add_control("lfo2FreqRatio", ds_lfo_ratios)
        self.add_control("lfoXMod", xs_lfo_xmod)
        self.add_control("lfoDelay", s_lfo_delay)
        self.add_control("lfoDepth", s_lfo_depth)
        self.add_control("vibrato", s_vibrato)

        self.add_control("xToSpread", s_xspread)
        self.add_control("xToNoise", s_xnoise)
        self.add_control("xToFilter", s_xfilter)
        self.add_control("xScale", s_xscale)

        y0 = 90
        x0 = 90
        x1 = x0 + 60
        x2 = x1 + 60
        x3 = x2 + 60
        x4 = x3 + 60
        #5 = x4 + 30

        xlfo = x4 + 75
        x6 = xlfo
        x7 = x6 + 60
        x8 = x7 + 60
        x9 = x8 + 60
        x10 = x9 + 60
        x11 = x10 + 60

        xs_attack.layout(offset=(x0, y0), checkbutton_offset=None, height=380)
        xs_decay.layout(offset=(x1, y0), checkbutton_offset=None, height=380)
        s_sustain.widget().place(x=x2, y=y0, height=380)
        xs_release.layout(offset=(x3, y0), checkbutton_offset=None, height=380)
        cb_envmode.widget().place(x=x4, y=y0)

        xs_lfo_freq.layout(offset=(x6, y0),
                           checkbutton_offset=None,
                           height=380)
        xs_lfo_xmod.layout(offset=(x7, y0),
                           checkbutton_offset=None,
                           height=380)
        ds_lfo_ratios.widget().place(x=x8, y=y0)
        s_lfo_delay.widget().place(x=x9, y=y0)

        s_lfo_depth.widget().place(x=x10, y=y0)
        s_vibrato.widget().place(x=x11, y=y0)

        y1 = 320
        s_xspread.widget().place(x=x8, y=y1)
        s_xnoise.widget().place(x=x9, y=y1)
        s_xfilter.widget().place(x=x10, y=y1)
        s_xscale.widget().place(x=x11, y=y1)
Exemple #12
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME)
        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)

        # Tone Spread
        s_spread = cfactory.linear_slider(frame, "spread", self, range_=(0, 4))
        s_spread_lfo = cfactory.linear_slider(frame,
                                              "spreadLfo",
                                              self,
                                              range_=(0, 4))
        s_spread_env = cfactory.linear_slider(frame,
                                              "spreadEnv",
                                              self,
                                              range_=(0, 4))
        self.add_control("spread", s_spread)
        self.add_control("spreadLfo", s_spread_lfo)
        self.add_control("spreadEnv", s_spread_env)

        # Tone Cluster
        s_cluster = cfactory.linear_slider(frame,
                                           "cluster",
                                           self,
                                           range_=(0, 16))
        s_cluster_lfo = cfactory.linear_slider(frame,
                                               "clusterLfo",
                                               self,
                                               range_=(0, 16))
        s_cluster_env = cfactory.linear_slider(frame,
                                               "clusterEnv",
                                               self,
                                               range_=(-16, 16))
        s_cluster_lag = cfactory.normalized_slider(frame, "clusterLag", self)
        self.add_control("cluster", s_cluster)
        self.add_control("clusterLfo", s_cluster_lfo)
        self.add_control("clusterEnv", s_cluster_env)
        self.add_control("clusterLag", s_cluster_lag)

        # Tone PW
        s_pw = cfactory.normalized_slider(frame, "pw", self)
        s_pwm = cfactory.normalized_slider(frame, "pwLfo", self)
        self.add_control("pw", s_pw)
        self.add_control("pwLfo", s_pwm)

        # Noise
        s_noise = cfactory.mix_slider(frame, "noiseAmp", self)
        self.add_control("noiseAmp", s_noise)

        # LFO
        s_lfo_freq = ExpSlider(frame,
                               "lfoFreq",
                               self,
                               range_=100,
                               degree=3,
                               clip=(0.001, 100))
        s_lfo_ratio = cfactory.discrete_slider(frame,
                                               "lfo2FreqRatio",
                                               self,
                                               values=[
                                                   0.01, 0.1, 0.25, 0.333, 0.5,
                                                   0.667, 0.75, 1.0, 1.125,
                                                   1.25, 1.5, 1.175, 2, 3, 4,
                                                   5, 8
                                               ])
        s_lfo_xmod = ExpSlider(frame, "lfoXMod", self, range_=100, degree=3)
        s_lfo_delay = cfactory.linear_slider(frame,
                                             "lfoDelay",
                                             self,
                                             range_=(0, 8))
        s_lfo_depth = cfactory.normalized_slider(frame, "lfoDepth", self)
        s_vibrato = cfactory.normalized_slider(frame, "vibrato", self)
        self.add_control("lfoFreq", s_lfo_freq)
        self.add_control("lfo2FreqRatio", s_lfo_ratio)
        self.add_control("lfoXMod", s_lfo_xmod)
        self.add_control("lfoDelay", s_lfo_delay)
        self.add_control("lfoDepth", s_lfo_depth)
        self.add_control("vibrato", s_vibrato)

        # Filter
        s_filter = ExpSlider(frame, "filterFreq", self, range_=16000)
        s_filter_lfo = ExpSlider(frame, "filterLfo", self, range_=9999)
        s_filter_env = ExpSlider(frame, "filterEnv", self, range_=9999)
        s_filter_lag = cfactory.normalized_slider(frame, "filterLag", self)
        s_filter_res = cfactory.normalized_slider(frame, "res", self)
        s_filter_mix = cfactory.normalized_slider(frame, "filterMix", self)
        s_filter_env.widget("checkbutton-sign").config(background="#2c272e")
        s_filter_lfo.widget("checkbutton-sign").config(background="#2c272e")

        self.add_control("filterFreq", s_filter)
        self.add_control("filterLfo", s_filter_lfo)
        self.add_control("filterEnv", s_filter_env)
        self.add_control("filterLag", s_filter_lag)
        self.add_control("res", s_filter_res)
        self.add_control("filterMix", s_filter_mix)

        # Env
        self.var_env_mode = tk.BooleanVar()
        s_attack = ExpSlider(frame, "attack", self, range_=60, degree=3)
        s_decay = ExpSlider(frame, "decay", self, range_=60, degree=3)
        s_release = ExpSlider(frame, "release", self, range_=60, degree=3)
        s_sustain = cfactory.normalized_slider(frame, "sustain", self)
        cb_trigmode = cfactory.ControlCheckbutton(frame, "envMode", self,
                                                  "Trig")
        cb_trigmode.widget().config(background="#3D3937")
        self.add_control("attack", s_attack)
        self.add_control("decay", s_decay)
        self.add_control("release", s_release)
        self.add_control("sustain", s_sustain)
        self.add_control("envMode", cb_trigmode)

        # Amp
        s_amp = cfactory.volume_slider(frame, "amp", self)
        self.add_control("amp", s_amp)

        s_xtone = cfactory.normalized_slider(frame, "xToSpread", editor)
        s_xnoise = cfactory.normalized_slider(frame, "xToNoise", editor)
        s_xfilter = cfactory.normalized_slider(frame, "xToFilter", editor)
        rs_xscale = ReciprocalSlider(frame,
                                     "xScale",
                                     editor,
                                     range_=4,
                                     degree=1)
        s_xbias = cfactory.linear_slider(frame,
                                         "xBias",
                                         editor,
                                         range_=(-4, 4))
        self.add_control("xToSpread", s_xtone)
        self.add_control("xToNoise", s_xnoise)
        self.add_control("xToFilter", s_xfilter)
        self.add_control("xScale", rs_xscale)
        self.add_control("xBias", s_xbias)

        y0, y1 = 50, 300
        x0 = 50
        x1 = x0 + 60
        x2 = x1 + 60
        s_spread.widget().place(x=x0, y=y0)
        s_spread_lfo.widget().place(x=x1, y=y0)
        s_spread_env.widget().place(x=x2, y=y0)

        x3 = x2 + 90
        x4 = x3 + 60
        x5 = x4 + 60
        x5b = x5 + 30
        s_cluster.widget().place(x=x3, y=y0)
        s_cluster_lfo.widget().place(x=x4, y=y0)
        s_cluster_env.widget().place(x=x5, y=y0)
        s_cluster_lag.widget().place(x=x5b, y=y0, width=14, height=75)

        x6 = x5 + 90
        x7 = x6 + 60
        s_pw.widget().place(x=x6, y=y0)
        s_pwm.widget().place(x=x7, y=y0)

        x8 = x7 + 90
        s_noise.widget().place(x=x8, y=y0)

        x9 = x8 + 90
        x10 = x9 + 60
        x11 = x10 + 60
        x12 = x11 + 60
        x13 = x12 + 60
        x14 = x13 + 60
        s_lfo_freq.layout(offset=(x9, y0), checkbutton_offset=None)
        s_lfo_ratio.widget().place(x=x10, y=y0)
        s_lfo_xmod.layout(offset=(x11, y0), checkbutton_offset=None)
        s_lfo_delay.widget().place(x=x12, y=y0)
        s_lfo_depth.widget().place(x=x13, y=y0)
        s_vibrato.widget().place(x=x14, y=y0)

        # ROW 2
        s_filter.layout(offset=(x0, y1), checkbutton_offset=None)
        s_filter_lfo.layout(offset=(x1, y1), checkbutton_offset=(-6, -24))
        s_filter_env.layout(offset=(x2, y1), checkbutton_offset=(-6, -24))
        s_filter_lag.widget().place(x=x2 + 30, y=y1, width=14, height=75)
        s_filter_res.widget().place(x=x3, y=y1)
        s_filter_mix.widget().place(x=x4, y=y1)

        x5 = x4 + 90
        x6 = x5 + 60
        x7 = x6 + 60
        x8 = x7 + 60
        x9 = x8 + 30
        s_attack.layout(offset=(x5, y1), checkbutton_offset=None)
        s_decay.layout(offset=(x6, y1), checkbutton_offset=None)
        s_sustain.widget().place(x=x7, y=y1)
        s_release.layout(offset=(x8, y1), checkbutton_offset=None)
        cb_trigmode.widget().place(x=x9, y=y1)

        # x10 = x8+120
        # s_amp.widget().place(x=x10, y=y1)

        # x11 = x10 + 190
        # x12 = x11 + 60
        # x13 = x12 + 60
        # s_xtone.widget().place(x=x11, y=y1)
        # s_xnoise.widget().place(x=x12, y=y1)
        # s_xfilter.widget().place(x=x13, y=y1)

        x10 = x8 + 120
        x11 = x10 + 60
        x12 = x11 + 60
        x13 = x12 + 60
        x14 = x13 + 60
        x15 = x14 + 60
        s_xtone.widget().place(x=x10, y=y1)
        s_xnoise.widget().place(x=x11, y=y1)
        s_xfilter.widget().place(x=x12, y=y1)
        rs_xscale.layout(offset=(x13, y1),
                         sign_offset=None,
                         invert_offset=(-4, -20))
        s_xbias.widget().place(x=x14, y=y1)
        s_amp.widget().place(x=x15, y=y1)
Exemple #13
0
 def exp_slider(self, param, x, y, range_=2.0, degree=2):
     s = ExpSlider(self.canvas, param, self.editor, range_, degree)
     self.add_control(param, s)
     s.layout((x, y), checkbutton_offset=None)
     return s
Exemple #14
0
 def exp_slider(self,param,x,y,range_=2.0,degree=2):
     s = ExpSlider(self.canvas,param,self.editor,
                   range_,degree)
     self.add_control(param,s)
     s.layout((x,y),checkbutton_offset=None)
     return s
Exemple #15
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)
     # Filter Freq
     s_freq = cfactory.third_octave_slider(frame, "filterFreq", editor, "Filter frequency")
     s_keytrack = cfactory.linear_slider(frame, "filterKeytrack", editor,range_ = (0.0, 4.0))
     s_freq_env1 = ExpSlider(frame, "filterFreq_env1", editor, range_=12000, degree=4)
     s_freq_lfo =  ExpSlider(frame, "filterFreq_lfo", editor, range_=12000, degree=4)
     s_freq_external = ExpSlider(frame, "xToFilterFreq", editor, range_=12000, degree=4)
     s_bandpass_offset = cfactory.linear_slider(frame, "bandpassOffset", editor,range_ = (1, 16))
     s_bandpass_lag = cfactory.normalized_slider(frame, "bandpassLag", editor)
     y0, y1 = 50, 300
     x0 = 60
     x1 = x0 + 60
     x2 = x1 + 60
     x3 = x2 + 40
     s_freq.widget().place(x=x0, y=y0)
     s_keytrack.widget().place(x=x1, y=y0)
     s_freq_env1.layout((x0,y1), checkbutton_offset=(-5,-28))
     s_freq_lfo.layout((x1,y1), checkbutton_offset=(-5,-28))
     s_freq_external.layout(offset = (x1+30, y1), checkbutton_offset = None)
     s_bandpass_offset.widget().place(x=x2, y=y0)
     s_bandpass_lag.widget().place(x=x3, y=y0, width=10, height=75)
     # Filter Resonace
     s_res = cfactory.normalized_slider(frame, "filterRes", editor)
     s_res_env1 = ExpSlider(frame, "filterRes_env1", editor, range_=1.0, degree=1)
     s_res_lfo = ExpSlider(frame, "filterRes_lfo", editor, range_=1.0, degree=1)
     x4 = x3 + 40
     s_res.widget().place(x=x4, y=y0)
     s_res_env1.layout(offset=(x4-60, y1), checkbutton_offset=(-5,-28))
     s_res_lfo.layout(offset=(x4, y1), checkbutton_offset=(-5,-28))
     # Filter Mix
     s_filter_mix = cfactory.bipolar_slider(frame, "filterMix", editor)
     s_filter_mix_env1 = ExpSlider(frame, "filterMix_env1", editor, range_=1, degree=1)
     s_filter_mix_lfo = ExpSlider(frame, "filterMix_lfo", editor, range_=1, degree=1)
     x5 = x4 + 60
     x6 = x5 + 60
     s_filter_mix.widget().place(x=x5, y=y0)
     s_filter_mix_env1.layout(offset=(x5, y1), checkbutton_offset=(-5, -28))
     s_filter_mix_lfo.layout(offset=(x6, y1), checkbutton_offset=(-5, -28))
     self.add_control("filterFreq", s_freq)
     self.add_control("filterKeytrack", s_keytrack)
     self.add_control("bandpassOffset", s_bandpass_offset)
     self.add_control("bandpassLag", s_bandpass_lag)
     self.add_control("filterFreq_env1", s_freq_env1)
     self.add_control("filterFreq_lfo", s_freq_lfo)
     self.add_control("filterRes", s_res)
     self.add_control("filterRes_env1", s_res_env1)
     self.add_control("filterRes_lfo", s_res_lfo)
     self.add_control("filterMix", s_filter_mix)
     self.add_control("filterMix_env1", s_filter_mix_env1)
     self.add_control("filterMix_lfo", s_filter_mix_lfo)
     self.add_control("xToFilterFreq", s_freq_external)
     # Env1 
     s_env1_a = ExpSlider(frame, "env1Attack", editor, range_=8, degree=2)
     s_env1_d = ExpSlider(frame, "env1Decay", editor, range_=8, degree=2)
     s_env1_r = ExpSlider(frame, "env1Release", editor, range_=8, degree=2)
     s_env1_s = cfactory.normalized_slider(frame, "env1Sustain", editor)
     self.add_control("env1Attack", s_env1_a)
     self.add_control("env1Decay", s_env1_d)
     self.add_control("env1Release", s_env1_r)
     self.add_control("env1Sustain", s_env1_s)
     xenv = x6 + 90
     xa = xenv
     xd = xa + 60
     xs = xd + 60
     xr = xs + 60
     s_env1_a.layout(offset = (xa, y0), checkbutton_offset=None)
     s_env1_d.layout(offset = (xd, y0), checkbutton_offset=None)
     s_env1_r.layout(offset = (xr, y0), checkbutton_offset=None)
     s_env1_s.widget().place(x=xs, y=y0)
     # Env2 
     s_env2_a = ExpSlider(frame, "env2Attack", editor, range_=8, degree=2)
     s_env2_d = ExpSlider(frame, "env2Decay", editor, range_=8, degree=2)
     s_env2_r = ExpSlider(frame, "env2Release", editor, range_=8, degree=2)
     s_env2_s = cfactory.normalized_slider(frame, "env2Sustain", editor)
     self.add_control("env2Attack", s_env2_a)
     self.add_control("env2Decay", s_env2_d)
     self.add_control("env2Release", s_env2_r)
     self.add_control("env2Sustain", s_env2_s)
     xenv = x6 + 90
     xa = xenv
     xd = xa + 60
     xs = xd + 60
     xr = xs + 60
     s_env2_a.layout(offset = (xa, y1), checkbutton_offset=None)
     s_env2_d.layout(offset = (xd, y1), checkbutton_offset=None)
     s_env2_r.layout(offset = (xr, y1), checkbutton_offset=None)
     s_env2_s.widget().place(x=xs, y=y1)
     # LFO
     s_lfo_freq = ExpSlider(frame, "lfoFreq", editor, range_=20, degree=2, clip=(0.01,20))
     s_lfo_delay = cfactory.linear_slider(frame, "lfoDelay", editor, range_=(0,4))
     s_lfo_depth = cfactory.normalized_slider(frame, "lfoDepth", editor)
     self.add_control("lfoFreq", s_lfo_freq)
     self.add_control("lfoDelay", s_lfo_delay)
     self.add_control("lfoDepth", s_lfo_depth)
     xlfo = xr + 90
     x1 = xlfo
     x2 = x1 + 60
     x3 = x2 + 60
     s_lfo_freq.layout(offset=(x1, y0), checkbutton_offset=None)
     s_lfo_delay.widget().place(x=x2, y=y0)
     s_lfo_depth.widget().place(x=x3, y=y0)
     # Vibrato
     s_vfreq = ExpSlider(frame, "vfreq", editor, range_=20, clip=(0.01,20))
     s_vdelay = cfactory.linear_slider(frame, "vdelay", editor, range_=(0,4))
     s_vsens = ExpSlider(frame, "vsens", editor, range_=1)
     s_vdepth = cfactory.normalized_slider(frame, "vdepth", editor)
     self.add_control("vfreq", s_vfreq)
     self.add_control("vdelay", s_vdelay)
     self.add_control("vsens", s_vsens)
     self.add_control("vdepth", s_vdepth)
     x4 = x3 + 60
     s_vfreq.layout(offset=(x1, y1), checkbutton_offset=None)
     s_vdelay.widget().place(x=x2, y=y1)
     s_vsens.layout(offset=(x3, y1), checkbutton_offset=None)
     s_vdepth.widget().place(x=x4, y=y1)
     # Primary amp
     xamp = x4 + 60
     s_amp = cfactory.volume_slider(frame, "amp", editor)
     self.add_control("amp", s_amp)
     s_amp.widget().place(x=xamp, y=y0)
Exemple #16
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME)
        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)

        # Tone Spread
        s_spread = cfactory.linear_slider(frame, "spread", self, range_=(0, 4))
        s_spread_lfo = cfactory.linear_slider(frame, "spreadLfo", self, range_=(0,4))
        s_spread_env = cfactory.linear_slider(frame, "spreadEnv", self, range_=(0,4))
        self.add_control("spread", s_spread)
        self.add_control("spreadLfo", s_spread_lfo)
        self.add_control("spreadEnv", s_spread_env)


        # Tone Cluster
        s_cluster = cfactory.linear_slider(frame, "cluster", self, range_=(0,16))
        s_cluster_lfo = cfactory.linear_slider(frame, "clusterLfo", self, range_=(0,16))
        s_cluster_env = cfactory.linear_slider(frame, "clusterEnv", self, range_=(-16,16))
        s_cluster_lag = cfactory.normalized_slider(frame, "clusterLag", self)
        self.add_control("cluster", s_cluster)
        self.add_control("clusterLfo", s_cluster_lfo)
        self.add_control("clusterEnv", s_cluster_env)
        self.add_control("clusterLag", s_cluster_lag)

        # Tone PW
        s_pw = cfactory.normalized_slider(frame, "pw", self)
        s_pwm = cfactory.normalized_slider(frame, "pwLfo", self)
        self.add_control("pw", s_pw)
        self.add_control("pwLfo", s_pwm)

        # Noise
        s_noise = cfactory.mix_slider(frame, "noiseAmp", self)
        self.add_control("noiseAmp", s_noise)

        # LFO
        s_lfo_freq = ExpSlider(frame, "lfoFreq", self, range_=100, degree=3, clip=(0.001, 100))
        s_lfo_ratio = cfactory.discrete_slider(frame, "lfo2FreqRatio", self,
                                              values = [0.01, 0.1, 0.25, 0.333, 0.5, 0.667,
                                                        0.75, 1.0, 1.125, 1.25, 1.5, 1.175,
                                                        2, 3, 4, 5, 8])
        s_lfo_xmod = ExpSlider(frame, "lfoXMod", self, range_=100, degree=3)
        s_lfo_delay = cfactory.linear_slider(frame, "lfoDelay", self, range_=(0, 8))
        s_lfo_depth = cfactory.normalized_slider(frame, "lfoDepth", self)
        s_vibrato = cfactory.normalized_slider(frame, "vibrato", self)
        self.add_control("lfoFreq", s_lfo_freq)
        self.add_control("lfo2FreqRatio", s_lfo_ratio)
        self.add_control("lfoXMod", s_lfo_xmod)
        self.add_control("lfoDelay", s_lfo_delay)
        self.add_control("lfoDepth", s_lfo_depth)
        self.add_control("vibrato", s_vibrato)
        
        # Filter
        s_filter = ExpSlider(frame, "filterFreq", self, range_= 16000)
        s_filter_lfo = ExpSlider(frame, "filterLfo", self, range_ = 9999)
        s_filter_env = ExpSlider(frame, "filterEnv", self, range_ = 9999)
        s_filter_lag = cfactory.normalized_slider(frame, "filterLag", self)
        s_filter_res = cfactory.normalized_slider(frame, "res", self)
        s_filter_mix = cfactory.normalized_slider(frame, "filterMix", self)
        s_filter_env.widget("checkbutton-sign").config(background="#2c272e")
        s_filter_lfo.widget("checkbutton-sign").config(background="#2c272e")
        
        self.add_control("filterFreq", s_filter)  
        self.add_control("filterLfo", s_filter_lfo)  
        self.add_control("filterEnv", s_filter_env)  
        self.add_control("filterLag", s_filter_lag)  
        self.add_control("res", s_filter_res)  
        self.add_control("filterMix", s_filter_mix)  

        # Env
        self.var_env_mode = tk.BooleanVar()
        s_attack = ExpSlider(frame, "attack", self, range_=60, degree=3)
        s_decay = ExpSlider(frame, "decay", self, range_=60, degree=3)
        s_release = ExpSlider(frame, "release", self, range_=60, degree=3)
        s_sustain = cfactory.normalized_slider(frame, "sustain", self)
        cb_trigmode = cfactory.ControlCheckbutton(frame, "envMode", self, "Trig")
        cb_trigmode.widget().config(background="#3D3937")
        self.add_control("attack", s_attack)
        self.add_control("decay", s_decay)
        self.add_control("release", s_release)
        self.add_control("sustain", s_sustain)
        self.add_control("envMode", cb_trigmode)

        # Amp
        s_amp = cfactory.volume_slider(frame, "amp", self)
        self.add_control("amp", s_amp)

        s_xtone = cfactory.normalized_slider(frame, "xToSpread", editor)
        s_xnoise = cfactory.normalized_slider(frame, "xToNoise", editor)
        s_xfilter = cfactory.normalized_slider(frame, "xToFilter", editor)
        rs_xscale = ReciprocalSlider(frame, "xScale", editor, range_ = 4, degree=1)
        s_xbias = cfactory.linear_slider(frame, "xBias", editor, range_=(-4, 4))
        self.add_control("xToSpread", s_xtone)
        self.add_control("xToNoise", s_xnoise)
        self.add_control("xToFilter", s_xfilter)
        self.add_control("xScale", rs_xscale)
        self.add_control("xBias", s_xbias)
        
        y0, y1 = 50, 300
        x0 = 50
        x1 = x0 + 60
        x2 = x1 + 60
        s_spread.widget().place(x=x0, y=y0)
        s_spread_lfo.widget().place(x=x1, y=y0)
        s_spread_env.widget().place(x=x2, y=y0)

        x3 = x2 + 90
        x4 = x3 + 60
        x5 = x4 + 60
        x5b = x5 + 30
        s_cluster.widget().place(x=x3, y=y0)
        s_cluster_lfo.widget().place(x=x4, y=y0)
        s_cluster_env.widget().place(x=x5, y=y0)
        s_cluster_lag.widget().place(x=x5b, y=y0, width=14, height=75)

        x6 = x5+90
        x7 = x6+60
        s_pw.widget().place(x=x6, y=y0)
        s_pwm.widget().place(x=x7, y=y0)

        x8 = x7 + 90
        s_noise.widget().place(x=x8, y=y0)

        x9 = x8 + 90
        x10 = x9 + 60
        x11 = x10 + 60
        x12 = x11 + 60
        x13 = x12 + 60
        x14 = x13 + 60
        s_lfo_freq.layout(offset=(x9, y0), checkbutton_offset=None)
        s_lfo_ratio.widget().place(x=x10, y=y0)
        s_lfo_xmod.layout(offset=(x11, y0), checkbutton_offset=None)
        s_lfo_delay.widget().place(x=x12, y=y0)
        s_lfo_depth.widget().place(x=x13, y=y0)
        s_vibrato.widget().place(x=x14, y=y0)
        
        # ROW 2
        s_filter.layout(offset=(x0, y1), checkbutton_offset = None)
        s_filter_lfo.layout(offset=(x1, y1), checkbutton_offset = (-6, -24))
        s_filter_env.layout(offset=(x2, y1), checkbutton_offset = (-6, -24))
        s_filter_lag.widget().place(x=x2+30, y=y1, width=14, height=75)
        s_filter_res.widget().place(x=x3, y=y1)
        s_filter_mix.widget().place(x=x4, y=y1)
        


        
        x5 = x4 + 90
        x6 = x5+60
        x7 = x6+60
        x8 = x7+60
        x9 = x8+30
        s_attack.layout(offset=(x5, y1), checkbutton_offset = None)
        s_decay.layout(offset=(x6, y1), checkbutton_offset = None)
        s_sustain.widget().place(x=x7, y=y1)
        s_release.layout(offset=(x8, y1), checkbutton_offset = None)
        cb_trigmode.widget().place(x=x9, y=y1)
        
        # x10 = x8+120
        # s_amp.widget().place(x=x10, y=y1)

        # x11 = x10 + 190
        # x12 = x11 + 60
        # x13 = x12 + 60
        # s_xtone.widget().place(x=x11, y=y1)
        # s_xnoise.widget().place(x=x12, y=y1)
        # s_xfilter.widget().place(x=x13, y=y1)


        x10 = x8+120
        x11 = x10+60
        x12 = x11 + 60
        x13 = x12 + 60
        x14 = x13 + 60
        x15 = x14 + 60
        s_xtone.widget().place(x=x10, y=y1)
        s_xnoise.widget().place(x=x11, y=y1)
        s_xfilter.widget().place(x=x12, y=y1)
        rs_xscale.layout(offset=(x13,y1),
                         sign_offset = None,
                         invert_offset = (-4, -20))
        s_xbias.widget().place(x=x14, y=y1)
        s_amp.widget().place(x=x15, y=y1)
Exemple #17
0
 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
Exemple #18
0
 def exp_slider(param,range_,x,y,degree=2,height=150):
     s = ExpSlider(canvas,param,editor,range_=range_,degree=degree)
     self.add_control(param,s)
     s.layout((x,y),checkbutton_offset=None)
     return s
Exemple #19
0
 def exp_slider(param,range_,degree=2):
     s = ExpSlider(canvas,param,editor,range_,degree)
     self.add_control(param,s)
     return s
Exemple #20
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_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)
Exemple #21
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)

        xs_attack = ExpSlider(frame, "attack", editor, range_= 32)
        xs_decay = ExpSlider(frame, "decay", editor, range_= 32)
        s_sustain = cf.normalized_slider(frame, "sustain", editor)
        xs_release = ExpSlider(frame, "release", editor, range_= 32)
        cb_envmode = cf.ControlCheckbutton(frame, "envMode", editor, values=(0,1))


        xs_lfo_freq = ExpSlider(frame, "lfoFreq", editor, range_= 100)
        ds_lfo_ratios = cf.discrete_slider(frame,"lfo2FreqRatio", editor, values=LFO_RATIOS)
        xs_lfo_xmod = ExpSlider(frame, "lfoXMod", editor, range_= 100)
        s_lfo_delay = cf.linear_slider(frame, "lfoDelay", editor, range_=(0,8))
        s_lfo_depth = cf.normalized_slider(frame, "lfoDepth", editor)
        s_vibrato = cf.normalized_slider(frame, "vibrato", editor)
                                       
        s_xspread = cf.normalized_slider(frame, "xToSpread", editor)
        s_xnoise = cf.normalized_slider(frame, "xToNoise", editor)
        s_xfilter = cf.normalized_slider(frame, "xToFilter", editor)
        s_xscale = cf.linear_slider(frame, "xScale", editor, range_=(0,4))
        
        self.add_control("attack", xs_attack)
        self.add_control("decay", xs_decay)
        self.add_control("sustain", s_sustain)
        self.add_control("release", xs_release)
        self.add_control("envMode", cb_envmode)
        self.add_control("lfoFreq",xs_lfo_freq)
        self.add_control("lfo2FreqRatio",ds_lfo_ratios)
        self.add_control("lfoXMod",xs_lfo_xmod)
        self.add_control("lfoDelay",s_lfo_delay)
        self.add_control("lfoDepth",s_lfo_depth)
        self.add_control("vibrato",s_vibrato)
                                    
        self.add_control("xToSpread", s_xspread)
        self.add_control("xToNoise", s_xnoise)
        self.add_control("xToFilter", s_xfilter)
        self.add_control("xScale", s_xscale)

        y0 = 90
        x0 = 90
        x1 = x0 + 60
        x2 = x1 + 60
        x3 = x2 + 60
        x4 = x3 + 60
        #5 = x4 + 30

        xlfo = x4 + 75
        x6 = xlfo
        x7 = x6 + 60
        x8 = x7 + 60
        x9 = x8 + 60
        x10 = x9 + 60
        x11 = x10 + 60
        
        xs_attack.layout(offset = (x0, y0), checkbutton_offset =None, height=380)
        xs_decay.layout(offset = (x1, y0), checkbutton_offset =None, height=380)
        s_sustain.widget().place(x=x2, y=y0, height=380)
        xs_release.layout(offset = (x3, y0), checkbutton_offset =None, height=380)
        cb_envmode.widget().place(x=x4, y=y0)


        xs_lfo_freq.layout(offset=(x6, y0),checkbutton_offset = None, height=380)
        xs_lfo_xmod.layout(offset=(x7, y0),checkbutton_offset = None, height=380)
        ds_lfo_ratios.widget().place(x=x8, y=y0)
        s_lfo_delay.widget().place(x=x9, y=y0)
        
        s_lfo_depth.widget().place(x=x10, y=y0)
        s_vibrato.widget().place(x=x11, y=y0)

        y1 = 320
        s_xspread.widget().place(x=x8, y=y1)
        s_xnoise.widget().place(x=x9, y=y1)
        s_xfilter.widget().place(x=x10, y=y1)
        s_xscale.widget().place(x=x11, y=y1)
Exemple #22
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME)
        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)
        # Envelopes
        s_env1_a = ExpSlider(frame, "env1Attack", editor,range_=60, degree=5,ttip="ENV1 Attack")
        s_env1_d = ExpSlider(frame, "env1Decay", editor,range_=60, degree=5,ttip="ENV1 Decay")
        s_env1_s = cfactory.normalized_slider(frame, "env1Sustain", editor, ttip="ENV1 Sustain")
        s_env1_r = ExpSlider(frame, "env1Release", editor,range_=60, degree=5,ttip="ENV1 Release")
        s_env2_a = ExpSlider(frame, "env2Attack", editor,range_=60, degree=5,ttip="ENV2 Attack")
        s_env2_d = ExpSlider(frame, "env2Decay", editor,range_=60, degree=5,ttip="ENV2 Decay")
        s_env2_s = cfactory.normalized_slider(frame, "env2Sustain", editor, ttip="ENV2 Sustain")
        s_env2_r = ExpSlider(frame, "env2Release", editor,range_=60, degree=5,ttip="ENV2 Release")
        y0, y1 = 50, 300
        x0 = 60
        x1 = x0+60
        x2 = x1+60
        x3 = x2+60
        s_env1_a.layout((x0, y0), checkbutton_offset = None)
        s_env1_d.layout((x1, y0), checkbutton_offset = None)
        s_env1_s.widget().place(x=x2, y=y0)
        s_env1_r.layout((x3, y0), checkbutton_offset = None)
        s_env2_a.layout((x0, y1), checkbutton_offset = None)
        s_env2_d.layout((x1, y1), checkbutton_offset = None)
        s_env2_s.widget().place(x=x2, y=y1)
        s_env2_r.layout((x3, y1), checkbutton_offset = None)
        self.add_control("env1Attack", s_env1_a)
        self.add_control("env1Decay", s_env1_d)
        self.add_control("env1Sustain", s_env1_s)
        self.add_control("env1Release", s_env1_r)
        self.add_control("env2Attack", s_env2_a)
        self.add_control("env2Decay", s_env2_d)
        self.add_control("env2Sustain", s_env2_s)
        self.add_control("env2Release", s_env2_r)
        # Vibrato
        s_vfreq = cfactory.simple_lfo_freq_slider(frame,"vfreq",editor,"Vibrato frequency")
        s_vsens = cfactory.normalized_slider(frame,"vsens",editor,"Vibrato Sensitivity")
        s_vdelay = cfactory.linear_slider(frame,"vdelay",editor,range_=(0,4),ttip="Vibrato delay")
        s_vdepth = cfactory.normalized_slider(frame,"vdepth",editor,"Vibrato depth")
        x4 = x3+90
        x5 = x4+60
        x6 = x5+60
        x7 = x6+60
        s_vfreq.widget().place(x=x4, y=y0)
        s_vdelay.widget().place(x=x5, y=y0)
        s_vdepth.widget().place(x=x6, y=y0)
        s_vsens.widget().place(x=x7, y=y0)
        self.add_control("vfreq",s_vfreq)        
        self.add_control("vsens",s_vsens)        
        self.add_control("vdelay",s_vdelay)        
        self.add_control("vdepth",s_vdepth)        
        # LFO
        s_lfo_freq = cfactory.simple_lfo_freq_slider(frame,"lfoFreq",editor,"LFO Frequency")
        s_lfo_delay = cfactory.linear_slider(frame,"lfoDelay",editor,range_=(0,4),ttip="LFO delay")
        s_lfo_depth = cfactory.normalized_slider(frame,"lfoDepth",editor,"LFO depth")
        s_lfo_freq.widget().place(x=x4, y=y1)
        s_lfo_delay.widget().place(x=x5, y=y1)
        s_lfo_depth.widget().place(x=x6, y=y1)
        self.add_control("lfoFreq",s_lfo_freq)        
        self.add_control("lfoDelay",s_lfo_delay)
        self.add_control("lfoDepth",s_lfo_depth)

        # Amp
        x8 = x7+90
        s_amp = cfactory.volume_slider(frame, "amp", editor)
        s_amp.widget().place(x=x8, y=y0)
Exemple #23
0
 def env_time_slider(self, param, x, y):
     s = ExpSlider(self.canvas, param, self.editor, range_=4, degree=2)
     self.add_control(param, s)
     s.layout((x, y), width=14, height=150, checkbutton_offset=None)
     return s
Exemple #24
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)
     # Filter Freq
     s_freq = cfactory.third_octave_slider(frame, "filterFreq", editor,
                                           "Filter frequency")
     s_keytrack = cfactory.linear_slider(frame,
                                         "filterKeytrack",
                                         editor,
                                         range_=(0.0, 4.0))
     s_freq_env1 = ExpSlider(frame,
                             "filterFreq_env1",
                             editor,
                             range_=12000,
                             degree=4)
     s_freq_lfo = ExpSlider(frame,
                            "filterFreq_lfo",
                            editor,
                            range_=12000,
                            degree=4)
     s_freq_external = ExpSlider(frame,
                                 "xToFilterFreq",
                                 editor,
                                 range_=12000,
                                 degree=4)
     s_bandpass_offset = cfactory.linear_slider(frame,
                                                "bandpassOffset",
                                                editor,
                                                range_=(1, 16))
     s_bandpass_lag = cfactory.normalized_slider(frame, "bandpassLag",
                                                 editor)
     y0, y1 = 50, 300
     x0 = 60
     x1 = x0 + 60
     x2 = x1 + 60
     x3 = x2 + 40
     s_freq.widget().place(x=x0, y=y0)
     s_keytrack.widget().place(x=x1, y=y0)
     s_freq_env1.layout((x0, y1), checkbutton_offset=(-5, -28))
     s_freq_lfo.layout((x1, y1), checkbutton_offset=(-5, -28))
     s_freq_external.layout(offset=(x1 + 30, y1), checkbutton_offset=None)
     s_bandpass_offset.widget().place(x=x2, y=y0)
     s_bandpass_lag.widget().place(x=x3, y=y0, width=10, height=75)
     # Filter Resonace
     s_res = cfactory.normalized_slider(frame, "filterRes", editor)
     s_res_env1 = ExpSlider(frame,
                            "filterRes_env1",
                            editor,
                            range_=1.0,
                            degree=1)
     s_res_lfo = ExpSlider(frame,
                           "filterRes_lfo",
                           editor,
                           range_=1.0,
                           degree=1)
     x4 = x3 + 40
     s_res.widget().place(x=x4, y=y0)
     s_res_env1.layout(offset=(x4 - 60, y1), checkbutton_offset=(-5, -28))
     s_res_lfo.layout(offset=(x4, y1), checkbutton_offset=(-5, -28))
     # Filter Mix
     s_filter_mix = cfactory.bipolar_slider(frame, "filterMix", editor)
     s_filter_mix_env1 = ExpSlider(frame,
                                   "filterMix_env1",
                                   editor,
                                   range_=1,
                                   degree=1)
     s_filter_mix_lfo = ExpSlider(frame,
                                  "filterMix_lfo",
                                  editor,
                                  range_=1,
                                  degree=1)
     x5 = x4 + 60
     x6 = x5 + 60
     s_filter_mix.widget().place(x=x5, y=y0)
     s_filter_mix_env1.layout(offset=(x5, y1), checkbutton_offset=(-5, -28))
     s_filter_mix_lfo.layout(offset=(x6, y1), checkbutton_offset=(-5, -28))
     self.add_control("filterFreq", s_freq)
     self.add_control("filterKeytrack", s_keytrack)
     self.add_control("bandpassOffset", s_bandpass_offset)
     self.add_control("bandpassLag", s_bandpass_lag)
     self.add_control("filterFreq_env1", s_freq_env1)
     self.add_control("filterFreq_lfo", s_freq_lfo)
     self.add_control("filterRes", s_res)
     self.add_control("filterRes_env1", s_res_env1)
     self.add_control("filterRes_lfo", s_res_lfo)
     self.add_control("filterMix", s_filter_mix)
     self.add_control("filterMix_env1", s_filter_mix_env1)
     self.add_control("filterMix_lfo", s_filter_mix_lfo)
     self.add_control("xToFilterFreq", s_freq_external)
     # Env1
     s_env1_a = ExpSlider(frame, "env1Attack", editor, range_=8, degree=2)
     s_env1_d = ExpSlider(frame, "env1Decay", editor, range_=8, degree=2)
     s_env1_r = ExpSlider(frame, "env1Release", editor, range_=8, degree=2)
     s_env1_s = cfactory.normalized_slider(frame, "env1Sustain", editor)
     self.add_control("env1Attack", s_env1_a)
     self.add_control("env1Decay", s_env1_d)
     self.add_control("env1Release", s_env1_r)
     self.add_control("env1Sustain", s_env1_s)
     xenv = x6 + 90
     xa = xenv
     xd = xa + 60
     xs = xd + 60
     xr = xs + 60
     s_env1_a.layout(offset=(xa, y0), checkbutton_offset=None)
     s_env1_d.layout(offset=(xd, y0), checkbutton_offset=None)
     s_env1_r.layout(offset=(xr, y0), checkbutton_offset=None)
     s_env1_s.widget().place(x=xs, y=y0)
     # Env2
     s_env2_a = ExpSlider(frame, "env2Attack", editor, range_=8, degree=2)
     s_env2_d = ExpSlider(frame, "env2Decay", editor, range_=8, degree=2)
     s_env2_r = ExpSlider(frame, "env2Release", editor, range_=8, degree=2)
     s_env2_s = cfactory.normalized_slider(frame, "env2Sustain", editor)
     self.add_control("env2Attack", s_env2_a)
     self.add_control("env2Decay", s_env2_d)
     self.add_control("env2Release", s_env2_r)
     self.add_control("env2Sustain", s_env2_s)
     xenv = x6 + 90
     xa = xenv
     xd = xa + 60
     xs = xd + 60
     xr = xs + 60
     s_env2_a.layout(offset=(xa, y1), checkbutton_offset=None)
     s_env2_d.layout(offset=(xd, y1), checkbutton_offset=None)
     s_env2_r.layout(offset=(xr, y1), checkbutton_offset=None)
     s_env2_s.widget().place(x=xs, y=y1)
     # LFO
     s_lfo_freq = ExpSlider(frame,
                            "lfoFreq",
                            editor,
                            range_=20,
                            degree=2,
                            clip=(0.01, 20))
     s_lfo_delay = cfactory.linear_slider(frame,
                                          "lfoDelay",
                                          editor,
                                          range_=(0, 4))
     s_lfo_depth = cfactory.normalized_slider(frame, "lfoDepth", editor)
     self.add_control("lfoFreq", s_lfo_freq)
     self.add_control("lfoDelay", s_lfo_delay)
     self.add_control("lfoDepth", s_lfo_depth)
     xlfo = xr + 90
     x1 = xlfo
     x2 = x1 + 60
     x3 = x2 + 60
     s_lfo_freq.layout(offset=(x1, y0), checkbutton_offset=None)
     s_lfo_delay.widget().place(x=x2, y=y0)
     s_lfo_depth.widget().place(x=x3, y=y0)
     # Vibrato
     s_vfreq = ExpSlider(frame, "vfreq", editor, range_=20, clip=(0.01, 20))
     s_vdelay = cfactory.linear_slider(frame,
                                       "vdelay",
                                       editor,
                                       range_=(0, 4))
     s_vsens = ExpSlider(frame, "vsens", editor, range_=1)
     s_vdepth = cfactory.normalized_slider(frame, "vdepth", editor)
     self.add_control("vfreq", s_vfreq)
     self.add_control("vdelay", s_vdelay)
     self.add_control("vsens", s_vsens)
     self.add_control("vdepth", s_vdepth)
     x4 = x3 + 60
     s_vfreq.layout(offset=(x1, y1), checkbutton_offset=None)
     s_vdelay.widget().place(x=x2, y=y1)
     s_vsens.layout(offset=(x3, y1), checkbutton_offset=None)
     s_vdepth.widget().place(x=x4, y=y1)
     # Primary amp
     xamp = x4 + 60
     s_amp = cfactory.volume_slider(frame, "amp", editor)
     self.add_control("amp", s_amp)
     s_amp.widget().place(x=xamp, y=y0)
Exemple #25
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME, self.TAB_FILE)
        frame.config(background=factory.bg())
        canvas = factory.canvas(frame,1018,663,self.IMAGE_FILE)
        canvas.pack()
        TkSubEditor.__init__(self, canvas, editor, self.NAME)
        editor.add_child_editor(self.NAME, self)

        def ratio_msb(param,x,y):
            count = len(HARMONICS)
            msb = MSB(canvas,param,editor,count)
            for i,p in enumerate(HARMONICS):
                v,text = p
                d = _msb_aspect(v,text)
                msb.define_aspect(i,v,d)
            self.add_control(param,msb)
            msb.layout((x,y))
            msb.update_aspect()
            return msb
        tumbler = Tumbler(canvas,"lfoFreq",editor, digits=5, scale=0.001)
        s_scale = cf.linear_slider(canvas, "lfoScale", editor, range_=(0,4))
        s_bias = cf.linear_slider(canvas, "lfoBias", editor, range_=(-4,4))
        s_fm = cf.linear_slider(canvas, "lfoFM", editor, range_=(0, 8))
        s_am = cf.normalized_slider(canvas, "lfoAM", editor)
        s_delay = ExpSlider(canvas, "lfoDelay", editor, range_=8)
        s_attack = ExpSlider(canvas, "lfoAttack", editor, range_=8)
        s_hold = ExpSlider(canvas, "lfoHold", editor, range_=8)
        s_release = ExpSlider(canvas, "lfoRelease", editor, range_=8)
        s_env_fm = cf.linear_slider(canvas, "lfoEnvToFreq", editor, range_=(0,8))
        s_env_bleed = cf.normalized_slider(canvas, "lfoBleed", editor)
        s_amp_a = cf.normalized_slider(canvas, "lfoAmpA", editor)
        s_amp_b = cf.normalized_slider(canvas, "lfoAmpB", editor)
        s_amp_c = cf.normalized_slider(canvas, "lfoAmpC", editor)
        self.add_control("lfoFreq", tumbler)
        self.add_control("lfoScale", s_scale)
        self.add_control("lfoBias", s_bias)
        self.add_control("lfoFM", s_fm)
        self.add_control("lfoAM", s_am)
        self.add_control("lfoDelay", s_delay)
        self.add_control("lfoAttack", s_attack)
        self.add_control("lfoHold", s_hold)
        self.add_control("lfoRelease", s_release)
        self.add_control("lfoEnvToFreq", s_env_fm)
        self.add_control("lfoBleed", s_env_bleed)
        self.add_control("lfoAmpA", s_amp_a)
        self.add_control("lfoAmpB", s_amp_b)
        self.add_control("lfoAmpC", s_amp_c)
        y0, y1 = 90, 350
        x0 = 90
        x1 = x0 + 140
        x2 = x1 + 60
        x_mod = x2 +60
        x_fm = x_mod + 75
        x_am = x_fm + 60
        x_delay = x_am + 90
        x_attack = x_delay + 60
        x_hold = x_attack + 60
        x_release = x_hold + 60
        x_env_fm = x_release + 60
        x_bleed = x_env_fm + 60
        x_a = x0
        x_b = x_a + 150
        x_c = x_b + 150
        ratio_msb("lfoModFreq", x_mod,y0)
        ratio_msb("lfoRatioA", x_a, y1)
        ratio_msb("lfoRatioB", x_b, y1)
        ratio_msb("lfoRatioC", x_c, y1)
        tumbler.layout((x0+13,y0+30))
        s_scale.widget().place(x=x1, y=y0)
        s_bias.widget().place(x=x2, y=y0)
        s_fm.widget().place(x=x_fm, y=y0)
        s_am.widget().place(x=x_am, y=y0)
        s_delay.layout(offset=(x_delay, y0),checkbutton_offset=None)
        s_attack.layout(offset=(x_attack, y0),checkbutton_offset=None)
        s_hold.layout(offset=(x_hold, y0),checkbutton_offset=None)
        s_release.layout(offset=(x_release, y0),checkbutton_offset=None)
        s_env_fm.widget().place(x=x_env_fm, y=y0)
        s_env_bleed.widget().place(x=x_bleed, y=y0)
        s_amp_a.widget().place(x=x_a+75, y=y1)
        s_amp_b.widget().place(x=x_b+75, y=y1)
        s_amp_c.widget().place(x=x_c+75, y=y1)
Exemple #26
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
            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)
Exemple #27
0
    def __init__(self, editor):
        frame = editor.create_tab(self.NAME)
        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)
        # Envelopes
        s_env1_a = ExpSlider(frame,
                             "env1Attack",
                             editor,
                             range_=60,
                             degree=5,
                             ttip="ENV1 Attack")
        s_env1_d = ExpSlider(frame,
                             "env1Decay",
                             editor,
                             range_=60,
                             degree=5,
                             ttip="ENV1 Decay")
        s_env1_s = cfactory.normalized_slider(frame,
                                              "env1Sustain",
                                              editor,
                                              ttip="ENV1 Sustain")
        s_env1_r = ExpSlider(frame,
                             "env1Release",
                             editor,
                             range_=60,
                             degree=5,
                             ttip="ENV1 Release")
        s_env2_a = ExpSlider(frame,
                             "env2Attack",
                             editor,
                             range_=60,
                             degree=5,
                             ttip="ENV2 Attack")
        s_env2_d = ExpSlider(frame,
                             "env2Decay",
                             editor,
                             range_=60,
                             degree=5,
                             ttip="ENV2 Decay")
        s_env2_s = cfactory.normalized_slider(frame,
                                              "env2Sustain",
                                              editor,
                                              ttip="ENV2 Sustain")
        s_env2_r = ExpSlider(frame,
                             "env2Release",
                             editor,
                             range_=60,
                             degree=5,
                             ttip="ENV2 Release")
        y0, y1 = 50, 300
        x0 = 60
        x1 = x0 + 60
        x2 = x1 + 60
        x3 = x2 + 60
        s_env1_a.layout((x0, y0), checkbutton_offset=None)
        s_env1_d.layout((x1, y0), checkbutton_offset=None)
        s_env1_s.widget().place(x=x2, y=y0)
        s_env1_r.layout((x3, y0), checkbutton_offset=None)
        s_env2_a.layout((x0, y1), checkbutton_offset=None)
        s_env2_d.layout((x1, y1), checkbutton_offset=None)
        s_env2_s.widget().place(x=x2, y=y1)
        s_env2_r.layout((x3, y1), checkbutton_offset=None)
        self.add_control("env1Attack", s_env1_a)
        self.add_control("env1Decay", s_env1_d)
        self.add_control("env1Sustain", s_env1_s)
        self.add_control("env1Release", s_env1_r)
        self.add_control("env2Attack", s_env2_a)
        self.add_control("env2Decay", s_env2_d)
        self.add_control("env2Sustain", s_env2_s)
        self.add_control("env2Release", s_env2_r)
        # Vibrato
        s_vfreq = cfactory.simple_lfo_freq_slider(frame, "vfreq", editor,
                                                  "Vibrato frequency")
        s_vsens = cfactory.normalized_slider(frame, "vsens", editor,
                                             "Vibrato Sensitivity")
        s_vdelay = cfactory.linear_slider(frame,
                                          "vdelay",
                                          editor,
                                          range_=(0, 4),
                                          ttip="Vibrato delay")
        s_vdepth = cfactory.normalized_slider(frame, "vdepth", editor,
                                              "Vibrato depth")
        x4 = x3 + 90
        x5 = x4 + 60
        x6 = x5 + 60
        x7 = x6 + 60
        s_vfreq.widget().place(x=x4, y=y0)
        s_vdelay.widget().place(x=x5, y=y0)
        s_vdepth.widget().place(x=x6, y=y0)
        s_vsens.widget().place(x=x7, y=y0)
        self.add_control("vfreq", s_vfreq)
        self.add_control("vsens", s_vsens)
        self.add_control("vdelay", s_vdelay)
        self.add_control("vdepth", s_vdepth)
        # LFO
        s_lfo_freq = cfactory.simple_lfo_freq_slider(frame, "lfoFreq", editor,
                                                     "LFO Frequency")
        s_lfo_delay = cfactory.linear_slider(frame,
                                             "lfoDelay",
                                             editor,
                                             range_=(0, 4),
                                             ttip="LFO delay")
        s_lfo_depth = cfactory.normalized_slider(frame, "lfoDepth", editor,
                                                 "LFO depth")
        s_lfo_freq.widget().place(x=x4, y=y1)
        s_lfo_delay.widget().place(x=x5, y=y1)
        s_lfo_depth.widget().place(x=x6, y=y1)
        self.add_control("lfoFreq", s_lfo_freq)
        self.add_control("lfoDelay", s_lfo_delay)
        self.add_control("lfoDepth", s_lfo_depth)

        # Amp
        x8 = x7 + 90
        s_amp = cfactory.volume_slider(frame, "amp", editor)
        s_amp.widget().place(x=x8, y=y0)
Exemple #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)
Exemple #29
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
            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)