newTrack=session.data.addTrack(name=track.sequencerInterface.name,scale=track.pattern.scale,color=track.color,simpleNoteNames=track.pattern.simpleNoteNames)#track name increments itself from "Track A" to "Track B" or "Track 1" -> "Track 2"
exportPattern+=cbox.Pattern.serialize_event(startTick,0x90,pitch,velocity)# note on
exportPattern+=cbox.Pattern.serialize_event(endTick-1,0x80,pitch,velocity)# note off #-1 ticks to create a small logical gap. Does not affect next note on.
exportPattern+=cbox.Pattern.serialize_event(startTick,0x90+self.parentTrack.midiChannel,pitch,velocity)# note on
exportPattern+=cbox.Pattern.serialize_event(endTick-1,0x80+self.parentTrack.midiChannel,pitch,velocity)# note off #-1 ticks to create a small logical gap. Does not affect next note on.
@ -56,6 +56,7 @@ class Track(object): #injection at the bottom of this file!
#we take inspiration from the GUI that presents the Track on its own.
#The following setting is most likely to be found in the track sub-window:
self.patternLengthMultiplicator=1#int. >= 1 the multiplicator is added after all other calculations, like subdivions. We can't integrate this into howManyUnits because that is the global score value
self.midiChannel=0# 0-15 midi channel is always set.
self.structure=structureifstructureelseset()#see buildTrack(). This is the main track data structure besides the pattern. Just integers (starts at 0) as switches which are positions where to play the patterns. In between are automatic rests.
@ -109,6 +110,7 @@ class Track(object): #injection at the bottom of this file!