Post #2411782
2021-11-25 20:32 UTC
Replies (3)
-
@sjaehn@fosstodon.org 2021-11-26 11:56
@murks@social.tchncs.de OK, I didn't explain the purpose of ADSR. Maybe I'm too focused on electronic musicians who want to start programming. For them the purpose was clear before. ADSR envelopes are put on top for each key. To softly fade in (A_ttack), softly go down (D_ecay) to a S_ustain level, and softly fade out (R_elease). Othewise you would only have on (1) or off (0). This would produce very nasty clicks. adsr() simply returns the level of the envelope function for the actual time when a key is on.
-
@sjaehn@fosstodon.org 2021-11-26 12:00
@murks@social.tchncs.de OK, Key::get() is not the most intuitive name. Maybe play or synth would be better. But I used or will use these symbols differently. Key::get() simply synthesizes an audio signal from the sine wave, the MIDI velocity, and the ADSR envelope.
-
@sjaehn@fosstodon.org 2021-11-26 12:08
@murks@social.tchncs.de Defining the class Key is clear. But this doesn't create an object. Right. This was your point. The object is declared in the video at 2:20 as a member of MySineSynth. And its only one object. So the synth we made is a Monosynth. The object key starts its life at 2:28 in the initializer of MySineSynth.