Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Generation
diff options
context:
space:
mode:
authorOli <olivier.belanger@umontreal.ca>2007-07-12 19:02:50 (GMT)
committer Oli <olivier.belanger@umontreal.ca>2007-07-12 19:02:50 (GMT)
commitd71e92a094b8b8630ba52b48e45ff24cc23bf56c (patch)
treefe747f208a06e1473d9f3d4b554a6cba07ff36da /Generation
parent0ace1a336b5429ee726bbd6326068ac6c0a4e92c (diff)
audio recording stop playing after one pass
Diffstat (limited to 'Generation')
-rw-r--r--Generation/GenerationRythm.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/Generation/GenerationRythm.py b/Generation/GenerationRythm.py
index effb61a..9b611d4 100644
--- a/Generation/GenerationRythm.py
+++ b/Generation/GenerationRythm.py
@@ -17,8 +17,8 @@ class GenerationRythm:
currentOnsetValue = onsetValue + ( random.randint( 0, onsetDeviation ) - ( onsetDeviation / 2 ) )
if currentOnsetValue < 0:
currentOnsetValue = 0
- elif currentOnsetValue > onsetLen:
- currentOnsetValue = onsetLen
+ elif currentOnsetValue >= onsetLen:
+ currentOnsetValue = onsetLen - 1
else:
currentOnsetValue = currentOnsetValue
@@ -30,8 +30,8 @@ class GenerationRythm:
currentOnsetValue = onsetValue + ( randInt( 0, onsetDeviation ) - ( onsetDeviation / 2 ) )
if currentOnsetValue < 0:
currentOnsetValue = 0
- elif currentOnsetValue > onsetLen:
- currentOnsetValue = onsetLen
+ elif currentOnsetValue >= onsetLen:
+ currentOnsetValue = onsetLen - 1
else:
currentOnsetValue = currentOnsetValue
onsetDelta = GenerationConstants.TABLE_ONSET_VALUES[ currentOnsetValue ]