I'd like a max patch that calculates the length of a selection. Claude and Gemini can't help me.
The reason for this, I need to calculate the average tempo of a section when there is tempo automation. I need this to bring the music in Session View.
For example, if I have a 4 bars accelerando, I can't bring that to Session view. The only way I found was to calculate the average tempo of those 4 bars. Ex. : 4 bars accel from 120 to 135Bpm, when I select these 4 bars, Live tells me (bottom left) it is 7.625 sec.
I do 16 beats (4 bars) * 60 / 7.625 = 125.90 BPM average.
If I bring those 4 bars in session view, and write a tempo of 125.90, then it will play fluidly to the next scene.
This Max Patch would calculate it automatically when I select those 4 bars, because going manually takes time. I do a lot of music with tempo automation.
Thanks,
Getting length of a selection in seconds.milliseconds
Getting length of a selection in seconds.milliseconds
MBP M1 Max 64 GB Ram, OSX 15.7.4
Live 10.1.43 Suite
Live 11.3.35
Live 12.3.6
Interface : RME Fireface UCX
Live 10.1.43 Suite
Live 11.3.35
Live 12.3.6
Interface : RME Fireface UCX
-
chapelier fou
- Posts: 6357
- Joined: Mon May 15, 2006 12:15 pm
Re: Getting length of a selection in seconds.milliseconds
It's tricky because it depends on the tempo automation curve.
If you restrict it to linear segments, maybe it's simpler to calculate ?
If you restrict it to linear segments, maybe it's simpler to calculate ?
MacBook Pro 13" Retina i7 2.8 GHz OS 10.13, L10.0.1, M4L.
MacStudio M1Max 32Go OS 12.3.1
MacStudio M1Max 32Go OS 12.3.1
Re: Getting length of a selection in seconds.milliseconds
It's the only place I need the length, in the automation sections, because it doesn't translate in session view. Live already tells me the length, bottom left when I select something. This value is not "copy-able"?chapelier fou wrote: ↑Wed Apr 08, 2026 2:15 pmIt's tricky because it depends on the tempo automation curve.
If you restrict it to linear segments, maybe it's simpler to calculate ?
MBP M1 Max 64 GB Ram, OSX 15.7.4
Live 10.1.43 Suite
Live 11.3.35
Live 12.3.6
Interface : RME Fireface UCX
Live 10.1.43 Suite
Live 11.3.35
Live 12.3.6
Interface : RME Fireface UCX