Hey there,
i´m trying to understand how the groove induction of midi pal works.
i guess the core of the groove induction happens here
void Clock::Update( uint16_t bpm, uint8_t bpm_tenth, uint8_t groove_template, uint8_t groove_amount) // bpmtenth = zentel der bpm?
{
int32_t base_tick_duration = 7812500 / \ (static_cast<uint32_t>(bpm) * 10 + bpm_tenth) - 1;
for (uint8_t i = 0; i < kNumStepsInGroovePattern; ++i) // kNumStepsInGroovePattern = 16;
{
int32_t swing_direction = ResourcesManager::Lookup<int16_t, uint8_t>( LUT_RES_GROOVE_SWING + groove_template, i );
swing_direction *= base_tick_duration;
swing_direction *= groove_amount;
intervals_[i] = base_tick_duration + (swing_direction >> 16);
}
}
i assume the 7812500 is nanoseconds (7,812 ms) and this tick duration is the smallest possible tick duration right?
int32_t base_tick_duration = 7812500 / \ (static_cast<uint32_t>(bpm) * 10 + bpm_tenth) - 1;
( and what means / \ ? )
how can I interpret the following array? lets assume the midiclock has 24ppq. this array has 16 steps.
which of the 24 ticks per beat are shifted to affect the 16th grid? or the other way around… I dont find the piece of code where the 16th grid is translated to the tick level of ppq. where is that happening?
const prog_uint16_t lut_res_groove_swing[] PROGMEM = {
127, 127, -127, -127, 127, 127, -127, -127,
127, 127, -127, -127, 127, 127, -127, -127,
};
would be more than delighted for any help!
also any hint for code or literature concerning how groove induction in midi clocks might work is very welcome!
I have the feeling that most of the midi clock receivers are focusing on steadiness of the bpm, and fast adoption to bpm changes. I wonder to what extend groove induction is possible and when it causes jittering in the midi clock receiver.
looking forward to chat!