importtemplate.engine.api#we need direct access to the module to inject data in the provided structures. but we also need the functions directly. next line:
@ -57,6 +57,7 @@ class Data(template.engine.sequencer.Score):
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?
self.swing=0#-0.5 to 0.5 See pattern.buildPattern docstring.
#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")
@ -197,6 +198,7 @@ class Data(template.engine.sequencer.Score):
"subdivisions":self.subdivisions,
"lastUsedNotenames":self.lastUsedNotenames,
"loopMeasureFactor":self.loopMeasureFactor,
"swing":self.swing,
})
returndictionary
@ -209,10 +211,15 @@ class Data(template.engine.sequencer.Score):