Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Feature Requests

Reply
 
Thread Tools Display Modes
Old 02-11-2020, 02:44 PM   #41
puddi
Human being with feelings
 
puddi's Avatar
 
Join Date: Jun 2018
Posts: 375
Default

60 Hz would be very nice indeed.

Something I've noticed in the latest pre-releases (can't speak for the stable versions) is that the play cursor in the Arranger view moves much smoother than the cursor in the MIDI Editor. It's pretty clear if you zoom in a bit and let it play.
__________________
☐ Area Selection
puddi is offline   Reply With Quote
Old 02-15-2020, 03:28 PM   #42
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

Quote:
Originally Posted by puddi View Post
60 Hz would be very nice indeed.

Something I've noticed in the latest pre-releases (can't speak for the stable versions) is that the play cursor in the Arranger view moves much smoother than the cursor in the MIDI Editor. It's pretty clear if you zoom in a bit and let it play.
Yeah, they have overhauled a lot in Reaper's UI-behavior on pre-6-versions of Reaper, with the smoother updating of the playcursor being one of them, if I remember correctly.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 09-05-2020, 07:44 PM   #43
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

Bumparoooyoohoo
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-07-2020, 11:24 AM   #44
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

Ok, after some tests by CFillion and me in this thread:
https://forum.cockos.com/showthread.php?t=216679

it seems like my suggestion would not necessarily help boosting scripts.
Currently Reaper seems to update states(like GetPlayPosition) of its functions 30 times per second, which means, before a next GUI-update/all-defer-scripts-run-cycle.
My idea would work only, if it would be updated before every script/defer-cycle is run, to benefit from being scheduled more often within such a GUI-update/all-defer-scripts-run-cycle but I'm not sure, if this would eat up too many ressources.

