deskCtrl2

control module for the deskmix2 module Enter the name of the deskmix2 module in the reference box! mute: channel mute solo: channel solo gain: channel level pan: channel panning sendLvl: volume of audio send to selected send-output select: selects which send-output the audio is send to all parameters can be k-rate modulated for complex controlled mixing
Author: Remco van der most
License: BSD
Github: sss/mix/deskCtrl2.axo

Inlets

int32 sendSel

bool32 mute

bool32 solo

frac32 gain

frac32 pan

frac32 sendLvl

Outlets

None

Parameters

bool32.tgl mute

bool32.tgl solo

frac32.u.map.gain gain

frac32.s.map pan

frac32.u.map sendLvl

int32 select

Attributes

objref a

Declaration
int mod;

int32_t prev;
Init
mod = attr_a.mod;
attr_a.mod += 1;
prev = 0;
Control Rate
int32_t gain = param_mute + inlet_mute > 0
                   ? 0
                   : __USAT((param_gain >> 1) + (inlet_gain << 3), 30) << 1;
attr_a.solo[mod] = param_solo + inlet_solo;
attr_a.send[mod] = __SSAT(param_sendLvl + inlet_sendLvl, 28);
int32_t pan = (__SSAT(param_pan + inlet_pan, 27) >> 1) + (1 << 26);
attr_a.select[mod] = param_select + inlet_sendSel;
attr_a.pan[mod] = ___SMMUL(pan << 3, gain);
attr_a.ccomp[mod] = ___SMMUL(((1 << 27) - pan) << 3, gain);

if (attr_a.MUTE > 0) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_mute], 0,
                     0xFFFD);
}
if (attr_a.SOLO > 0) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_solo], 0,
                     0xFFFD);
}

Privacy

© 2024 Zrna Research