Set position of where song will start?

Learn about building and using Max for Live devices.
Post Reply
prebentious
Posts: 312
Joined: Fri Jul 20, 2007 12:07 am

Set position of where song will start?

Post by prebentious » Sat May 19, 2012 3:55 pm

Hello!

I have a question for those smart M4L folks out there.

Say I'm recording into the arrangement and things are going well, but then I mess up. So I'd like to try again, while keeping my original performance.
The thing to do would be to move the transport to start AFTER my last performance, so the new performance gets recorded into blank arrangement space, leaving the first performance intact.

I know how to do the math, and I tried moving the current_song_time property of live_set, but that only works when the transport is playing. If I move current_song_time when the transport is stopped it doesn't affect the position that Live starts at.

So I put in a function to move the playhead right after I press play again. That works, but there's a hiccup when Live starts, as it jumps around right after I press play (I had to put in a deferlow, which probably exacerbates the lag).

I notice in the arrange page, that sometimes there are orange and green triangles just below the scrub area. The set_current_song_time moves the orange triangle, but not the green one, and it looks like the green one is the one in charge of where playback starts.

Anyone have any advice on how to set the playback position when transport is stopped?
THanks!
Ben

Here's a demo:

<pre><code>
----------begin_max5_patcher----------
476.3oc0U1saiBCDE9ZySgk0dIsBGJIo8t1WipJjAlMwq.6H7PZ5V0280+Pn
c2lfPooQZu.CdlA7Y93f40HBqPuCLL5czGoDxqQDhOjK.oeNg0H1UVKL9xXp
tlBnkEGRo6vZ.wW1.gmASpPVLkUHTqXzm5qZi.KWKUqxagRLT3rr4WmDSWtz
Mlk3F41qGtEYke0zE+5Jd19U6mZEpDM90hceqTTSePWW8wzF4u8o4tGYHrUw
RkUkd8yeOXP69nybAeKJxMDOQPz.FiXErewQXmu0XF.okcssfByMZaSixFf9
C9QQ13bJclmMoyCmByleDRkdFI0rCRJ9IPJE7rUceBT0xsv01Dtd8zXyMAey
BOaxtcTSD+6GM8QMhsPUdnwxEH1JK5vvGYjABQX4afVizffpDFHa.smKqnkY
qoNLmaMkmHiu0C2423FWvG08k7em6CWKMUvVYIbT532IKdXiM2oQ40RumL3L
WLpk76easzyLtb9oiaih6OlfcJ.oL9X3I8hhGuBrco5e+anuIbw+alYzcsk6
a8d4ReuOp.CJUBTpUenF2lPT9PQqkUUfO+dQ2Hq1nsVrdMPe5fu.mpj3SVSI
WNMkMEMkdQ0zjjTxkESISPSeEJYm7Vze.X3qVcD
-----------end_max5_patcher-----------
</code></pre>

broc
Posts: 1151
Joined: Mon Jul 26, 2004 8:37 am

Re: Set position of where song will start?

Post by broc » Sat May 19, 2012 9:43 pm

I think moving the playhead right after start is the only way.
You could try to improve the reaction time by using [plugsync~] as trigger.

<pre><code>
----------begin_max5_patcher----------
656.3ocyW9sjZBCEF+Z7oHSldo0gveDr209ZzYGlHjUSGHwgDrtcmsO6M4.r
U2UQT2F6MBbRv7c9kuSR34Id3kxcLEF8Ez2QddOOwyCBYC308rGthtKujpft
gykUULgFOssMMamFhqzzZMRyqX8MIZpjM5RlFdQ+tnOJEZE+WLaLh+r9van5
70bwprZVttUOAgIllMcx1KT7b3gzY9nG5dGdALxxk+3yj46MpbQ+fR1aPEzJ
XPweslSKQeSVVfss9xjI1elNx7Wv9oY.eW5yOdV2Kf1P5m1vZyML2fvWSjwy
DRRKFhisWBClEO.ShNJSBbFSTrRivQjiilfSglkTwJ7TD9V3S.3YhRFzyDdm
4SIeKaldMWUv1xyOQcS34vj0IM8pMTgg9s.iXujrXPfE3rhrlpkr5Kz2zABf
KWAIBBSgjm.LH1ePRPbEIpXJEcE6cdGSBrFYMPYJl9BW64V7IsK7j.tEx7SP
G++GJrrD5BKofUclda.JEbQwjgrOo24Mq.9XZvJdGXc7g0jCBAlDO3RLIWky
oqYEcKqHqMuxnZcMeYit8zMduBHOb1FVshqzLQdq5g3.Y+npNM0jn7l5ZyAk
xTRCMrmKB8IhCnc+NfKZsiliHLPk576bgZ9Zyh0rqnJ811zqiQovwChF7fkQ
24R0MkMqTOIx+8wgzhyrY3gWdrTRgaJM1+CB75MeHfsayyfAO9U3sRV3O0jJ
h29ALfvrwOD2JYScdOe5b+n+JsBlRyETMWJ1qOIGzm07hBlX+OmohWrQZnUm
DPObzo9wpHyFCHxHTDwYJxtW9YgTpSgj8XnmURuQ2+q0T3HjTjSUTzXfTnam
3Fill6VIMlINham4rebw3zz0tLf4gWl7GDlfwjB
-----------end_max5_patcher-----------
</code></pre>

Post Reply