|
|
|
08-09-2020, 06:00 AM
|
#1
|
Human being with feelings
Join Date: Feb 2017
Location: Kiel
Posts: 974
|
region repeat
Hi
region repeat doesn't exist yet, does it?
Maybe you could build it that way
Last edited by Dragonetti; 08-09-2020 at 08:26 AM.
|
|
|
08-09-2020, 06:54 AM
|
#2
|
Human being with feelings
Join Date: May 2017
Location: Leipzig
Posts: 6,621
|
What do you mean with region-repeat. Duplication on an existing region?
|
|
|
08-09-2020, 07:51 AM
|
#3
|
Human being with feelings
Join Date: Feb 2017
Location: Kiel
Posts: 974
|
The region is repeated 8 times in the example above, currently we are repeating the 5th time
|
|
|
08-09-2020, 08:38 AM
|
#4
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,126
|
Try something like this to loop Region under cursor
Code:
function loopRegionRegionUnderPlay()
local playpos = reaper.GetPlayPositionEx(proj)
local editpos = reaper.GetCursorPositionEx(proj)
local pos = playpos
local isStopped = reaper.GetPlayStateEx(proj) == 0
if isStopped then pos = editpos end
local markeridx, regionidx = reaper.GetLastMarkerAndCurRegion(0, pos)
if regionidx then
local _, _, x, y = reaper.EnumProjectMarkers3(0,regionidx)
reaper.GetSet_LoopTimeRange(1, 1, x, y, 0)
end
local isRepeat = reaper.GetSetRepeat(-1) == 1
if not isRepeat then
reaper.GetSetRepeat(1) --Set Repeat
end
end
Using Action markers this can be automatically triggered easily.
Then using extstates you can build a counter in the function everytime it is triggered
Your "Repeat off" action should reset the extstate to zero.
Done.
Last edited by lexaproductions; 08-13-2020 at 05:53 AM.
|
|
|
08-09-2020, 01:16 PM
|
#5
|
Human being with feelings
Join Date: Feb 2017
Location: Kiel
Posts: 974
|
Thanks lexaproductions
but I don't understand.
The script doesn't do anything to me. Should it turn on the repeat function of a region?
|
|
|
08-10-2020, 04:31 AM
|
#6
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,126
|
Code:
function loopRegionUnderPlay()
local playpos = reaper.GetPlayPositionEx(0)
local editpos = reaper.GetCursorPositionEx(0)
local pos = playpos
local isStopped = reaper.GetPlayStateEx(0) == 0
if isStopped then pos = editpos end
local markeridx, regionidx = reaper.GetLastMarkerAndCurRegion(0, pos)
if regionidx then
local _, _, x, y = reaper.EnumProjectMarkers3(0,regionidx)
reaper.GetSet_LoopTimeRange(1, 1, x, y, 0)
end
local isRepeat = reaper.GetSetRepeat(-1) == 1
if not isRepeat then
reaper.GetSetRepeat(1) --Set Repeat
end
end
loopRegionUnderPlay()
Try this
It should set the loop points to the current region and Enable the repeat mode.
Last edited by lexaproductions; 08-13-2020 at 05:53 AM.
|
|
|
08-10-2020, 04:57 AM
|
#7
|
Human being with feelings
Join Date: Feb 2006
Location: decepticon mothership in a hidden place inside a mountain
Posts: 3,754
|
Quote:
Originally Posted by Meo-Ada Mespotine
What do you mean with region-repeat. Duplication on an existing region?
|
I think Dragonetti want Reaper to behave like a hardware Midi sequencer (or like Ableton Live can do in session view) :
- play your song/project
- when the playhead is at the region, repeat (loop playback) X times
- then continue regular playback
etc
@Dragonetti, I think that PLaytime should allow you to do that
https://www.helgoboss.org/projects/playtime/
By the way, your suggestion (in the original post) is very clever !
|
|
|
08-10-2020, 10:30 AM
|
#8
|
Human being with feelings
Join Date: Feb 2017
Location: Kiel
Posts: 974
|
I only recently discovered the function "region" for myself.
I think it would be very appropriate to quickly repeat a region, it doesn't bother anyone. The default would of course be 1.
|
|
|
08-10-2020, 04:52 PM
|
#9
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,126
|
I understood the request. Using a function like the one I posted, you could easily setup a counter in it with user input. And then using Action markers to trigger it.
|
|
|
08-12-2020, 09:39 PM
|
#10
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,126
|
Hey Dragonetti, here are 2 scripts I quickly made. It will answer your needs for now.
One is the actual action and the other one is the "Add Action Marker" function that will ask you how many times you want to loop your region.
For it to work, you need to do three things:
1- Add the lua actions in your list.
2- Right-Click on the LoopRegion.lua action and copy the command ID
3- Open the AddLoopRegionActionMarker.lua file in a text editor and paste your Command ID over the one that's currently there.
Then to operate the whole thing, you simply place your cursor within a region and fire the Add Action Marker action. It will ask you how many times you want.
Let me know if it works.
|
|
|
08-12-2020, 10:00 PM
|
#11
|
Human being with feelings
Join Date: Jan 2014
Posts: 923
|
You can use this:
SWS/S&M: Open/close Region Playlist window
|
|
|
08-13-2020, 04:28 AM
|
#12
|
Human being with feelings
Join Date: Feb 2017
Location: Kiel
Posts: 974
|
@lexaproduction
Thank you, The script seems to be quite suitable for live use.
but for the way I work, I find the sws region playlist clearer.
|
|
|
Thread Tools |
|
Display Modes |
Linear Mode
|
Posting Rules
|
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts
HTML code is Off
|
|
|
All times are GMT -7. The time now is 07:14 AM.
|