And another one,
I'm curious if there's anything in Pyo as flexible as SuperCollider's Env object. With that object one can define an envelope in terms of three arrays representing respectively: signal amplitude, duration between the amplitudes, and the curvature of the segments, taking the form:
Env.new(levels: [0, 1, 0.9, 0], times: [0.1, 0.5, 1], curve: [-5, 0, -5]).plot;
In the curve array, zero represents a straight line, positive numbers represent an exponential curve, and negative numbers represent a logarithmic curve. As far as I can tell, in Pyo, Expseg allows us to globally define the steepness of all the curves, with 1 being straight lines, but doesn't allow us the granular detail of varying the level of curve at each breakpoint. Is there a way to implement something like the SuperCollider paradigm described above in Pyo? It would be great to be able to define complex envelopes of this nature especially since it is fairly common to want an exponential attack but then a flatline sustain for instance.
In SuperCollider it's straightforward to throw this general envelope onto a midi event. We just have to define a release node (the address in the levels array where we want our midi event to sustain) and then we put this Env in an EnvGen.kr to instantiate it on the server, and then we assign that to a SynthDef. We can then play this Synth with a midi instrument and the envelope should work. In Pyo, it seems we are pretty limited with our midi options. We have MidiAdsr of course, MidiDelAdsr, and MidiLinseg. We don't have MidiExpseg let alone something that allows for variable curve breakpoints. Am I understanding this right or is there something I'm missing. I'm very new here and coming from a Supercollider/Max background so I'm open to there being more pythonic ways to accomplish these same ideas.
Thanks again,
Kjel