Go Back   Cockos Incorporated Forums > REAPER Forums > REAPER Q&A, Tips, Tricks and Howto

Reply
 
Thread Tools Display Modes
Old 01-02-2020, 05:30 AM   #1
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default how to create loop points from marker locations on the fly ?

does anyone know how to set loop points (while reaper is playing) with a single key press that would set the start of the loop as the previous marker (from the current cursor position) and the end of the loop as at the next marker and also turn repeat on so with one button press it loops that section of the song on the fly ?

i know you can just double click with the mouse between markers to set the loop area but id like to be able to do this via a single button on an OSC layout as im going to be playing along and dont want to mess around with a mouse.. im also aware SWS extensions has marker actions which can seek to the last marker and you can toggle that on/off but for a couple of reasons it's a bit messy and id rather not use that method.. id prefer to just create native reaper loop points and toggle the repeat button on the fly if i can..

anyone know if this is possible ? id also be interested to hear if anyone has any other solutions to do the same thing..
EcBaPr is offline   Reply With Quote
Old 01-02-2020, 06:38 AM   #2
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

A custom action:

Transport: Stop
Markers: Go to next marker/project end
Loop points: Set end point
Markers: Go to previous marker/project start
Loop points: Set start point
Transport: Toggle repeat
Transport: Play

With this one, you must have repeat toggled off before using it. Other option would be to remove the Toggle repeat action and handle that separately.

A bit more advanced version would be a SWS cycle action where one step would be all above and the other step just toggling the repeat. That way you could keep toggling the same cycle action and it would either play back a looped section, or toggle repeat off and continue playing forward.
xpander is offline   Reply With Quote
Old 01-02-2020, 07:46 AM   #3
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

i created that custom action but it jumps the playback cursor at the precise moment you run it.. i would like it to work while the song is playing back in realtime if possible..

I also tried what you mentioned and took the stop/playback steps out but that also doesn't work.. if the song is stopped it will set the loop area and turn repeat on but if the song is playing it doesn't want to set the loop points properly.. Also i just noticed it doesn't seem like you can actually do this in real time even using the mouse... if the song is playing and you double click between two markers it will set the loop area ok, then you can select R and all looks good however the first cycle of the loop doesn't return to the 1st marker it loops at the position where you double clicked the mouse ?? the subsequent loops return to marker 1 but not the first cycle.. so maybe this idea just wont work at all ?

Last edited by EcBaPr; 01-02-2020 at 08:29 AM.
EcBaPr is offline   Reply With Quote
Old 01-02-2020, 08:29 AM   #4
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

I played around with it some more and discovered while the timeline is playing set loop point actions are positioned at the playback cursor location not the edit cursor.. makes sense, but is there a way to change Reapers default behaviour so any edits get carried out at the edit cursor location even during playback ? I looked through options but couldn't see anything..
EcBaPr is offline   Reply With Quote
Old 01-02-2020, 10:20 AM   #5
xpander
Human being with feelings
 
xpander's Avatar
 
Join Date: Jun 2007
Location: Terra incognita
Posts: 7,670
Default

Quote:
Originally Posted by EcBaPr View Post
I also tried what you mentioned and took the stop/playback steps out but that also doesn't work..
No, remove toggle repeat, not the playback actions. And that only if you want to handle repeat toggling separately. As you noticed, the loop points can't be set correctly with this set of actions, if you don't stop and start the playback again.

But that custom action can't really work fully how you'd like. An SWS cycle action like the following example could get you closer, but even with that, the playback will seek the start of the loop immediately when you initiate it.

Command Description
40434 View: Move edit cursor to play cursor
1016 Transport: Stop
40173 Markers: Go to next marker/project end
40223 Loop points: Set end point
40172 Markers: Go to previous marker/project start
40222 Loop points: Set start point
1068 Transport: Toggle repeat
1007 Transport: Play
! ----- Step -----
40020 Time selection: Remove time selection and loop points
1068 Transport: Toggle repeat


I think you need a script to make it work exactly how you would want it.

Last edited by xpander; 01-02-2020 at 11:28 AM. Reason: tyop
xpander is offline   Reply With Quote
Old 01-02-2020, 12:50 PM   #6
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,180
Default

With the mouse and holding down control and command (on Mac) double click the space between the markers. Can't remember if you need time selection linked to loop points for this to work..

Also works for regions (clicking on the region)
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is offline   Reply With Quote
Old 01-02-2020, 06:12 PM   #7
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

