move_warp_marker

Learn about building and using Max for Live devices.
Post Reply
macduff
Posts: 6
Joined: Fri Nov 06, 2009 11:37 am

move_warp_marker

Post by macduff » Fri Apr 08, 2022 8:49 pm

Hi
I'm trying to use move_warp_marker from the Live Object Model, but without success. I'm doing this, for example, to move a warp marker at 2.1 (ie beat time = 4) by a distance of 1 beat:

var api=new LiveAPI(null,'live_set view highlighted_clip_slot clip')
api.call('move_warp_marker',[4,1])

I get an error in the max console
jsliveapi: Invalid arguments: 'move_warp_marker 4 1'

add_warp_marker works as expected. I've also tried using a dict instead of an array for the params.

Any ideas anyone?
Thanks

[jur]
Site Admin
Posts: 5406
Joined: Mon Jun 01, 2015 3:04 pm
Location: Ableton

Re: move_warp_marker

Post by [jur] » Sat Apr 09, 2022 1:49 pm

This needs to be checked, but I think warp_marker's position is defined as a ratio of the total clip's length, or something like that, even maybe in seconds:milliseconds. I never tried myself but I remember that it looked utterly complicated when I looked at it, especially regarding the time format used... but once again, don't take my words for granted, the LOM is the place to look at.
Ableton Forum Moderator

macduff
Posts: 6
Joined: Fri Nov 06, 2009 11:37 am

Re: move_warp_marker

Post by macduff » Sun Apr 10, 2022 7:40 pm

Hi [jur] thanks for the suggestion. I tried using values which are ratios, but no joy. I also tried using values returned by clip.warp_values, but these don't work either. Also, warp_values doesn't return a dict as the LOM docs say, but an array with a JSON string. Time to contact support I think...

zsteinkamp
Posts: 11
Joined: Mon Apr 11, 2022 1:09 am

Re: move_warp_marker

Post by zsteinkamp » Mon Apr 11, 2022 2:46 am

This works for me:

function bang() {
var api = new LiveAPI('live_set view highlighted_clip_slot clip');
api.call('move_warp_marker', 0, 1);
}

But there needs to be a warp marker at beat 0, which is 1.1.1 in the timeline.

macduff
Posts: 6
Joined: Fri Nov 06, 2009 11:37 am

Re: move_warp_marker

Post by macduff » Mon Apr 11, 2022 6:46 pm

aha - thanks zsteinkamp - my mistake was putting the arguments to liveapi call method as an array, not separate values

Post Reply