Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Generation
diff options
context:
space:
mode:
authorOli2 <olivier.belanger@umontreal.ca>2007-03-29 04:49:05 (GMT)
committer Oli2 <olivier.belanger@umontreal.ca>2007-03-29 04:49:05 (GMT)
commit2defde46473270d4df33326bface8dedd702a907 (patch)
treeb65146b8081e6b3cc02d3c072f3da672d13a3493 /Generation
parentf912bcff3a721a56321caebfb331447365f4f4f3 (diff)
drum fillin target on 8th notes
Diffstat (limited to 'Generation')
-rwxr-xr-xGeneration/Generator.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/Generation/Generator.py b/Generation/Generator.py
index 7ed18dc..0b34c0d 100755
--- a/Generation/Generator.py
+++ b/Generation/Generator.py
@@ -111,7 +111,11 @@ def generator1(
if ( rand() * fillDrum ) > ( parameters.silence * .5 ):
if fillDrum != 1:
if rythmSequence[i] not in trackOnsets or pitchSequence[i] not in trackPitchs:
- append( CSoundNote( rythmSequence[i], pitchSequence[i], gainSequence[i], pan, durationSequence[i], trackId, instrument_id, 0.002, 0.098, 0.1, 0, 1000, False, 'edit' ) )
+ if rythmSequence[i] > ( barLength / 2 ):
+ fillOnset = rythmSequence[i] + random.choice([0, GenerationConstants.DOUBLE_TICK_DUR / 2.])
+ else:
+ fillOnset = rythmSequence[i]
+ append( CSoundNote( fillOnset, pitchSequence[i], gainSequence[i], pan, durationSequence[i], trackId, instrument_id, 0.002, 0.098, 0.1, 0, 1000, False, 'edit' ) )
else:
append( CSoundNote( rythmSequence[i], pitchSequence[i], gainSequence[i], pan, durationSequence[i], trackId, instrument_id, 0.002, 0.098, 0.1, 0, 1000, False, 'edit' ) )
else: