Set keyframes / breakpoints from M4L device

    Max For Liveadvanced

    Martin Beck's icon
    Martin Beck's icon
    Martin Beck
    Jun 21 2020 | 9:51 am
    Hello,
    I would like to set keyframes of device parameters from a M4L device (in Live this is called breakpoints in the clip envelope). I tried the attached patch which invokes recording and gets/sends values of all live.numboxes in the patcher (which results in writing to the clip envelope). The problem is that I can not suppress the unintended keyframes at the beginning and end of the recording. Can anybody help me with a solution to this?
    UDP 3 fader.amxd
    amxd 32.22 KB
    Initial state of automation curve.
    Initial state of automation curve.
    Required state of automation curve after setting a keyframe via the M4L device.
    Required state of automation curve after setting a keyframe via the M4L device.
    Problem with the current implementation - 3 unintended keyframes at start and beginning of recording resulting in a parameter jump instead of the required linear curve.
    Problem with the current implementation - 3 unintended keyframes at start and beginning of recording resulting in a parameter jump instead of the required linear curve.
    The red button invokes writing the numbox values to the automation.
    The red button invokes writing the numbox values to the automation.
    Logic of the record/keyframe button
    Logic of the record/keyframe button
    if (e[i].maxclass=="live.numbox" && e[i].varname != "UDP") { var rep = e[i].getvalueof(); e[i].message("float",rep); }
    Intention is that the user adjusts the numboxes to the required values while Live is stopped. The user sets the playhead to the required song position in arrangement view and presses the red button to set the values as keyframes in the automation. Basically the patch does the following on click on the red button: a) arm track for recording b) start recording (i assume Live is configured in the preferences to start playing with record) c) get all live.numbox objects in the patcher (except those with special names) and get their values and send the values to the numboxes d) User stops the recording by pressing the red button again.
    Screenshot 3 shows the problem with this solution. There is not a single keyframe, but there are 4 making a rectangle instead of the intended linear descend shown in screenshot 2. The 3 unintended keyframes originate from the record on/off.

    • Martin Beck's icon
      Martin Beck's icon
      Martin Beck
      Jun 26 2020 | 6:16 am
      How can I get help with this? Looks like a dead end. In the Ableton forum people did feature requests years ago, but there seems to be still no comprehensive access to automation / clip envelopes via the LOM that allows to insert and delete breakpoints.
      Intention is that the user adjusts numboxes to the required values while Live is stopped. The user sets the playhead to the required song position in arrangement view and presses a button to set the values of the numboxes as keyframes in the automation / clip envelope.
      Most of this can already be scripted as shown in my first post. Remaining problem is that the recording makes a rectangular automation curve / parameter jump instead of inserting a single value and doing linear interpolation as would be done if the user draws a single breakpoint by hand.
      Share
    • Martin Beck's icon
      Martin Beck's icon
      Martin Beck
      Sep 10 2020 | 12:57 pm
      Feature request for LOM function: Insert breakpoints in clip envelope.
      By the way no response in Ableton's M4L forum to this topic so far.
      https://forum.ableton.com/viewtopic.php?f=35&t=239694&p=1777894#p1777894 https://forum.ableton.com/viewtopic.php?f=35&t=239739&p=1778064#p1778064
    • Rob Rox's icon
      Rob Rox's icon
      Rob Rox
      Nov 06 2022 | 10:01 am
      would be a really powerful feature!