diff options
author | Oli <olpc@localhost.localdomain> | 2007-03-05 00:15:22 (GMT) |
---|---|---|
committer | Oli <olpc@localhost.localdomain> | 2007-03-05 00:15:22 (GMT) |
commit | 74d7de4b639a1f2fcf61473e6ff40f4d0a3b0f46 (patch) | |
tree | 2f493201d6f8edcfca25fa0c25ea6c931a39e4c6 /Generation | |
parent | 90fd4e1f17ea44f5886c8714cc085f69ea068695 (diff) |
removed 'fullDuration' from CSoundNote
Diffstat (limited to 'Generation')
-rwxr-xr-x | Generation/Generator.py | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/Generation/Generator.py b/Generation/Generator.py index 3b42f35..794199b 100755 --- a/Generation/Generator.py +++ b/Generation/Generator.py @@ -71,15 +71,9 @@ def generator1( def makeDurationSequence( onsetList, parameters, table_duration, barLength, currentInstrument ): durationSequence = [] - fullDurationSequence = [] if len( onsetList ) > 1: for i in range(len(onsetList) - 1): duration = (onsetList[i+1] - onsetList[i]) * Utils.prob2( table_duration ) - if duration == (onsetList[i+1] - onsetList[i]): - fullDurationSequence.append(True) - else: - fullDurationSequence.append(False) - if Config.INSTRUMENTS[ currentInstrument ].soundClass == 'drum': duration = GenerationConstants.DOUBLE_TICK_DUR / 2 @@ -89,14 +83,12 @@ def generator1( durationSequence.append( GenerationConstants.DOUBLE_TICK_DUR / 2) else: durationSequence.append(( barLength - onsetList[-1]) * Utils.prob2( table_duration )) - fullDurationSequence.append(False) elif len( onsetList ) == 1: if Config.INSTRUMENTS[ currentInstrument ].soundClass == 'drum': durationSequence.append( GenerationConstants.DOUBLE_TICK_DUR / 2 ) else: durationSequence.append( ( barLength - onsetList[ 0 ] ) * Utils.prob2( table_duration )) - fullDurationSequence.append( False ) - return durationSequence, fullDurationSequence + return durationSequence def pageGenerate( parameters, trackId, pageId, selectedPageCount, lastPageId, trackOfNotes, drumPitch = None ): trackNotes = trackOfNotes @@ -127,13 +119,13 @@ def generator1( elif parameters.pitchMethod == 1: pitchSequence = makePitch.harmonicPitchSequence( rythmSequence, parameters, table_pitch, harmonicSequence ) gainSequence = makeGainSequence(rythmSequence) - durationSequence, fullDurationSequence = makeDurationSequence(rythmSequence, parameters, table_duration, barLength, currentInstrument) + durationSequence = makeDurationSequence(rythmSequence, parameters, table_duration, barLength, currentInstrument) for i in range(len(rythmSequence)): if random.random() > parameters.silence: trackNotes.append( CSoundNote( rythmSequence[i], pitchSequence[i], gainSequence[i], - GenerationConstants.DEFAULT_PAN, durationSequence[i], trackId, - fullDurationSequence[i], Config.INSTRUMENTS[instrument[ trackId ]].instrumentId ) ) + GenerationConstants.DEFAULT_PAN, durationSequence[i], trackId, + Config.INSTRUMENTS[instrument[ trackId ]].instrumentId ) ) # del trackDictionary[ trackId ][ pageId ] trackDictionary[ trackId ][ pageId ] = trackNotes |