From 886f16785ff5f6ebb28e8b1afd3f2b012bc80847 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sun, 4 Jan 2015 11:32:23 +0000 Subject: [PATCH 1/2] TODOs --- README.mkd | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/README.mkd b/README.mkd index a777ef6..919e782 100644 --- a/README.mkd +++ b/README.mkd @@ -1,3 +1,13 @@ # DELAY LORD ![Screenshot](screenshot.png) + +## TODO +- Fix metronome sync +- 2x, 4x, 1.13x +- Bidirectional, reverse play +- 1/2 rate +- FX chain: Reverb, LPF, HPF, per-channel wet/dry +- Output level +- VU meters on input/output +- OSC sync over ethernet From 70bbcf7ffa8cb9d5a03cf04c2c76e45a58f5ed95 Mon Sep 17 00:00:00 2001 From: Pete Shadbolt Date: Sun, 4 Jan 2015 15:58:30 +0000 Subject: [PATCH 2/2] New UI stuff, not active yet --- main.ck | 2 +- main.py | 58 +++++++++++++++++++++++++++++++++++++++++++++++++-------- 2 files changed, 51 insertions(+), 9 deletions(-) diff --git a/main.ck b/main.ck index 3bb1291..877b140 100644 --- a/main.ck +++ b/main.ck @@ -20,7 +20,7 @@ OscMsg msg; // Start the metronome 0 => int metronomeLevel; -//spork ~plip(); +spork ~plip(); // Event loop while (true) { diff --git a/main.py b/main.py index 48ffc5a..e7133e7 100644 --- a/main.py +++ b/main.py @@ -1,7 +1,7 @@ from libs.simpleosc import * import wx -def sendOSCSave(channel, data): +def sendOSCSafe(channel, data): try: sendOSCMsg(channel, data) except OSCClientError: @@ -21,7 +21,6 @@ class OSCSlider(wx.Panel): self.Bind=self.slider.Bind self.GetValue=self.slider.GetValue - class CommsPanel(wx.Panel): """ OSC comms """ def __init__(self, parent): @@ -77,7 +76,7 @@ class InputPanel(wx.Panel): gain=self.gain.slider.GetValue()/100. thru=self.thru.slider.GetValue()/100. if self.mute.GetValue(): gain, thru = 0.,0. - sendOSCMsg("/input", [gain, thru]) + sendOSCSafe("/input", [gain, thru]) class DelayPanel(wx.Panel): ''' Handle the ADC input settings ''' @@ -109,11 +108,11 @@ class DelayPanel(wx.Panel): """ Send OSC messages """ a=self.delayTime.slider.GetValue()/100. b=self.feedback.slider.GetValue()/100. - sendOSCMsg("/delay", [a, b]) + sendOSCSafe("/delay", [a, b]) def switchMetronome(self, evt): """ Send OSC messages """ - sendOSCMsg("/metronome", [int(self.metronome.GetValue())]) + sendOSCSafe("/metronome", [int(self.metronome.GetValue())]) class Channel(wx.Panel): """ A single channel """ @@ -132,6 +131,9 @@ class Channel(wx.Panel): self.pan = OSCSlider(self, "Pan", default_value=0, min_value=-1, max_value=1, align=False) sizer.Add(self.pan, 0, wx.ALL|wx.EXPAND, 3) + self.fxsend = OSCSlider(self, "Dry/Wet", default_value=0, min_value=0, max_value=1, align=False) + sizer.Add(self.fxsend, 0, wx.ALL|wx.EXPAND, 3) + self.record = wx.ToggleButton(self, 1, "Arm") sizer.Add(self.record, 0, wx.ALL|wx.EXPAND if index==0 else wx.ALL|wx.EXPAND, 3) @@ -139,6 +141,12 @@ class Channel(wx.Panel): sizer.Add(self.mute, 0, wx.ALL|wx.EXPAND, 3) self.clear = wx.Button(self, 1, "Clear") sizer.Add(self.clear, 0, wx.ALL|wx.EXPAND, 3) + + choices=["1 bar", "2 bars", "4 bars", "Dephase"] + self.speed= wx.ComboBox(self, choices=choices, style=wx.CB_READONLY, size=(25,25)) + self.speed.SetValue("1 bar") + sizer.Add(self.speed, 0, wx.ALL|wx.EXPAND, 3) + self.SetSizerAndFit(sizer) self.gain.Bind(wx.EVT_SCROLL, self.update) @@ -150,7 +158,7 @@ class Channel(wx.Panel): gain=self.gain.GetValue()/100. pan=self.pan.GetValue()/100. if self.mute.GetValue(): gain=0.0; - sendOSCMsg("/channel", [self.index, gain, pan]) + sendOSCSafe("/channel", [self.index, gain, pan]) class Mixer(wx.Panel): @@ -179,13 +187,42 @@ class Mixer(wx.Panel): for i, c in enumerate(self.channels): c.record.SetValue(0) self.channels[index].record.SetValue(value) - sendOSCMsg("/arm", [index if value else -1]) + sendOSCSafe("/arm", [index if value else -1]) def clear_channel(self, evt): """ Send OSC message to clear a channel """ index = evt.GetEventObject().index - sendOSCMsg("/clear", [index]) + sendOSCSafe("/clear", [index]) + +class FXPanel(wx.Panel): + ''' Effects chain ''' + def __init__(self, parent): + ''' Constructor ''' + wx.Panel.__init__(self, parent) + sizer = wx.BoxSizer(wx.VERTICAL) + label = wx.StaticText(self, label="FX:") + font = label.GetFont(); font.SetWeight(wx.BOLD); label.SetFont(font) + sizer.Add(label, 0, wx.TOP|wx.BOTTOM|wx.RIGHT, 5) + + choices=["Low pass filter", "High pass filter", "Reverb"] + self.fxtype= wx.ComboBox(self, choices=choices, style=wx.CB_READONLY, size=(25,25)) + sizer.Add(self.fxtype, 0, wx.ALL|wx.EXPAND, 5) + self.fxtype.SetValue(choices[0]) + + self.delayTime=OSCSlider(self, "Strength", default_value=0) + sizer.Add(self.delayTime, 0, wx.EXPAND|wx.ALL, 5) + + self.SetSizerAndFit(sizer) + #self.update(None) + + """ + def update(self, evt): + # Send OSC messages + a=self.delayTime.slider.GetValue()/100. + b=self.feedback.slider.GetValue()/100. + sendOSCSafe("/delay", [a, b]) + """ class MainGUI(wx.Frame): @@ -223,6 +260,11 @@ class MainGUI(wx.Frame): self.mixer = Mixer(self) self.mainsizer.Add(self.mixer, 1, wx.EXPAND|wx.ALL, 5) + line=wx.StaticLine(self); self.mainsizer.Add(line, 0, wx.EXPAND|wx.ALL, 1) + + self.fx = FXPanel(self) + self.mainsizer.Add(self.fx, 0, wx.EXPAND|wx.ALL, 5) + # Put things together self.SetSizerAndFit(self.mainsizer) self.Show()