thanks Xpander + Triode.. appreciate the help..

I'm on PC, holding down control-alt and double clicking with the mouse makes it loopback to the marker properly and not where the mouse was clicked.. That is good proof of concept but my goal is to do this via a single button on OSC layout and avoid using the mouse..

does anyone know if there is a way to get Reaper to follow edit cursor when making realtime edits instead of the playback cursor ?
EcBaPr is offline   Reply With Quote
Old 01-02-2020, 07:10 PM   #8
Triode
Human being with feelings
 
Triode's Avatar
 
Join Date: Jan 2012
Posts: 1,180
Default

There are scripts which move the edit cursor to time selection or loop edges without moving the play head.
Do you have reapack?
__________________
Mixing / Brush and Beater Drums Online: www.outoftheboxsounds.com
Triode is offline   Reply With Quote
Old 01-02-2020, 10:27 PM   #9
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

I can move the edit cursor no problem but setting a loop point while reaper is playing wont work on the edit cursors position it only works with the play cursor.. i'll explain what I did..

I made two markers around 8 bars apart and pressed play just before the first marker.. the timeline starts playing and when it is moving through the middle of the marker area I selected [ as the shortcut for move to previous marker.. this moved the edit cursor to previous marker and I then selected { which is shortcut for set loop start point... then I pressed ] to move edit cursor to next marker and selected } to set end loop point, then I hit R to turn repeat on... what you end up with though is a loop point which corresponds to where the play cursor was when you pressed the two shortcut keys to set the loop points {}.. it doesn't follow to the edit cursor position..

This also explains why xpanders custom script idea didn't work while timeline is playing because I think it tries to set loop start/end points at the same time location (ie: the play cursor position).. so I'm wondering how do you get reaper to follow edits in realtime using the edit cursor position and not the play cursor ? I looked through the preferences but couldn't see anything..

Using control/alt and double clicking between markers as you mentioned works so if there is a way of mimicking those same mouse actions with a script it would likely work.. I have reapack I think, i'll have a look through it later this afternoon.. if you know an existing script that might help let me know.

Last edited by EcBaPr; 01-02-2020 at 10:37 PM.
EcBaPr is offline   Reply With Quote
Old 01-05-2020, 06:15 AM   #10
udzele
Human being with feelings
 
Join Date: Dec 2016
Posts: 12
Default

There is this script in Reapack:
me2beats_Set time selection to nearest markers from cursor.lua
udzele is offline   Reply With Quote
Old 01-05-2020, 08:17 AM   #11
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

got it working.. thanks for the help all.

I downloaded the m2beats script which was a good start but I needed to turn on looping follows time selection in editing behaviour and then with the custom action had to add move edit cursor to play cursor first and then it works..

now I just gotta get it happening as a button on OSC layout which hopefully shouldn't be too hard.. i'll dive into that later.. cheers
EcBaPr is offline   Reply With Quote
Old 09-19-2020, 03:28 AM   #12
Vin Morgan
Human being with feelings
 
Join Date: Sep 2020
Posts: 5
Default

Quote:
Originally Posted by EcBaPr View Post
got it working.. thanks for the help all.

I downloaded the m2beats script which was a good start but I needed to turn on looping follows time selection in editing behaviour and then with the custom action had to add move edit cursor to play cursor first and then it works..

now I just gotta get it happening as a button on OSC layout which hopefully shouldn't be too hard.. i'll dive into that later.. cheers

Can you post a copy of your action/script that you made this work?

I'm trying to make a custom that loops the current Region and then having the additional ability to Using the Go to Region 1,2,3,4 (obey smooth seeking) via midi controller Function keys.

I found the m2beats script and i'm trying to employ it under Project Markers with !_COMMAND ID method.

Ideally I Reaper to play and move the time selection to the current Region under the play marker and then IF I toggle loop then repeat the section as necessary. Then tell it to go where I want all without touching my keyboard or mouse.
Vin Morgan is offline   Reply With Quote
Old 10-22-2020, 12:39 AM   #13
EcBaPr
Human being with feelings
 
Join Date: Aug 2009
Posts: 402
Default

sorry for slow reply..

I recall i got "proof of concept" going at the time.. all i did was make a custom action that contained

View: Move edit cursor to play cursor
Script: me2beats-Set time selection to nearest markers from cursor
Transport: toggle repeat

then made sure to set "link loop points to time selection" in preferences/editing behaviour.. pretty sure that was it
EcBaPr 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 02:42 PM.


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