Web   ·   Wiki   ·   Activities   ·   Blog   ·   Lists   ·   Chat   ·   Meeting   ·   Bugs   ·   Git   ·   Translate   ·   Archive   ·   People   ·   Donate
summaryrefslogtreecommitdiffstats
path: root/Generation
diff options
context:
space:
mode:
authorOli <olpc@localhost.localdomain>2007-03-05 22:54:30 (GMT)
committer Oli <olpc@localhost.localdomain>2007-03-05 22:54:30 (GMT)
commitd4f2d55906b97783a79233926561fe372564eebb (patch)
tree26a9ea567bd9f4851f75c717e9f31178d2136674 /Generation
parent771f7b8ed93126313091d17a516cb631ff36c9a9 (diff)
4 bars of music on load, algo stuff, activity = 19
Diffstat (limited to 'Generation')
-rwxr-xr-xGeneration/GenerationConstants.py2
-rw-r--r--Generation/GenerationPitch.py2
-rwxr-xr-xGeneration/Generator.py10
3 files changed, 8 insertions, 6 deletions
diff --git a/Generation/GenerationConstants.py b/Generation/GenerationConstants.py
index 452428c..2c1d4fd 100755
--- a/Generation/GenerationConstants.py
+++ b/Generation/GenerationConstants.py
@@ -65,7 +65,7 @@ class GenerationConstants:
DENSITY_SCALE_MIN_MAPPING = 0
DENSITY_SCALE_MAX_MAPPING = 38
DENSITY_SCALE_STEPS = 38
- ARTICULATION_SCALE_MIN_MAPPING = .3
+ ARTICULATION_SCALE_MIN_MAPPING = .6
ARTICULATION_SCALE_MAX_MAPPING = 1
ARTICULATION_SCALE_STEPS = 30
diff --git a/Generation/GenerationPitch.py b/Generation/GenerationPitch.py
index d7239a9..5949d08 100644
--- a/Generation/GenerationPitch.py
+++ b/Generation/GenerationPitch.py
@@ -32,7 +32,7 @@ class GenerationPitch:
def drunkPitchSequence(self, length, parameters, table_pitch):
pitchMethod = self.chooseMethod( parameters.pattern )
pitchSequence = []
- numberOfPitch = int( ( 1 - parameters.pitchRegularity ) * 10 + 1 )
+ numberOfPitch = int( ( 1 - (parameters.pitchRegularity*.8) ) * 10 + 1 )
for i in range(numberOfPitch):
pitchSequence.append((table_pitch[pitchMethod.getNextValue(-(10 - (int(parameters.step * 10))), (len(table_pitch)-1))]) + GenerationConstants.DEFAULT_TONIQUE)
for i in range( length - numberOfPitch ):
diff --git a/Generation/Generator.py b/Generation/Generator.py
index fb6ab6b..d6ce88a 100755
--- a/Generation/Generator.py
+++ b/Generation/Generator.py
@@ -122,10 +122,12 @@ def generator1(
durationSequence = makeDurationSequence(rythmSequence, parameters, table_duration, barLength, currentInstrument)
for i in range(len(rythmSequence)):
- if random.random() > parameters.silence:
- trackNotes.append( CSoundNote( rythmSequence[i], pitchSequence[i], gainSequence[i],
- GenerationConstants.DEFAULT_PAN, durationSequence[i], trackId,
- Config.INSTRUMENTS[instrument[ trackId ]].instrumentId, 0.002, 0.098, 0.1, 0, 1000, False, 'edit' ) )
+ if Config.INSTRUMENTS[ currentInstrument ].soundClass == 'drum':
+ if random.random() > ( parameters.silence * .7 ):
+ trackNotes.append( CSoundNote( rythmSequence[i], pitchSequence[i], gainSequence[i], GenerationConstants.DEFAULT_PAN, durationSequence[i], trackId, Config.INSTRUMENTS[instrument[ trackId ]].instrumentId, 0.002, 0.098, 0.1, 0, 1000, False, 'edit' ) )
+ else:
+ if random.random() > parameters.silence:
+ trackNotes.append( CSoundNote( rythmSequence[i], pitchSequence[i], gainSequence[i], GenerationConstants.DEFAULT_PAN, durationSequence[i], trackId, Config.INSTRUMENTS[instrument[ trackId ]].instrumentId, 0.002, 0.098, 0.1, 0, 1000, False, 'edit' ) )
# del trackDictionary[ trackId ][ pageId ]
trackDictionary[ trackId ][ pageId ] = trackNotes