Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions Resources/Control.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,7 @@ def createPluginPanel(self):
paramsTemplate = [[0, 0, 0, 0], [.25, 1, .5, 1], [.25, .7, 5000, 1], [1, 1000, 1, 1], [.5, .2, .5, 1], [1000, 1, -3, 1],
[0, 0, 0, 1], [-20, 3, 0, 1], [-70, 0.005, .01, 1], [.7, .7, -12, 1], [8, 1, 0, 1], [100, 5, 1.1, 1],
[.1, 0, 0.5, 1], [0.5, 0.25, 0.25, 1], [-7, 0, 0.5, 1], [80, 2.01, 0.33, 1], [80, 0.5, 0.33, 1],
[0.025, 0.5, 1, 2]]
[0.025, 0.5, 1, 2], [1, 1, 0, 1]]
self.pluginsParams = {}
for i in range(NUM_OF_PLUGINS):
CeciliaLib.setPlugins(None, i)
Expand All @@ -459,7 +459,7 @@ def createPluginPanel(self):
'Para EQ': EQPlugin, '3 Bands EQ': EQ3BPlugin, 'Compress': CompressPlugin, 'Gate': GatePlugin,
'Disto': DistoPlugin, 'AmpMod': AmpModPlugin, 'Phaser': PhaserPlugin, 'Delay': DelayPlugin,
'Flange': FlangePlugin, 'Harmonizer': HarmonizerPlugin, 'Resonators': ResonatorsPlugin,
'DeadReson': DeadResonPlugin, 'ChaosMod': ChaosModPlugin}
'DeadReson': DeadResonPlugin, 'ChaosMod': ChaosModPlugin, 'AutoPan': AutoPanPlugin}
self.pluginsPanel = wx.Panel(self, -1, style=wx.BORDER_NONE)
self.pluginsPanel.SetBackgroundColour(BACKGROUND_COLOUR)
self.pluginSizer = wx.BoxSizer(wx.VERTICAL)
Expand Down
40 changes: 40 additions & 0 deletions Resources/Plugins.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -1099,3 +1099,43 @@ def __init__(self, parent, choiceFunc, order):

self.sizer.Add(revMenuBox, 0, wx.LEFT, 5)
self.SetSizer(self.sizer)

class AutoPanPlugin(Plugin):
def __init__(self, parent, choiceFunc, order):
Plugin.__init__(self, parent, choiceFunc, order)
self.pluginName = 'AutoPan'
self.knobNameTemplates = ['plugin_%d_pan_freq', 'plugin_%d_pan_amount', 'plugin_%d_pan_phase']
self.sizer = wx.FlexGridSizer(1, 4, 0, 0)
revMenuBox = wx.BoxSizer(wx.VERTICAL)

self.knob1 = PluginKnob(self, 0.1, 10, 1, size=(43, 70), log=False, outFunction=self.onChangeKnob1, label='Pan')
self.knob1.setName(self.knobNameTemplates[0] % self.order)
self.sizer.Add(self.knob1)

self.knob2 = PluginKnob(self, 0, 1, 1, size=(43, 70), log=False, outFunction=self.onChangeKnob2, label='Amount')
self.knob2.setName(self.knobNameTemplates[1] % self.order)
self.sizer.Add(self.knob2)

self.knob3 = PluginKnob(self, 0, 1, 0, size=(43, 70), log=False, outFunction=self.onChangeKnob3, label='Phase')
self.knob3.setName(self.knobNameTemplates[2] % self.order)
self.sizer.Add(self.knob3)

self.setKnobLabels()

self.createHeadBox()
revMenuBox.Add(self.headBox, 0, wx.TOP, 0)
self.choice = CustomMenu(self, choice=PLUGINS_CHOICE, init='AutoPan', size=(93, 18), colour=PLUGINPOPUP_BACK_COLOUR, outFunction=self.replacePlugin)
CeciliaLib.setToolTip(self.choice, TT_POST_ITEMS)
revMenuBox.Add(self.choice, 0, wx.TOP, 2)

plugChoicePreset = wx.StaticText(self, -1, 'Type:')
plugChoicePreset.SetFont(wx.Font(CONTROLSLIDER_FONT, wx.FONTFAMILY_SWISS, wx.FONTSTYLE_NORMAL, wx.FONTWEIGHT_NORMAL))
plugChoicePreset.SetForegroundColour(TEXT_LABELFORWIDGET_COLOUR)
revMenuBox.Add(plugChoicePreset, 0, wx.TOP, 6)
self.preset = CustomMenu(self, choice=['Bypass', 'Active'], init='Active', size=(93, 18),
colour=CONTROLLABEL_BACK_COLOUR, outFunction=self.onChangePreset)
self.presetName = 'plugin_%d_pan_preset' % self.order
revMenuBox.Add(self.preset, 0, wx.TOP, 2)

self.sizer.Add(revMenuBox, 0, wx.LEFT, 5)
self.SetSizer(self.sizer)
14 changes: 13 additions & 1 deletion Resources/audio.py
Original file line number Diff line number Diff line change
Expand Up @@ -1473,6 +1473,18 @@ def setPreset(self, x, label):
self.lfo.value = self.lforo.play()
self.out.interp = 1

class CeciliaAutoPanPlugin(CeciliaPlugin):
def __init__(self, input, params, knobs):
CeciliaPlugin.__init__(self, input, params, knobs)
chnls = CeciliaLib.getVar("nchnls")
if self.preset == 0:
inter = 0
else:
inter = 1
self.lfo = Sine(self.sig1(), self.sig3(), mul=0.5, add=0.5)
self.pan = SPan(self.input, outs=chnls, pan=self.lfo*self.sig2())
self.out = Interp(self.input, self.pan, inter)

class AudioServer():
def __init__(self):
self.amp = 1.0
Expand All @@ -1498,7 +1510,7 @@ def __init__(self):
"Chorus": CeciliaChorusPlugin, "3 Bands EQ": CeciliaEQ3BPlugin, "Compress": CeciliaCompressPlugin, "Gate": CeciliaGatePlugin,
"Disto": CeciliaDistoPlugin, "AmpMod": CeciliaAmpModPlugin, "Phaser": CeciliaPhaserPlugin, "Delay": CeciliaDelayPlugin,
"Flange": CeciliaFlangePlugin, "Harmonizer": CeciliaHarmonizerPlugin, "Resonators": CeciliaResonatorsPlugin,
"DeadReson": CeciliaDeadResonPlugin, 'ChaosMod': CeciliaChaosModPlugin}
"DeadReson": CeciliaDeadResonPlugin, "ChaosMod": CeciliaChaosModPlugin, 'AutoPan': CeciliaAutoPanPlugin}

def updateDebug(self):
if CeciliaLib.getVar("DEBUG"):
Expand Down
2 changes: 1 addition & 1 deletion Resources/constants.py
100644 → 100755
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@

# plugin types
PLUGINS_CHOICE = ['None', 'Reverb', 'WGVerb', 'Filter', 'Chorus', 'Para EQ', '3 Bands EQ', 'Compress', 'Gate',
'Disto', 'AmpMod', 'Phaser', 'Delay', 'Flange', 'Harmonizer', 'Resonators', 'DeadReson', 'ChaosMod']
'Disto', 'AmpMod', 'Phaser', 'Delay', 'Flange', 'Harmonizer', 'Resonators', 'DeadReson', 'ChaosMod', 'AutoPan']
NUM_OF_PLUGINS = 4

# Audio settings
Expand Down