From 8900ef5f0fcf5005234f25023acdced1a37387de Mon Sep 17 00:00:00 2001 From: Pootle Translation Date: Tue, 27 May 2008 04:30:07 +0000 Subject: Merge branch 'master' of git+ssh://dev.laptop.org/git/projects/tamtam --- diff --git a/TamTamEdit.activity/Edit/MainWindow.py b/TamTamEdit.activity/Edit/MainWindow.py index 4842013..bb81391 100644 --- a/TamTamEdit.activity/Edit/MainWindow.py +++ b/TamTamEdit.activity/Edit/MainWindow.py @@ -616,7 +616,9 @@ class MainWindow( gtk.EventBox ): self.handleRewind() self.audioRecordState = True - self.audioFileName = chooser.get_filename() + head, tail = os.path.split(chooser.get_filename()) + tailfilt = '_'.join(tail.split()) + self.audioFileName = os.path.join(head, tailfilt) if self.audioFileName[-4:] != '.ogg': self.audioFileName += '.ogg' @@ -2141,7 +2143,7 @@ class instrumentPalette( Popup ): self.volumeSlider.set_inverted(False) self.volumeSlider.set_draw_value(False) - self.categories = [cat.capitalize() for cat in Config.CATEGORIES] + self.categories = [cat.capitalize() for cat in Config.CATEGORIES if cat != 'mysounds'] self.instruments = self.getInstruments() self.categoryBox = BigComboBox() @@ -2218,7 +2220,7 @@ class instrumentPalette( Popup ): def getInstruments(self, category = 'all'): if category == 'all': - return sorted([instrument for instrument in self.instrumentDB.instNamed.keys() if not instrument.startswith('drum') and not instrument.startswith('guid')]) + return sorted([instrument for instrument in self.instrumentDB.instNamed.keys() if not instrument.startswith('drum') and not instrument.startswith('guid') and not instrument.startswith('mic') and not instrument.startswith('lab')]) else: return sorted([instrument for instrument in self.instrumentDB.instNamed.keys() if not instrument.startswith('drum') and not instrument.startswith('guid') and self.instrumentDB.instNamed[instrument].category == category]) diff --git a/TamTamEdit.activity/MANIFEST b/TamTamEdit.activity/MANIFEST index 4b92652..0574d0f 100644 --- a/TamTamEdit.activity/MANIFEST +++ b/TamTamEdit.activity/MANIFEST @@ -4,47 +4,58 @@ setup.py TamTamEdit.py activity/activity-tamtamedit.svg activity/activity.info -po/ne.po +po/TamTamEdit.pot po/am.po -po/fa.po -po/en.po -po/ca.po po/ar.po -po/ig.po -po/yo.po +po/ay.po +po/bg.po po/bn.po -po/qu.po -po/pseudo.po +po/bn_IN.po +po/ca.po +po/de.po +po/dz.po po/el.po -po/ur.po -po/bg.po -po/hi.po -po/fa_AF.po -po/pt_BR.po -po/nl.po -po/te.po +po/en.po po/es.po -po/mk.po -po/pl.po -po/ro.po -po/bn_IN.po +po/fa.po +po/fa_AF.po +po/ff.po +po/fr.po +po/gu.po +po/ha.po +po/hi.po +po/ht.po +po/ig.po +po/is.po +po/it.po po/ja.po -po/dz.po +po/km.po +po/ko.po +po/mk.po +po/ml.po +po/mn.po +po/mr.po +po/ne.po +po/nl.po po/pa.po -po/TamTamEdit.pot -po/ay.po +po/pl.po po/ps.po -po/de.po -po/ml.po -po/th.po -po/rw.po -po/fr.po +po/pseudo.po po/pt.po -po/is.po -po/ff.po +po/pt_BR.po +po/qu.po +po/ro.po po/ru.po -po/ha.po -po/mn.po +po/rw.po +po/si.po +po/te.po +po/th.po +po/tr.po +po/ur.po +po/vi.po +po/yo.po +po/zh_CN.po +po/zh_TW.po icons/XYBut.svg icons/XYButDown.svg icons/XYButDownClick.svg diff --git a/TamTamEdit.activity/NEWS b/TamTamEdit.activity/NEWS index 48a200b..7be5f54 100644 --- a/TamTamEdit.activity/NEWS +++ b/TamTamEdit.activity/NEWS @@ -1,5 +1,9 @@ 48 +* TamTamEdit saves OGG files in the journal (Olipet) +* Removed mic and lab sounds (Olipet) +* Edit follows security model (Olipet) + 47 * Updated po files (Flipo) diff --git a/TamTamEdit.activity/TamTamEdit.py b/TamTamEdit.activity/TamTamEdit.py index 99a0fc3..8400e82 100644 --- a/TamTamEdit.activity/TamTamEdit.py +++ b/TamTamEdit.activity/TamTamEdit.py @@ -23,10 +23,10 @@ class TamTamEdit(activity.Activity): def __init__(self, handle): activity.Activity.__init__(self, handle) - for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']: - if not os.path.isfile(os.path.join(Config.DATA_DIR, snd)): - shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.DATA_DIR + '/' + snd) - os.system('chmod 0777 ' + Config.DATA_DIR + '/' + snd + ' &') +# for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']: +# if not os.path.isfile(os.path.join(Config.DATA_DIR, snd)): +# shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.DATA_DIR + '/' + snd) +# os.system('chmod 0777 ' + Config.DATA_DIR + '/' + snd + ' &') color = gtk.gdk.color_parse(Config.WS_BCK_COLOR) self.modify_bg(gtk.STATE_NORMAL, color) diff --git a/TamTamJam.activity/Jam/Picker.py b/TamTamJam.activity/Jam/Picker.py index 0d280b2..6c70556 100644 --- a/TamTamJam.activity/Jam/Picker.py +++ b/TamTamJam.activity/Jam/Picker.py @@ -168,15 +168,16 @@ class Instrument( Picker ): self.type = Instrument self.instrumentDB = InstrumentDB.getRef() + list = [inst for inst in self.instrumentDB.getSet( "All" ) if not inst.name.startswith('lab')] - for inst in self.instrumentDB.getSet( "All" ): + for inst in list: self.addBlock( inst.instrumentId ) def addBlock( self, id ): # match data structure of Block.Instrument data = { "name": _(self.instrumentDB.instId[id].name), "id": id } - + self.csnd.load_instrument(self.instrumentDB.instId[id].name) win = gtk.gdk.get_default_root_window() diff --git a/TamTamJam.activity/Jam/Toolbars.py b/TamTamJam.activity/Jam/Toolbars.py index 5e4ab6c..80598c0 100644 --- a/TamTamJam.activity/Jam/Toolbars.py +++ b/TamTamJam.activity/Jam/Toolbars.py @@ -412,6 +412,8 @@ class LoopSettingsPalette( Palette ): self.GUI['startSlider'].set_inverted(True) self.GUI['startSlider'].set_size_request(50, 200) self.GUI['startSlider'].set_digits(3) + # tooltip closes loop settings palette!!! + #self._add_tooltip( self.GUI['startSlider'], _("Loop start position") ) self.handleStart( self.startAdjust ) startBox.pack_start(self.GUI['startSlider'], True, True, 5) self.controlsBox.pack_start(startBox) @@ -466,6 +468,15 @@ class LoopSettingsPalette( Palette ): self.mainBox.show_all() self.set_content(self.mainBox) + def _add_palette( self, widget, palette ): + widget._palette = palette + widget._palette.props.invoker = WidgetInvoker( widget ) + #widget._palette.set_property( "position", position ) + + def _add_tooltip( self, widget, tooltip ): + #self._add_palette( widget, Palette( tooltip ), Palette.DEFAULT ) + self._add_palette( widget, Palette( tooltip ) ) + def handlePopup(self, widget, data=None): self.setButtonState() self.soundMenuBox.remove_all() diff --git a/TamTamJam.activity/MANIFEST b/TamTamJam.activity/MANIFEST index cc3aafe..35fc76d 100644 --- a/TamTamJam.activity/MANIFEST +++ b/TamTamJam.activity/MANIFEST @@ -4,47 +4,58 @@ setup.py TamTamJam.py activity/activity-tamtamjam.svg activity/activity.info -po/ne.po +po/TamTamJam.pot po/am.po -po/fa.po -po/en.po -po/ca.po po/ar.po -po/ig.po -po/yo.po +po/ay.po +po/bg.po po/bn.po -po/qu.po -po/pseudo.po +po/bn_IN.po +po/ca.po +po/de.po +po/dz.po po/el.po -po/ur.po -po/bg.po -po/hi.po -po/fa_AF.po -po/pt_BR.po -po/nl.po -po/te.po +po/en.po po/es.po -po/mk.po -po/pl.po -po/ro.po -po/bn_IN.po +po/fa.po +po/fa_AF.po +po/ff.po +po/fr.po +po/gu.po +po/ha.po +po/hi.po +po/ht.po +po/ig.po +po/is.po +po/it.po po/ja.po -po/dz.po +po/km.po +po/ko.po +po/mk.po +po/ml.po +po/mn.po +po/mr.po +po/ne.po +po/nl.po po/pa.po -po/ay.po -po/TamTamJam.pot +po/pl.po po/ps.po -po/de.po -po/ml.po -po/th.po -po/rw.po -po/fr.po +po/pseudo.po po/pt.po -po/is.po -po/ff.po +po/pt_BR.po +po/qu.po +po/ro.po po/ru.po -po/ha.po -po/mn.po +po/rw.po +po/si.po +po/te.po +po/th.po +po/tr.po +po/ur.po +po/vi.po +po/yo.po +po/zh_CN.po +po/zh_TW.po icons/XYBut.svg icons/XYButDown.svg icons/XYButDownClick.svg diff --git a/TamTamJam.activity/NEWS b/TamTamJam.activity/NEWS index ebd096b..fcfb796 100644 --- a/TamTamJam.activity/NEWS +++ b/TamTamJam.activity/NEWS @@ -1,5 +1,9 @@ 49 +* Removed lab sounds (Olipet) +* Mic recording and loop settings clean up (Olipet) +* Jam follows security model (Olipet) + 48 * Updated po files (Flipo) diff --git a/TamTamJam.activity/TamTamJam.py b/TamTamJam.activity/TamTamJam.py index b52cb10..e0f7381 100644 --- a/TamTamJam.activity/TamTamJam.py +++ b/TamTamJam.activity/TamTamJam.py @@ -27,7 +27,7 @@ class TamTamJam(activity.Activity): activity.Activity.__init__(self, handle) - for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']: + for snd in ['mic1','mic2','mic3','mic4']: if not os.path.isfile(os.path.join(Config.DATA_DIR, snd)): shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.DATA_DIR + '/' + snd) os.system('chmod 0777 ' + Config.DATA_DIR + '/' + snd + ' &') diff --git a/TamTamMini.activity/MANIFEST b/TamTamMini.activity/MANIFEST index 24e6f6d..f0cb213 100644 --- a/TamTamMini.activity/MANIFEST +++ b/TamTamMini.activity/MANIFEST @@ -78,44 +78,55 @@ common/Resources/crop.csd common/Resources/tamtamorc.csd common/Resources/tooltips_en.py common/Resources/tooltips_fr.py -po/ne.po +po/TamTamMini.pot po/am.po -po/fa.po -po/en.po -po/ca.po po/ar.po -po/ig.po -po/yo.po +po/ay.po +po/bg.po po/bn.po -po/qu.po -po/pseudo.po +po/bn_IN.po +po/ca.po +po/de.po +po/dz.po po/el.po -po/ur.po -po/bg.po -po/hi.po -po/fa_AF.po -po/pt_BR.po -po/nl.po -po/te.po +po/en.po po/es.po -po/mk.po -po/pl.po -po/TamTamMini.pot -po/ro.po -po/bn_IN.po +po/fa.po +po/fa_AF.po +po/ff.po +po/fr.po +po/gu.po +po/ha.po +po/hi.po +po/ht.po +po/ig.po +po/is.po +po/it.po po/ja.po -po/dz.po +po/km.po +po/ko.po +po/mk.po +po/ml.po +po/mn.po +po/mr.po +po/ne.po +po/nl.po po/pa.po -po/ay.po +po/pl.po po/ps.po -po/de.po -po/ml.po -po/th.po -po/rw.po -po/fr.po +po/pseudo.po po/pt.po -po/is.po -po/ff.po +po/pt_BR.po +po/qu.po +po/ro.po po/ru.po -po/ha.po -po/mn.po +po/rw.po +po/si.po +po/te.po +po/th.po +po/tr.po +po/ur.po +po/vi.po +po/yo.po +po/zh_CN.po +po/zh_TW.po \ No newline at end of file diff --git a/TamTamMini.activity/NEWS b/TamTamMini.activity/NEWS index e4c9fc7..42dfaa5 100644 --- a/TamTamMini.activity/NEWS +++ b/TamTamMini.activity/NEWS @@ -1,5 +1,8 @@ 47 +* Removed mic and lab sounds (Olipet) +* Mini follows security model (Olipet) + 46 * Updated po files (Flipo) diff --git a/TamTamSynthLab.activity/MANIFEST b/TamTamSynthLab.activity/MANIFEST index 1f5b7cb..f513fb2 100644 --- a/TamTamSynthLab.activity/MANIFEST +++ b/TamTamSynthLab.activity/MANIFEST @@ -4,47 +4,58 @@ setup.py TamTamSynthLab.py activity/activity-tamtamsynthlab.svg activity/activity.info -po/ne.po +po/TamTamSynthLab.pot po/am.po -po/fa.po -po/en.po -po/ca.po po/ar.po -po/ig.po -po/yo.po +po/ay.po +po/bg.po po/bn.po -po/qu.po -po/pseudo.po +po/bn_IN.po +po/ca.po +po/de.po +po/dz.po po/el.po -po/ur.po -po/TamTamSynthLab.pot -po/bg.po -po/hi.po -po/fa_AF.po -po/pt_BR.po -po/nl.po -po/te.po +po/en.po po/es.po -po/mk.po -po/pl.po -po/ro.po -po/bn_IN.po +po/fa.po +po/fa_AF.po +po/ff.po +po/fr.po +po/gu.po +po/ha.po +po/hi.po +po/ht.po +po/ig.po +po/is.po +po/it.po po/ja.po -po/dz.po +po/km.po +po/ko.po +po/mk.po +po/ml.po +po/mn.po +po/mr.po +po/ne.po +po/nl.po po/pa.po -po/ay.po +po/pl.po po/ps.po -po/de.po -po/ml.po -po/th.po -po/rw.po -po/fr.po +po/pseudo.po po/pt.po -po/is.po -po/ff.po +po/pt_BR.po +po/qu.po +po/ro.po po/ru.po -po/ha.po -po/mn.po +po/rw.po +po/si.po +po/te.po +po/th.po +po/tr.po +po/ur.po +po/vi.po +po/yo.po +po/zh_CN.po +po/zh_TW.po icons/accept.svg icons/cancel.svg icons/preset10.svg @@ -112,6 +123,7 @@ icons/sl-voice+.svg icons/sl-wguide-menu.svg icons/sl-wguide+.svg icons/tam-help.svg +icons/recordO.svg icons/XYButDownClick.svg icons/XYButDown.svg icons/XYBut.svg diff --git a/TamTamSynthLab.activity/NEWS b/TamTamSynthLab.activity/NEWS index 1f09b88..28d6145 100644 --- a/TamTamSynthLab.activity/NEWS +++ b/TamTamSynthLab.activity/NEWS @@ -1,5 +1,8 @@ 49 +* Extended duration and save OGG files in the journal (Olipet) +* SynthLab follows security model (Olipet) + 48 * Updated po files (Flipo) diff --git a/TamTamSynthLab.activity/SynthLab/SynthLabMain.py b/TamTamSynthLab.activity/SynthLab/SynthLabMain.py index a593f19..9bc56c3 100644 --- a/TamTamSynthLab.activity/SynthLab/SynthLabMain.py +++ b/TamTamSynthLab.activity/SynthLab/SynthLabMain.py @@ -24,6 +24,7 @@ from SynthLab.SynthLabConstants import SynthLabConstants from SynthLab.SynthLabToolbars import mainToolbar from SynthLab.SynthLabToolbars import presetToolbar from common.Util.Trackpad import Trackpad +from sugar.datastore import datastore as_window = False @@ -52,6 +53,7 @@ class SynthLabMain(gtk.EventBox): self.updateBounds(i) self.instanceOpen = 0 self.recordWait = 0 + self.table = 0 self.recCount = 0 self.new = True self.selectGate = False @@ -145,10 +147,11 @@ class SynthLabMain(gtk.EventBox): slider1Min = SynthLabConstants.TYPES[selectedType][4] slider1Max = SynthLabConstants.TYPES[selectedType][5] - slider2Min = SynthLabConstants.TYPES[selectedType][6] if selectedType == 'sample' or selectedType == 'grain': + slider2Min = 4 slider2Max = len(self.sample_names) else: + slider2Min = SynthLabConstants.TYPES[selectedType][6] slider2Max = SynthLabConstants.TYPES[selectedType][7] slider3Min = SynthLabConstants.TYPES[selectedType][8] slider3Max = SynthLabConstants.TYPES[selectedType][9] @@ -411,11 +414,12 @@ class SynthLabMain(gtk.EventBox): slider1Min = SynthLabConstants.TYPES[selectedType][4] slider1Max = SynthLabConstants.TYPES[selectedType][5] - slider2Min = SynthLabConstants.TYPES[selectedType][6] if selectedType == 'sample' or selectedType == 'grain': self.sample_names = [name for i in range( len( self.instrumentDB.instNamed ) ) for name in self.instrumentDB.instNamed.keys() if self.instrumentDB.instNamed[ name ].instrumentId == i ] + slider2Min = 4 slider2Max = len(self.sample_names) else: + slider2Min = SynthLabConstants.TYPES[selectedType][6] slider2Max = SynthLabConstants.TYPES[selectedType][7] slider3Min = SynthLabConstants.TYPES[selectedType][8] slider3Max = SynthLabConstants.TYPES[selectedType][9] @@ -504,8 +508,45 @@ class SynthLabMain(gtk.EventBox): def resetRecord( self ): gobject.source_remove( self.wait ) self.recordButton.set_active(False) - inst = 'lab' + str(self.table-85) - self.csnd.load_synth_instrument(inst) + if self.table > 85: + inst = 'lab' + str(self.table-85) + self.csnd.load_synth_instrument(inst) + elif self.table == 85: + time.sleep(4) + self.csnd.__del__() + time.sleep(0.5) + command = "gst-launch-0.10 filesrc location=" + Config.INSTANCE_DIR + "/lab0 ! wavparse ! audioconvert ! vorbisenc ! oggmux ! filesink location=" + self.audioFileName + command2 = "rm " + Config.INSTANCE_DIR + "/lab0" + (status, output) = commands.getstatusoutput(command) + (status2, output2) = commands.getstatusoutput(command2) + + jobject = datastore.create() + jobject.metadata['title'] = os.path.split(self.audioFileName)[1] + jobject.metadata['keep'] = '1' + jobject.metadata['mime_type'] = 'audio/ogg' + jobject.file_path = self.audioFileName + datastore.write(jobject) + + os.remove(self.audioFileName) + + self.csnd.__init__() + time.sleep(0.1) + self.csnd.connect(True) + time.sleep(0.1) + self.csnd.load_instruments() + time.sleep(0.3) + self.initializeConnections() + self.controlToSrcConnections() + time.sleep(.01) + self.controlToFxConnections() + time.sleep(.01) + self.audioConnections() + time.sleep(.01) + self.synthObjectsParameters.update() + self.writeTables( self.synthObjectsParameters.types, self.synthObjectsParameters.controlsParameters, self.synthObjectsParameters.sourcesParameters, self.synthObjectsParameters.fxsParameters ) + time.sleep(.01) + self.invalidate_rect( 0, 0, self.drawingAreaWidth, self.drawingAreaHeight ) + self.table = 0 return True @@ -529,7 +570,10 @@ class SynthLabMain(gtk.EventBox): def playNote( self, midiPitch, table ): cpsPitch = 261.626*pow(1.0594633, midiPitch-36) self.recCount += 1 - mess = "i5203." + str(self.recCount) + " 0 " + str(self.duration) + " " + str(cpsPitch) + " " + str(table) + " " + " ".join([str(n) for n in self.synthObjectsParameters.getOutputParameters()]) + ' "%s"' % Config.DATA_DIR + if self.table == 85: + mess = "i5203." + str(self.recCount) + " 0 " + str(self.duration) + " " + str(cpsPitch) + " " + str(table) + " " + " ".join([str(n) for n in self.synthObjectsParameters.getOutputParameters()]) + ' "%s"' % Config.INSTANCE_DIR + else: + mess = "i5203." + str(self.recCount) + " 0 " + str(self.duration) + " " + str(cpsPitch) + " " + str(table) + " " + " ".join([str(n) for n in self.synthObjectsParameters.getOutputParameters()]) + ' "%s"' % Config.DATA_DIR self.csnd.inputMessage( mess ) if self.recCount >= 9: self.recCount = 0 @@ -1181,6 +1225,36 @@ class SynthLabMain(gtk.EventBox): else: self.recordWait = 0 + def recordOgg( self, widget, data=None ): + if widget.get_active() == True: + chooser = gtk.FileChooserDialog( + title='Save Synth sound as Audio file', + action=gtk.FILE_CHOOSER_ACTION_SAVE, + buttons=(gtk.STOCK_CANCEL,gtk.RESPONSE_CANCEL,gtk.STOCK_SAVE,gtk.RESPONSE_OK)) + filter = gtk.FileFilter() + filter.add_pattern('*.ogg') + chooser.set_filter(filter) + chooser.set_current_folder(Config.INSTANCE_DIR) + + for f in chooser.list_shortcut_folder_uris(): + chooser.remove_shortcut_folder_uri(f) + + if chooser.run() == gtk.RESPONSE_OK: + head, tail = os.path.split(chooser.get_filename()) + tailfilt = '_'.join(tail.split()) + self.audioFileName = os.path.join(head, tailfilt) + if self.audioFileName[-4:] != '.ogg': + self.audioFileName += '.ogg' + chooser.destroy() + + if os.path.isfile(Config.INSTANCE_DIR + '/lab0'): + os.system('rm ' + Config.INSTANCE_DIR + '/lab0') + self.recordButton = widget + self.recordWait = 1 + self.table = 85 + else: + self.recordWait = 0 + def updateSound( self ): self.controlToSrcConnections() time.sleep(.01) diff --git a/TamTamSynthLab.activity/SynthLab/SynthLabToolbars.py b/TamTamSynthLab.activity/SynthLab/SynthLabToolbars.py index 5dd6334..58a3c9c 100644 --- a/TamTamSynthLab.activity/SynthLab/SynthLabToolbars.py +++ b/TamTamSynthLab.activity/SynthLab/SynthLabToolbars.py @@ -30,7 +30,7 @@ class mainToolbar(gtk.Toolbar): self.durationSliderLabelSecond = gtk.Label(_(' s.')) self.durationSliderLabelSecondTool = gtk.ToolItem() self.durationSliderLabelSecondTool.add(self.durationSliderLabelSecond) - self.durationSliderAdj = gtk.Adjustment(2, .5, 10, .01, .01, 0) + self.durationSliderAdj = gtk.Adjustment(2, .5, 30, .01, .01, 0) self.durationSliderAdj.connect("value_changed" , self.synthLab.handleDuration) self.durationSlider = gtk.HScale(adjustment = self.durationSliderAdj) self.durationSlider.set_size_request(250,15) @@ -87,6 +87,13 @@ class mainToolbar(gtk.Toolbar): self.synthRec6Button.show() self.synthRec6Button.set_tooltip(_('Record Synth sound into slot "lab6"')) + #RecordOgg button + self.recordOggButton = ToggleToolButton('recordO') + self.recordOggButton.connect('clicked', self.synthLab.recordOgg) + self.insert(self.recordOggButton, -1) + self.recordOggButton.show() + self.recordOggButton.set_tooltip(_('Record to ogg')) + _insertSeparator(1) self.resetButton = ToolButton('sl-reset') diff --git a/TamTamSynthLab.activity/TamTamSynthLab.py b/TamTamSynthLab.activity/TamTamSynthLab.py index 483d4f0..1f27c51 100644 --- a/TamTamSynthLab.activity/TamTamSynthLab.py +++ b/TamTamSynthLab.activity/TamTamSynthLab.py @@ -22,7 +22,7 @@ class TamTamSynthLab(activity.Activity): def __init__(self, handle): activity.Activity.__init__(self, handle) - for snd in ['mic1','mic2','mic3','mic4','lab1','lab2','lab3','lab4', 'lab5', 'lab6']: + for snd in ['lab1','lab2','lab3','lab4', 'lab5', 'lab6']: if not os.path.isfile(os.path.join(Config.DATA_DIR, snd)): shutil.copyfile(Config.SOUNDS_DIR + '/' + snd , Config.DATA_DIR + '/' + snd) os.system('chmod 0777 ' + Config.DATA_DIR + '/' + snd + ' &') diff --git a/TamTamSynthLab.activity/icons/recordO.svg b/TamTamSynthLab.activity/icons/recordO.svg new file mode 100644 index 0000000..83f8cfe --- /dev/null +++ b/TamTamSynthLab.activity/icons/recordO.svg @@ -0,0 +1,18 @@ + + + + + + + + + + + + + + diff --git a/common/Config.py b/common/Config.py index 0bf0210..474bd82 100644 --- a/common/Config.py +++ b/common/Config.py @@ -46,7 +46,6 @@ if SugarMode == True: INSTANCE_DIR = os.path.join(get_activity_root(), 'instance') DATA_DIR = os.path.join(get_activity_root(), 'data') TMP_DIR = os.path.join(get_activity_root(), 'tmp') - SNDS_DIR = DATA_DIR SNDS_INFO_DIR = os.path.join(get_activity_root(), 'data', 'snds_info') diff --git a/common/Resources/tamtamorc.csd b/common/Resources/tamtamorc.csd index 1563a9f..f0a63f1 100644 --- a/common/Resources/tamtamorc.csd +++ b/common/Resources/tamtamorc.csd @@ -1107,7 +1107,7 @@ f32 0 1024 10 1 0 .1 0 .3 .2 0 0 .1 f33 0 1024 10 1 0 0 0 .1 0 0 .2 .1 0 0 .1 f34 0 1024 10 1 .6 0 0 .4 .2 .1 0 0 .1 f35 0 1024 10 1 .5 .3 0 .1 0 0 0 .1 .1 -f36 0 1024 10 1 0 .6 .4 .1 0 0 .2 .1 0 0 ,1 +f36 0 1024 10 1 0 .6 .4 .1 0 0 .2 .1 0 0 .1 f37 0 1024 10 1 0 0 0 .1 .2 .1 0 0 0 .1 0 0 .1 f38 0 1024 10 1 .4 .3 0 .1 .2 .1 .1 .1 0 0 0 0 .1 .05 f39 0 1024 10 1 0 .5 0 0 .3 0 0 .2 0 .1 0 0 0 0 .2 0 0 0 .05 0 0 0 0 .03 ; ADDITIVE SYNTHESIS WAVE diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py index 69ed50f..2ce3238 100644 --- a/common/Util/CSoundClient.py +++ b/common/Util/CSoundClient.py @@ -79,26 +79,23 @@ class _CSoundClientPlugin: sc_inputMessage( Config.CSOUND_MIC_RECORD % table ) def load_mic_instrument( self, inst ): - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[inst].instrumentId sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName)) def load_synth_instrument( self, inst ): - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[inst].instrumentId sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName)) def load_ls_instrument( self, inst ): - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst sc_inputMessage(Config.CSOUND_LOAD_LS_INSTRUMENT % fileName) def load_instruments( self ): for instrumentSoundFile in self.instrumentDB.instNamed.keys(): if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab' or self.instrumentDB.instNamed[instrumentSoundFile].category == 'mysounds': - try: - fileName = Config.JAM_DIR + '/' + instrumentSoundFile - except: - fileName = Config.SNDS_DIR + '/' + instrumentSoundFile + fileName = Config.DATA_DIR + '/' + instrumentSoundFile else: fileName = Config.SOUNDS_DIR + "/" + instrumentSoundFile instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ instrumentSoundFile ].instrumentId @@ -107,10 +104,7 @@ class _CSoundClientPlugin: def load_instrument(self, inst): if not inst in loadedInstruments: if inst[0:3] == 'mic' or inst[0:3] == 'lab' or self.instrumentDB.instNamed[inst].category == 'mysounds': - try: - fileName = Config.JAM_DIR + '/' + inst - except: - fileName = Config.SNDS_DIR + '/' + inst + fileName = Config.DATA_DIR + '/' + inst else: fileName = Config.SOUNDS_DIR + "/" + inst instrumentId = Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ inst ].instrumentId diff --git a/common/Util/LoopSettings.py b/common/Util/LoopSettings.py index f389275..d672050 100644 --- a/common/Util/LoopSettings.py +++ b/common/Util/LoopSettings.py @@ -152,7 +152,7 @@ class LoopSettings( gtk.VBox ): ofile.write(name + ' ' + tied + ' ' + register + ' ' + melo + ' ' + category + ' ' + start + ' ' + end + ' ' + dur + '\n') ofile.close() - (s,o) = commands.getstatusoutput('cp ' + Config.SNDS_DIR + '/' + self.oldName + ' ' + Config.SNDS_DIR + '/' + name) + (s,o) = commands.getstatusoutput('cp ' + Config.DATA_DIR + '/' + self.oldName + ' ' + Config.DATA_DIR + '/' + name) self.doneLoopSettingsPopup() def set_name(self, name): diff --git a/scripts/genpolist.py b/scripts/genpolist.py new file mode 100644 index 0000000..558926f --- /dev/null +++ b/scripts/genpolist.py @@ -0,0 +1,9 @@ +#!/usr/bin/env python + +import os + +activities = ['../' + rep for rep in os.listdir('../') if rep.endswith('activity')] +for activity in activities: + for f in sorted(os.listdir(os.path.join(activity,'po'))): + print 'po/' + f + \ No newline at end of file -- cgit v0.9.1