# How to create curves with multiple inflection points?

Hello

I’m a beginner in supercollider. Are there any functions to make curves with multiple inflection points, like an envelop, but in the form : list of breakpoints (2, 7, 1, 15…) , list of number of steps (5, 7…), list of types of curves (0, -3, 3…) — in order to make streams to use in a Pbind ?

Thank you!

maybe Pseg if what you asking for.

Thank you dietcv !

The problem here is the same as for envelops : the second argument return durations, not the number of steps. I, would like to obtain an interpolation of x steps between each value…

Can you just write the steps by hand into the envelope spec?

`Env.new([0.0, 0.4, 0.4, 0.6, 0.6, 0.8, 0.8, 1.0], [0.1, 0.1, 0.1, 0.1, 0.1, 0.1, 0.1, ], [-1, 0, 0, 0, 1, 0, 5]).plot;`

to give a stair step, for instance

Actually, the idea is to produce a stream from a list of breakpoints and the steps between each breakpoint, to produce something that would be closer to this (without using duration values!):

[Array.interpolation(5, 3.2, 20.5), Array.interpolation(15, 20.5, 7), Array.interpolation(29, 7, 100),…], e
For example, giving the “size” as a sequence of random values between 5 and 30, and so on.
There must be a function that does this… ?