Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/TamTamJam.activity
diff options
context:
space:
mode:
Diffstat (limited to 'TamTamJam.activity')
-rw-r--r--TamTamJam.activity/Jam/JamMain.py6
-rw-r--r--TamTamJam.activity/Jam/Picker.py25
2 files changed, 24 insertions, 7 deletions
diff --git a/TamTamJam.activity/Jam/JamMain.py b/TamTamJam.activity/Jam/JamMain.py
index 53f2798..77e97d1 100644
--- a/TamTamJam.activity/Jam/JamMain.py
+++ b/TamTamJam.activity/Jam/JamMain.py
@@ -173,11 +173,13 @@ class JamMain(gtk.EventBox):
self.pixelsPerTick = Block.Loop.BEAT/float(Config.TICKS_PER_BEAT)
self.ticksPerPixel = 1.0/self.pixelsPerTick
- #-- Instrument Images ---------------------------------
+ #-- Instruments ---------------------------------------
self.instrumentImage = {}
self.instrumentImageActive = {}
for inst in self.instrumentDB.getSet( "All" ):
- self.prepareInstrumentImage( inst.instrumentId, inst.img )
+ if not inst.kitStage:
+ self.prepareInstrumentImage( inst.instrumentId, inst.img )
+ self.csnd.load_instrument(inst.name)
#-- Loop Images ---------------------------------------
self.loopImage = {} # get filled in through updateLoopImage
diff --git a/TamTamJam.activity/Jam/Picker.py b/TamTamJam.activity/Jam/Picker.py
index f44c29f..aec2ae0 100644
--- a/TamTamJam.activity/Jam/Picker.py
+++ b/TamTamJam.activity/Jam/Picker.py
@@ -118,13 +118,30 @@ class Instrument( Picker ):
def __init__( self, owner, filter = ( "All" ) ):
Picker.__init__( self, owner, filter )
- self.csnd = new_csound_client()
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 list:
+ all = []
+ lab = []
+ mic = []
+
+ for i in self.instrumentDB.getSet( "All" ):
+ if i.name.startswith('lab'):
+ lab.append(i)
+ elif i.name.startswith('mic'):
+ mic.append(i)
+ elif not i.kitStage and not i.kit:
+ all.append(i)
+
+ if not Config.XO:
+ lab.sort()
+ all += lab
+
+ mic.sort()
+ all += mic
+
+ for inst in all:
self.addBlock( inst.instrumentId )
def addBlock( self, id ):
@@ -132,8 +149,6 @@ class Instrument( Picker ):
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()
width = Block.Instrument.WIDTH
height = Block.Instrument.HEIGHT