|
|
|
03-17-2017, 12:36 PM
|
#1
|
Human being with feelings
Join Date: Mar 2012
Location: Asheville NC
Posts: 1,335
|
Trying to build a "create regions between markers" action
I have a long, continuous piece of music that I want to break up into tracks. I want to drop markers where I want tracks to stop and start, then automatically create regions between them. Is there an action that does this, or one I can build myself?
|
|
|
03-17-2017, 02:06 PM
|
#2
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
When u have SWS extensions installed, then you have this Action:
"SWS: Convert markers to regions"
Sufficient enough or .. ?
|
|
|
03-17-2017, 08:45 PM
|
#3
|
Human being with feelings
Join Date: Mar 2012
Location: Asheville NC
Posts: 1,335
|
Thanks, I do. Don't know how I missed that...
|
|
|
03-20-2017, 03:40 PM
|
#4
|
Human being with feelings
Join Date: Sep 2008
Posts: 2
|
Create regions from markers with name
Quote:
Originally Posted by Swamp Ape
I have a long, continuous piece of music that I want to break up into tracks. I want to drop markers where I want tracks to stop and start, then automatically create regions between them. Is there an action that does this, or one I can build myself?
|
Splitting large concert to numbered regions with song name:
1. Insert markers with song name to starting position of each song you want to render
2. If there is some unwanted material, insert markers without name to the starting position of each portion of unwanted material, typically at the end of song
3. Use script to add regions
4. Render songs using region wildcards
=====
5. Download script "Named_Markers_to_Regions.lua" into folder of your choice (..\reaper\scripts\)
6. Load script into Reaper/Actions, add keyboard shortcut of your choice (Alt-F7)
Last edited by sasa; 03-22-2017 at 03:22 AM.
Reason: New version of attached script
|
|
|
03-20-2017, 06:41 PM
|
#5
|
Human being with feelings
Join Date: May 2015
Location: Québec, Canada
Posts: 4,968
|
There's also "Insert regions at markers and vice versa in time selection" in the ReaTeam Scripts repository which keeps the initial markers, affects only the time selection and works in both directions.
|
|
|
03-22-2017, 04:00 AM
|
#6
|
Human being with feelings
Join Date: Sep 2008
Posts: 2
|
Very useful repository
Quote:
Originally Posted by cfillion
There's also "Insert regions at markers and vice versa in time selection" in the ReaTeam Scripts repository which keeps the initial markers, affects only the time selection and works in both directions.
|
Thanks for maintaining scripts in repository. Tons of useful and interesting things.
I would be happy if there was my script included. It differentiates between named and unnamed markers. Creates regions from named markers only, giving them consecutive numbering.
|
|
|
03-21-2018, 12:50 PM
|
#7
|
Human being with feelings
Join Date: Jan 2013
Posts: 1,128
|
Quote:
Originally Posted by sasa
Splitting large concert to numbered regions with song name:
1. Insert markers with song name to starting position of each song you want to render
2. If there is some unwanted material, insert markers without name to the starting position of each portion of unwanted material, typically at the end of song
3. Use script to add regions
4. Render songs using region wildcards
=====
5. Download script "Named_Markers_to_Regions.lua" into folder of your choice (..\reaper\scripts\)
6. Load script into Reaper/Actions, add keyboard shortcut of your choice (Alt-F7)
|
Hi Sasa.
I'm trying to get this very action but that would ignore "Action Markers" (Markers that starts with "!"). You know how to mod your script to do it?
|
|
|
11-19-2019, 04:59 AM
|
#8
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
Quote:
Originally Posted by cfillion
There's also "Insert regions at markers and vice versa in time selection" in the ReaTeam Scripts repository which keeps the initial markers, affects only the time selection and works in both directions.
|
Hi cfillion
Is there a simple way to mod this script so that when creating a region it only takes the first marker as a reference and ignores subsequent markers (creating one region the length of the whole time selection) ?
|
|
|
11-19-2019, 05:10 PM
|
#9
|
Human being with feelings
Join Date: Jan 2012
Posts: 1,185
|
I've done two small hacky edits that seem to have served my purpose. I often create a marker with a section's name without knowing where the end point is yet. I then find that the end point is beyond other markers. This version of the script comes in handy for me when I then want to quickly change that one marker into a region defined by the length of the time selection by a quick modified double click in the ruler. Small pleasures
I'll still use the original script on a menu no doubt
Thank you
Code:
reaper.Undo_BeginBlock()
local UNDO_STATE_MISCCFG = 8
local next_index, boundaries, last_marker = 0, {}, 0
local ts_from, ts_to = reaper.GetSet_LoopTimeRange(false, false, 0, 0, false)
while true do
-- marker = {retval, isrgn, pos, rgnend, name, markrgnindexnumber, color}
local marker = {reaper.EnumProjectMarkers3(0, next_index)}
next_index = marker[1]
if next_index == 0 then break end
if not marker[2] then -- it's not a region
if boundaries[last_marker] then
boundaries[last_marker].to = marker[3]
end
last_marker = #boundaries + 1 -- commenting this out skips up to one marker
end
boundaries[#boundaries + 1] = {isregion=marker[2], from=marker[3],
to=marker[4], name=marker[5], id=marker[6], color=marker[7]}
end
local function exists(match)
for _,boundary in ipairs(boundaries) do
if boundary ~= match and boundary.from == match.from then
return true
end
end
return false
end
for _,boundary in ipairs(boundaries) do
local withinTS = ts_to == 0 or (boundary.from == ts_from and boundary.to <= ts_to)
if boundary.to > 0 and withinTS and not exists(boundary) then
reaper.AddProjectMarker2(0, not boundary.isregion, boundary.from,
ts_to, boundary.name, boundary.id, boundary.color)
end
end
reaper.Undo_EndBlock('Insert regions at markers and vice versa in time selection', UNDO_STATE_MISCCFG)
|
|
|
10-30-2023, 05:08 AM
|
#10
|
Human being with feelings
Join Date: Mar 2021
Posts: 4
|
Regions made of specific markers
Hi there,
is there a possibility to make regions from specific markers? I’ll give you example:
I have an audio book with many markers. Some of them marks starts and ends of chpaters (M1 and M10 for example), some of them marks mistakes etc. (M2-M9 for example). I want to make region between M1 and M10 but still want to maintain M2-M9. I know I could do this with time selection but Im searching for a way how to do that in region marker manager or something like that (just easier way). I thaught to myself that answer could be somewhere in SWS extension. Could you help me?
Thank you very much
|
|
|
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 05:28 AM.
|