How to call duplicate_clip_to from Javascript
I'm trying to copy a clip from one clipslot to another. I'm trying to call duplicate_clip_to, as described in the documentation, but I'm having a problem passing the target clipslot as a parameter. How do you do this? What's wrong with my syntax???
thisClipSlot.call("duplicate_clip_to", thatClipSlot);
Note: In this example, both clip_slot references are fine - I can call delete_clip on either, and that works.
No luck. I ended up putting a $25 bounty on this question, and got an answer. Here's the magic line:
clipslot1.call("duplicate_clip_to", "id "+clipslot2.id);
The API clearly calls for a clipSlot object. Maybe I could have guessed about sending the ID string instead... but prepending "id " - who would have guessed that?
Anyway, I'm sorted. Just wanted to post this in case someone else searches for this in the future.
Must've been a smart guy that figured that out ;)
Yeah, really smart. But a total douchebag. Man, these MAX developers are the worst! :-)
I'm sorry I would like to know how to be smart enough to understand how this got solved! Who are the engineers behind this mystical language and what's the potion or spell I must cast to figure out how to do it myself?
Also, thank you David Berzack for documenting properly.. you must not be an actual engineer!

This is what brings me here... duplicate_clip_to_arrangement

I tried:
var clip = new LiveAPI('live_set tracks 0 clip_slots 0 clip');
var track = new LiveAPI('live_set tracks 0');
track.call('duplicate_clip_to_arrangement', "id"+clip.id, 1.1);
NO LUCK. Please, if you're a knowledgeable person, help!
concatenation with id needs a space!
"id"+" "+clip.id
OR
"id "+clip.id
Thank you Broc you rock :)
track.call('duplicate_clip_to_arrangement', "id " +clip.id, 0.0);