Shift of warp markers of weak beats

Just Evan's icon

Hello. I'm going to make a device that will set warp markers on every 16th beat, then I need to move every 2nd marker (every other) until the markers match the transients of the loop to which the swing was applied (transients are not initially determined by Ableton). This way I don’t have to manually add markers to apply quantize.

Question: how can I access every 2nd marker to assign a shift for all of them?

👽'tW∆s ∆lienz👽's icon

in case you just need a mathematical formula(i've no clue about the m4l-specific objects to use), you could try something like this pseudo-code where 'x' is a general class for 'warp_marker' and that class has traits/properties for 'number' and 'position', and markers are indexed in their numbering starting on 0:

if (x.number%2 == 1) then { x.position = reassigned_shift; }

(if markers are not indexed starting on 0, then you can simply switch to if(x.number%2 == 0)... to access every second marker, with that type of indexing instead)

hope i understood you, and that this can help 🥃