View Single Post
Old 04-09-2020, 12:51 AM   #1053
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,607
Default

Awesome!! thank you!

Quote:
Originally Posted by juliansader View Post
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

Last edited by Sexan; 04-09-2020 at 03:05 AM.
Sexan is online now   Reply With Quote