exportPattern+=cbox.Pattern.serialize_event(startTick,0x90,pitch,velocity)# note on
exportPattern+=cbox.Pattern.serialize_event(startTick,0x90,pitch,velocity)# note on
exportPattern+=cbox.Pattern.serialize_event(endTick-1,0x80,pitch,velocity-1)# note off #-1 ticks to create a small logical gap. Does not affect next 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.