diff options
author | Oli <olivier.belanger@umontreal.ca> | 2007-07-11 04:18:10 (GMT) |
---|---|---|
committer | Oli <olivier.belanger@umontreal.ca> | 2007-07-11 04:18:10 (GMT) |
commit | 294e43606e605c9eaacb1705fea3731b7b1562db (patch) | |
tree | 69cda6b4555fa96d279f898fe3c63f0ba6d1cf84 /Generation | |
parent | a8740043e04f4c19447903a4029d6fb645abe0c7 (diff) |
fix for generation density bug in lower values
Diffstat (limited to 'Generation')
-rw-r--r-- | Generation/GenerationRythm.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Generation/GenerationRythm.py b/Generation/GenerationRythm.py index d210c22..effb61a 100644 --- a/Generation/GenerationRythm.py +++ b/Generation/GenerationRythm.py @@ -12,7 +12,7 @@ class GenerationRythm: lastOnsetTime = 0 onsetLen = len(GenerationConstants.TABLE_ONSET_VALUES) - onsetValue = int( ( 1 - parameters.density ) * onsetLen ) + onsetValue = int( ( 1 - (parameters.density*0.98+0.02) ) * onsetLen ) onsetDeviation = int( ( 1 - parameters.rythmRegularity ) * 20 ) currentOnsetValue = onsetValue + ( random.randint( 0, onsetDeviation ) - ( onsetDeviation / 2 ) ) if currentOnsetValue < 0: |