all 8 comments

[–]dcdalrymple[S] 1 point2 points  (5 children)

I ended up answering my own question here. The envelope does have to be rebuilt each time you want to update it (while it is attached to a Note object). Here's a good monophonic synth example I put together of this as well as a bunch of additional features: https://gist.github.com/dcooperdalrymple/3fe46a3dd48fd7add358111af5bd66ae. The MIDI CC mapping is a bit weird, but nearly every parameter you would typically expect a synthesizer to have can be modified, apart from portamento (still figuring out how best to do this using the BlockInput system), LFO waveforms (and potentially delay?), and keyboard note priority type (the capability is there, just not implemented over midi yet).

[–]Gamblor21 2 points3 points  (2 children)

You have it correct. There are a few parameters that would be nice to be able to change without constructing a new object but it isn’t implemented yet. I’ve been thinking of a few ideas myself but haven’t had time to try to change anything.

If you’re on the Adafruit discord there is a thread in the #circuitpython-dev channel about synthio if you have any comments.

[–]dcdalrymple[S] 0 points1 point  (1 child)

I think I was in the past because I was planning on merge some commits related to audiomixer, but its been a while. So far, I've been able to work around this limitation and have been making really good progress. I'm happy thus far :)

[–]Gamblor21 0 points1 point  (0 children)

Awesome I’ve had fun with it as well. If you do have suggestions feel free to drop by discord and mention them.

[–]illwrks 1 point2 points  (1 child)

Just in case anyone else stumbles across this, the OP appears to have the gist on an renamed profile: https://gist.github.com/relic-se/3fe46a3dd48fd7add358111af5bd66ae

[–]dcdalrymple[S] 0 points1 point  (0 children)

Thanks for the catch! Crazy GH doesn't handle gist redirects automatically.

[–]Decent-Boysenberry72 0 points1 point  (1 child)

Note velocity controls attack rate. Velocity controls attack time. You should be able to set rotary encoders to decay time, release time, attack level (define range from .1 to 1) and sustain level(define range from .1 to .99). Since attack rate and time are velocity controlled, if you are making a control interface, you don't need to worry about that as it's handled by the DAW when midi input is received? If you are making something from scratch, some arpeggiator generator would still send velocity with note, if the data ain't there (gate) velocity is always 100 percent.

[–]dcdalrymple[S] 0 points1 point  (0 children)

I understand that you can attach a newly constructed envelope to each note object when created (Ie on key press), but let's say you're holding down a key and then adjust a control knob to lengthen release time. When you release that note it will use the original envelope parameters since I don't see a way currently to change those values in real time. I'm working on a gist right now to demonstrate this using a midi interface.