diff options
author | Aleksey Lim <alsroot@sugarlabs.org> | 2012-06-06 07:18:26 (GMT) |
---|---|---|
committer | Aleksey Lim <alsroot@sugarlabs.org> | 2012-06-06 07:18:36 (GMT) |
commit | 2931f2f1bc98096eb8d270ea467f8244a67e808c (patch) | |
tree | fefe7cfbf7edae5790111e84a684e1f4648c1508 /common/Util/Instruments.py | |
parent | 3b162ef806b77cf4bdf85eccd40854479dc222a0 (diff) |
Add singular access point for getting image files; add 73% scaled images for resolution <=800
Diffstat (limited to 'common/Util/Instruments.py')
-rw-r--r-- | common/Util/Instruments.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/common/Util/Instruments.py b/common/Util/Instruments.py index 5ba8937..3fc2ecb 100644 --- a/common/Util/Instruments.py +++ b/common/Util/Instruments.py @@ -2,6 +2,7 @@ import os from gettext import gettext as _ import common.Config as Config +from common.Config import imagefile import common.Util.InstrumentDB as InstrumentDB from sugar.activity.activity import get_bundle_name @@ -19,8 +20,13 @@ INST_PERC = Config.INST_PERC instrumentDB = InstrumentDB.getRef() -def _addInstrument(name, csoundInstrumentId, instrumentRegister, category, loopStart, loopEnd, crossDur, ampScale=1, kit=None, kitStage=False, volatile=False, nameTooltip=""): - instrumentDB.addInstrumentFromArgs(name, csoundInstrumentId, instrumentRegister, loopStart, loopEnd, crossDur, ampScale, kit, name, Config.IMAGE_ROOT + "/" + name + ".png", category, kitStage=kitStage, volatile=volatile, nameTooltip=nameTooltip) +def _addInstrument(name, csoundInstrumentId, instrumentRegister, category, + loopStart, loopEnd, crossDur, ampScale=1, kit=None, kitStage=False, + volatile=False, nameTooltip=""): + instrumentDB.addInstrumentFromArgs(name, csoundInstrumentId, + instrumentRegister, loopStart, loopEnd, crossDur, ampScale, kit, + name, imagefile(name + '.png'), category, kitStage=kitStage, + volatile=volatile, nameTooltip=nameTooltip) if Config.FEATURES_MIC: _addInstrument("mic1", INST_TIED, MID, 'mysounds', .01, 1.99, .01, 1, volatile=True) |