WCM12

module for manually setting the chance that certain notes follow up on certain previous notes. "Note1" sets the "oldest previous" note. "Note2" sets the "last previous" note. The small selectors set the chance for each note to follow up on this sequence.
Author: Remco van der most
License: BSD
Github: sss/patt/WCM12.axo

Inlets

None

Outlets

None

Parameters

int32.mini i0

int32.mini i1

int32.mini i2

int32.mini i3

int32.mini i4

int32.mini i5

int32.mini i6

int32.mini i7

int32.mini i8

int32.mini i9

int32.mini i10

int32.mini i11

bool32.mom do

int32 note1

int32 note2

Attributes

objref core

Declaration
int prev;
int PREV;
int i;
int dtrig;
Control Rate
int NOTE = param_note2 * 12 + param_note1 * 144;

if (!(prev == NOTE + attr_core.load)) {
  PExParameterChange(&parent->PExch[PARAM_INDEX_attr_legal_name_i0],
                     attr_core.array[NOTE], 0xFFFD);
  for (i = 1; i < 12; i++) {
    PExParameterChange(
        &parent->PExch[PARAM_INDEX_attr_legal_name_i0 + i],
        attr_core.array[i + NOTE] - attr_core.array[i - 1 + NOTE], 0xFFFD);
  }
}

if ((param_do > 0) && !dtrig) {
  dtrig = 1;
  attr_core.array[0 + NOTE] = param_i0;
  attr_core.array[1 + NOTE] = param_i1 + attr_core.array[0 + NOTE];
  attr_core.array[2 + NOTE] = param_i2 + attr_core.array[1 + NOTE];
  attr_core.array[3 + NOTE] = param_i3 + attr_core.array[2 + NOTE];
  attr_core.array[4 + NOTE] = param_i4 + attr_core.array[3 + NOTE];
  attr_core.array[5 + NOTE] = param_i5 + attr_core.array[4 + NOTE];
  attr_core.array[6 + NOTE] = param_i6 + attr_core.array[5 + NOTE];
  attr_core.array[7 + NOTE] = param_i7 + attr_core.array[6 + NOTE];
  attr_core.array[8 + NOTE] = param_i8 + attr_core.array[7 + NOTE];
  attr_core.array[9 + NOTE] = param_i9 + attr_core.array[8 + NOTE];
  attr_core.array[10 + NOTE] = param_i10 + attr_core.array[9 + NOTE];
  attr_core.array[11 + NOTE] = param_i11 + attr_core.array[10 + NOTE];
} else if (param_do == 0) {
  dtrig = 0;
}
prev = NOTE + attr_core.load;

Privacy

© 2024 Zrna Research