mod2Karplus

Module to attenuate the midi data to all the parameter inputs of the KarplusStrong2 module. Also has attenuators for controlling a BP-filter to pre-filter the audio-in, feeding the delay.
Author: Remco van der Most
License: BSD
Github: sss/delay/mod2Karplus.axo

Inlets

frac32 input

frac32 velocity

frac32 touch

Outlets

frac32 output

frac32 tailtime

frac32 color

frac32 mode

frac32 strength

frac32 influence

frac32 BPcut

frac32 BPres

Parameters

frac32.s.map note

frac32.s.map vel

frac32.s.map touch

frac32.s.map n2p

frac32.s.map v2p

frac32.s.map t2p

frac32.s.map n2t

frac32.s.map v2t

frac32.s.map t2t

frac32.s.map n2c

frac32.s.map v2c

frac32.s.map t2c

frac32.s.map n2m

frac32.s.map v2m

frac32.s.map t2m

frac32.s.map n2s

frac32.s.map v2s

frac32.s.map t2s

frac32.s.map n2i

frac32.s.map v2i

frac32.s.map t2i

frac32.s.map n2BPc

frac32.s.map v2BPc

frac32.s.map t2BPc

frac32.s.map n2BPr

frac32.s.map v2BPr

frac32.s.map t2BPr

int32 0=position,1=tailtime,2=color,3=mode,4=strength,5=influence,6=BP Cut,7=BP res

Declaration
int select;
Control Rate
if (!(param_select == select)) {

  switch (param_select > 0 ? param_select : 0) {
  case 0:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2p, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2p, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2p, 0xFFFD);
    break;
  case 1:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2t, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2t, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2t, 0xFFFD);
    break;
  case 2:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2c, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2c, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2c, 0xFFFD);
    break;
  case 3:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2m, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2m, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2m, 0xFFFD);
    break;
  case 4:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2s, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2s, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2s, 0xFFFD);
    break;
  case 5:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2i, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2i, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2i, 0xFFFD);
    break;
  case 6:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2BPc, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2BPc, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2BPc, 0xFFFD);
    break;
  case 7:
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_note],
                       param_n2BPr, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_vel],
                       param_v2BPr, 0xFFFD);
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_touch],
                       param_t2BPr, 0xFFFD);
    break;
  }
}

switch (param_select > 0 ? param_select : 0) {
case 0:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2p],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2p], param_vel,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2p],
                     param_touch, 0xFFFD);
  break;
case 1:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2t],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2t], param_vel,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2t],
                     param_touch, 0xFFFD);
  break;
case 2:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2c],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2c], param_vel,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2c],
                     param_touch, 0xFFFD);
  break;
case 3:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2m],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2m], param_vel,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2m],
                     param_touch, 0xFFFD);
  break;
case 4:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2s],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2s], param_vel,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2s],
                     param_touch, 0xFFFD);
  break;
case 5:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2i],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2i], param_vel,
                     0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2i],
                     param_touch, 0xFFFD);
  break;
case 6:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2BPc],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2BPc],
                     param_vel, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2BPc],
                     param_touch, 0xFFFD);
  break;
case 7:
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_n2BPr],
                     param_note, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_v2BPr],
                     param_vel, 0xFFFD);
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_t2BPr],
                     param_touch, 0xFFFD);
  break;
}

outlet_position = ___SMMUL(param_n2p << 3, inlet_pitch << 2) +
                  ___SMMUL(param_v2p << 3, inlet_velocity << 2) +
                  ___SMMUL(param_t2p << 3, inlet_touch << 2);
outlet_tailtime = ___SMMUL(param_n2t << 3, inlet_pitch << 2) +
                  ___SMMUL(param_v2t << 3, inlet_velocity << 2) +
                  ___SMMUL(param_t2t << 3, inlet_touch << 2);
outlet_color = ___SMMUL(param_n2c << 3, inlet_pitch << 2) +
               ___SMMUL(param_v2c << 3, inlet_velocity << 2) +
               ___SMMUL(param_t2c << 3, inlet_touch << 2);
outlet_mode = ___SMMUL(param_n2m << 3, inlet_pitch << 2) +
              ___SMMUL(param_v2m << 3, inlet_velocity << 2) +
              ___SMMUL(param_t2m << 3, inlet_touch << 2);
outlet_strength = ___SMMUL(param_n2s << 3, inlet_pitch << 2) +
                  ___SMMUL(param_v2s << 3, inlet_velocity << 2) +
                  ___SMMUL(param_t2s << 3, inlet_touch << 2);
outlet_influence = ___SMMUL(param_n2i << 3, inlet_pitch << 2) +
                   ___SMMUL(param_v2i << 3, inlet_velocity << 2) +
                   ___SMMUL(param_t2i << 3, inlet_touch << 2);
outlet_BPcut = ___SMMUL(param_n2BPc << 3, inlet_pitch << 2) +
               ___SMMUL(param_v2BPc << 3, inlet_velocity << 2) +
               ___SMMUL(param_t2BPc << 3, inlet_touch << 2);
outlet_BPres = ___SMMUL(param_n2BPr << 3, inlet_pitch << 2) +
               ___SMMUL(param_v2BPr << 3, inlet_velocity << 2) +
               ___SMMUL(param_t2BPr << 3, inlet_touch << 2);

select = param_select;

Privacy

© 2024 Zrna Research