Old 06-12-2019, 11:19 PM   #681
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

ok then using screentoclient prior top bot would solve thiss issue?

I need to setup osx immediatly....
Sexan is offline   Reply With Quote
Old 06-13-2019, 07:14 AM   #682
juliansader
Human being with feelings
 
Join Date: Jul 2009
Posts: 3,714
Default

ScreenToClient will work, but is most useful if you eventually need to draw into the window's client area, in which case you will need the client coordinates (which are always relative to the top left corner, even on OSX).

However, for simple comparisons, you can perhaps just take the inverse:
Code:
OSX = reaper.GetOS():match("OSX")
...
if OSX then mouse.y = -mouse.y end
...
local _, _, top, _, bottom = reaper.JS_Window_GetRect(window)
if OSX then top, bottom = -top, -bottom end
juliansader is offline   Reply With Quote
Old 06-13-2019, 03:27 PM   #683
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Sexan, just wanted to report back, that AS51 is working pretty great so far.
I still see a lot of flickering though, when a selection is made. Not sure if this can be improved. Othewrwise, it's just marvelous!
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-13-2019, 03:54 PM   #684
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

hm..... i do not have any flicker until its drawing like 100ghost or something like that... is the project clean/empty? you have some other scripts runnnig can you lice cap it at 60fps?

tommorrow I will push new update with more fixes,some new stuff and hopefully osx fix
Sexan is offline   Reply With Quote
Old 06-13-2019, 04:17 PM   #685
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

I just tried to LICEcap it, but it's not working. Even not with 60 fps. I might do a mobile phone video, if you want.

But what I found out:

Yes, I am running some additional scripts in the dockers, namely:
Track Inspector, Reaticulate and LBX Smart Knobs. However, terminating them
doesn't improve it at all.

But you know, what does? Hiding all the dockers via "View: Show docker".
Could it be that the docker are interefering here?

EDIT: sending you a pm with the video. Apparently hiding the dockers doesn't help. It seems that issue is intermittend.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 06-13-2019 at 04:30 PM.
_Stevie_ is offline   Reply With Quote
Old 06-13-2019, 05:12 PM   #686
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 302
Default

Quote:
Originally Posted by _Stevie_ View Post
I just tried to LICEcap it, but it's not working. Even not with 60 fps. I might do a mobile phone video, if you want.
Maybe try on a clean portable install of reaper only with sws and JS_API?
nappies is offline   Reply With Quote
Old 06-13-2019, 05:19 PM   #687
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

What I mean is: even with LICEcap @60 fps you can't see the flickering.
But I'm trying a portable install to check if the flickering is gone there.

EDIT: the portable install has less flickering, but it's still there.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom

Last edited by _Stevie_; 06-13-2019 at 05:29 PM.
_Stevie_ is offline   Reply With Quote
Old 06-13-2019, 11:21 PM   #688
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

Try turning off tooltips in preferences and check again. I had some drawing/redrawing issues when they are on because it makes drawing hang for some reason. Script has a lot of optimiziation and checking so drawing is only happening if there are x,y changes in the project. Drawing last AS freezes all other AS. There is also room for a little improvements
Sexan is offline   Reply With Quote
Old 06-14-2019, 07:14 AM   #689
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Just tried that, didn't really help.
Well, it's a bit distracting, but not terrible. I don't want to keep
you off from the more important things in the script.
It's just something that I noticed.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 10:08 AM   #690
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

But I don't know what is causing it... thats whats bothering me... can you send me your template or something?

At my end its "perfect", I took special care of drawing at the beginning of the coding to resolve any issues so it must be something else.... script itself does not draw anything if not needed, so something else is interfering with drawing.

It also happens when reaper wants to redraw something

Last edited by Sexan; 06-14-2019 at 10:13 AM.
Sexan is offline   Reply With Quote
Old 06-14-2019, 10:56 AM   #691
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Sure, I can send it to you. Not sure, if it helps, though. But I'm happy to help to find the culprit! Here you go:
https://www.dropbox.com/s/q6vdp3h5t4...201.0.rar?dl=0
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 11:52 AM   #692
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

