24ppq to pos

Converts a 24ppq counter signal into different subdivisions: quarters, sixteenths and triplet eights. Length parameter can be used to set the length (in quarters) before resetting the counter (works exactly like divremc. Cue parameter offsets the incoming signal by a constant number of ppqs. 24ppqrem outputs the cued and divided 24ppq signal. inlet -> +cue -> divremc -> 24ppqrem -> other outputs
Author: Sputnki
License: BSD
Github: sptnk/sequencer/24ppq to pos.axo

Inlets

int32.positive 24ppq

Outlets

int32 4th

int32 16th

int32 8thT

int32 24ppqrem

Parameters

int32 length

int32 cue

Control Rate
uint32_t i = inlet_24ppq + param_cue;
uint32_t pos_tot = i - param_length * 24 * (i / (24 * param_length));
outlet_24ppqrem = pos_tot;

outlet_4th = pos_tot / 24;
outlet_16th = pos_tot / 6;
outlet_8thT = pos_tot / 8;

Privacy

© 2024 Zrna Research