shorepine / amy

AMY - A high-performance fixed-point Music synthesizer librarY for microcontrollers
https://shorepine.github.io/amy/
MIT License
224 stars 14 forks source link

Feature Suggestion: Volume EG for partials #213

Closed Visuelle-Musik closed 2 months ago

Visuelle-Musik commented 2 months ago

I would be cool if wave=amy.PARTIALS could additionally have a master-volume envelope Also see this discussion: "Interaction of voices and oscillators" #191

dpwe commented 2 months ago

Yes, I like this. Currently the amplitude envelope is applied with within-block linear interpolation during the waveform generation for basic wave shapes (SINE, PULSE, SAW, TRIANGLE), applied piecewise-constant within blocks for NOISE, KS, PCM, but ignored for PARTIALS (other than the propagation of velocity to each of the component partials).

It also appears that pitch modulation is only applied at the creation of individual partials, after which they continue at a fixed base pitch (modified by their frequency modulation contour). Dynamic filtering is already correctly applied to PARTIALS outputs.

Adding overall amplitude modulation following the amplitude envelope of the main PARTIALS oscillator should be added. Also, pitch modulation of that oscillator should propagate down to individual partials frame-by-frame.

Also see #214 for additional PARTIALS modes.