None
None
frac32.u.map position
frac32.u.map strike
bool32.mom do
int32 damp
int32 minDiv
int32 harmonics
int32 jump
int32 max
int32 preset
objref table
uint32_t phase;
int i;
int j;
int32_t sum;
int32_t r;
int32_t posWidth;
int32_t position;
int32_t prev;
int ctrig;
int create;
int32_t Pos;
int k;
int32_t start;
float32_t A;
float32_t B;
uint32_t PM;
int DO;
DO = 1;
if ((param_do > 0) || DO > 0) {
DO = 0;
int32_t preset = param_preset;
preset = preset - (preset / attr_table.Waveforms) * attr_table.Waveforms;
int32_t update = param_position + param_strike + param_damp +
param_harmonics + param_jump + param_max + param_minDiv;
if ((!(prev == (update))) && !create) {
create = 1;
attr_table.Do = 1;
Pos = param_position;
start = param_strike;
for (i = 0; i < attr_table.LENGTH; i++) {
attr_table.array[i + param_preset * attr_table.LENGTH] = 0;
}
for (j = 0; j < param_harmonics; j++) {
k = (j * param_jump - (j * param_jump / param_max) * param_max);
position = ((j + 1) * Pos << 4);
SINE2TINTERP(position, posWidth)
for (i = 0; i < attr_table.LENGTH; i++) {
SINE2TINTERP((i << 32 - attr_table.LENGTHPOW) / param_minDiv *
(k + param_minDiv) -
(start << 3) * (k + param_minDiv),
r)
attr_table.array[i + preset * attr_table.LENGTH] +=
___SMMUL(r >> 3, posWidth >> 3) / (1 + k * param_damp);
}
}
} else if (prev == (update)) {
create = 0;
}
prev = update;
} else if (param_do == 0) {
attr_table.Do = 0;
}