Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Util/CSoundClient.py
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2007-07-20 20:28:57 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2007-07-20 20:28:57 (GMT)
commit3181391214117cf8e0d31d30ae3fc14ff56e0e25 (patch)
tree391a02134afa0666e2facb910f47c74fff93588e /Util/CSoundClient.py
parent3380c4f59ddeeae9448530416959eb2901fa01bd (diff)
sounds folder (/.sugar/default/tamtam/snds)
Diffstat (limited to 'Util/CSoundClient.py')
-rw-r--r--Util/CSoundClient.py42
1 files changed, 21 insertions, 21 deletions
diff --git a/Util/CSoundClient.py b/Util/CSoundClient.py
index 242461f..c52cad1 100644
--- a/Util/CSoundClient.py
+++ b/Util/CSoundClient.py
@@ -31,7 +31,7 @@ class _CSoundClientPlugin:
def __init__(self):
sc_initialize( Config.PLUGIN_UNIVORC, Config.PLUGIN_DEBUG,
Config.PLUGIN_PERIOD, Config.PLUGIN_NPERIODS,
- Config.PLUGIN_VERBOSE,
+ Config.PLUGIN_VERBOSE,
Config.PLUGIN_KSMPS, Config.PLUGIN_RATE)
self.on = False
#self.masterVolume = 80.0
@@ -66,23 +66,23 @@ class _CSoundClientPlugin:
sc_inputMessage( Config.CSOUND_MIC_RECORD % table )
def load_mic_instrument( self, inst ):
- fileName = Config.PREF_DIR + '/' + inst
+ fileName = Config.SNDS_DIR + '/' + inst
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + Config.INSTRUMENTS[inst].instrumentId
sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName))
def load_synth_instrument( self, inst ):
- fileName = Config.PREF_DIR + '/' + inst
+ fileName = Config.SNDS_DIR + '/' + inst
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + Config.INSTRUMENTS[inst].instrumentId
sc_inputMessage(Config.CSOUND_LOAD_INSTRUMENT % (instrumentId, fileName))
def load_ls_instrument( self, inst ):
- fileName = Config.PREF_DIR + '/' + inst
+ fileName = Config.SNDS_DIR + '/' + inst
sc_inputMessage(Config.CSOUND_LOAD_LS_INSTRUMENT % fileName)
-
+
def load_instruments( self ):
for instrumentSoundFile in Config.INSTRUMENTS.keys():
if instrumentSoundFile[0:3] == 'mic' or instrumentSoundFile[0:3] == 'lab':
- fileName = Config.PREF_DIR + '/' + instrumentSoundFile
+ fileName = Config.SNDS_DIR + '/' + instrumentSoundFile
else:
fileName = Config.SOUNDS_DIR + "/" + instrumentSoundFile
instrumentId = Config.INSTRUMENT_TABLE_OFFSET + Config.INSTRUMENTS[ instrumentSoundFile ].instrumentId
@@ -90,12 +90,12 @@ class _CSoundClientPlugin:
def connect( self, init = True ):
def reconnect():
- if sc_start(self.periods_per_buffer) :
+ if sc_start(self.periods_per_buffer) :
if (Config.DEBUG > 0) : print 'ERROR connecting'
else:
self.on = True
def disconnect():
- if sc_stop() :
+ if sc_stop() :
if (Config.DEBUG > 0) : print 'ERROR connecting'
else:
self.on = False
@@ -220,12 +220,12 @@ class _CSoundClientPlugin:
def csnote_to_array(self, csnote):
return self.csnote_to_array1(
- csnote.onset,
+ csnote.onset,
csnote.pitch,
csnote.amplitude,
csnote.pan,
- csnote.duration,
- csnote.trackId,
+ csnote.duration,
+ csnote.trackId,
csnote.attack,
csnote.decay,
csnote.reverbSend,
@@ -235,16 +235,16 @@ class _CSoundClientPlugin:
csnote.instrumentId,
csnote.mode)
- def csnote_to_array1( self, onset,
- pitch,
- amplitude,
- pan,
- duration,
- trackId,
- attack = 0.002,
- decay = 0.098,
- reverbSend = 0.1,
- filterType = 0,
+ def csnote_to_array1( self, onset,
+ pitch,
+ amplitude,
+ pan,
+ duration,
+ trackId,
+ attack = 0.002,
+ decay = 0.098,
+ reverbSend = 0.1,
+ filterType = 0,
filterCutoff = 1000,
tied = False,
instrumentId = Config.INSTRUMENTS["flute"].instrumentId,