New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Implement "Wait for next {bar,beat}" and "Wait until end of loop" actions on macOS #1685
Conversation
0db5fe5
to
6db85e3
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6db85e3
to
daa82fc
Compare
This comment was marked as outdated.
This comment was marked as outdated.
daa82fc
to
aa56d2b
Compare
This comment was marked as outdated.
This comment was marked as outdated.
Unlikely to happen naturally, but required for reaper-oss/sws#1685
aa56d2b
to
6a1aad9
Compare
This comment was marked as outdated.
This comment was marked as outdated.
6a1aad9
to
8af6ffb
Compare
✅ Build sws 898-master completed (commit 523de2d766 by @cfillion) Windows 64-bitWindows 32-bitmacOS x86 64-bitmacOS x86 32-bitmacOS ARM 64-bitLinux x86 64-bitLinux x86 32-bitLinux ARM 64-bitLinux ARM 32-bit |
Amazing CFillion! Not too sure I understood the statement: |
That's right. |
Ok Cool thanks. Just asking as I've would've hoped to get the same precision as a "Smooth Seek" action |
A solution using the wall clock could be more precise (within limits, nothing in the main thread will ever come anywhere close to be sample-accurate or even jitter-free). Wouldn't be comparable to smooth seek. |
I have a "Seek to next tab" function which kinda works pretty good but is not as tight as Reaper's "Smooth Seeking" capacities I use this:
|
Nothing can come close to smooth seek but hacking REAPER's misc timer to fire more often might help a little bit: made one set to 60 Hz (approximately, especially on Windows) at https://forum.cockos.com/showthread.php?p=2546458. |
Excited to use this, but it doesn't appear in the action list. Am I missing something, or has it just not been included in a release, yet? |
It's part of the 2.13.2 release: https://www.sws-extension.org/download/pre-release/. |
Just tested on M1 Mac. Works as described! However: blocks other actions (spinning beach ball) until the "wait" action completes. I don't know if it's feasible, but I think an asynchronous implementation would be more useful. In a live performance/looping scenario, you'd want to fire this and then go about setting up for what's going to happen after. Right now, it just hangs. Hope that helps! |
These actions are meant to be used in custom actions. They need to be synchronous to work in that context. See https://forum.cockos.com/showthread.php?p=2089111#post2089111 and LexaProductions's snippet above for an asynchronous script solution. |
This uses a very dodgy hack to prevent deadlocks (due to
GetPlayPosition
not updating) if the wait actions are ran from within REAPER's misc timer (eg. a script's defer callback). The workaround just posts aWM_TIMER
to the main window every 30 ms. This bypasses NSTimer's reentrency check.The Windows implementation still tests the exit condition every 1 ms (vs 30 ms on macOS). However this is likely more than necessary assuming
GetPlayPosition
is also updated by the misc timer there.Fixes #971, fixes #1676.