Open alex-parisi opened 1 month ago
This was a bad example - in the case of Baby's First Synth
, the gain should be a ratio of the number of voices. The mixer should not be related to this.
However, a different use case would be to sync up the Generator
with the Envelope
elements. When the frequency is changed, the phase is correctly changed between frequencies with the generator - this results in a slight delay (a few samples) until the new frequency starts "playing". But the 'Envelope' element will react immediately, and begin opening before the frequency has smoothly changed.
Even though there is attack applied to the Envelope
element, there is still the potential of opening it up too early. A control signal could tell the Envelope
how many samples to wait before acting.
Right now the audio graph supports two types of input/output connections: MIDI and audio data.
MIDI connections are implemented in the
dibiff::graph::MidiInput
anddibiff::graph::MidOutput
classes.Audio data connections are implemented in the
dibiff::graph::AudioInput
anddibiff::graph::AudioOutput
classes.The need has arisen for a third type of data connection type: control. For example, in the case of
Baby's First Synth
, the mixer mixes all of the voices together equally, when it should ideally only be mixing together the active voices. This would prevent notes with one voice from being significantly less loud that notes with all voices. If theEnvelope
objects could report theirEnvelopeStage
's to the mixer, the mixer would be able to apply the correct amount of attenuation.