Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAleksey Lim <alsroot@member.fsf.org>2008-12-19 04:26:58 (GMT)
committer Aleksey Lim <alsroot@member.fsf.org>2008-12-19 23:50:57 (GMT)
commitcf9c4c752d2b2941d3598cde31c437225696f012 (patch)
tree40196f96d9d9f7576d5e95ab7cbbdcf3a11ea46e
parent11ddb4cbf9b695fdd042105d7e341f20e347e018 (diff)
global on/off mic&lab from Config flags
-rw-r--r--TamTamJam.activity/Jam/JamMain.py5
-rw-r--r--TamTamJam.activity/Jam/Picker.py6
-rw-r--r--TamTamMini.activity/Mini/InstrumentPanel.py3
-rwxr-xr-xTamTamSynthLab.activity/SynthLab/SynthLabConstants.py4
-rw-r--r--common/Config.py2
-rw-r--r--common/Util/Instruments.py23
6 files changed, 23 insertions, 20 deletions
diff --git a/TamTamJam.activity/Jam/JamMain.py b/TamTamJam.activity/Jam/JamMain.py
index d78b095..ae41951 100644
--- a/TamTamJam.activity/Jam/JamMain.py
+++ b/TamTamJam.activity/Jam/JamMain.py
@@ -205,8 +205,9 @@ class JamMain(gtk.EventBox):
self.activity.toolbox.add_toolbar( _("Playback"), self.playbackToolbar )
self.desktopToolbar = DesktopToolbar( self )
self.activity.toolbox.add_toolbar( _("Desktop"), self.desktopToolbar )
- self.recordToolbar = RecordToolbar( self )
- self.activity.toolbox.add_toolbar( _("Record"), self.recordToolbar )
+ if Config.MIC:
+ self.recordToolbar = RecordToolbar( self )
+ self.activity.toolbox.add_toolbar( _("Record"), self.recordToolbar )
#-- GUI -----------------------------------------------
if True: # GUI
diff --git a/TamTamJam.activity/Jam/Picker.py b/TamTamJam.activity/Jam/Picker.py
index aec2ae0..70d4481 100644
--- a/TamTamJam.activity/Jam/Picker.py
+++ b/TamTamJam.activity/Jam/Picker.py
@@ -134,11 +134,9 @@ class Instrument( Picker ):
elif not i.kitStage and not i.kit:
all.append(i)
- if not Config.XO:
- lab.sort()
- all += lab
-
+ lab.sort()
mic.sort()
+ all += lab
all += mic
for inst in all:
diff --git a/TamTamMini.activity/Mini/InstrumentPanel.py b/TamTamMini.activity/Mini/InstrumentPanel.py
index 5355b30..73fbebe 100644
--- a/TamTamMini.activity/Mini/InstrumentPanel.py
+++ b/TamTamMini.activity/Mini/InstrumentPanel.py
@@ -129,9 +129,6 @@ class InstrumentPanel( gtk.EventBox ):
for i in range(loadStage[2], len(keys)):
key = keys[i]
- if Config.XO and key[0:3] == 'lab':
- continue
-
instrument = self.instrumentDB.instNamed[key]
if not instrument.kitStage and not instrument.kit:
diff --git a/TamTamSynthLab.activity/SynthLab/SynthLabConstants.py b/TamTamSynthLab.activity/SynthLab/SynthLabConstants.py
index 88367c6..0fd9094 100755
--- a/TamTamSynthLab.activity/SynthLab/SynthLabConstants.py
+++ b/TamTamSynthLab.activity/SynthLab/SynthLabConstants.py
@@ -1,4 +1,5 @@
from gettext import gettext as _
+import common.Config as Config
class SynthLabConstants:
@@ -74,7 +75,8 @@ class SynthLabConstants:
CONTROL_TYPES = ['lfo', 'rand', 'adsr', 'trackpadX', 'trackpadY']
CONTROL_TYPES_PLUS = [type + '+' for type in CONTROL_TYPES]
- SOURCE_TYPES = ['fm', 'buzz', 'vco', 'pluck', 'noise', 'sample', 'voice', 'grain', 'addSynth', 'mic']
+ SOURCE_TYPES = ['fm', 'buzz', 'vco', 'pluck', 'noise', 'sample', 'voice', 'grain', 'addSynth']
+ if Config.MIC: SOURCE_TYPES += ['mic']
SOURCE_TYPES_PLUS = [type + '+' for type in SOURCE_TYPES]
FX_TYPES = ['wguide', 'distort','filter', 'ring', 'reverb', 'harmon', 'eq4band', 'chorus']
FX_TYPES_PLUS = [type + '+' for type in FX_TYPES]
diff --git a/common/Config.py b/common/Config.py
index 53b161e..fee725c 100644
--- a/common/Config.py
+++ b/common/Config.py
@@ -62,6 +62,8 @@ PLUGIN_NPERIODS = 2
## SOUNDS
##############
+MIC = False
+
ARECORD = "arecord " + os.getenv("TAMTAM_ARECORD",
"-f S16_LE -t wav -r 16000 -c2 -D hw:0,0")
diff --git a/common/Util/Instruments.py b/common/Util/Instruments.py
index d8a41b3..b4aa318 100644
--- a/common/Util/Instruments.py
+++ b/common/Util/Instruments.py
@@ -20,17 +20,20 @@ instrumentDB = InstrumentDB.getRef()
def _addInstrument( name, csoundInstrumentId, instrumentRegister, category, loopStart, loopEnd, crossDur, ampScale = 1, kit = None, kitStage = False ):
instrumentDB.addInstrumentFromArgs( name, csoundInstrumentId, instrumentRegister, loopStart, loopEnd, crossDur, ampScale, kit, name, Config.IMAGE_ROOT+"/"+name+".png", category, kitStage = kitStage )
+if Config.MIC:
+ _addInstrument( "mic1", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
+ _addInstrument( "mic2", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
+ _addInstrument( "mic3", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
+ _addInstrument( "mic4", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
+
+if not Config.XO:
+ _addInstrument( "lab1", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
+ _addInstrument( "lab2", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
+ _addInstrument( "lab3", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
+ _addInstrument( "lab4", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
+ _addInstrument( "lab5", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
+ _addInstrument( "lab6", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
-_addInstrument( "mic1", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
-_addInstrument( "mic2", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
-_addInstrument( "mic3", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
-_addInstrument( "mic4", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1 )
-_addInstrument( "lab1", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
-_addInstrument( "lab2", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
-_addInstrument( "lab3", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
-_addInstrument( "lab4", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
-_addInstrument( "lab5", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
-_addInstrument( "lab6", INST_SIMP, MID, 'mysounds', 0, 0, 0, 1 )
_addInstrument( "ounk", INST_SIMP, MID, 'animals', 0, 0, 0, 1 )
_addInstrument( "gam", INST_TIED, HIGH, 'percussions', .69388, .7536, .02922, 1.4 )
_addInstrument( "guit", INST_TIED, MID, 'strings', .08592, .75126, .33571, 0.7 )