How to detect ableton transport start

thapelo's icon

Sup fellas

Is there an object i can use that will send a bang when the ableton transport starts?
I dont want to use "metro @autostart" as that will continue sending bangs, i just need one bang when the ableton transport starts

Thanks

broc's icon

[timepoint 1 1 0] sends a bang at start since Live automatically jumps to the start position.

thapelo's icon

Thank you sir

Wetterberg's icon

also, interfacing with the [transport] option is typically useful for this kind of stuff - combined with timepoint you get some good control.

Stephane Morisse's icon
Max Patch
Copy patch and select New From Clipboard in Max.

Do you want to receive a bang also when Live starts anywhere else than 1.1.0 ? as this can also happen if you start with shift-space of from an insertion point in the arrange grid. If this is the case, you'll have to observe Live's transport through the LOM.

thapelo's icon

Thanks guys.

Max Patch
Copy patch and select New From Clipboard in Max.

What am i doing wrong here, when i play this midi clip in ableton it plays fine and in tempo but when i use the seq object this way it goes off tempo:

Stephane Morisse's icon

I'm not familiar with the seq object but I think this might come from the fact that your tempo division in [tempo] is set à 96 (the maximum) and [seq] might wait for higher resolution ticks. It isn't clear to me in the seq help what the 'start 1024' for normal speed playing refers to.

broc's icon

The tempo division 96 is correct (same as midi clock).

However, you can't simply retrigger playback from the last midi event (right outlet of seq) since it happens before the last bar has ended. Instead you need to retrigger playback every x bars if x is the length of the midi file in bars, ie. basically the same what Live does with looped midi clips.

thapelo's icon

Hi Broc

Its a 4 bar midi loop, i know by looking at it, how would i know what bar it is on in the Max effect and how would i retrigger at the end of the last bar?

Lee's icon

you can always observe is_playing on the live_set - this sends a 1/0 when transport is started/stopped

thapelo's icon

im playing a 4 par piano loop in live and in the seq object im tryna play a 4 bar drum loop, but i can hear the drum loop is off tempo when played in the seq object. If i take the drum midi loop and play it in an ableton clip, it plays perfectly and loops perfectly with the piano

broc's icon

If already the first play (without loop) is out of sync I'd suspect that the tempo control with ticks doesn't work as expected inside the seq object. Sync with ticks is inherently problematic as the tempo must be calculated from tick intervals which can only be done after at least 2 ticks are received.

thapelo's icon

that makes absolute sense broc, it will never be synced in that case....hmmm so what is the solution, is there anyway for me to specify the tempo manually then before hitting play? Im tryna play the midi file at 60bpm

broc's icon

Quote from the ref page:

"The word start, followed by a number, plays the stored sequence at a tempo determined by the number. The message start 1024 indicates normal tempo. If the number is 512, seq plays the sequence at half the original recorded speed, start 2048 plays it back at twice the original speed, and so on."

thapelo's icon

"The message start 1024 indicates normal tempo" thats normal relative to the tempo of the midi file, to play it at a tempo of my choice i guess i would need to know the tempo of the midi file first before hand so that i can get a number to play the file with

broc's icon

Yes, but you can find out the tempo of your midi file by dragging it into an empty Live set. The global tempo of Live will then be adjusted to the tempo of that file, if it contains an explicit tempo definition. Midi files without tempo definition are considered to have standard tempo 120.

guitarguy93's icon

Isn't there a built-in patcher that comes with Max for Live that is made EXACTLY for this? It outputs a bang at the exact time that you start Live's transport.

It's [m4l.api.observetransport].

broc's icon

Keep in mind that the Live API doesn't ensure accurate timing as it runs on low priority threads.

thomasswell's icon

i am trying to write a patch that simply sends out a band whenever a clip starts in the track it is placed in. when i new clip is played it bangs again. but not when the clip loops around. in that case it doesnt bamng. just once when the clip is initialized.

any thoughts?

to_the_sun's icon

Thomas,

I haven't tried it myself but have you looked at using [live.observer playing_status]?

broc's icon

Thomas,

you could observe the track property 'playing_slot_index' and bang if the value changes.