diff options
author | Oli <olpc@localhost.localdomain> | 2007-02-27 04:24:59 (GMT) |
---|---|---|
committer | Oli <olpc@localhost.localdomain> | 2007-02-27 04:24:59 (GMT) |
commit | 7e0b90a9d323dd52fb7faa1ace9c4e6352420f8f (patch) | |
tree | 7c3db46e4277fd5296df9bd51f954292a9a29a09 /Generation | |
parent | c8759c3281a18519d4271cf17571e4c9f3fc6b09 (diff) |
link of different drums to the generator
Diffstat (limited to 'Generation')
-rwxr-xr-x | Generation/Generator.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/Generation/Generator.py b/Generation/Generator.py index 0f76100..3dbd3cb 100755 --- a/Generation/Generator.py +++ b/Generation/Generator.py @@ -102,7 +102,7 @@ def generator1( trackNotes = trackOfNotes barLength = Config.TICKS_PER_BEAT * nbeats if drumPitch: - currentInstrument = Config.DRUM1INSTRUMENTS[ drumPitch[ 0 ] ] + currentInstrument = Config.DRUMSINSTRUMENTSDICT[Config.DRUMKITS.index(instrument[ trackId ])][ drumPitch[ 0 ] ] else: drumPitch = [ 36 ] currentInstrument = instrument[ trackId ] @@ -145,7 +145,7 @@ def generator1( GenerationConstants.CHORDS_TABLE[ makeHarmonicSequence.getNextValue( 2, len( GenerationConstants.CHORDS_TABLE ) - 1 ) ] ) for trackId in trackIds: - if instrument[ trackId ] == 'drum1kit': + if instrument[ trackId ][0:4] == 'drum': if parameters.rythmRegularity > 0.75: pitchOfStream = [ [ 24 ], [30] , [ 40 ], [ 46 ] ] elif parameters.rythmRegularity > 0.5: @@ -159,7 +159,7 @@ def generator1( for pageId in pageIds: trackOfNotes = [] # del trackDictionary[ trackId ][ pageId ] - if instrument[ trackId ] == 'drum1kit': + if instrument[ trackId ][0:4] == 'drum': for drumPitch in pitchOfStream: pageGenerate( parameters, trackId, pageId, selectedPageCount, lastPageId, trackOfNotes, drumPitch ) else: |