And that you probably will be working on SEQV4 more than anything, but the realtime recording of V3 is the only real thorn in it’s side as far as a perfect sequencer goes (IMHO).
I hope you don’t think I’m coming across rude, and maybe I’m a minority when it come’s to useing realtime record, but I really really do miss it.
due to resource limitations of the PIC (RAM/Flash/Timers) it’s unlikely that I will be able to provide a better quantisation algorithm for MBSEQ V3. It will be a piece of cake for MBSEQ V4 on the STM32, especially because I already adjusted the programming concepts to simplify the implementation of certain feature requests.
Thats a shame about V3, I was afraid that it was beyond it’s limitations.. but at least V4 will have better real time recording.. so that’ll give us something good to look for.
// take next step if it will be reached "soon" (>80% of current step)
if( SEQ_BPM_IsRunning() ) {
u32 timestamp = SEQ_BPM_TickGet();
u8 shift_event = 0;
if( t->timestamp_next_step_ref <= timestamp )
shift_event = 1;
else {
s32 diff = (s32)t->timestamp_next_step_ref - (s32)timestamp;
u32 tolerance = (t->step_length * 20) / 100; // usually 20% of 96 ticks -> 19 ticks
// TODO: we could vary the tolerance depending on the BPM rate: than slower the clock, than lower the tolerance
// as a simple replacement for constant time measuring
if( diff < tolerance)
shift_event = 1;
}
if( shift_event ) {
int next_step = seq_record_step + 1; // tmp. variable used for u8 -> u32 conversion to handle 256 steps properly
if( next_step > tcc->length ) // TODO: handle this correctly if track is played backwards
next_step = tcc->loop;
#if DEBUG_VERBOSE_LEVEL >= 1
MIOS32_MIDI_SendDebugMessage("Shifted step %d -> %d\n", seq_record_step, next_step);
#endif
seq_record_step = next_step;
t->state.REC_DONT_OVERWRITE_NEXT_STEP = 1; // next step won't be overwritten
dont_play_step_now = 1; // next step will be played by sequencer, and not immediately
}
}
[/code]
Intensively tested by recording drum/mono/poly sequences which are played by Logic Audio, shifted by delays of +/- 20% of a 16th note.
Best Regards, Thorsten.