I have a conversion question.
Look at this code:
local_ticks_length cycle duration in K-rate ticks (int32_t)
local_current_tick current tick (int32_t)
local_cycle_length percentage of the total length (int32_t)
inlet_ticks_length cycle duration in ticks (int32.positive)
params_cycle_length the percentage to apply to the total length (frac32.u.map)
// PLEASE HELP ME!!!
local_cycle_length = local_ticks_length * (params_cycle_length / 64);
local_current_tick = local_current_tick + 1 % local_cycle_length;
This is a part of an object that cycles and then triggers at the beginning of the cycle.
What I need to do is scaling the length of the cycle using a frac32.u.map:
local_ticks_length * (params_cycle_length / 64);
where 64 is the upper value of the frac32.u.map.
I have no idea on how to convert those variables in order to cycle only in the range of the scaled length.
Any help would be very appreciated!