deskmix3

up to 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. unlike the deskmix2 module, where the whole code is written out, this version uses a for-loop, so it first counts the amount of control modules that are loaded and then only calculates the channels that are actually in use. THOUGH! it does somehow ask 1% more.. something which I think, is really really weird.. This saves quite some lines of code, so if you just ran out of memory because the code gets too big, you might want to use this one instead of the deskmix2 module.
Author: Remco van der Most
License: BSD
Github: sss/mix/deskmix3.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;

for (i = 0; i < mod; i++) {
  ACC[i] = 0;
  sumL += ___SMMUL(in[i], Ccomp[i]);
  sumR += ___SMMUL(in[i], Pan[i]);
  ACC[select[i]] += ___SMMUL(in[i], Send[i]);
}

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