Awesome!! thank you!
Quote:
Originally Posted by juliansader
I notice that the check_mouse_change function returns true whenever the mouse y position changes, which causes lots up extra updates. Perhaps the updates can be limited to when the y position moves into another media or envelope lane?
|
I really do not understand why vertical updates lags with this (this is why I went with Y, could not figure it out....)
Code:
local last_m_tr, last_m_p
function check_mouse_change()
if mouse.p ~= last_m_p or mouse.tr ~= last_m_tr then
last_m_p = mouse.p
last_m_tr = mouse.tr
return true
end
end
I've tested it and update function passes normal (I've set counter and it increases on every track change), but it only updates on every 2 track change. You need to make 2 track difference for it to update ghosts vertically. And then ghosts are off by 1 track
See DRAWCOUNT changes then it changes track, it passes composite for all ghosts where I do the count, but as you see it does not update (this is with V1 JS_API)
Code:
A_DRAWCOUNT = 0
function Element:draw(w,h)
reaper.JS_Composite(track_window, self.x, self.y, self.w, self.h, self.bm, 0, 0, w, h)
A_DRAWCOUNT = A_DRAWCOUNT + 1
end