nop, nothing, draws normal... whats your cpu usage when drawing (should be 0-0.3%)?
Sexan is offline   Reply With Quote
Old 06-14-2019, 01:00 PM   #693
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Man, I think I just found out what it is. When the screen is covered with tracks and items (e.g. no "unused space" is visible at the bottom of the project), there are no visible redraws at all! But when you zoom out all the tracks, so that this empty area at the bottom appears, the script acts flickery.
Does that help you in some way? I can make a video if needed.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 01:41 PM   #694
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

please do!
Sexan is offline   Reply With Quote
Old 06-14-2019, 01:53 PM   #695
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Okay here you go:
https://www.dropbox.com/s/6h1wmu08mw...ering.mov?dl=0

EDIT: to mention your previous question: CPU usage was around 0.3 - 0.5 %.
So, I think everything is okay on that side.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 02:24 PM   #696
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

For the love of god I cannot reproduce that, I made like 100 tracks 1000 items...midi...wav...mp3...this....that...scroll left, right, top, bot, empty here empty there.... nothing. I even zoomed in at the point I can see reapers arrange code...

Will find out whats causing that, will take a while unfortunately.


Can you zoom step by step and see when EXACTLY that happens?

Is it when certain item hits the right side of the screen or all of them?

Can you see if you have 1 item across the whole project will then happen?

Last edited by Sexan; 06-14-2019 at 02:30 PM.
Sexan is offline   Reply With Quote
Old 06-14-2019, 02:33 PM   #697
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 302
Default

