It's been more than two weeks since I was last able to work on my synth project (apart from the name change) because the last couple of weeks were *stressful* to say the least.
My plans for a self-care-and-synth-tinkering-day today also fell through spectacularly. But I don't want this day to go to waste entirely. So short late-night electronics session it is.
The plan for tonight is roughly:
1. finish planning the envelope generator
2. implement envelope with fixed parameters
3. enjoy that my synth no longer just goes beeeeeeeeeeeeeeeep 😁
I will move the ADC stuff (which I originally planned for today) to another day, where I'll hopefully have the full day to work on it.
Tooted about it before, but just to reiterate: The synth will have two ADSR envelope generators, one for amplitude and one for filter cutoff. Since there's no filter implemented yet, it's just going to be the amplitude envelope today.
The sustain phase will simply be a constant factor from 0.0-1.0 multiplied with each sample.
The decay and release phases will be implemented by having an accumulated factor f and a decay speed s, that work together somewhat like this (pseudocode):
f := 1.0
s := 0.999
loop:
f = f * s
sample := produce_sample() * f
output_sample()
sleep()
That should give a nice, smooth, capacitor-ish decay. The attack phase then works by multiplying (1-f) with the sample.
#LuBuildsASynth