ADSRBezMem

This is the control module for the ADSRbezier module curve controles, so you'll only need one knob and a selector to control all 9 curve parameters
Author: Remco van der Most
License: BSD
Github: sss/env/ADSRBezMem.axo

Inlets

int32 select parameter to change (0 to 17)

frac32.positive input for controlling parameters

bool32.rising Trigger high updates parameter to "in" inlet

frac32 adds to respective value, so no need for external adders.

frac32 adds to respective value

frac32 adds to respective value

frac32 adds to respective value

frac32 adds to respective value

frac32 D3

frac32 R1

frac32 R2

frac32 R3

Outlets

frac32 A1

frac32 A2

frac32 A3

frac32 D1

frac32 D2

frac32 D3

frac32 R1

frac32 R2

frac32 R3

Parameters

frac32.s.map A1

frac32.s.map A2

frac32.s.map A3

frac32.s.map D1

frac32.s.map D2

frac32.s.map D3

frac32.s.map R1

frac32.s.map R2

frac32.s.map R3

Declaration
int32_t cache;
int trg;
Control Rate
switch (inlet_sel > 0 ? inlet_sel : 0) {

case 0:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_A1], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;

case 1:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_A2], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;

case 2:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_A3], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;

case 3:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_D1], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;

case 4:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_D2], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;

case 5:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_D3], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;
case 6:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_R1], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;

case 7:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_R2], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;

case 8:
  if ((inlet_trg > 0) && (trg != 1)) {
    trg = 1;
    PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_R3], inlet_in,
                       0xFFFD);
  } else {
    if (inlet_trg == 0) {
      trg = 0;
    }
  }
  break;
}
outlet_A1 = param_A1 + inlet_A1;
outlet_A2 = param_A2 + inlet_A2;
outlet_A3 = param_A3 + inlet_A3;
outlet_D1 = param_D1 + inlet_D1;
outlet_D2 = param_D2 + inlet_D2;
outlet_D3 = param_D3 + inlet_D3;
outlet_R1 = param_R1 + inlet_R1;
outlet_R2 = param_R2 + inlet_R2;
outlet_R3 = param_R3 + inlet_R3;

Privacy

© 2024 Zrna Research