Matt, Jeff
The TrueRMS part used in the new violin mode BLRMS appears to be having trouble... its output may be positive with no input, or zero with a large input. It appears that the trouble comes from an uninitialized variable in the RCG part (PART_n). The following code is an approximation to what the RCG generates:
// TrueRMS: PART
if (PART_first_time_through) {
PART_first_time_through = 0;
PART = in0;
PART_sqrsum = in0 * in0;
PART_indatsqrd[0] = PART_sqrsum;
} else {
if (PART_n < PART_WINSZ) {
PART_index = PART_n++;
} else {
PART_index = (1+PART_index) % PART_WINSZ;
PART_sqrsum -= PART_indatsqrd[PART_index];
}
PART_indatsqrd[PART_index] = in0 * in0;
PART_sqrsum += PART_indatsqrd[PART_index];
PART_sqrval = PART_sqrsum / (double) PART_n;
if (PART_sqrval > 0.0) {
PART = lsqrt(PART_sqrval);
}else{
PART = 0.0;
}
}
With PART_n uninitialized, the PART_sqrsum is polluted by uninitialized values in the PART_indatsqrd array, resulting in a persistent offset.
We'll need to get this fixed and rebuild the SUS FEs.