Jump inside clip from MAX in session view
I have a clip in the first slot of an audio track. The clip is warped and looped from start:1.1.1 end:41.1.1
Is there some way I can jump to a random place in the clip when I e.g click a button. I hope to find a general way I can use also for other clips with other lenghts.. Maybe Javascript can be an option?
which object are you using to play the sample?
Either with groove~ or play~ you can select the starting point of your loop.
The value can be then randomized with [bang] [random], if I got your question correctly.
You can't set the playing_position using the LOM (get, observe only), this is only possible with the loop_start...
Hi in reply to your posts. I am not using MAX objects for playback - this is a clip in Ableton.
With regards to the loop start I guess I cannot use that.
However I guess I can map a midi control to the scrub button as suggested in the article below.. Thanks anyway for the advise:)
So you just have to make a device that generates a midi message when you press a button, and being mappable to any parameter through the API.
Hi Stephane,
Thanks for the reply but I do not quite see how I can use your suggestion to control clip playback position? Can I please ask you to elaborate.
THanks
Mapping to the scrub I think will affect all clips. I think the loop_start is the way forward.
Sorry late to jump into this one, not sure any of the answers above quite get to the solution?
1, Observe the playing_slot_index on the track to obtain the index for the currently playing clip, use this to formulate a path to the clip...
2, When the playing_slot_index changes (to 0 or above) get the clip_start and clip_end and store these as minimum and maximum values
3, You need to use the move_playing_position and observe the current_playing_position basically each time you press your random button you want it to produce a number that moves the playhead within the current clip, effectively as the current_playing_position changes you'll be calculating the maximum and minimum (negative) values that you can send the move_playing_position...
Cheers
D