Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Paste (Include Tracks' Sends) #18

Closed
Jeff0S opened this issue Jul 8, 2014 · 39 comments
Closed

Paste (Include Tracks' Sends) #18

Jeff0S opened this issue Jul 8, 2014 · 39 comments

Comments

@Jeff0S
Copy link
Member

Jeff0S commented Jul 8, 2014

From mercadon...@gmail.com on November 06, 2009 23:01:54

This would be the same as regular paste but it would include tracks' sends
if they exist. The action will take a look at the clipboard and see if
there is a track there, if it's so it will paste it with its sends.

Thanks!

Original issue: http://code.google.com/p/sws-extension/issues/detail?id=18

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on November 06, 2009 20:52:57

Yup, this could be a generic replacement for Ctrl-V.

Status: Accepted
Labels: -Priority-Medium Priority-High

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on March 24, 2010 14:33:16

Tim, (no to owe you a fix too long ;) I take this one if nothing started on your
side (?) Didn't look to it deeply yet, but I have some close code, as you know..

Owner: jeffos277

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on March 24, 2010 14:47:38

Hi Jeff, no I haven't done anything for this one.

There's some implied tricky stuff: Ideally you could replace the build in reaper
current copy/paste commands which extension versions (bind to ctrl-c/ctrl-v). The
extension version would call the reaper version and do some extra magic if the
copied/pasted item is a track (because copy/paste works for items/envs too).

The way I would do it is:
Copy:

  1. run the normal reaper copy fcn
  2. check the clipboard - is there a track on the clipboard?
  3. if so, add more info to the clipboard (a separate format) that includes the send info

Paste:

  1. run the normal reaper paste fcn
  2. was a new track pasted, and valid clipboard data?
  3. if so, get the send info from the clipboard and insert it into the project

Of course, if you have another idea that would work that would be OK too.

Tim

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on March 24, 2010 14:52:48

Note there's a new API fcn that may help:

// 0 if track panels, 1 if items, 2 if envelopes, otherwise unknown
REAPERAPI_DECL int (*GetCursorContext)();

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on March 24, 2010 15:27:51

Bonjour Tim. oh, ok, I see. I was thinking to -try- a simple implementation: 3 new
actions "overriding" native ones: copy/past items/tracks/envs points (depending on
focus)
cut/copy would: store the sends of selected track(s), i.e. list of destination
MediaTrack* - run the related native action - store the nb of tracks
paste would: run the related native action - if number of tracks differs (ie not an
item/env paste), then patch the stored sends to the selected tracks (selection done
by reaper)

Let me know if you think it worths a try..
Jeff

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on March 24, 2010 15:36:15

.. with caution of loopbacks & cross copy/pasted sends !

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on March 24, 2010 22:41:22

Sounds like a good idea to me! Give it a shot if you feel like it, but no hard
feelings if you want to work on something that's more important to you of course.

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on March 25, 2010 02:18:58

ok, I'll try it then (got 3 motivations: I'd use it, "collaborative" should work
both ways, I guess I know who is behind mercadonegroestudios...)

Tech.: not that I dream of C++, but I had another thought this morning: not so
simple. Imagine: copy with sends, then remove some tracks (ie del. key), then paste
with sends.. but remains do-able I think, well, I'll try!

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mario.kr...@gmail.com on March 28, 2010 12:29:07

How's this going? :D

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 01, 2010 04:55:46

fine, thanks (busy with music + lost in the depths of cisco routeurs these days,
still haven't found the exit..)

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 03, 2010 13:05:10

Status: Started

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 05, 2010 03:33:39

ok, it works, have to test it now but I've got a question.

If you have:
Track 1 with send -> Track 2
Track 2 with send -> Track 1

If you (natively) copy/paste track 1 to a new track 3, REPAER will do:
Track 3 without any sends
My actions will do: Track 3 with send -> Track 2

This case is OK, but:

If you (natively) copy/paste track 1&2 to new tracks 3 & 4, REPAER will do:
Track 3 with send -> Track 4
Track 4 with send -> Track 3
My actions will do:
Track 3 with send -> Track 2
Track 4 with send -> Track 1

is it what you expect too ?

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mario.kr...@gmail.com on April 05, 2010 03:45:14

It's what I'd expect it to do, yeah.

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mercadon...@gmail.com on April 05, 2010 03:58:15

Yes, that's what I'd also expect.

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 05, 2010 05:18:44

ok! thanks for confirming ED and MN.
=> release later this week (I take more time to test than to code..)

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 10, 2010 04:33:52

done ( r95 )

Status: Fixed

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mercadon...@gmail.com on April 10, 2010 05:41:05

Woooo! Thanks Jeffos. One question, why new actions to copy/cut depending on focus? I
think most of us are now using new Tim's actions: "Cut/copy items/tracks/env, obeying
time sel" and this would break our new macros/assignments. Why not simply 'Copy/Cut
Tracks Sends' so we can put it in our macros?

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 10, 2010 08:28:53

Hmmm, good thought merc. I may have to agree with you on this one - break out just
the copy/cut tracks with sends for a macro, and then I can make my "Cut/copy
items/tracks/env, obeying time sel" actions use Jeffos's version.

Sound ok?

Tim

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mercadon...@gmail.com on April 10, 2010 11:03:27

Yeah, that'd be ok Tim. Thanks!

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 10, 2010 11:58:09

@mn, simply didn't think to that! I agree too..
@tim, english: not sure understand "break out just the..", do you want me to update
these actions into 'Copy/Cut Tracks Sends' ? no prob if so..

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 11, 2010 08:10:06

Correct, instead of

Cut/copy items/tracks/env points (depending on focus)
and Paste items/tracks

Just Cut/copy track(s) with sends
and Paste track(s) with sends

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mercadon...@gmail.com on April 11, 2010 11:21:36

hmmm, and wouldn't 'Paste items/tracks' (native) do the same? I mean, the sends are
copied to the clipboard with 'Copy/cut track(s) with sends' it should work, right?

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 11, 2010 12:06:43

nah, gotta have a special paste

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 11, 2010 12:59:23

in fact, I don't see the pb! Tim I think your actions can call mine as they are e.g.
for SmartCopy(COMMAND_T*) replacing action 40057 with my copyWithIOs(), as it's
itself based on 40057 (you're testing GetCursorContext() == 1 while I'm testing !
GetCursorContext()).

Tim, in the same pirit: I just discovered that awesome SmartSplit(): simple,
efficient!!
It'd be cool if that one (or a new S&M action?) would use my splitMidiAudio(), so we
could have a "Split items at time sel (if exists), else at cursor for midi/empty
items or at prior zero crossing for audio" that is to say a single "Split" action
for all cases..

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 11, 2010 13:05:13

Hehe :) I'm working on this now Jeffos, hope to not step on your toes.

Anyway the issue is:

You want to have a macro that cuts/copies/pastes tracks without worrying what the
focus is before running the macro.

Make sense now?

So, if you want to copy tracks in a macro, you use "S&M Copy tracks with routing" (I
renamed a little)

If you want to make a "smart keystroke" you'll use "SWS Copy items/tracks/env"

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 11, 2010 13:40:25

sorry, as the smart copy code is based on 40057, I still don't see: I think what I
said above will seamlessly upgrade the macros MN talked about. The reverse would
work too: I can call your SmartCopy() ? note: I have a pending commit on
SnM_Sends.cpp..
"S&M Copy tracks with routing" is indeed something else.. I undertand you take care
of it (?)

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 11, 2010 13:48:55

in the meantime.. tested the split as suggested above :))

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 11, 2010 13:57:58

