Browse Source

Various improvements. Master gain done

master
Pete Shadbolt 10 years ago
parent
commit
c10db5c91b
2 changed files with 29 additions and 21 deletions
  1. +14
    -7
      main.ck
  2. +15
    -14
      main.py

+ 14
- 7
main.ck View File

@@ -1,16 +1,19 @@
// TODO: turn off adcThru when recording
// TODO: Effects break panning for some unknown reason

// Capture mic/line in and monitor through DAC. Limit
adc => Dyno inputLimiter => Gain adcThru => dac; // Monitor input
inputLimiter.limit();
inputLimiter @=> UGen @ mainInput;
// TODO: currently I don't turn ADC thru back on after recording

// Effects chain with limiters, reverb, filters
PRCRev reverb => LPF lpf => Dyno outputLimiter => dac;
NRev reverb => LPF lpf => Dyno outputLimiter => dac;
outputLimiter.limit();
reverb @=> UGen @ outputWet; // Reference to wet output
outputLimiter @=> UGen @ outputDry; // Reference to dry output
outputLimiter @=> UGen @ mainOutput; // Reference to main output

// Capture mic/line in and monitor through DAC. Limit
adc => Dyno inputLimiter => Gain adcThru => mainOutput; // Monitor input
inputLimiter.limit();
inputLimiter @=> UGen @ mainInput;


// Default parameters
.5 => adcThru.gain;
@@ -64,7 +67,10 @@ while (true) {
}
else if(msg.address=="/fx") {
(100+msg.getFloat(0)*10000) => lpf.freq;
msg.getFloat(0) => reverb.mix;
msg.getFloat(1) => reverb.mix;
}
else if(msg.address=="/master") {
msg.getFloat(0) => mainOutput.gain;
}
}
}
@@ -99,6 +105,7 @@ public class LoopPedal
}

public void arm(int value) {
0 => adcThru.gain;
sample.playPos() => sample.recPos;
value => sample.record;
}


+ 15
- 14
main.py View File

@@ -1,6 +1,9 @@
from libs.simpleosc import *
import wx

#TODO: standardize methods for adding/removing arrays of widgets
#TODO: fix the *100 / /100 stuff

def sendOSCSafe(channel, data):
try:
sendOSCMsg(channel, data)
@@ -91,13 +94,13 @@ class DelayPanel(wx.Panel):
sizer.Add(label, 0, wx.TOP|wx.BOTTOM|wx.RIGHT, 5)

self.delayTime=OSCSlider(self, "Time", default_value=1, max_value=10, align=False)
sizer.Add(self.delayTime, 1, wx.EXPAND|wx.ALL, 5)
sizer.Add(self.delayTime, 1, wx.ALL, 5)

self.feedback=OSCSlider(self, "Hold", default_value=.99, align=False)
sizer.Add(self.feedback, 1, wx.EXPAND|wx.ALL, 5)
sizer.Add(self.feedback, 1, wx.ALL, 5)

self.metronome=wx.ToggleButton(self, 0, "Click")
sizer.Add(self.metronome, 0, wx.EXPAND|wx.ALL, 5)
self.metronome=wx.ToggleButton(self, 0, "Metronome")
sizer.Add(self.metronome, 0)

self.SetSizerAndFit(sizer)
self.delayTime.Bind(wx.EVT_SCROLL, self.update)
@@ -215,7 +218,7 @@ class FXPanel(wx.Panel):
wx.Panel.__init__(self, parent)
sizer = wx.BoxSizer(wx.HORIZONTAL)

label = wx.StaticText(self, label="Filter:")
label = wx.StaticText(self, label="FX:")
font = label.GetFont(); font.SetWeight(wx.BOLD); label.SetFont(font)
sizer.Add(label, 0, wx.EXPAND|wx.TOP|wx.BOTTOM|wx.RIGHT, 5)

@@ -224,11 +227,11 @@ class FXPanel(wx.Panel):
#sizer.Add(self.fxtype, 1, wx.ALL|wx.EXPAND, 5)
#self.fxtype.SetValue(choices[0])

self.lpf=OSCSlider(self, "Lowpass", default_value=0)
self.lpf=OSCSlider(self, "Lowpass", default_value=.5, align=False)
sizer.Add(self.lpf, 2, wx.EXPAND|wx.ALL, 5)
self.lpf.Bind(wx.EVT_SCROLL, self.update)

self.reverb=OSCSlider(self, "Reverb", default_value=0)
self.reverb=OSCSlider(self, "Reverb", default_value=.5, align=False)
sizer.Add(self.reverb, 2, wx.EXPAND|wx.ALL, 5)
self.reverb.Bind(wx.EVT_SCROLL, self.update)

@@ -253,18 +256,16 @@ class OutputPanel(wx.Panel):

self.level=OSCSlider(self, "Level", default_value=.8, align=False)
sizer.Add(self.level, 2, wx.EXPAND|wx.ALL, 5)
self.level.Bind(wx.EVT_SCROLL, self.update)

self.gauge = wx.Gauge(self, size=(40,10))
sizer.Add(self.gauge, 1, wx.EXPAND|wx.ALL, 5)
#self.gauge = wx.Gauge(self, size=(40,10))
#sizer.Add(self.gauge, 1, wx.EXPAND|wx.ALL, 5)

self.SetSizerAndFit(sizer)

"""
def update(self, evt):
a=self.delayTime.slider.GetValue()/100.
b=self.feedback.slider.GetValue()/100.
sendOSCSafe("/delay", [a, b])
"""
a=self.level.slider.GetValue()/100.
sendOSCSafe("/master", [a])


class MainGUI(wx.Frame):


Loading…
Cancel
Save