diff options
author | Oli <olivier.belanger@umontreal.ca> | 2007-04-13 23:47:15 (GMT) |
---|---|---|
committer | Oli <olivier.belanger@umontreal.ca> | 2007-04-13 23:47:15 (GMT) |
commit | 036ffcc62dde09fb07adbb1a557185925010c238 (patch) | |
tree | 89042b851530221150bc3a4dddf08ca5a431f6c0 /Generation | |
parent | d7edb44c9c511c8de53da048f9bc2d34976656a7 (diff) |
fixed first note bug
Diffstat (limited to 'Generation')
-rwxr-xr-x | Generation/Generator.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/Generation/Generator.py b/Generation/Generator.py index 09cc474..bddf3dd 100755 --- a/Generation/Generator.py +++ b/Generation/Generator.py @@ -149,9 +149,12 @@ def generator1( if instrument[ trackId ][0:4] == 'drum': if pageCycle in [1,2]: - trackDictionary[ trackId ][ pageId ] = [ n for n in trackDictionary[ trackId ][ lastPageId ] ] + trackDictionary[trackId][pageId] = [] + for n in trackDictionary[trackId][lastPageId]: + trackDictionary[trackId][pageId].append(n.clone()) elif pageCycle == 3: - trackOfNotes = [ n for n in trackDictionary[ trackId ][ lastPageId ] ] + for n in trackDictionary[trackId][pageId]: + trackOfNotes.append(n.clone()) trackOnsets = [n.onset for n in trackOfNotes] trackPitchs = [n.pitch for n in trackOfNotes] fillDrum = .5 @@ -169,7 +172,9 @@ def generator1( if (selectedPageCount % 2) == 0 or random.randint(0, 5) < 2 or selectedPageCount == 0: pageGenerate( parameters, trackId, pageId, trackOfNotes, drumPitch = None ) else: - trackDictionary[ trackId ][ pageId ] = [ n for n in trackDictionary[ trackId ][ lastPageId ] ] + trackDictionary[trackId][pageId] = [] + for n in trackDictionary[trackId][lastPageId]: + trackDictionary[trackId][pageId].append(n.clone()) selectedPageCount += 1 lastPageId = pageId |