vca3

3 input vca
Author: Smashed Transistors
License: LGPL
Github: tiar/gain/vca3.axo

Inlets

frac32buffer in1

frac32buffer in2

frac32buffer in3

frac32 g1

frac32 g2

frac32 g3

Outlets

frac32buffer mix out

Declaration
int32_t g1 = 0, g2 = 0, g3 = 0;
Control Rate
int32_t dg1 = (inlet_g1 - g1) >> 4;
int32_t dg2 = (inlet_g2 - g2) >> 4;
int32_t dg3 = (inlet_g3 - g3) >> 4;
for (int i = 0; i < BUFSIZE; i++) {
  outlet_out[i] = ___SMMLA(inlet_in3[i], g3 += dg3,
                           ___SMMLA(inlet_in2[i], g2 += dg2,
                                    ___SMMUL(inlet_in1[i], g1 += dg1)))
                  << 5;
}

Privacy

© 2024 Zrna Research