reaper-oss / sws

The SWS extension is a collection of features that seamlessly integrate into REAPER, the Digital Audio Workstation (DAW) software by Cockos, Inc
https://www.sws-extension.org/
MIT License
448 stars 85 forks source link

Action(s): Wait until start of next beat/bar/measure for next action #176

Closed Jeff0S closed 10 years ago

Jeff0S commented 10 years ago

From thoughtp...@gmail.com on August 22, 2010 01:09:42

Currently we have actions for waiting 0.1, 0.5, 1, 5, and 10 seconds before the next action, but unfortunately these aren't really useful in any musically sense.

I would really love if there were similar actions based on musical time intervals like beats, bars, measures and the current loop length.

The closest thing we have to this in Reaper now is the 'start on bar' feature of the media explorer. These actions would allow that same functionality to be used throughout the program in combination with ALL Reapers existing actions.

This would allow (among other things):

-Much easier use of Reaper as 'live-looper' like Mobius, the Gibson Echoplex or Ableton Live.

-Quantized functions like Ableton Live's "Global Quantization", Mobius (quantized solo, mute, reverse etc).

-More flexible punch and looped recording.

-The precision of manual automation with the creativity of recording it live.

-'On-the-fly' auditioning of different arrangements (Wait until next bar, go to marker X/Seek X bars etc).

-Endless creative actions (rather than strictly time-saving/convenience ones) that will automatically adapt to any project without needing to be edited.

-All of your audio and MIDI recordings could automatically be even bar lengths (i.e. loops) which mean they can easily be auditioned in other contexts using the media explorer's 'stretch to fit' and 'start on bar' features.

Further Details:

[IID#2623] Global Synchronization / Actions Snap to a Musical Timebase... http://forum.cockos.com/showthread.php?t=59771 Newbie help with a dynamic wait time action... http://forum.cockos.com/showthread.php?t=60899 Here's a couple of examples of what you can do with this type of feature: Keller Williams Loop Jam from "Breathe" (Gibson Echoplex) http://www.youtube.com/watch#!v=dMONzLf8VvA Psudaform - Shambhala 2010 (Ableton Live) http://www.youtube.com/watch?v=EaXNUkvI-OY&feature=related Thanks for you consideration :)

Original issue: http://code.google.com/p/sws-extension/issues/detail?id=176

Jeff0S commented 10 years ago

From swstim on September 20, 2010 19:15:27

I think I can do this, but not with ultra-precision. Probably accurate within 10-50ms? Still interested?

Owner: swstim

Jeff0S commented 10 years ago

From thoughtp...@gmail.com on September 21, 2010 15:45:34

Absolutely! That would be great. I think that level of precision would still be quite useful. :)

Jeff0S commented 10 years ago

From swstim on September 22, 2010 19:32:17

Added in v1.8.0 #2, r201 "SWS: Wait for next bar (if playing)" "SWS: Wait for next beat (if playing)"

OK, I did the best I could, which isn't really superb, but I think it should help you!

Note: The UI stops updating during the wait period. Because of this waiting until the end of a full loop (which could be a really long time) would be too painful IMO so I left it out.

Status: Fixed

Jeff0S commented 10 years ago

From swstim on September 22, 2010 19:58:27

Whoop, just saw this long thread http://forum.cockos.com/showthread.php?t=60899 ... and it has some good ideas. I will play some more and should be able to get the wait until end of loop actions.

(Also looks like there's a DLL posted by PitchSlap in the other thread. I wish I would have found this earlier, haha)

Jeff0S commented 10 years ago

From thoughtp...@gmail.com on September 22, 2010 21:17:59

I am PitchSlap. Sorry I didn't make my existing code and .DLL more obvious in the initial feature request. That was my first time trying to do anything like this, so I'm not very confident in the result. Even if your version ends up with the same precision I would feel more confident using the actions as part of the SWS package than my own hack job.

Considering how difficult sample accurate timing for actions appears, hopefully Cockos could add it to the API in the future...

Also, one idea I had when brainstorming on the accuracy problem was that maybe using Marker Actions could help. I haven't dived into them yet, but I assume they are precise because they don't require sleeping the main thread.

What if instead of waiting, the action placed a custom action marker on the start of the next beat, bar or measure? This might mean separate custom actions for each function (record/mute/solo etc at start of next beat/bar/measure), but for things that require precise timing it might be a workable solution.

Attachment: Dynamic Wait.cpp

Jeff0S commented 10 years ago

From swstim on September 22, 2010 21:40:32

Hey PitchSlap, great to have you here. No worries, I just didn't read the OP carefully enough before I started coding.

Actually the wait actions will be slightly more precise than the marker actions. The marker actions run on the control surface thread which is good to ~35ms, the wait loop is <~15ms (educated guess, I haven't measured.) It's probably possible to extract some more precision, but probably not enough to make it worthwhile.

More later, Tim