Maybe it`s problem with video gpu card? On my wife's computer, the reaper behaves sluggy for example. But Area51 is not flickering on any computer. Tried to test it like _Stevie_ now too.
nappies is offline   Reply With Quote
Old 06-14-2019, 02:36 PM   #698
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

AFAIK reaper is CPU only for rendering graphics
Sexan is offline   Reply With Quote
Old 06-14-2019, 02:37 PM   #699
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

@Sexan, will check that and report back!
It's a mystery to me, really...

@nappies: GPU, hmm, could be. It's like 3 years old:
Radeon RX460 with 2GB and 3 screens attached.

The CPU is fairly new, since my old computer broke some weeks ago.
9900X @3,5 GHz and 128GB of RAM.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 02:41 PM   #700
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

If you can reproduce it with something minimal it would be great (few tracks,only one/two types of items etc)

The problem is drawing has nothing to do whats on screen, it does not matter which tracks which items you have. Because when initial AS is created its only drawing from the coordinates from mouse and tracks. The AS info is gathered AFTER the AS is drawn and mouse is up.

What could it be is some of that tracks,items redraws something and hangs AS(51) so you see flicker.

One REALLY stupid question... can you try that on reaper Default Theme?

Anyway zones are almost ready (not hello kitty ones ) so next update will have lots of stuff
Sexan is offline   Reply With Quote
Old 06-14-2019, 03:10 PM   #701
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Quote:
Originally Posted by Sexan View Post
Can you zoom step by step and see when EXACTLY that happens?

Is it when certain item hits the right side of the screen or all of them?

Can you see if you have 1 item across the whole project will then happen?
It doesn't happen all of a sudden. The flickering is creeping in, when the unused space get's more.

Yes, it also happens with a single item across the whole project.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 03:13 PM   #702
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

hm.... is your power plan high performance?
Sexan is offline   Reply With Quote
Old 06-14-2019, 03:15 PM   #703
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Quote:
Originally Posted by Sexan View Post
If you can reproduce it with something minimal it would be great (few tracks,only one/two types of items etc)

The problem is drawing has nothing to do whats on screen, it does not matter which tracks which items you have. Because when initial AS is created its only drawing from the coordinates from mouse and tracks. The AS info is gathered AFTER the AS is drawn and mouse is up.

What could it be is some of that tracks,items redraws something and hangs AS(51) so you see flicker.

One REALLY stupid question... can you try that on reaper Default Theme?

Anyway zones are almost ready (not hello kitty ones ) so next update will have lots of stuff
Okay, will try to create a very simple scenario! But I somehow fear it has to do with my config. Does the script already work on OSX? I could cross test it on my Mac.

Just checked, It's the same with the default theme.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 03:16 PM   #704
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Quote:
Originally Posted by Sexan View Post
hm.... is your power plan high performance?
Nope, high performance. C states are deactivated in BIOS and CPU always clocks with 3.5GHz.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-14-2019, 03:33 PM   #705
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

No I did not upload yet hopefully fix for osx since I'm in the middle of coding 4 different things. Tomorrow will be live
Sexan is offline   Reply With Quote
Old 06-14-2019, 03:34 PM   #706
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

All good man. I will try the script on my other PC, as well and try to set up a minimal project that will cause/solve the issue.
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Old 06-15-2019, 01:40 PM   #707
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default



Few more bugs to fix.......add cursors....!!!!!!

Drag copy also will come with this
Sexan is offline   Reply With Quote
Old 06-15-2019, 01:48 PM   #708
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 302
Default

It'amazing Sexan!!!
nappies is offline   Reply With Quote
Old 06-15-2019, 01:55 PM   #709
SmajjL
Human being with feelings
 
Join Date: Nov 2013
Location: IKEA
Posts: 2,779
Default


__________________
_Ohh.))::_Linux_::((.Xoxo_

SmajjL is offline   Reply With Quote
Old 06-15-2019, 09:03 PM   #710
hopi
Human being with feelings
 
hopi's Avatar
 
Join Date: Oct 2008
Location: Right Hear
Posts: 15,618
Default

you're driving DEV's crazy, you know that don't you
__________________
...should be fixed for the next build... http://tinyurl.com/cr7o7yl
https://soundcloud.com/hopikiva
hopi is offline   Reply With Quote
Old 06-15-2019, 11:10 PM   #711
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

I just hope they can help me out with that issue I've reported with SetMouseModifier so I don't need to invent some weird code to do similar with extreme hacking around. That is the last thing I need to adjust so the script interacts with reaper in most pleasent way
Sexan is offline   Reply With Quote
Old 06-16-2019, 04:01 AM   #712
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 302
Default

Quote:
Originally Posted by Sexan View Post
I just hope they can help me out with that issue I've reported with SetMouseModifier so I don't need to invent some weird code to do similar with extreme hacking around. That is the last thing I need to adjust so the script interacts with reaper in most pleasent way
Sexan, I saw what you wrote in the bugreport about mouse modifiers . It can be replaced with JS_WindowMessage_Intercept.
nappies is offline   Reply With Quote
Old 06-16-2019, 04:43 AM   #713
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

I know but then it intercepts all mouse events.Did not yet figured out how to count how long the mouse is pressed while intercepted so I can release the intercept on mouse up
Sexan is offline   Reply With Quote
Old 06-17-2019, 05:40 AM   #714
nappies
Human being with feelings
 
nappies's Avatar
 
Join Date: Dec 2017
Posts: 302
Default

Sexan,
Not exactly, this JS_WindowMessage_Intercept intercepts commands in window. This does not affect on JS_Mouse_GetState. You can simply disable WM_LBUTTONDOWN when the mouse pointer is over the required part of the item(Before pressing button). Instead of switching the modifier on the fly. And in another zone, enable WM_LBUTTONDOWN.



Use this command to disable
reaper.JS_WindowMessage_Intercept(arrangewindow, "WM_LBUTTONDOWN", false)
And this to enable
reaper.JS_WindowMessage_PassThrough(arrangewindow, "WM_LBUTTONDOWN", false)
nappies is offline   Reply With Quote
Old 06-17-2019, 06:41 AM   #715
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

Oh cool! thank you very much!

Next update will be pretty big regarding new stuff:

Zones (almost finished)
Interacting with reaper via this intercept and other magical stuff
AS collision detection (prevent dragging one AS into another, or any mixing of AS)
Lots of fixes

Last edited by Sexan; 06-17-2019 at 06:50 AM.
Sexan is offline   Reply With Quote
Old 06-20-2019, 08:13 AM   #716
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default



Now its possible to copy envelope to track that does not have any.
Also improved offset code to allow copying/moving stuff below last track (before it was not possible to paste track UNDER last track).

Things took longer than expected, since it was required to modify other functions to get it working (and also fixed many many many bugs and misbehaviors), need to polish few more things and hope to release is very soon

and one so its not forgotten

Last edited by Sexan; 06-20-2019 at 08:20 AM.
Sexan is offline   Reply With Quote
Old 06-20-2019, 08:44 AM   #717
jangoux
Human being with feelings
 
Join Date: Dec 2015
Posts: 30
Default

I still havent been able to run this script. Getting this now:

Area_51_class.lua:7: unexpected symbol near '<'
jangoux is offline   Reply With Quote
Old 06-23-2019, 08:56 AM   #718
Sexan
Human being with feelings
 
Sexan's Avatar
 
Join Date: Jun 2009
Location: Croatia
Posts: 4,598
Default

Still did not find the solution, same issue even with reaper.JS_WindowMessage_Intercept.

It responds only after second mouse click, just like modifiers

Code:
local reaper_cursors =  {
                          {187,"MOVE"},  -- MOVE
                          {185,"DRAW"},  -- DRAW
                          {417,"EDGE L"},  -- LEFT EDGE
                          {418,"EDGE R"},  -- RIGHT EDGE
                          {184,"FADE L"},  -- FADE RIGHT
                          {105,"FADE R"},   -- FADE LEFT
                        }

function project_mouse_info()
    local cur_cursor = reaper.JS_Mouse_GetCursor()
    for i = 1, #reaper_cursors do
        local cursor = reaper.JS_Mouse_LoadCursor( reaper_cursors[i][1] )
        if cur_cursor == cursor then
          return reaper_cursors[i][2]
        end
    end
end

local detail = project_mouse_info()
if detail == "EDGE L" or detail == "EDGE R" then
              reaper.JS_WindowMessage_Intercept(track_window, "WM_LBUTTONDOWN", false)
            elseif not mouse.detail then
              reaper.JS_WindowMessage_PassThrough(track_window, "WM_LBUTTONDOWN", false)
            end
Anyone has some ideas?Am I doing something wrong?
Sexan is offline   Reply With Quote
Old 06-23-2019, 09:02 AM   #719
Lokasenna
Human being with feelings
 
Lokasenna's Avatar
 
Join Date: Sep 2008
Location: Calgary, AB, Canada
Posts: 6,551
Default

Quote:
Originally Posted by jangoux View Post
I still havent been able to run this script. Getting this now:

Area_51_class.lua:7: unexpected symbol near '<'
That error usually means you downloaded it as HTML (a web page) rather than a Lua script - if memory serves, Safari is particularly frustrating for doing this.
__________________
I'm no longer using Reaper or working on scripts for it. Sorry. :(
Default 5.0 Nitpicky Edition / GUI library for Lua scripts / Theory Helper / Radial Menu / Donate
Lokasenna is offline   Reply With Quote
Old 06-23-2019, 12:42 PM   #720
_Stevie_
Human being with feelings
 
_Stevie_'s Avatar
 
Join Date: Oct 2017
Location: Black Forest
Posts: 5,054
Default

Yeah, very annoying. But to be honest, it is Github that is failing miserably here. They should just provide a simple file download. Instead, I always have to download the whole archive as zip. Huge misconception in design...
__________________
My Reascripts forum thread | My Reascripts on GitHub
If you like or use my scripts, please support the Ukraine: Ukraine Crisis Relief Fund | DirectRelief | Save The Children | Razom
_Stevie_ is offline   Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 12:21 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2024, vBulletin Solutions Inc.