diff options
-rw-r--r-- | Edit/MainWindow.py | 7 | ||||
-rwxr-xr-x | Generation/GenerationConstants.py | 2 | ||||
-rw-r--r-- | Generation/GenerationPitch.py | 2 | ||||
-rwxr-xr-x | Generation/Generator.py | 10 | ||||
-rw-r--r-- | activity/activity.info | 2 |
5 files changed, 15 insertions, 8 deletions
diff --git a/Edit/MainWindow.py b/Edit/MainWindow.py index 72ae535..d27d181 100644 --- a/Edit/MainWindow.py +++ b/Edit/MainWindow.py @@ -499,7 +499,12 @@ class MainWindow( SubActivity ): self.GUI["2trackBox"].hide() self.GUI["2noteBox"].hide() self.setContext( CONTEXT.PAGE ) - + + self.pageAdd() + self.pageAdd() + self.pageAdd() + self.tuneInterface.selectPages( [1,2,3,4] ) + self.displayPage(1) self.generateMode = 'page' self.generate( GenerationParameters() ) 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 diff --git a/activity/activity.info b/activity/activity.info index 53ead88..e594856 100644 --- a/activity/activity.info +++ b/activity/activity.info @@ -3,4 +3,4 @@ name = TamTam service_name = org.laptop.TamTam icon = activity-tamtam class = TamTam.TamTam -activity_version = 18 +activity_version = 19 |