How to set the live arrangement position via m4l?
as from the topic’s title, i wish to control the live arrangement position from an external application (vvvv).
As this is not controllable via midi, i’m sure there is a way to do it with maxforlive.
Does anybody know a way? Even pointing me to a tutorial would be nice, i tried to search in the docs but didn’t find one.
I guess i have to use live.path and live.object, but didn’t find a tutorial about how to use these two objects..
Thanks a lot for your precious help, all the best.
You are on the right track. Below is a simple patch for this.
Note that current_song_time is measured in beats, not milliseconds.
The documentation is obviously wrong at this point.
----------begin_max5_patcher---------- 641.3oc0VE0iaBCC9Y5uhHzdrqpAZ60t219abZBkBtWyFjfRLc81o6+9RBgV nE3Zqllzd.BX6X+4uXr4sIAgakGAcH4KjmIAAuMIHvIxJHv+dPXA6XZNS6LK LUVT.BLbZsNDNhN4aAFpajtSJPM+2fUCc9r4dwkLLcOW7RhBRw5fRWswnlDs bgcYQj8Nc8r4ju2rGEnMwigbov4NubdlKrxs+3yKZBqnpfKxAT21PKVDrBGV B+phyxIeSlm0ZOxJrYSy6IpsP6BpCkOcIVsa58ISr2ldi7XN+.LyDbqU9fdf oNAzdT2G6Estl8VZWhW4Pzx6i8Vc1+JSzQPk.B11bns88xrcotnwotX247p0 C.zZGguVB0lGFNkDtKWxLauwFM6.jkvPTw2Vgv4mzdd1SzVlLuBj6ZD2HucN pKAHKmWz5TuqdDJ0CoDNVJE1uBrrwr9rnRvQM9ZGVriAElpAmtnm50AEFB2E 9d0xMt2TIWyUyOyicLpgMGwAWeT2kD1KU3H0jW3xCbM26sdSIY1GjzLgP5qb NE09BUtT7xsBKaTGiJy4heZ8kdLXKyFgI2IGDnRUFnFZmtZj5sVqz0BoY4N6 mXR.M6E3p9xZ.IoUJkoZMQansDjW.jOQefV09lMqcKz359eqZ8QbqtJw81SN 5Q5ISGrEwC03U.+x.vq3IWUjQgMcuapIJ1MRHNx0Gd4lqlh0hYh9ujYLI8dh 8oDSA0CPP0SN8i42PGifn+8FmGO1zE2UGhxgFS9Jt7WhbYjUdW1SKqToMtzO KkbNmx.MxEml897ouLZYyddVFHZ+qGE7rRIWfdHLvI4shn3a.QQ+SQj43kPu ADQePDYd48I+AHDSnp. -----------end_max5_patcher-----------
Thanks a lot broc, that’s exactly what i was searching for! Works perfectly, thanks.
As you said, the documentation is obviously wrong, cause the current_song_time is measured in beats, not milliseconds.
I guees this has to do with the way Live works, where everything is related to beats and not milliseconds..
infact a question comes to my mind, maybe you can answer that:
is it possible to have a certain event (for example a clip starting to play) happening exactly at say one minute from the beginning?
If then i increase the main bpm, everything will go faster, therefore the event will happen earlier, right?
This is quite strange for an audio software, isn’t it? I mean it should be possible to change the bpm on the go, and still have the event happening exactly after one minute of playing..
Can you explain this? Thanks a lot man!
Well, I think the implementation of current_song_time in milliseconds would also be possible since Live provides a time scale (at the bottom of arrange) which is adapted automatically to tempo changes.
Maybe we can have a comment from the developer team on this?
Yeah but then if you set the current_song_time to 60 seconds, change the bpm tempo, and set the time again to 60 seconds, the current position will actually change (i guess), because the time in Live seems to be not absolute, but depending on the current bpm..
Would be great if the dev team comment this.
Example: 60 secs at 120 bpm are 120 beats, and 60 secs at 60 bpm are 60 beats. This means that the arrange beat position at time x depends on tempo but also means that the position can be calculated from tempo. So it should be possible to implement current_song_time measured in milliseconds as described in the documentation.
Anyway, the inconsistency of implementation/documentation needs to be fixed.
Yes that’s true, you can calculate that from tempo, but still this wouldn’t be a way of having absolute time values, cause as soon as you change the tempo, time changes too.
So if i want a clip starting at one minute from the beginning, and during this first minute change the tempo, i can’t make sure that the clip will start after one minute.. unless i don’t patch it in max with some sort of timer triggering the clip.
Yeah that needs to be fixed anyway, let’s hope the devs see this topic.
Hi, the timer position seems to stop following the values coming from my device when I move the numberbox with my mouse and the values are > 127. If I mouse slowly live’s timer follows.
Also there seems to be a differentiation between timer and play position. Any way to control play position or make sure that timer position corresponds to play pos?
Thanks in advance
for illustration try this in m4l.
move the "beats" numberbox [0-1024]
unless you move it slowly live’s arrangement position stops following very quickly.
----------begin_max5_patcher---------- 708.3oc0VtsiaBCDF9ZxSgEpWlFggkrI8t1WiUqhLgIItErQ1lzrc09t2wFS Nz.TRpzpsWDB3Cy7Oed7X+5jfvL4APGR9B4IRPvqSBBbMYaHv+cPXI6v5Bl1 MrPQcYFnBm1zE9kr1T.FWmw9VqXl063hsqTvZSiwSdHZVzTxR6iT2qzEyhHO 6mAO2YbY12+LcYqw2HEFAqDbc8UEmUP9lrHus6FGadoBZbQHWXBmRByXhsgG sr0HZ9ubigZc7QgyEs5lZa6sISrOlNRNroPh13l4P7BpM3WLBNL+d4.JM16H IVKKKAK5a5y.GbwZXFvPi1IfhF.PIN1j3vzCwWQnJEnQuwLbovo3qIWxHAWO .4bOblvRma0x73dz0+LFK36gY1cW3n71bOScT9cz8nS5nKezwTmpSbwAM81X ZZuYa1DslLtS1ioPYa.0JPvxJfysYez8A21hjdT3kz02nlsGxWwLFEOq1.md S6wrmyVPVTCxMsM2194JsDcfK0rMO3hd4BtASeZzZzIgcwfZgx.F3Zfbwnz6 jJy.K4+gI2y0bu05xmkxbLCy4q3G6LrXBgzuTbzqc4JrV21wJKqWGBkEbwOr 1ROjrk4CPxMxdEpTkiGN0yLqw0.cuSUWAPdAuruYqMPUuZFNTIE1hfVXOqWm ado+09x10pnXbuPS+tRHs+ci0SPBqYagqJKqACYcsRgpckFWWWY3k.4Sztqp P+qUUlm51s1TbgNu6CyVbumkcaGeEeGbR.+DU3UXxkkicXC2akLIQMUvhbLI c4fGyG8+IZvvdGw91JLgpaBkL.gbxzeJ+R5f.hd2.Zp+2ceEH2Dw3U7m2Q1E R11ujdZYsZcq6848jSQUNnMbwwiYe5TFvYCZGOOGDmeKoRddkDubqWCjm6bo brRJcDRZw6phr23+iljl+wSR39.BcL4Rz6TS3GuM42fYZcFA -----------end_max5_patcher-----------
The communication with live.objects is asynchronous and has limited bandwidth.
I think it’s basically designed for one-shot settings.
Hm, but once live stops following, it doesn’t accept one shot settings either and I have to set the timer somewhere near the beginning of my set for live to follow my device again.
Also, how can I make sure live actually plays from where I set the timer (play position vs timer position)
to explain the context: I’m trying to jump to specific places in my arrangement when a musician sends triggers via midi. Cues, but with complex envelopes and layers, so probably not clip view…
For jumping to specific predefined places, you could use cue_points, ie. markers in the arrangement. There are several operations available like jump_to_next_cue etc.
yes indeed, just remembered that now. thanks!
Hi – what about observing Bar and Beat using m4l?
I have this patch which works fine – but if you change meter in a different scene it no longer stays accurate It becomes off by a beat or two – any ideas?
----------begin_max5_patcher---------- 920.3oc0XEriaBCD8L4q.gTO0zTrMFH8V6uQUUjIwaVuJ.Q1No61U8euXafP 10YgPhURu.ZFLl48l2L1lWm3EjU9LUD3+M+e56485DOOsKkCuZaufbxyK2PD 5gErrLOmVHClZdlj9rT6+GTRqS1Jsqxrm9RBtw4CkExBRNU+nuyYjMsOguNS 4MbVXmwJX+QOV.r08VNUT8sIRVYwBNcozD3v4pg3iPH0sv5K9+p9sJ1kyJ1P k53GbvY4NYi21O.Qt7QVw5ilbfYx0eC.VO8P87qdm+NYh5xzKk8HbajWzUj7 tPZHDeEogbpPPVSeGMfrQBvFmlHU9xVpIlBBZywe.+L.1.ZkM.8JJfyiU2Lj AHcjjQA82U37cbwm8A1XivSxFrJc0MiPR00dPbhVk.mgu.0wIHjOYgNhw2mz QhVX.ggWA53TEKfHaDRzcX0ho2wMnZIFdeJOBScd0xW8AyvVnD7oojG1TRt8 jBTeCE4jEX1xK2R4xW7Er0ED4NNcQU.R4DYosEfgI2eUSnXcYD.nEOf34tnb ZCaOcVYlfx2SsRLePalotlbf8SNQ5kiRlePDU+NBxd5pEUPn5UVPjRNKamzr CXuVJxKXQkJQvDRZwRS.p8q41qtTb4NNuZOgKDkUPQxxoV3a.3drsdXWgnoY lSDhUe7GssWnOVCdE0g12tLpWtIVuaYL9h5kcBlQ5m4uwBqb5JyLRwZ2yJvd YkzT2srWeMtP2m8sZpk9enuUUwnuhlWHn1NwO7tsSUjdOEIoV6SoisJ4Swa+ cH54S4+XtRTtiurAYMarx+PBaEUHYE5eUQmAEe7fdjsZEsn6QuyYq1VVs2z5 f.V0bUUkDYTDcrN7gXBR1FpNADZMOOTDDOHDT0ewGb9Hn9DyQ3VKGf.0oi6E ApenvYgf4lNUlpRDBzZ4hb.dHHH7LUQo3tpnZ73HUjZqg8qhvmWN.kXPPXhA A0MHStcH.CuHDzr5maP.ZnofyQDENuK.Rw2Z.fgiC..T2doJKWngFRY7nh+X S3evvE8QGPzGMpnOMpSzqLbPze7JT1idzYtF.Ty5fv5MODawBY9+EwZnosbD 15KynNr3HRM0voqkC.vaBtSmcFA.P3t.PYciTWvnwIu.5pCTrMKC3hPXWBN3 Pp7gmYoe8Re0Hnq0Mp.ANtNuMIjZ..FR2KywJHa2tWcvLSTni8pCa8TIWYFO UaxJLl5XHfS2yZFe5D0r82I+Cf3J49O -----------end_max5_patcher-----------
I guess the problem is due to timing inaccuracy (latency) of the Live API. For example, if you change meter exactly on a bar, the observers will report this a bit later, so the previous (wrong) value may still be used for the beat calculation.
Forums > Max For Live