Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Jam/Fillin.py
diff options
context:
space:
mode:
authoramartin <olpc@xo-05-28-21.localdomain>2007-08-28 11:58:27 (GMT)
committer amartin <olpc@xo-05-28-21.localdomain>2007-08-28 11:58:27 (GMT)
commit82bce73030735492a017113f0486ebe8aae5fae6 (patch)
tree4e606e9e8b1183b43f90fbb572a78f3be9ee2ac7 /Jam/Fillin.py
parent66de29ff7807cbc2d0849ece71146fc9e72e1fe4 (diff)
Jam save/load
Diffstat (limited to 'Jam/Fillin.py')
-rw-r--r--Jam/Fillin.py10
1 files changed, 7 insertions, 3 deletions
diff --git a/Jam/Fillin.py b/Jam/Fillin.py
index f17fe01..8f31489 100644
--- a/Jam/Fillin.py
+++ b/Jam/Fillin.py
@@ -21,12 +21,16 @@ class Fillin:
self.onsets = []
self.pitchs = []
self.playBackTimeout = None
+ self.loopId = 0
self.csnd = new_csound_client()
def reset( self ):
self.barCount = 0
self.gate = 0
+ def setLoopId( self, id ):
+ self.loopId = id
+
def setProperties( self, tempo, instrument, volume, beats, reverb ):
self.setTempo( tempo )
self.setInstrument( instrument )
@@ -70,11 +74,11 @@ class Fillin:
def clear( self ):
if self.notesList:
for n in self.notesList:
- self.csnd.loopDelete(n)
+ self.csnd.loopDelete(n, self.loopId)
self.notesList = []
def handleClock( self ):
- tick = self.csnd.loopGetTick()
+ tick = self.csnd.loopGetTick( self.loopId )
if tick < ( Config.TICKS_PER_BEAT / 2 + 1 ):
if self.gate == 0:
self.gate = 1
@@ -108,5 +112,5 @@ class Fillin:
n = Note(0, x.trackId, i, x)
self.notesList.append(n)
i += 1
- self.csnd.loopPlay(n,1) #add as active
+ self.csnd.loopPlay(n,1, loopId = self.loopId ) #add as active