Mix4sm

4 input s-rate mixer
Author: Johannes Taelman
License: BSD
Github: jaffa/mix2/Mix4sm.axo

Inlets

frac32buffer m

frac32buffer return in

frac32buffer input 1

frac32buffer input 2

frac32buffer input 3

frac32buffer input 4

Outlets

frac32buffer mix out

frac32buffer send out

frac32buffer o

Parameters

bool32.tgl 1on

bool32.tgl 2on

bool32.tgl 3on

bool32.tgl 4on

bool32.tgl return

frac32.u.map v1

frac32.u.map s1

frac32.u.map v2

frac32.u.map s2

frac32.u.map v3

frac32.u.map s3

frac32.u.map v4

frac32.u.map s4

frac32.u.map r

frac32.u.map main

Audio Rate
{
  // main mix
  int32_t accum = 0;
  if (param_1on) {
    accum = ___SMMUL(inlet_1, param_v1);
  }
  if (param_2on) {
    accum = ___SMMLA(inlet_2, param_v2, accum);
  }
  if (param_3on) {
    accum = ___SMMLA(inlet_3, param_v3, accum);
  }
  if (param_4on) {
    accum = ___SMMLA(inlet_4, param_v4, accum);
  }
  if (param_return) {
    accum = ___SMMLA(inlet_r, param_r, accum);
  } // Return
  outlet_m = __SSAT((accum << 5), 28);
}
{
  // send
  int32_t accum = 0;
  if (param_1on) {
    accum = ___SMMUL(inlet_1, param_s1);
  }
  if (param_2on) {
    accum = ___SMMLA(inlet_2, param_s2, accum);
  }
  if (param_3on) {
    accum = ___SMMLA(inlet_3, param_s3, accum);
  }
  if (param_4on) {
    accum = ___SMMLA(inlet_4, param_s4, accum);
  }
  outlet_s = __SSAT((accum << 5), 28);
}

{
  // master out
  int32_t accum = ___SMMUL(inlet_m, param_main);
  ;
  outlet_o = __SSAT((accum << 5), 28);
}

Privacy

© 2024 Zrna Research