From f52524e274d7e0b47da68b2fb5f27d1bb8e72662 Mon Sep 17 00:00:00 2001 From: amartin Date: Tue, 12 Feb 2008 12:59:37 +0000 Subject: beat sync --- (limited to 'common') diff --git a/common/Util/CSoundClient.py b/common/Util/CSoundClient.py index b8919eb..7e8ef78 100644 --- a/common/Util/CSoundClient.py +++ b/common/Util/CSoundClient.py @@ -54,6 +54,8 @@ class _CSoundClientPlugin: _loop_default = self.loopCreate() self.instrumentDB = InstrumentDB.getRef() + self.jamesSux = {} # temporyary dictionary of loopId: loopNumTicks, while I wait for james to implement it properly + def __del__(self): self.connect(False) sc_destroy() @@ -158,11 +160,20 @@ class _CSoundClientPlugin: def loopDestroy(self, loopId): sc_loop_delete(loopId) + try: + del self.jamesSux[ loopId ] + except: + pass def loopClear(self): global _loop_default sc_loop_delete(_loop_default) _loop_default = sc_loop_new() + try: + del self.jamesSux[ loopId ] + except: + pass + # this is function deletes an Event from a loop # TODO: rename this function @@ -186,9 +197,14 @@ class _CSoundClientPlugin: def loopSetNumTicks(self,n, loopId=_loop_default): sc_loop_setNumTicks(loopId, n) + self.jamesSux[loopId] = n + + def loopGetNumTicks( self, loopId = _loop_default ): + return self.jamesSux[loopId] def loopSetTickDuration(self,d, loopId=_loop_default): sc_loop_setTickDuration(loopId, d) + james def loopDeactivate(self, note = 'all', loopId=_loop_default): if note == 'all': -- cgit v0.9.1