diff options
author | Nat <natcl@hotmail.com> | 2007-07-20 16:01:12 (GMT) |
---|---|---|
committer | Nat <natcl@hotmail.com> | 2007-07-20 16:01:12 (GMT) |
commit | 517aadb5152a80cb46c4f67d8c9caf357d22db31 (patch) | |
tree | d3bc066ab29dbefc8cb05245ff390f4f1381f3f3 /SynthLab | |
parent | b75fcd47a1c6317b6cdf3f69c4b86a97a6ed554f (diff) | |
parent | 3380c4f59ddeeae9448530416959eb2901fa01bd (diff) |
Merge branch 'master' of git+ssh://natcl@dev.laptop.org/git/projects/tamtam
Diffstat (limited to 'SynthLab')
-rwxr-xr-x | SynthLab/SynthLabConstants.py | 2 | ||||
-rw-r--r-- | SynthLab/SynthLabWindow.py | 68 |
2 files changed, 37 insertions, 33 deletions
diff --git a/SynthLab/SynthLabConstants.py b/SynthLab/SynthLabConstants.py index 07562b6..e0ab44b 100755 --- a/SynthLab/SynthLabConstants.py +++ b/SynthLab/SynthLabConstants.py @@ -33,7 +33,7 @@ class SynthLabConstants: elif y > HALF_SIZE-GATE_OFFSET: y = HALF_SIZE m.append( ( x, y ) ) - INIT_LOCATIONS = [ [420,750], [500,750], [580,750], [660, 750], [55,750], [135,750], [215,750], [295, 750], [785,750], [865,750], [945,750], [1025, 750], [540, 645]] + INIT_LOCATIONS = [ [480,700], [560,700], [640,700], [720, 700], [100,700], [180,700], [260,700], [340, 700], [860,700], [940,700], [1020,700], [1100, 700], [600, 595]] FLOAT = [.01, False] INTEGER = [1, 1] diff --git a/SynthLab/SynthLabWindow.py b/SynthLab/SynthLabWindow.py index 2896d82..87e2723 100644 --- a/SynthLab/SynthLabWindow.py +++ b/SynthLab/SynthLabWindow.py @@ -130,9 +130,9 @@ class SynthLabWindow(SubActivity): self.commandBox.pack_start(self.buttonBox) #self.mainBox.pack_start(self.commandBox) - self.drawingAreaWidth = 1080 - self.drawingAreaHeight = 790 - self.separatorY = 690 + self.drawingAreaWidth = 1200 + self.drawingAreaHeight = 750 + self.separatorY = 640 self.clearMask = gtk.gdk.Rectangle(0,0,self.drawingAreaWidth,self.drawingAreaHeight) @@ -178,40 +178,40 @@ class SynthLabWindow(SubActivity): self.sliderBox.pack_start(self.durationSlider, True, True, 5) self.sliderBox.pack_start(self.durLabel, False, padding=10) - for i in [1,2,3,4,5,6]: - recordButton = ImageToggleButton(Config.IMAGE_ROOT + 'synthRecord' + str(i) + '.png', Config.IMAGE_ROOT + 'synthRecord' + str(i) + 'Down.png', Config.IMAGE_ROOT + 'synthRecord' + str(i) + 'Over.png') - recordButton.connect("clicked", self.recordSound, i) - self.buttonBox.pack_start(recordButton, False, False, 2) - self.tooltips.set_tip(recordButton, Tooltips.SL_RECORDBUTTONS[i-1]) - - saveButton = ImageButton(Config.IMAGE_ROOT + 'save.png') - saveButton.connect("clicked", self.handleSave, None) - self.buttonBox.pack_start(saveButton, False, False, 2) - - loadButton = ImageButton(Config.IMAGE_ROOT + 'load.png') - loadButton.connect("clicked", self.handleLoad, None) - self.buttonBox.pack_start(loadButton, False, False, 2) - - resetButton = ImageButton(Config.IMAGE_ROOT + 'reset.png') - resetButton.connect("clicked", self.handleReset, None) - self.buttonBox.pack_start(resetButton, False, False, 2) - - closeButton = ImageButton(Config.IMAGE_ROOT + 'close.png') - closeButton.connect("clicked", self.handleClose, None) - self.buttonBox.pack_start(closeButton, False, False, 2) - - self.tooltips.set_tip(saveButton, Tooltips.SAVE) - self.tooltips.set_tip(loadButton, Tooltips.LOAD) - self.tooltips.set_tip(resetButton, Tooltips.RESET) - self.tooltips.set_tip(closeButton, Tooltips.CLOSE) - self.add(self.mainBox) - self.tooltips.set_tip(self.durationSlider, Tooltips.SOUNDDUR + ': ' + self.durString) +# for i in [1,2,3,4,5,6]: +# recordButton = ImageToggleButton(Config.IMAGE_ROOT + 'synthRecord' + str(i) + '.png', Config.IMAGE_ROOT + 'synthRecord' + str(i) + 'Down.png', Config.IMAGE_ROOT + 'synthRecord' + str(i) + 'Over.png') +# recordButton.connect("clicked", self.recordSound, i) +# self.buttonBox.pack_start(recordButton, False, False, 2) +# self.tooltips.set_tip(recordButton, Tooltips.SL_RECORDBUTTONS[i-1]) + +# saveButton = ImageButton(Config.IMAGE_ROOT + 'save.png') +# saveButton.connect("clicked", self.handleSave, None) +# self.buttonBox.pack_start(saveButton, False, False, 2) + +# loadButton = ImageButton(Config.IMAGE_ROOT + 'load.png') +# loadButton.connect("clicked", self.handleLoad, None) +# self.buttonBox.pack_start(loadButton, False, False, 2) + +# resetButton = ImageButton(Config.IMAGE_ROOT + 'reset.png') +# resetButton.connect("clicked", self.handleReset, None) +# self.buttonBox.pack_start(resetButton, False, False, 2) + +# closeButton = ImageButton(Config.IMAGE_ROOT + 'close.png') +# closeButton.connect("clicked", self.handleClose, None) +# self.buttonBox.pack_start(closeButton, False, False, 2) + +# self.tooltips.set_tip(saveButton, Tooltips.SAVE) +# self.tooltips.set_tip(loadButton, Tooltips.LOAD) +# self.tooltips.set_tip(resetButton, Tooltips.RESET) +# self.tooltips.set_tip(closeButton, Tooltips.CLOSE) +# self.tooltips.set_tip(self.durationSlider, Tooltips.SOUNDDUR + ': ' + self.durString) + tempFile = 'synthTemp' if tempFile in os.listdir(Config.PREF_DIR): self.handleLoadTemp() else: self.presetCallback(self.presets,1) - + self.add(self.mainBox) self.show_all() def onDestroy(self): @@ -219,6 +219,10 @@ class SynthLabWindow(SubActivity): def onKeyPress(self,widget,event): key = event.hardware_keycode + #temporary binding + if key == 50: + self.handleSave(None, None) + if key not in Config.KEY_MAP: return midiPitch = Config.KEY_MAP[key] |