OK, made a few changes. I’ve added a simple DC filter to the output. It’s just before the output port, after all of the operators have been mixed/multiplied, so it shouldn’t have any effect on the FM process. It’s toggle-able through the context menu. This is the first time I’ve implemented a filter or a menu option, hopefully I’ve done so correctly.
Here’s the code for the DC Filter:
float xm1 = 0;
float ym1 = 0;
float r = 0.995;
float process(float x)
float y = x - xm1 + r * ym1;
xm1 = x;
ym1 = y;
output = DCBlock.process(output);
Since PSI OP only outputs the mangled result of modulated operators, I ran ValleyRacks Dexter through the filter to get an idea of what it’s doing:
Looks OK to me, the important harmonic content isn’t being affected I think.
Applying the filter to PSI OP had an interesting result though. On some wave combinations with lots of square like components, the filtered wave produced a greater peak to peak voltage than the unfiltered original:
Looking into this, I realised a mistake I’d made implementing the different FM algorithms. Originally the modulation matrix sent operators to the output at unity gain, regardless of how many operators were being sent for that algorithm. Now operators are properly mixed, so output volumes are consistent between algorithims.
There’s still a difference in peaks between the filtered and unfiltered, but since they’re now within their proper range it shouldn’t be such an issue.