@ -56,22 +56,23 @@ class Data(template.engine.sequencer.Score):
self.measuresPerGroup=8# meta data, has no effect on playback.
self.subdivisions=1
self.lastUsedNotenames=simpleNoteNames["English"]#The default value for new tracks/patterns. Changed each time the user picks a new representation via api.setNoteNames . noteNames are saved with the patterns.
self.loopMeasureFactor=1#when looping how many at once?
#Create three tracks with their first pattern activated, so 'play' after startup already produces sounding notes. This is less confusing for a new user.
self.addTrack(name="Melody A",color="#ffff00")
self.addTrack(name="Bass A",color="#00ff00")
self.addTrack(name="Melody A",color="#ffff00")
self.addTrack(name="Bass A",color="#00ff00")
self.addTrack(name="Drums A",color="#ff5500")
self.tracks[0].structure=set((0,))
self.tracks[1].structure=set((0,))
self.tracks[1].structure=set((0,))
self.tracks[1].pattern.scale=(48,47,45,43,41,40,38,36)#Low base notes, C-Major
cbox.Document.get_song().set_loop(start,end)#set playback length for the entire score. Why is the first value not zero? That would create an actual loop from the start to end. We want the song to play only once. The cbox way of doing that is to set the loop range to zero at the end of the track. Zero length is stop.
returnstart,end
@ -187,6 +192,7 @@ class Data(template.engine.sequencer.Score):
"measuresPerGroup":self.measuresPerGroup,
"subdivisions":self.subdivisions,
"lastUsedNotenames":self.lastUsedNotenames,
"loopMeasureFactor":self.loopMeasureFactor,
})
returndictionary
@ -199,6 +205,10 @@ class Data(template.engine.sequencer.Score):