partCount

part counter only lets the count through for a part of the whole range. The last count position can be kept when "sustain" is high, otherwise it goes back to 0 when it reaches the maximum length.
Author: Remco van der Most
License: BSD
Github: sss/patt/partCount.axo

Inlets

int32 count

Outlets

int32 out

int32 range

Parameters

bool32.tgl sustain

int32 range

frac32.u.map offset

frac32.u.map length

Control Rate
int32_t length = ___SMMUL(param_range << 3, param_length << 2);
int32_t offset = ___SMMUL(param_range << 3, param_offset << 2);
int32_t count = (inlet_count + offset -
                 ((inlet_count + offset) / param_range) * param_range);
outlet_out = count > length ? 0 + param_sustain *param_length : count;

Privacy

© 2024 Zrna Research