How to set the live arrangement position via m4l?
Hello,
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.
Pedro
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.
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.
Cheers man
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.
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?
thanks!
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.