I forgot: in short, what should I do about that ? nothing :) ?
oh! and "The reverse would work too..." but won't be seamless for MN, of course!

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 11, 2010 14:08:51

note for MN looking for more macro-able actions: the pending commit are "copy
routing for selected track", "paste routing for selected tracks" (!), "remove sends"
("remove rcv" is already there)

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mercadon...@gmail.com on April 11, 2010 14:40:58

Oh God, all this coding stuff has my head spinning :P

@tim, Jeffos:

This is my dream:

  1. Copy/cut tracks/items/env, obeying time selection and if a track was the last
    thing on focus copy/cut it with its sends

  2. I'd love to be able to paste whatever I copied/cut: items, env or tracks (with
    their sends) with one action or at least be able to build a macro for it.

@JeffOS:

Man, those are great actions, yeah: "copy routing for selected track", "paste routing
for selected tracks" (!), "remove sends". Thanks for working on something like that!

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 11, 2010 22:14:10

Jeffos, MercagoNegro came up with a good point/test case:

  1. Insert 2 tracks
  2. Create a send from track 1 to track 2
  3. Select both tracks and use new "copy" (with sends)
  4. Select last track and run new "Paste" (with sends)

Notice new track #3 doesn't have a send to track #2.

Instead, track #1 has a send to track #4 (and #2 as before)

