Anticipate live.dial value at start of loop before loop ends

charles spencer's icon

I want to capture the value that a dial will take via automation when the live loop jumps back.

This is so I can send a program change device to a drum machine that needs a little advance warning about upcoming program changes.

How can I have maxforlive look ahead (well actually behind) and find that value?

This will only be used in arrange mode.

tyler mazaika's icon

There's no way to lookup automation values out of realtime. So roughly what you'd do would have be to be like...

You'd observe all the loop brace information (START, END, loop ACTIVE).

When playhead crosses the start time of the loop, you get or observe the value of the dial and store it somewhere. (Possibly store it in a dict or coll as "<songposition>" : <value>).

Then next when the playhead gets close to the (like 1.0 beats or whatever) END, lookup the value in the dict for the songposition that's closest to the START of the loop.

How you store the dial automation values it kinda up to you, they each have drawbacks/limitations and there's no real perfect way to go about it. You could just use a [pattr] or [value] or number object to store the dial value at START and then just invalidate that value somehow anytime the loop brace moves.

charles spencer's icon

so if I store the value at the start of the loop

but then the user edits the automation at the start of the loop,

before it loops back

i'd lookup bad data?

I can't pull the full arrangement for the current track from somewhere?

tyler mazaika's icon

That is unfortunately correct (to both questions).