Useful Macro: Duplicate Selected Bars

UPDATE: The (almost solution) is below. I changed the title because I very much have wanted there to be a -simple- way to find useful macros that others have created. I hope others will share their work and post here in a similar format so everyone can benefit.

I admit I may be missing something obvious but…

I occasionally want to copy all tracks between bars x and y and then duplicate them. Think: a verse in a song.

Even after all these years it’s always a fraught process for me. I keep thinking there must be a goof proof way to simply a) select start bar b) select end bar and then TADA! that number of bars is copied and then pasted to the right, pushing the previous end bar also to the right (so it doesn’t get pasted over).

I -thought- there might be commands like “Select All Between Cycle Markers”. Or… I -thought- at one time that merely clicking on a Cycle Marker auto-magically selected all events within the Cycle Marker, but that doesn’t seem to work for me. OR I thought there was some command to “Create Range Using Current Cycle Marker” but I can’t find anything like that either.

Yes, I know about the Arranger, but I don’t want to have to use it just for this. I simply want an easy way to basically duplicate a whole section of a song the way one can hit Ctrl-K and duplicate events.

So… any helpful tips on doing this?

TIA! Merry Christmas!

—JC

Hi,

Set the Left and Right Locators to the part, you want to copy. Use Range selection tool. From the Edit menu, choose Select in Loop. Copy.

Put the play head cursor where you want to paste. Select the very 1st track. Paste. Done.

Isn’t the Edit/Range/Global copy, and Edit/Range/Paste Time meant to do exactly that?

So far, the correct answer seems to be a combination of the two previous answers:

  1. Set the Left and Right Locators to the part, you want to copy.

  2. Switch to Range selection tool.

  3. From the Edit menu, choose Select in Loop.

  4. Edit/Range/Global Copy.

  5. Put the play head cursor where you want to paste.

  6. Select the very 1st track.

  7. Edit/Range/Paste Time.

Seems to work! I have to say it feels like kind of a Rube Goldberg to me–which may be why I can never remember it. :smiley:

I wish I could automate it down so that

  1. Select L/R locators

  2. Press a key command and… PRESTO! the content between the Locators is duplicated at the Right Locator with the previous content moved over to the right.

I guess I’d need is a ‘Move Cursor to Right Locator’ key command -and- a ‘Go To First Track’ key command. I’ll go look later.

Thanks!

—JC

Global copy should work without the need to use range tool.
So you can skip 2,3 and 6.

At least it did when I tried.

Yep.

HOWEVER, as I said, I’d like to make this into a Macro… I found the Key Command for ‘Locate Selection End’. And unless I use 2 and 3, this doesn’t work. IOW: the ‘Selection End’ is based on the -Range-. So I’m about to try creating a Macro for this:

  1. Set the Left and Right Locators to the part, you want to copy.

  2. TRIAL MACRO

  3. Switch to Range tool.

  4. From the Edit menu, choose Select in Loop.

  5. Edit/Range/Global Copy.

  6. Locate To Selection End

  7. Edit/Range/Paste Time.

  8. Switch back to Selection tool.

I’ll let ya know if it works.


Hot puppies, Uncle Bob, this thing WORKS! (almost–see caveat at bottom) At the risk of seeming immodest (or thick) this seems so useful it should be part of the standard list of Macros. And I wish there was an EASY TO REFERENCE on-line repository of such useful macros.

Create the following Macro and assign to a key command (in my case Ctrl-Alt-Shift-K)

  1. Switch to Range tool.

  2. From the Edit menu, choose Select in Loop.

  3. Edit/Range/Global Copy.

  4. Locate To Selection End

  5. Edit/Range/Paste Time.

  6. Switch back to Selection tool.


    And to execute:

  7. Set the Left and Right Locators to the range of bars you want to copy.

  8. Ctrl-Alt-Shift-K


    CAVEAT: If there is a cycle marker within the original range of bars, it MOVES and RESIZES it to the new (duplicated) bars, which I do NOT understand at all. Bug?

I am fan of making macros for any idea came to me . up to now i had more than 50 macros for different purposes .

Any how if i get what u asked about. Yes i have this macro .it is very useful. I will share this when i am nere to my cubase . In this moment in work site

With range tool selection

Make this macro
1 transport-locators to selection
2 Edit - global copy
3 transport - go to right locators
4 Edit- paste time

This is my macro hope this helps you

very nice 3D and infos. Thanks

Not sure if it’s the same as what you’re trying to achieve, but when I want to duplicate a large section/amount of events, I create an arranger track, draw in the sections in the order you want (A, B, C, etc) and then just put in the desired section twice and flatten the arrangement.

I love the arranger track for that alone.

i regularly use the "range "edit stuff, for example global copy of locators range and paste it to other location.
but most of the time,midi events are causing problems, as i dont quantize or make the midi notes/events always on grid,
the edits are a mess,and lot of edits needes “clean” the midi notes left overs or to restore midi notes that are disappeared by the range edit
but otherwise of course the range edit tools are a good.

in cubase 8 forums i got answer for a related question, but it works partially.
if you put all project tracks(including tempo etc…) into a folder you can edit sections from there with selection tool,but something was not completely right,(maybe the tempo track could not follow or something else, i cant remember.)
the idea was to close the folder and have clean view of project “sections” and you could move,swap and edit sections freely.

I initially ‘campaigned’ heavily for the Arranger concept back in 2003ish. I think it was actually ‘my’ idea in the sense that I saw it used on another DAW and incessantly asked SB for it, literally every day for about a year. But then I saw how it was implemented and I -never- use it for the reason Mozizo says below…

I do a lot of orchestral stuff and almost every ‘section’ has pickup notes or keyswitches that come a fraction -before- the bar line or notes that need to fade -after- the bar line. What I BEGGED SB to do was to make Arranger sections INTELLIGENT… ie. be able to ‘see’ that events and parts that started a bit before (or after) the bar line should be INCLUDED in the ‘section’. But they aren’t. So one gets a bunch of cut sections without the proper keyswitches or notes that hang. Useless.

Now Ranges suffer from the same problems, but at least it’s one less gizmo to have to futz with.

—JC

It works without 1,2 and 6, because “global copy” makes a copy of all the content between the locators regardless of the events beginning or ending outside the cycle - the content outside the cycle is not copied, however. It’s not necessary to select anything, thus using range tool is not needed.

Maybe I’m missing something but why not just assign Key Commands to the “Edit / Range / Global Copy” and “Edit / Range / Paste Time” ?
I did that years ago. Perhaps you’re trying to create a “one click” Range duplicate ? Like Command D? I usually just lasso the entire chunk I want and use command D. But THAT doesn’t always work either if the parts are not all cut at the same position and/or if you need to include tempo & meter.

The way it works for me:

  • Set up locators - I use cycle markers alot so I just tap a cycle marker and hit “P” to set up the markers
  • Place the cursor where I want the duplicated part to go. (#2 if it’s just a duplicate right after the original)
  • Hit my Key Command for Global Copy - For me, Option+Command-C
  • hit my key command for Past Time. - for me, Option+Command-V ( so for me it’s literally just holding down the Option+Command and quickly C V.

If you don’t need to “insert” time into the middle of a song you can just use regular Command+V