Inserting steps in clip envelope: how to do a ramp? API bug?

Learn about building and using Max for Live devices.
Post Reply
lu57
Posts: 22
Joined: Mon Jan 20, 2020 9:02 am
Contact:

Inserting steps in clip envelope: how to do a ramp? API bug?

Post by lu57 » Thu Nov 16, 2023 12:32 pm

Hi there!

I'm trying to build clip envelopes via max or the api, and I don't understand the logic.
insert_step take 3 arguments:
1- start in beats
2- duration in beats
3- value

Let's imagine that I want to make a positive ramp,
I would call insert_step 2 times with the parameters:
* 0, 0, 0
* 4, 0, 1
But all I get is a 'spike' at beat 4.

But If I do:
* 0, 0, 0
* 4, -0.01, 1
I get my ramp with a little glitch at the end.

I simply do not understand the logic behind insert_step :(
Does anyone knows?

Post Reply