Looks like 60 fps refresh-rate would need a bigger overhaul on the devs-side, so I wouldn't expect that from coming any time soon...
(not mentioning the gui-redraw itself, which I don't know much about)
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 10-07-2020, 01:53 PM   #45
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,619
Default

Even without comprehensive support from state APIs, there's value from a GUI responsiveness perspective. But, yeah, full benefit would come from broader internal support.
tack is offline   Reply With Quote
Old 10-07-2020, 02:47 PM   #46
Meo-Ada Mespotine
Human being with feelings
 
Meo-Ada Mespotine's Avatar
 
Join Date: May 2017
Location: Leipzig
Posts: 6,630
Default

Gui-refresh itself seems to be tied to the same mechanism. It seems like the current refresh-timer is a core thing in Reaper, so changing it could lead to all things falling apart, at least gui and extension related.

If the devs manage to tackle this one without breaking anything, they'll grow even further to godlike-status.
__________________
Use you/she/her.Ultraschall-Api Lua Api4Reaper - Donate, if you wish

On vacation for the time being...
Meo-Ada Mespotine is offline   Reply With Quote
Old 12-31-2020, 11:27 PM   #47
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
Default

+1
daniellumertz is online now   Reply With Quote
Old 09-13-2021, 02:54 PM   #48
kartalex
Human being with feelings
 
Join Date: Dec 2015
Posts: 172
Default

+1
kartalex is offline   Reply With Quote
Old 03-27-2022, 10:10 AM   #49
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,336
Default

Still not possible to change refresh rate?
vitalker is offline   Reply With Quote
Old 03-27-2022, 01:11 PM   #50
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
Default

Only JSFX can.

Justin, I think, said they might do it sometime so hopes is up, this would be FANTASTIC
daniellumertz is online now   Reply With Quote
Old 03-27-2022, 01:31 PM   #51
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,336
Default

Quote:
Originally Posted by daniellumertz View Post
Only JSFX can.

Justin, I think, said they might do it sometime so hopes is up, this would be FANTASTIC
So sad... Actually I'd like to be able to decrease refresh rate.
vitalker is offline   Reply With Quote
Old 03-28-2022, 05:49 AM   #52
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

decrease is possible in gfx, you just need to call gx.update only if necessary, or you can call only after a certain time interval by registering ime in each defer loop
X-Raym is offline   Reply With Quote
Old 03-28-2022, 06:23 AM   #53
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,336
Default

Quote:
Originally Posted by X-Raym View Post
decrease is possible in gfx, you just need to call gx.update only if necessary, or you can call only after a certain time interval by registering ime in each defer loop
The problem is I've removed gfx.update and it is updated using other functions like gfx.rect, gfx.set, gfx.setfont, gfx.drawstr. I've tried reducing a number of calls by
PHP Code:
if math.ceil(reaper.time_precise()*10)/10 0.5 == 0 then 
, but in this case buttons (the GUI has buttons) aren't highlighted neither they don't react to mouse clicks. Maybe I'll try again updating GUI only when the mouse is moved, but previously some things didn't work, so I need more conditions.
Hm, so you are suggesting use for example reaper.time_precise(), write its value to a new variable and when the difference between reaper.time_precise() and this new variable is bigger than X, update the GUI? Pretty nice idea, thanks! I already use something like this for showing tooltips.
vitalker is offline   Reply With Quote
Old 03-28-2022, 12:25 PM   #54
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

@vitalker
indeed to take care of hover for button can require some adjustement about what to put in the functions called at slower speed.
Most if my script doesnt have this 'slow' mode, as reper is efficient enough to redraw GUI at normal speed even with complex functions in most cases

But are you sure ReaImgui wouldnt be better in your case ?
X-Raym is offline   Reply With Quote
Old 03-28-2022, 12:34 PM   #55
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,336
Default

Quote:
Originally Posted by X-Raym View Post
@vitalker
indeed to take care of hover for button can require some adjustement about what to put in the functions called at slower speed.
Most if my script doesnt have this 'slow' mode, as reper is efficient enough to redraw GUI at normal speed even with complex functions in most cases

But are you sure ReaImgui wouldnt be better in your case ?
The issue here is the GUI costs me almost 14% of CPU, that's why I want to improve it. Reaper is redrawing everything very fast, that's the problem.
It would be too much of unwanted learning and a new dependency, which I want to avoid. Currently I am using heavy-modified GUI from daniellumertz, which is a fork of eugen2777's (R.I.P.) GUI.
https://forum.cockos.com/showpost.ph...&postcount=101
vitalker is offline   Reply With Quote
Old 03-28-2022, 04:13 PM   #56
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
Default

Quote:
Originally Posted by vitalker View Post
The issue here is the GUI costs me almost 14% of CPU, that's why I want to improve it. Reaper is redrawing everything very fast, that's the problem.
It would be too much of unwanted learning and a new dependency, which I want to avoid. Currently I am using heavy-modified GUI from daniellumertz, which is a fork of eugen2777's (R.I.P.) GUI.
https://forum.cockos.com/showpost.ph...&postcount=101
GFX GUI are much slower than IMGUI, if your concern is resource you should change to imgui. My demo script with just some sliders buttons and layers increase CPU usage in like 2% here. The ImGUI demo with all tabs open here dont take 1%, I dont know if they actually use GPU.

That being said. I wonder what are you doing to make a GUI that consumes 14%. How much CPU increase you notice in my demo? Aren't you calling some demanding function ? I find very hard that that is the GUI increasing that much CPU, unless you made a MEGA-ULTRA GUI.

Also if you concern is time learning a framework I think you should go to IMGUI seriously you can learn in one day or two the basics things and start using it. Much more easier than that fork.

About the dependency, well, I would say that most people will have it soon. And people that install scripts normally don't mind installing an extension.

That being said I really like the aesthetic of eugen library, so cool ! I would use it sometime just for that looking hahaha.
daniellumertz is online now   Reply With Quote
Old 03-28-2022, 05:02 PM   #57
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

@vitalker
Maybe you have a bottleneck somewhere


On my own fork of Eugen script I use in my premium scripts, bottleneck was font resizing. When I figured it out it was about 15 times more quick :P


Anyway here we are definitely starting to do offtopic, cause this is just code optimization, not a missing thing,
Maybe open a thread with your script, let other inspect your code etc
X-Raym is offline   Reply With Quote
Old 03-29-2022, 12:35 AM   #58
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,336
Default

Quote:
Originally Posted by daniellumertz View Post
GFX GUI are much slower than IMGUI, if your concern is resource you should change to imgui. My demo script with just some sliders buttons and layers increase CPU usage in like 2% here. The ImGUI demo with all tabs open here dont take 1%, I dont know if they actually use GPU.

That being said. I wonder what are you doing to make a GUI that consumes 14%. How much CPU increase you notice in my demo? Aren't you calling some demanding function ? I find very hard that that is the GUI increasing that much CPU, unless you made a MEGA-ULTRA GUI.

Also if you concern is time learning a framework I think you should go to IMGUI seriously you can learn in one day or two the basics things and start using it. Much more easier than that fork.

About the dependency, well, I would say that most people will have it soon. And people that install scripts normally don't mind installing an extension.

That being said I really like the aesthetic of eugen library, so cool ! I would use it sometime just for that looking hahaha.
Interesting, didn't know. Well maybe it depends on CPU. I don't know dedicated GPU, so that's probably the reason.

I do nothing . It has some buttons and a few droplists, but here is an interesting thing: when I allow it to update only every 0.1 seconds, the usage decreases to 5%.

Okay, thanks. Then I'll try imGUI. I hope I'll remake it really fast, because the script took so much time.

Maybe you're right about installing the extension.

Yeah, it looks pretty good, but I don't use a lot of different elements, so imGUI should cover all my needs. Thanks again!
vitalker is offline   Reply With Quote
Old 03-29-2022, 12:46 AM   #59
vitalker
Human being with feelings
 
vitalker's Avatar
 
Join Date: Dec 2012
Posts: 13,336
Default

Quote:
Originally Posted by X-Raym View Post
@vitalker
Maybe you have a bottleneck somewhere


On my own fork of Eugen script I use in my premium scripts, bottleneck was font resizing. When I figured it out it was about 15 times more quick :P


Anyway here we are definitely starting to do offtopic, cause this is just code optimization, not a missing thing,
Maybe open a thread with your script, let other inspect your code etc
Could be fonts, yeah. I don't know how to disable it, so maybe imGUI would be a better solution anyway.

Offtopic, but setting refresh rate would be still very cool.
vitalker is offline   Reply With Quote
Old 03-29-2022, 05:12 AM   #60
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,619
Default

I'm interested in this for REAPER Toolkit (another GUI for Lua) as it supports animations, the most utilitarian of which is smooth scroll, and that would definitely benefit from a faster refresh. I'd just dial back the GUI update rate when not animating to conserve CPU.
tack is offline   Reply With Quote
Old 04-10-2022, 04:19 PM   #61
cfillion
Human being with feelings
 
cfillion's Avatar
 
Join Date: May 2015
Location: Québec, Canada
Posts: 4,970
Default

Made a quick proof of concept:
https://gist.github.com/cfillion/d4d...9a97edadf4bff9
some binaries at https://cfillion.ca/files/reaper/60fps/

This changes the rate of REAPER's "misc" timer to 60 Hz. That timer is responsible for many many internal things, running deferred scripts and extension timer callbacks being only two of them. Some things may break as a side effect, so no guarantees! Also it's still a low-priority Win32 timer so the firing rate remains approximate.

EDIT: Added a high-resolution mode that replaces the Win32 timer with a multimedia timer (reaper_60fps_hires.dll). (This is way overkill, but it'll reach that 60FPS no matter what!)

Last edited by cfillion; 04-11-2022 at 10:11 AM.
cfillion is offline   Reply With Quote
Old 04-10-2022, 05:02 PM   #62
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
Default

hey cf thanks for making this extension test drive!

I notice (looking in imgui FPS) with your dll and the fps caps at 40FPS.
And with 1000/120 in the .cpp it caps at 60

Also notice something strange concerning monitors and FPS looking via IMGUI. When maind Dear Imgui Demo is in the same window than the Metric/Debugger the FPS decreases


(not bug reports just want to leave observation for further investigation)


EDIT:
More investigation

A fps counter script

Code:
function print(...) 
    local t = {}
    for i, v in ipairs( { ... } ) do
      t[i] = tostring( v )
    end
    reaper.ShowConsoleMsg( table.concat( t, "\n" ) .. "\n" )
end


start = reaper.time_precise()
fps = 1

function loop()
  local now = reaper.time_precise()
  if now - start >= 1 then
    print('FPS IS '..fps)
    fps = 1
    start = reaper.time_precise()
  end

  fps = fps + 1  
  reaper.defer(loop)
end

loop()
it seems it is the Metric window that makes the fps go lower, so test is better done with separate scripts (?)


Last edited by daniellumertz; 04-10-2022 at 05:14 PM.
daniellumertz is online now   Reply With Quote
Old 04-11-2022, 01:14 PM   #63
X-Raym
Human being with feelings
 
X-Raym's Avatar
 
Join Date: Apr 2013
Location: France
Posts: 9,902
Default

@cfillion
The hi rez just freeze reaper somehow for me (make it extra extra slow) the other version I didn't noticed diff on my reateab hero script :S

Thanks for experimenting
X-Raym is offline   Reply With Quote
Old 04-11-2022, 01:28 PM   #64
tack
Human being with feelings
 
tack's Avatar
 
Join Date: Jan 2014
Location: Ontario, Canada
Posts: 1,619
Default

Cool PoC, Christian. Scrolling viewports in rtk is appreciably smoother. The smoother refresh rate exacerbates the GUI refresh slowness when the MIDI editor is open -- this is a long standing REAPERism, but it's much more noticeable when normal operation happens at 60fps
tack is offline   Reply With Quote
Old 07-02-2022, 08:49 PM   #65
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
Default

sad bumping =)
daniellumertz is online now   Reply With Quote
Old 02-18-2023, 04:51 AM   #66
bFooz
Human being with feelings
 
Join Date: Jul 2010
Location: Slovakia
Posts: 2,588
Default

Bump.
bFooz is offline   Reply With Quote
Old 03-06-2023, 04:03 PM   #67
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
Default

more options of defer would be really great for script running live ! (some would really appreciate more than 60fps if feasible )
daniellumertz is online now   Reply With Quote
Old 11-19-2023, 12:25 AM   #68
kartalex
Human being with feelings
 
Join Date: Dec 2015
Posts: 172
Default

+1 for 60fps option.
kartalex is offline   Reply With Quote
Old 02-08-2024, 08:10 PM   #69
daniellumertz
Human being with feelings
 
daniellumertz's Avatar
 
Join Date: Dec 2017
Location: Brazil
Posts: 2,011
Default

umpalumpa bumpalumpa
daniellumertz is online now   Reply With Quote
Old 04-09-2024, 11:07 PM   #70
Hipox
Human being with feelings
 
Join Date: Apr 2022
Posts: 204
Default

+1 60 or more fps, please
Hipox 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 05:17 PM.


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