hdavid / Launchpad95

Improved Novation Launchpad scripts for Ableton Live
http://motscousus.com/stuff/2011-07_Novation_Launchpad_Ableton_Live_Scripts/
GNU General Public License v3.0
352 stars 82 forks source link

Setting loop start/end for audios clips similar to midi clips in step sequencer #58

Closed NiklasGebauer closed 4 years ago

NiklasGebauer commented 4 years ago

Hey,

I just started using your scripts with my Launchpad MK2 and the added functionality is incredible, thanks a lot! I was wondering if it is or would be possible to set the loop start and end positions for recorded clips on audio tracks in a similar fashion to how we can do it for the midi clips in the combined mode of the step sequencer (the blue buttons that can be used to set the window).

I sometimes record from a position where I cannot easily access mouse or keyboard and it would be nice if I can adjust the loop window for audio clips directly from the launchpad (e.g. if I hit the stop button too late when recording or when I recorded a few tries and only want to loop one of them). I already tried mapping some buttons from the user 2 mode to loop position and length in Live directly, but I think they require knobs or faders, the buttons do not change anything.

I also started reading your code base and found the corresponding class and functions in the StepSequencerComponent, but I did not quite yet grasp the overall information flow between live and the controller. Do you think the code could be stripped down and re-used on an audio clip or does Live not provide functions to set the start/end of loops for audio clips?

I thought it might be better to see whether this is clearly impossible or whether there already is a simple solution to this that I missed before really diving into the programming.

Thanks again and best wishes Niklas

hdavid commented 4 years ago

Hi,

This is i guess possible. But i have no idea how the clip classes would react with audio clips. i suppose it should be possible to move start/end markers around using the script code but i never tried it. currently the script is quite complete feature wise and i am not planning on adding more stuff to it. but feel free to have a try and if you succeed in making it work and it is not disrupting other functionalities of the script, please sumbit a PR and i will integrate it.

if you need some example, i would suggest to look at the framework classes and push classes there : https://github.com/gluon/AbletonLive10.1_MIDIRemoteScripts

cheers,

Henri