diff options
author | Aleksey 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) |
commit | cf9c4c752d2b2941d3598cde31c437225696f012 (patch) | |
tree | 40196f96d9d9f7576d5e95ab7cbbdcf3a11ea46e /common | |
parent | 11ddb4cbf9b695fdd042105d7e341f20e347e018 (diff) |
global on/off mic&lab from Config flags
Diffstat (limited to 'common')
-rw-r--r-- | common/Config.py | 2 | ||||
-rw-r--r-- | common/Util/Instruments.py | 23 |
2 files changed, 15 insertions, 10 deletions
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 ) |