5
« on: March 01, 2018, 04:41:11 PM »
Reading through the source code, I discovered that there is already a CC mapped to volume, it just isn't obvious:
CC 73, Filter Gain, is actually gain1 no matter what filter or final effect mode is selected, even none.
If Xavier's intention is that parameter always be simple channel gain as part of any future effects, then this parameter could be used for a in-box mixer mode, as well as externally.
I suppose if I were to attempt to code this (which I might), I'd be tempted to put an additional, per-instrument, pan and gain stage after the filter. I don't think it would cost too much in processing, and it would leave the row of filter parameters alone for future filter use. I would also be likely to implement a "constant voice gain" mode so that number of voices doesn't change the relative volume of an instrument.2
In the original post, there is a fx level. I suspect the intention was wet/dry. This doesn't exist in the synth. calculations today, but could be easily added (just another two multiplies and an add per instrument.)
Thoughts?
1: This filter stage gain calculation is linear. This gives a rather unnatural feel to the control. I'd think a quadratic response (squaring the gain) would yield a wider usable range, with a more natural feel, where the user can feel the control as scaled dbs.
2: It is understood that in a "constant voice gain", an instrument with but one voice would be 1/8 the volume it could be - thus losing some available range on the DAC if it were the only instrument. Personally, I'd be willing to give up these 3 bits in exchange for constant leveling of voices: one voice in a mono instrument is as loud as a single voice in a 3 voice instrument.