tenacity-legacy icon indicating copy to clipboard operation
tenacity-legacy copied to clipboard

Use monitor refresh rate for play head/track moving

Open n0toose opened this issue 3 years ago • 11 comments

See https://github.com/audacity/audacity/issues/1278

n0toose avatar Jul 18 '21 12:07 n0toose

Wow, that is janky. We should fix this. Does anyone have a 144 Hertz monitor on the dev team? I don't.

emabrey avatar Jul 19 '21 09:07 emabrey

Wow, that is janky. We should fix this. Does anyone have a 144 Hertz monitor on the dev team? I don't.

I've got one but I'm only a user.

HeyBanditoz avatar Jul 20 '21 16:07 HeyBanditoz

Wow, that is janky. We should fix this. Does anyone have a 144 Hertz monitor on the dev team? I don't.

I have a 144 Hz monitor and can help debugging this

fugidev avatar Jul 26 '21 14:07 fugidev

I would really love to see this feature added finally, it's one of my biggest annoyances with this program. Not sure if anyone's working on this yet but the constant that affects this right now is here (it's hardcoded to 20hz currently): https://github.com/tenacityteam/tenacity/blob/eb774a449c6fec354c06d8fcc33ca8007664e8e8/src/TrackPanel.h#L55 That constant controls the period of EVT_TRACK_PANEL_TIMER, which determines how often the position is updated in ProjectWindow::PlaybackScroller::OnTimer here: https://github.com/tenacityteam/tenacity/blob/44968d3ac316e4a4fd465cb02976fc51699b44fc/src/ProjectWindow.cpp#L1675 ...which is accessed here: https://github.com/tenacityteam/tenacity/blob/e9c575cbc1ea338667c8e5d8568ed384c6ee8e48/src/tracks/ui/PlayIndicatorOverlay.cpp#L163 I've been using a build with it set to 6ms and it does make the play head much smoother; it's been pretty nice. I'm not sure what else that timer controls, there might be performance concerns? (I think the mRecentStreamTime write could be separated into another timer or whatever if needed?)

Also, other than just changing the number depending on the refresh rate, I think it would be extra nice if there was an option to have it update every n frames instead of on a timer, since even if you try to match the timer to your refresh rate, it's still off by a frame or two sometimes so it ends up a bit stuttery.

I might start working on a PR for this soon if nobody else is interested, but I currently have no experience with wx or Tenacity/Audacity's code in general so it might take a bit.

PieKing1215 avatar Oct 05 '21 05:10 PieKing1215

performance concerns

Yeah, bumping it up a bit like we did in src/Meter.cpp is desired, but it gets a bit trickier if the user can't optimize it back "to normal" in the event where this actually makes performance worse on their computer. Our approach here is "be modern-er, but reluctantly without affecting the core experience too much". I guess we could confidently say that the Audacity folks did that for a reason.

n0toose avatar Oct 05 '21 06:10 n0toose

On the other hand, it's probably safe to assume that a person who supposedly uses a 144 hz monitor probably has the resources to run the Track Panel in 144 fps.

n0toose avatar Oct 05 '21 06:10 n0toose

P.S. Toning that number down to 5-6 results in recording not working over here.

Playback is super smooth.

n0toose avatar Oct 05 '21 06:10 n0toose

Bump! Please add this! I really want to work in Audacity, but these things are making me not have fun working in it, although it's a good program. I guess I'm just spoilt :/

DasGandlaf avatar Jan 15 '22 18:01 DasGandlaf

I previously tried to work on this, but the deal is that the playback looks super smooth, but recording completely breaks for some reason.

n0toose avatar Jan 25 '22 13:01 n0toose

Perhaps it will work if kTimerInterval is changed the same way in TimerRecordDialog.cpp as well?

https://github.com/tenacityteam/tenacity/blob/44968d3ac316e4a4fd465cb02976fc51699b44fc/src/TimerRecordDialog.cpp#L87

Found via https://github.com/tenacityteam/tenacity/search?q=kTimerInterval

Ideally this would be configurable. There might be impact for low tech users see https://forum.audacityteam.org/viewtopic.php?f=46&t=124660

qubodup avatar Apr 03 '22 01:04 qubodup

Bump, please fix this. Audacity is unusable for many users with a modern monitor.

bobibisponge avatar May 23 '22 09:05 bobibisponge