@ -64,7 +64,7 @@ class Data(template.engine.sequencer.Score):
#However, explicit is better than implicit.
self . noteOnsInProgress = { i : set ( ) for i in range ( 10 ) }
self . track . sequencerInterface . insertEmptyClip ( ) #needed for recording. Creates a maximum length empty clip
self . eventCollectorForUndo = [ ] #The api switches this between a list and None. Starting in a list enables to record right from the program start
self . eventCollectorForUndo = None #The api switches this between a list and None. Starting in a list enables to record right from the program start
logger . info ( " Main Data instance complete " )
self . copyBuffer = [ ]
@ -105,34 +105,32 @@ class Data(template.engine.sequencer.Score):
def livePolyphonicAftertouch ( self , tickindex : int , note : int , value : int ) :
""" 0xA0 Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
""" 0xA0 Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
assert not self . eventCollectorForUndo is None
resultEvent = self . track . layers [ self . track . activeLayer ] . newEvent ( tickindex , 0xA0 , note , value , " " )
self . eventCollectorForUndo . append ( resultEvent )
return resultEvent
def liveCC ( self , tickindex : int , type : int , value : int ) :
""" 0xB0 Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
""" 0xB0 Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
assert not self . eventCollectorForUndo is None
resultEvent = self . track . layers [ self . track . activeLayer ] . newEvent ( tickindex , 0xB0 , type , value , " " )
self . eventCollectorForUndo . append ( resultEvent )
return resultEvent
def liveProgramChange ( self , tickindex : int , value : int ) :
""" Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
""" Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
assert not self . eventCollectorForUndo is None
resultEvent = self . track . layers [ self . track . activeLayer ] . newEvent ( tickindex , 0xC0 , value , 0 , " " ) #Byte2 gets ignored
self . eventCollectorForUndo . append ( resultEvent )
return resultEvent
def liveChannelPressure ( self , tickindex : int , value : int ) :
""" Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
""" Connected via the api, which sends further callbacks to the GUI """
if self . parentSession . recordingEnabled and not tickindex is None :
assert not self . eventCollectorForUndo is None
resultEvent = self . track . layers [ self . track . activeLayer ] . newEvent ( tickindex , 0xD0 , value , 0 , " " ) #Byte2 gets ignored
self . eventCollectorForUndo . append ( resultEvent )