Having a lot of trouble with [line] object and values being dropped.

    Max For Livebugs/issues

    Popbot's icon
    Popbot's icon
    Jan 24 2023 | 9:14 pm
    Hey! I'm relatively new to programming in max, and I'm having a lot of issues with the line object. I've seen on other forum posts that it's useful for a slew between signals, so I've been using it to slew between random values. I also wanted it to have a variable slew time, so I did some stuff with messages to be able to change that with a parameter. The only issue is that on lower slew times (0 - 50-ish milliseconds) i'm getting a lot of values that just go to zero for whatever reason. help would be appreciated! Here's an attached screen recording i took in case my explanation here wasn't sufficient: https://www.youtube.com/watch?v=XLqQrIKe1h4

    • 👽R∆J∆ The Resident ∆lien👽's icon
      👽R∆J∆ The Resident ∆lien👽's icon
      taking a quick guess: you're using 'line' - this is driven by an event-rate scheduler i think you want to look into reworking your patch using the signal-accurate version: 'line~' also, take a look at the 'curve~' object if you want line~ but with curvature to the slew (if you reduce the timing to 0.1, that's in milliseconds, that means not 1 millisecond, but 1/10 of a millisecond, at 48000kHz sample-rate, that would mean 4.8 samples in length of duration, an event-rate scheduler would not be efficient for this(you'd have to set it into 'Overdrive' and 'In Audio Interrupt' and then set the signal-vector to 1 sample, and then you'd have a serious CPU drain... not worth it even if this were possible), so you get the 0s at the end of the ramp automatically because that's the value the event-rate scheduler catches at the frequency it polls for event-rate values)