deskmix2

8 input s-rate mixer, controlled remotely from the control modules (deskCtrl2 module, load this as many times as the channels you are using) Features solo/mute/gain/pan/sendLvl/sendSelect for all channels->controlled with deskCtrl2 module.
Author: Remco van der Most
License: BSD
Github: sss/mix/deskmix2.axo

Inlets

frac32buffer 1

frac32buffer 2

frac32buffer 3

frac32buffer 4

frac32buffer 5

frac32buffer 6

frac32buffer 7

frac32buffer 8

Outlets

frac32buffer mix out

frac32buffer R

frac32buffer send1

frac32buffer send2

frac32buffer send3

frac32buffer send4

frac32buffer send5

frac32buffer send6

frac32buffer send7

frac32buffer send8

Parameters

frac32.u.map.gain volume

frac32.u.map.gain send

bool32.mom unmute

bool32.mom unsolo

Declaration
int32_t gain[8];
int solo[8];
int32_t in[8];
int32_t send[8];
int select[8];
int32_t pan[8];
int32_t ccomp[8];
int32_t Pan[8];
int32_t Ccomp[8];
int32_t Send[8];
int Solo;
int mod;
int i;
int32_t ACC[8];
int32_t MUTE;
int32_t SOLO;
Control Rate
int Solo = 0;
for (i = 0; i < mod; i++) {
  Solo += solo[i];
  Solo = Solo > 0 ? 1 : 0;
}
for (i = 0; i < mod; i++) {
  Ccomp[i] =
      ((Solo > 0) & (!solo[i])) ? 0 : ___SMMUL(ccomp[i] << 2, param_volume);
  Pan[i] = ((Solo > 0) & (!solo[i])) ? 0 : ___SMMUL(pan[i] << 2, param_volume);
  Send[i] = ((Solo > 0) & (!solo[i])) ? 0 : ___SMMUL(send[i] << 2, param_send);
}
MUTE = param_unmute;
SOLO = param_unsolo;
Audio Rate
in[0] = inlet_1 << 3;
in[1] = inlet_2 << 3;
in[2] = inlet_3 << 3;
in[3] = inlet_4 << 3;
in[4] = inlet_5 << 3;
in[5] = inlet_6 << 3;
in[6] = inlet_7 << 3;
in[7] = inlet_8 << 3;
int32_t sumL = 0;
int32_t sumR = 0;
ACC[0] = 0;
ACC[1] = 0;
ACC[2] = 0;
ACC[3] = 0;
ACC[4] = 0;
ACC[5] = 0;
ACC[6] = 0;
ACC[7] = 0;
sumL += ___SMMUL(in[0], Ccomp[0]);
sumR += ___SMMUL(in[0], Pan[0]);
ACC[select[0]] += ___SMMUL(in[0], Send[0]);
if (mod > 1) {
  sumL += ___SMMUL(in[1], Ccomp[1]);
  sumR += ___SMMUL(in[1], Pan[1]);
  ACC[select[1]] += ___SMMUL(in[1], Send[1]);
}
if (mod > 2) {
  sumL += ___SMMUL(in[2], Ccomp[2]);
  sumR += ___SMMUL(in[2], Pan[2]);
  ACC[select[2]] += ___SMMUL(in[2], Send[2]);
}
if (mod > 3) {
  sumL += ___SMMUL(in[3], Ccomp[3]);
  sumR += ___SMMUL(in[3], Pan[3]);
  ACC[select[3]] += ___SMMUL(in[3], Send[3]);
}
if (mod > 4) {
  sumL += ___SMMUL(in[4], Ccomp[4]);
  sumR += ___SMMUL(in[4], Pan[4]);
  ACC[select[4]] += ___SMMUL(in[4], Send[4]);
}
if (mod > 5) {
  sumL += ___SMMUL(in[5], Ccomp[5]);
  sumR += ___SMMUL(in[5], Pan[5]);
  ACC[select[5]] += ___SMMUL(in[5], Send[5]);
}
if (mod > 6) {
  sumL += ___SMMUL(in[6], Ccomp[6]);
  sumR += ___SMMUL(in[6], Pan[6]);
  ACC[select[6]] += ___SMMUL(in[6], Send[6]);
}
if (mod > 7) {
  sumL += ___SMMUL(in[7], Ccomp[7]);
  sumR += ___SMMUL(in[7], Pan[7]);
  ACC[select[7]] += ___SMMUL(in[7], Send[7]);
}

outlet_L = sumL;
outlet_R = sumR;
outlet_send1 = ACC[0] << 1;
outlet_send2 = ACC[1] << 1;
outlet_send3 = ACC[2] << 1;
outlet_send4 = ACC[3] << 1;
outlet_send5 = ACC[4] << 1;
outlet_send6 = ACC[5] << 1;
outlet_send7 = ACC[6] << 1;
outlet_send8 = ACC[7] << 1;

Privacy

© 2024 Zrna Research