carrierdown / mutateful

Add-on for Ableton Live that enables live coding functionality fully integrated into Live's session view.
GNU General Public License v3.0
406 stars 13 forks source link

Limit on Clip length or size? #21

Closed pottering closed 4 years ago

pottering commented 5 years ago

Is there a limit on Clip length or size?

Seems reasonable, but it is not mentioned in the "docs".

carrierdown commented 5 years ago

Yeah, the documentation leaves a lot to be desired at present :| You can use the crop command for this. E.g. crop 1 will crop the clip to a length of 1 bar. When two parameters are specified it acts upon a region, so for instance crop 1/4 2 would crop the clip so that it starts one quarter note in, and anything after 1/4 + 2 bars would be removed. Does this solve your use case?

carrierdown commented 5 years ago

I've started working on the wiki btw :D https://github.com/carrierdown/mutateful/wiki

pottering commented 5 years ago

It caught me off guard, but after some testing I got used to it.

Another thing that caught me off guard was how it deals with the Loop Braces and Start/End markers.

Anyhow, thanks for this great tool!

carrierdown commented 5 years ago

Care to elaborate on the loop braces and start/end markers? How would you like the behaviour to be, ideally?

pottering commented 5 years ago

Basically you can shorten a MIDI Clip or move the Start marker, but seems mutateful takes into account only the 1.1.1 point?

Once I noticed there was some kind of limit, first thing I did was select a shorter time in the MIDI Clip, and the MIDI Clip also started with a couple bars of "silence", so I selected a part in the middle, but mutateful treat the Clip as still beginning in the 1.1.1.

For a (simplified) example, I had a MIDI Clip with 2 bars of "silence" then 2 bars with notes, I shortened the Clip to last 2 bars, then used "Crop 2" mutateful command. That got me 2 bars of "silence", because it processed from 1.1.1, not from the Loop Brace's start. If I click the start of the Loop Brace and use "Set 1.1.1 here" then I get the last 2 bars with notes.

To me it would be a bit easier if it processed the Clip as it is set to play in Live.

If a 4 bar Clip was shortened and set to Loop only 1 bar, it would process only that 1 bar.

carrierdown commented 5 years ago

I see. My intention is that it should use the loop start point in the clip, since this is usually what's interesting to process. I haven't used it in the way you describe, so haven't really hit upon these cases before.

Looking at the code, I'm actually asking for the loop_start field and the clip length and using that to extract the note information. However, the Live API can be quite tricky sometimes because it has a lot of quirky behaviour. For instance, reading the documentation for the Live API I see that they have this behaviour for the loop_start field:

loop_start

Description
For looped clips: loop start.
For unlooped clips: clip start.

So this actually depends on whether the clip is looping or not. I'll experiment some more and see if we can get some improved behaviour here down the road.

carrierdown commented 4 years ago

Created a separate issue (#25) for this.