8xvca

8x "voltage controlled amplifier", multiplies v and a inputs, with linear interpolation from k- to s-rate
Author: Johannes Taelman
License: BSD
Github: phi/gain/8xvca.axo

Inlets

frac32 gain input

frac32 v2

frac32 v3

frac32 v4

frac32 v5

frac32 v6

frac32 v7

frac32 v8

frac32buffer a1

frac32buffer a2

frac32buffer a3

frac32buffer a4

frac32buffer a5

frac32buffer a6

frac32buffer a7

frac32buffer a8

Outlets

frac32buffer o1

frac32buffer o2

frac32buffer o3

frac32buffer o4

frac32buffer o5

frac32buffer o6

frac32buffer o7

frac32buffer o8

Declaration
int32_t prev1;
int32_t step1;
int32_t prev2;
int32_t step2;
int32_t prev3;
int32_t step3;
int32_t prev4;
int32_t step4;
int32_t prev5;
int32_t step5;
int32_t prev6;
int32_t step6;
int32_t prev7;
int32_t step7;
int32_t prev8;
int32_t step8;
Control Rate
step1 = (inlet_v1 - prev1) >> 4;
int32_t i1 = prev1;
prev1 = inlet_v1;

step2 = (inlet_v2 - prev2) >> 4;
int32_t i2 = prev2;
prev2 = inlet_v2;

step3 = (inlet_v3 - prev3) >> 4;
int32_t i3 = prev3;
prev3 = inlet_v3;

step4 = (inlet_v4 - prev4) >> 4;
int32_t i4 = prev4;
prev4 = inlet_v4;

step5 = (inlet_v5 - prev5) >> 4;
int32_t i5 = prev5;
prev5 = inlet_v5;

step6 = (inlet_v6 - prev6) >> 4;
int32_t i6 = prev6;
prev6 = inlet_v6;

step7 = (inlet_v7 - prev7) >> 4;
int32_t i7 = prev7;
prev7 = inlet_v7;

step8 = (inlet_v8 - prev8) >> 4;
int32_t i8 = prev8;
prev8 = inlet_v8;
Audio Rate
outlet_o1 = ___SMMUL(inlet_a1, i1) << 5;
i1 += step1;
outlet_o2 = ___SMMUL(inlet_a2, i2) << 5;
i2 += step2;
outlet_o3 = ___SMMUL(inlet_a3, i3) << 5;
i3 += step3;
outlet_o4 = ___SMMUL(inlet_a4, i4) << 5;
i4 += step4;
outlet_o5 = ___SMMUL(inlet_a5, i5) << 5;
i5 += step5;
outlet_o6 = ___SMMUL(inlet_a6, i6) << 5;
i6 += step6;
outlet_o7 = ___SMMUL(inlet_a7, i7) << 5;
i7 += step7;
outlet_o8 = ___SMMUL(inlet_a8, i8) << 5;
i8 += step8;

Privacy

© 2024 Zrna Research