decay

Author: Smashed Transistors
License: LGPL
Github: tiar/ADD16/decay sl.axo

Inlets

bool32.rising trig

Outlets

None

Parameters

frac32.s.mapvsl d1

frac32.s.mapvsl d2

frac32.s.mapvsl d3

frac32.s.mapvsl d4

frac32.s.mapvsl d5

frac32.s.mapvsl d6

frac32.s.mapvsl d7

frac32.s.mapvsl d8

frac32.s.mapvsl d9

frac32.s.mapvsl d10

frac32.s.mapvsl d11

frac32.s.mapvsl d12

frac32.s.mapvsl d13

frac32.s.mapvsl d14

frac32.s.mapvsl d15

frac32.s.mapvsl d16

Attributes

objref ctlAmp

Declaration
static const uint32_t NBH = 16;

int32_t g[NBH];
bool atrig = false;

uint32_t getGain(int h) { return g[h]; }
Init
for (int h = 0; h < NBH; h++)
  g[h] = 0;
Control Rate
if (inlet_trig && !atrig) {
  for (int h = 0; h < NBH; h++) {
    g[h] = attr_ctlAmp.getGain(h);
  }
}
atrig = inlet_trig;
/*
            int32_t in = - inlet_d - param_d;
      int32_t c;
      MTOFEXTENDED(in, c);
      c = 0x7FFFFFFF - (c >> 2);
      val = ___SMMUL(val, c)<<1;
*/
int32_t f;
MTOFEXTENDED(-param_d1, f);
g[0] = ___SMMLS(g[0], f, g[0]);
MTOFEXTENDED(-param_d2, f);
g[1] = ___SMMLS(g[1], f, g[1]);
MTOFEXTENDED(-param_d3, f);
g[2] = ___SMMLS(g[2], f, g[2]);
MTOFEXTENDED(-param_d4, f);
g[3] = ___SMMLS(g[3], f, g[3]);
MTOFEXTENDED(-param_d5, f);
g[4] = ___SMMLS(g[4], f, g[4]);
MTOFEXTENDED(-param_d6, f);
g[5] = ___SMMLS(g[5], f, g[5]);
MTOFEXTENDED(-param_d7, f);
g[6] = ___SMMLS(g[6], f, g[6]);
MTOFEXTENDED(-param_d8, f);
g[7] = ___SMMLS(g[7], f, g[7]);
MTOFEXTENDED(-param_d9, f);
g[8] = ___SMMLS(g[8], f, g[8]);
MTOFEXTENDED(-param_d10, f);
g[9] = ___SMMLS(g[9], f, g[9]);
MTOFEXTENDED(-param_d11, f);
g[10] = ___SMMLS(g[10], f, g[10]);
MTOFEXTENDED(-param_d12, f);
g[11] = ___SMMLS(g[11], f, g[11]);
MTOFEXTENDED(-param_d13, f);
g[12] = ___SMMLS(g[12], f, g[12]);
MTOFEXTENDED(-param_d14, f);
g[13] = ___SMMLS(g[13], f, g[13]);
MTOFEXTENDED(-param_d15, f);
g[14] = ___SMMLS(g[14], f, g[14]);
MTOFEXTENDED(-param_d16, f);
g[15] = ___SMMLS(g[15], f, g[15]);

Privacy

© 2024 Zrna Research