Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/InstrumentPanel.py
diff options
context:
space:
mode:
authorNat <Nat@localhost.localdomain>2007-02-20 02:19:03 (GMT)
committer Nat <Nat@localhost.localdomain>2007-02-20 02:19:03 (GMT)
commit683c0884a0f2617cb4f1c96c78f4eebbe4cda075 (patch)
tree726bd00dffa234b7561f0eeccbaa1a0f3f7608e6 /Util/InstrumentPanel.py
parentf0d7d9a5e84acd64ece9454eb26f9a3a0e75f226 (diff)
Automatic drum
Diffstat (limited to 'Util/InstrumentPanel.py')
-rw-r--r--Util/InstrumentPanel.py41
1 files changed, 3 insertions, 38 deletions
diff --git a/Util/InstrumentPanel.py b/Util/InstrumentPanel.py
index cc983e1..6d159b7 100644
--- a/Util/InstrumentPanel.py
+++ b/Util/InstrumentPanel.py
@@ -104,41 +104,6 @@ class InstrumentPanel(gtk.EventBox):
def handleInstrumentButtonEnter(self,widget,instrument):
if self.playInstrument: self.playInstrument(instrument)
- def draw_mic_lab_box(self):
-
- for n in ['mic1','mic2','mic3','mic4']:
- vbox1 = RoundVBox(fillcolor = Config.INST_BCK_COLOR, bordercolor = Config.PANEL_COLOR, radius = Config.PANEL_RADIUS)
- vbox1.set_border_width(Config.PANEL_SPACING)
-
- micBtn = ImageRadioButton(self.firstInstButton, Config.IMAGE_ROOT + n + '.png' , Config.IMAGE_ROOT + n + 'sel.png', Config.IMAGE_ROOT + n + 'sel.png')
- micRecBtn = ImageButton(Config.IMAGE_ROOT + 'record.png' , Config.IMAGE_ROOT + 'recordsel.png', Config.IMAGE_ROOT + 'recordhi.png')
- self.tooltips.set_tip(micRecBtn,Tooltips.RECMIC)
-
- micBtn.connect('clicked', self.handleInstrumentButtonClick, n)
- micRecBtn.connect('clicked', self.handleMicRecButtonClick, n)
- micRecBtn.connect('pressed', self.handleRecButtonPress, micBtn)
-
- vbox1.pack_start(micRecBtn,False,False)
- vbox1.pack_start(micBtn,False,False)
- self.instDic[n] = vbox1
-
-
- for n in ['lab1','lab2','lab3','lab4']:
- vbox2 = RoundVBox(fillcolor = Config.INST_BCK_COLOR, bordercolor = Config.PANEL_COLOR, radius = Config.PANEL_RADIUS)
- vbox2.set_border_width(Config.PANEL_SPACING)
-
- synthBtn = ImageRadioButton(self.firstInstButton, Config.IMAGE_ROOT + n + '.png', Config.IMAGE_ROOT + n + 'sel.png', Config.IMAGE_ROOT + n + 'sel.png')
- synthRecBtn = ImageButton(Config.IMAGE_ROOT + 'record.png' , Config.IMAGE_ROOT + 'recordsel.png', Config.IMAGE_ROOT + 'recordhi.png')
- self.tooltips.set_tip(synthRecBtn,Tooltips.RECLAB)
-
- synthBtn.connect('clicked', self.handleInstrumentButtonClick, n)
- synthRecBtn.connect('clicked', self.handleSynthRecButtonClick, n)
- synthRecBtn.connect('pressed', self.handleRecButtonPress, synthBtn)
-
- vbox2.pack_start(synthRecBtn,False,False)
- vbox2.pack_start(synthBtn,False,False)
- self.instDic[n] = vbox2
-
def handleMicRecButtonClick(self,widget,mic):
self.recstate = False
self.setInstrument(mic)
@@ -186,14 +151,14 @@ class InstrumentPanel(gtk.EventBox):
instButton.connect('clicked',self.handleInstrumentButtonClick, instrument)
if self.enterMode:
instButton.connect('enter',self.handleInstrumentButtonEnter, instrument)
- instBox.pack_start(instButton)
+ instBox.pack_start(instButton,False,False)
self.instDic[instrument] = instBox
if self.firstInstButton == None:
self.firstInstButton = instButton
def getInstrumentList(self,category = 'all'):
- instrumentList = [instrument for instrument in Config.INSTRUMENTS.keys() if instrument[0:4] != 'drum' and instrument[0:4] != 'guid' and instrument[0:3] != 'mic' and instrument[0:3] != 'lab'] + ['drum1kit', 'drum2kit', 'drum3kit', 'mic1', 'mic2', 'mic3', 'mic4', 'lab1', 'lab2', 'lab3', 'lab4']
+ instrumentList = [instrument for instrument in Config.INSTRUMENTS.keys() if instrument[0:4] != 'drum' and instrument[0:4] != 'guid' and instrument[0:3] != 'mic' and instrument[0:3] != 'lab'] + Config.DRUMKITS + ['mic1', 'mic2', 'mic3', 'mic4', 'lab1', 'lab2', 'lab3', 'lab4']
if self.enterMode:
instrumentList = [instrument for instrument in Config.INSTRUMENTS.keys() if instrument[0:4] != 'drum' and instrument[0:4] != 'guid' and instrument[0:3] != 'mic' and instrument[0:3] != 'lab'] + ['mic1', 'mic2', 'mic3', 'mic4', 'lab1', 'lab2', 'lab3', 'lab4']
@@ -201,7 +166,7 @@ class InstrumentPanel(gtk.EventBox):
if category != 'all':
instrumentList = [instrument for instrument in Config.INSTRUMENTS.keys() if instrument[0:4] != 'drum' and instrument[0:4] != 'guid' and Config.INSTRUMENTS[instrument].category == category]
if category == 'percussions' and not self.enterMode:
- instrumentList = ['drum1kit', 'drum2kit', 'drum3kit'] + instrumentList
+ instrumentList = Config.DRUMKITS + instrumentList
if category == 'people':
instrumentList = instrumentList + ['mic1', 'mic2', 'mic3', 'mic4']
if category == 'electronic':