I'm not sure how to deal with this! Any thoughts, J?

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 12, 2010 00:29:55

@mn, thanks! That list isn't complete yet (that's why the commit is pending) I think
those actions will give you more freedom for macros (that's also probably why I
don't see the need for "copy tracks with sends": it doesn't cost much, sure, but
you'll be able to build it yourself, btw).

Tim, mail following about r98 and MN's point 1) & 2) but later: have to go rigth
now..
About issue 18 : yeah, I know that: we're in the case of "cross" copy/pasted tracks
(I mean there're sends/receives between the copy/pasted tracks) in that case I
voluntary put a priority between copied receives over copied sends (ie if you do the
same test with a receive it'll work). Not sure it's needed, I'll fix that later
today if the tests remain ok (I'll report here otherwise).
note: er.. is it possible to bann MercagoNegro that is to good at pointing design
issues (even when we think they're well hidden) ? ;)

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 12, 2010 13:20:04

one good and one bad news..
The good one: when it comes to code we speak the same language with Tim :))
The bad one: I removed the priority thing, there're possible duplicated receives in
a very corner case (can occur only with cut action), I did some debug: not obvious,
I'll need some time to check that..
we're so close.. I'll commit what I did!

note: for me, the expected result of MN's test is:
track 3 with a send to track 2 (copy of 1->2)
track 4 with a receive from track 1 (copy of 2<-1)
.. so "track #1 has a send to track #4" is normal. for you too?

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From mercadon...@gmail.com on April 12, 2010 13:41:19

Yes, I expect:

Track 3 has a send to track 2
Track 4 has a receive from track 1

That's all.

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 12, 2010 16:21:46

OK, released as v1.7.1 #5! There's separate actions:
SWS/S&M: Copy tracks (with routing)
SWS/S&M: Cut tracks (with routing)
SWS/S&M: Paste items or tracks with routing

Or if you use the SWS: Copy/cut tracks/items/env actions, they're in there too.

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From jeffos...@gmail.com on April 12, 2010 23:47:20

last issue fixed ( r101 ) !

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 12, 2010 23:58:52

Thanks Jeffos, posted v1.7.1 #6 with fix.

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From musicbynumbers@gmail.com on April 13, 2010 06:35:15

Kind of related...

whilst checking this new feature out I tried to also use "copy/paste snapshot" to
copy and then paste a track that only had receives and no sends and found that
snapshots don't do receives.

I can see why it could be a major pain in the ass (and the more I think of it the
more I remember this coming up before) but if it's doable at somepoint it would be
awesome! :)

thanks for all your "good shit" so far anyway!

@Jeff0S
Copy link
Member Author

Jeff0S commented Jul 8, 2014

From swstim on April 13, 2010 07:32:11

Copied to issue 77 .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant