|
|
|
04-09-2014, 03:56 PM
|
#1
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Convert loops to real copies
Possible?
|
|
|
04-09-2014, 07:44 PM
|
#2
|
Human being with feelings
Join Date: Dec 2012
Posts: 7,295
|
Yes?
Wait, what's the question?
|
|
|
04-09-2014, 07:50 PM
|
#3
|
Human being with feelings
Join Date: Mar 2007
Location: I'm in a barn
Posts: 4,467
|
loops of what?
audio?
midi?
froot?
*burp. I ate teh froot loops
Last edited by James HE; 04-11-2014 at 07:18 AM.
|
|
|
04-09-2014, 09:37 PM
|
#4
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Exuse me for such a short question. I mean when you loop an item, is it possible to convert all loop segments to individual items, the same as in Logic Pro for example.
|
|
|
04-09-2014, 10:11 PM
|
#5
|
Human being with feelings
Join Date: Jul 2009
Location: Ljubljana, Slovenia
Posts: 3,801
|
Create a new item out of the looped item? Glue it to itself.
Edit: Ah you probably mean create instances of each loop
into individual items. Not sure, maybe with a certain sws
action, don't think it's possible natively.
e
|
|
|
04-10-2014, 01:13 AM
|
#6
|
Human being with feelings
Join Date: Sep 2007
Location: The Reflection Free Zone
Posts: 3,026
|
glue is the correct answer
|
|
|
04-10-2014, 03:21 AM
|
#7
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
Glue creates one long item instead of individual items for each iteration. What's needed is more like "split item at take loop positions and probably also "Glue to individual items". Both are not available yet.
It's not possible with onboard tools. Maybe because different takes can have individual loop length, there is no "move cursor to next/previous take loop position" like action you could use to then split the item or whatever you wish to do there. Would be a useful action. I don't think SWS has it either.
Good candidate for a ReaScript, the function as a whole. I can already find the loop positions of the active take with audio sources, but with MIDI it turns out to be not as reliable (MIDI source lengths are rounded to MIDI ticks) and I wouldn't know what to do if you wanted pooled copies as a result (like Logic's "Convert loops to aliases").
|
|
|
04-10-2014, 04:03 AM
|
#8
|
Human being with feelings
Join Date: May 2012
Posts: 1,216
|
I found a way to do it. Not very elegant, though.
The first macro is needed to get the time selection of a single loop iteration.
The second one moves the time selection right by it's length and splits the item.
If you assign a shortcut to it and keep it pressed, this macro can be pretty fast.
Edit:
After splitting you can run the action 'render as new take' if you want.
(Seems to work only for audio items.)
Edit 2:
If you remove 'loop item source' from the first macro, it should also work for midi items.
Last edited by witti; 04-10-2014 at 04:14 AM.
|
|
|
04-10-2014, 05:13 AM
|
#9
|
Human being with feelings
Join Date: Sep 2013
Location: Oxfordshire, UK
Posts: 60
|
Quote:
Originally Posted by Viente
I mean when you loop an item, is it possible to convert
|
Cut away the repeats, (so the loop is just the first item) then copy it (Ctrl+C in Windows), then just click paste as many times as you want (Ctrl+V)... does that do what you want?
|
|
|
04-10-2014, 05:41 AM
|
#10
|
Human being with feelings
Join Date: May 2012
Posts: 1,216
|
Copy and paste (or duplicate item) also pastes/duplicates the track envelope points, if there are any. (unless you've un-ticked: move envelope points with items). It's also not the easiest task to select the exact area of the portion you want to cut away because the edit cursor or time selection is not snapping to a take loop position. That's why i've created the macros this way.
(Is there a way to get the number of loop iterations with reascript, or better eel ?)
Last edited by witti; 04-10-2014 at 03:00 PM.
|
|
|
04-10-2014, 09:13 AM
|
#11
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Thanks! I'll try to improve your custom action with EEL script as soon as i figure out new syntax (i was used Python before)
|
|
|
04-10-2014, 03:39 PM
|
#12
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
There seems to be a problem with "Set item length to source media length" when the first loop iteration is not complete (if the left item edge is not on the take section loop border). The action crops the item to the partial loop iteration. I don't think that's intended. I didn't try Witti's macro, but think it breaks under this circumstance.
Turned out I needed to find a way around several cliffs in the script. EG, MIDI sources behave different from audio when the take has a playrate other than 1, and for both weird values can occur for "Start in source" which the script depends upon. But I think this version is working - apart from a glitch with undo. For some reason I never seem to get undo right ... This script for some reason creates two undo points in the history.
Please test if interested or take as a source for your own ideas: (edit: damn it fails with MIDI when tempo changes are in the way. yuck.)
Code:
#---convert looped takes into individual items for each iteration---
cursorPos = RPR_GetCursorPositionEx(0)
RPR_PreventUIRefresh(1)
selCountA = RPR_CountSelectedMediaItems(0)
selList = []
k = 0
RPR_Undo_BeginBlock2(0)
while k < selCountA:
it = RPR_GetSelectedMediaItem(0, k)
selList.append(it)
k += 1
itemList = selList
RPR_Main_OnCommand(40289, 0) # unselect all
for i in range(selCountA):
RPR_SetMediaItemSelected(selList[i], 1)
selCount = RPR_CountSelectedMediaItems(0)
item = RPR_GetSelectedMediaItem(0,0)
take = RPR_GetActiveTake(item)
src = RPR_GetMediaItemTake_Source(take)
rate = RPR_GetMediaItemTakeInfo_Value(take, "D_PLAYRATE")
StartOffs = RPR_GetMediaItemTakeInfo_Value(take, "D_STARTOFFS")
ItemStart = RPR_GetMediaItemInfo_Value(item, "D_POSITION")
retval, src, offsOut, lenOut, revOut = RPR_PCM_Source_GetSectionInfo(src, 0, 0, 0)
(src, type, bufsize) = RPR_GetMediaSourceType(src, "", 5)
if type == "MIDI":
loopLen = lenOut
else:
loopLen = lenOut/rate
Pos = (ItemStart + loopLen - (StartOffs/rate))
RPR_SetEditCurPos2(0, Pos, 0, 0)
RPR_Main_OnCommand(40757, 0) #split at cursor, no selection change
RPR_SetMediaItemSelected(item, 0)
selCount = RPR_CountSelectedMediaItems(0)
while selCount > 0:
item = RPR_GetSelectedMediaItem(0,0)
itemList.append(item)
Pos = Pos + loopLen
RPR_SetEditCurPos2(0, Pos, 0, 0)
RPR_Main_OnCommand(40757, 0) #split at cursor, no selection change
RPR_SetMediaItemSelected(item, 0)
selCount = RPR_CountSelectedMediaItems(0)
#---reselect involved items---:
for i in range(len(itemList)):
RPR_SetMediaItemSelected(itemList[i], 1)
RPR_SetEditCurPos2(0, cursorPos, 0, 0)
RPR_PreventUIRefresh(-1)
RPR_Undo_EndBlock2(0, "Convert take loops to items",-1)
It just splits into individual items for each iteration of the active take. No glue (glue would have printed take FX, killed other takes, reset rate etc... I think I wouldn't want that with this function). You can do multiple items in one go, btw. At the end of the script all involved items are (re)selected. Not sure about that, but it seemed better than leaving the user with no item selection.
EDIT: shit! I didn't test the script against tempo changes. Of course MIDI item fails. Horrible can of worms now open . Not sure if and how that can be accounted for.
Last edited by gofer; 04-10-2014 at 05:23 PM.
|
|
|
04-10-2014, 04:02 PM
|
#13
|
Human being with feelings
Join Date: May 2012
Posts: 1,216
|
Quote:
Originally Posted by gofer
There seems to be a problem with "Set item length to source media length" when the first loop iteration is not complete (if the left item edge is not on the take section loop border). The action crops the item to the partial loop iteration. I don't think that's intended. I didn't try Witti's macro, but think it breaks under this circumstance.
|
I think so, too. These macros assume that every 'loop' has the same length.
(Didn't think about that, because most of the time i change the length of an item and then i loop it. -using 'loop section of media items'.)
|
|
|
04-10-2014, 05:35 PM
|
#14
|
Human being with feelings
Join Date: Dec 2010
Posts: 3,826
|
I just have a button for duplicate item and never loop and more, works out fine for me.
__________________
Stop posting huge images, smaller images or thumbnail, it's not rocket science!
|
|
|
04-10-2014, 06:34 PM
|
#15
|
Human being with feelings
Join Date: Dec 2009
Location: Oblivion
Posts: 10,272
|
Quote:
Originally Posted by Viente
Thanks! I'll try to improve your custom action with EEL script as soon as i figure out new syntax (i was used Python before)
|
i've been thinking of learning python, is eel better? i only have basic programming knowledge and would like to use it beyond reaper if i'm going to learn...
|
|
|
04-10-2014, 11:21 PM
|
#16
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Thanks gofer! Your script does exactly what i need!
2 PooFox:
EEL is embeded in REAPER by default, so no need to install anything which means its 100% portable, and it seems its also faster than Python. The syntax is like JS.
|
|
|
04-10-2014, 11:31 PM
|
#17
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by gofer
For some reason I never seem to get undo right ...
|
Could you please open a bug issue in the tracker? I can't find such a thing here. But its obvious that something wrong with undo in the reascript world...
Quote:
Originally Posted by gofer
EDIT: shit! I didn't test the script against tempo changes. Of course MIDI item fails. Horrible can of worms now open . Not sure if and how that can be accounted for.
|
Could you please "protect" the script from being run if there any tempo changes on the way? Probably with dialog window telling there are tempo changes detected. Or at least just warning? Thanks!
|
|
|
04-11-2014, 02:58 AM
|
#18
|
-blänk-
Join Date: Jun 2008
Posts: 11,359
|
Keep finding more worms: items with stretch markers and MIDI which "ignores project tempo use n bpm instead" break my script as well .
Throw it in the trash bin, there must be a better approach.
|
|
|
04-11-2014, 06:17 AM
|
#19
|
Human being with feelings
Join Date: Feb 2012
Posts: 1,972
|
Quote:
Originally Posted by gofer
Throw it in the trash bin, there must be a better approach.
|
Nah, its still useful for me! Thanks!
|
|
|
06-25-2014, 10:20 PM
|
#20
|
Human being with feelings
Join Date: Nov 2012
Location: Long Island
Posts: 20
|
I was googling this to see if it existed. I miss this from my days starting out in Logic 8 on a Mac. Would be really cool if this could happen in REAPER.
__________________
Michael J Perrotta
Private Guitar and Bass Instruction | Recording Mixing Performance Composition
www.michaeljperrotta.com
|
|
|
07-01-2014, 12:29 AM
|
#21
|
Human being with feelings
Join Date: Jul 2012
Location: Netherlands
Posts: 5,247
|
Is this plugin also 64 bit for pc ?
|
|
|
02-23-2018, 07:03 AM
|
#22
|
Human being with feelings
Join Date: Oct 2017
Posts: 4
|
Any news on this?
Thanks
|
|
|
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 11:18 AM.
|