diff options
author | Oli <olivier.belanger@umontreal.ca> | 2007-10-19 08:10:01 (GMT) |
---|---|---|
committer | Oli <olivier.belanger@umontreal.ca> | 2007-10-19 08:10:01 (GMT) |
commit | 138653b35fe9ed1ccc651fd988fac4b14e83f71a (patch) | |
tree | 66f95e963c157da97dd1f512dca8340eda3dae2b /TamTamMini.activity | |
parent | 3e9a586f404b70cda362cf888653de9c940fd849 (diff) |
removed old and unused files
Diffstat (limited to 'TamTamMini.activity')
-rw-r--r-- | TamTamMini.activity/Mini/NoteStdAlone.py | 103 |
1 files changed, 0 insertions, 103 deletions
diff --git a/TamTamMini.activity/Mini/NoteStdAlone.py b/TamTamMini.activity/Mini/NoteStdAlone.py deleted file mode 100644 index d007da9..0000000 --- a/TamTamMini.activity/Mini/NoteStdAlone.py +++ /dev/null @@ -1,103 +0,0 @@ -import common.Config as Config -from common.Util.CSoundClient import CSoundClient -from common.Generation.GenerationConstants import GenerationConstants - -class NoteStdAlone: - def __init__( self, client, - onset, - pitch, - amplitude, - pan, - duration, - trackId, - fullDuration = False, - instrument = Config.FLUTE, - attack = 0.005, - decay = 0.095, - reverbSend = 0.1, - filterType = 0, - filterCutoff = 1000, - tied = False, - overlap = False, - instrumentFlag = Config.FLUTE ): - self.csnd = client - self.onset = onset - self.pitch = pitch - self.amplitude = amplitude - self.pan = pan - self.duration = duration - self.trackId = trackId - self.instrument = instrument - self.fullDuration = fullDuration - self.attack = attack - self.decay = decay - self.reverbSend = reverbSend - self.filterType = filterType - self.filterCutoff = filterCutoff - self.tied = tied - self.overlap = overlap - if self.instrument == 'drum1kit': - self.instrumentFlag = Config.DRUM1INSTRUMENTS[ self.pitch ] - else: - self.instrumentFlag = self.instrument - - def play( self ): - self.csnd.sendText( self.getText(120) ) - - def getText( self, tempo ): - if self.instrument[ 0: 4 ] == 'drum': - if GenerationConstants.DRUMPITCH.has_key( self.pitch ): - self.pitch = GenerationConstants.DRUMPITCH[ self.pitch ] - - if self.instrument == 'drum1kit': - self.instrumentFlag = Config.DRUM1INSTRUMENTS[ self.pitch ] - if self.instrument == 'drum2kit': - self.instrumentFlag = Config.DRUM2INSTRUMENTS[ self.pitch ] - if self.instrument == 'drum3kit': - self.instrumentFlag = Config.DRUM3INSTRUMENTS[ self.pitch ] - newPitch = 1 - else: - self.instrumentFlag = self.instrument - newPitch = pow( GenerationConstants.TWO_ROOT_TWELVE, self.pitch - 36 ) - - oneTickDuration = (Config.MS_PER_MINUTE / 1000) / tempo / Config.TICKS_PER_BEAT - - newDuration = oneTickDuration * self.duration - - # condition for tied notes - if self.instrumentDB.instNamed[ self.instrumentFlag ].csoundInstrumentId == 101 and self.tied and self.fullDuration: - newDuration = -1 - # condition for overlaped notes - if self.instrumentDB.instNamed[ self.instrumentFlag ].csoundInstrumentId == 102 and self.overlap: - newDuration = oneTickDuration * self.duration + 1. - - if True: newAmplitude = self.amplitude * 0.8 - else : newAmplitude = self.amplitude * music_volume_get( self.trackId ) - - newAttack = newDuration * self.attack - if newAttack <= 0.002: - newAttack = 0.002 - - newDecay = newDuration * self.decay - if newDecay <= 0.002: - newDecay = 0.002 - - loopStart = self.instrumentDB.instNamed[ self.instrumentFlag ].loopStart - loopEnd = self.instrumentDB.instNamed[ self.instrumentFlag ].loopEnd - crossDur = self.instrumentDB.instNamed[ self.instrumentFlag ].crossDur - return Config.PLAY_NOTE_COMMAND % ( self.instrumentDB.instNamed[ self.instrumentFlag ].csoundInstrumentId, - self.trackId, - 0, - newDuration, - newPitch, - self.reverbSend, - newAmplitude, - self.pan, - Config.INSTRUMENT_TABLE_OFFSET + self.instrumentDB.instNamed[ self.instrumentFlag ].instrumentId, - newAttack, - newDecay, - self.filterType, - self.filterCutoff, - loopStart, - loopEnd, - crossDur ) |