split 4 symm

Split the incoming signal in three, based on the amplitude.
Author: Sputnki
License: BSD
Github: sptnk/split/split 4 symm.axo

Inlets

frac32buffer in

Outlets

frac32buffer o1

frac32buffer o2

frac32buffer o3

frac32buffer o4

Parameters

frac32.u.map cutoff

Declaration
int32_t center;
int32_t o1;
int32_t o2;
int32_t o3;
int32_t o4;
Control Rate
center = param_cutoff;
Audio Rate
if (inlet_in < -center) {
  o1 = inlet_in;
  o2 = 0;
  o3 = 0;
  o4 = 0;
} else if (inlet_in > center) {
  o1 = 0;
  o2 = 0;
  o3 = 0;
  o4 = inlet_in;
} else if (inlet_in < 0) {
  o1 = 0;
  o2 = inlet_in;
  o3 = 0;
  o4 = 0;
} else {
  o1 = 0;
  o2 = 0;
  o3 = inlet_in;
  o4 = 0;
}

outlet_o1 = o1;
outlet_o2 = o2;
outlet_o3 = o3;
outlet_o4 = o4;

Privacy

© 2024 Zrna Research