|
|
@ -73,8 +73,8 @@ class ClientCallbacks(Callbacks): #inherits from the templates api callbacks |
|
|
|
func(export) |
|
|
|
callbacks._dataChanged() |
|
|
|
|
|
|
|
def _setPlaybackTicks(self): #Differs from the template because it has subdivisions. |
|
|
|
ppqn = cbox.Transport.status().pos_ppqn * session.data.subdivisions |
|
|
|
def _setPlaybackTicks(self): #Differs from the template because it has subdivisions and offset |
|
|
|
ppqn = cbox.Transport.status().pos_ppqn * session.data.subdivisions - session.data.cachedOffsetInTicks |
|
|
|
status = playbackStatus() |
|
|
|
for func in self.setPlaybackTicks: |
|
|
|
func(ppqn, status) |
|
|
@ -219,18 +219,6 @@ class ClientCallbacks(Callbacks): #inherits from the templates api callbacks |
|
|
|
func(_swingToPercent_Table[export]) |
|
|
|
callbacks._dataChanged() |
|
|
|
|
|
|
|
#Override template one |
|
|
|
def _setPlaybackTicks(self): |
|
|
|
"""This gets called very very often (~60 times per second). |
|
|
|
Any connected function needs to watch closely |
|
|
|
for performance issues""" |
|
|
|
ppqn = cbox.Transport.status().pos_ppqn - session.data.cachedOffsetInTicks |
|
|
|
status = playbackStatus() |
|
|
|
for func in self.setPlaybackTicks: |
|
|
|
func(ppqn, status) |
|
|
|
self._dataChanged() #includes _historyChanged |
|
|
|
|
|
|
|
|
|
|
|
#Inject our derived Callbacks into the parent module |
|
|
|
template.engine.api.callbacks = ClientCallbacks() |
|
|
|
from template.engine.api import callbacks |
|
|
|