f0plugins icon indicating copy to clipboard operation
f0plugins copied to clipboard

Dbjorklund offset bug?

Open dietcv opened this issue 1 year ago • 1 comments

hey,

If you use the offset param of Dbjorklund the pattern does not start at initial time. I think this is a bug:

compare: {Duty.ar(1/100, 0, Dbjorklund(5, 8, 0)) * Impulse.ar(100) }.plot(0.1); // starts with an initial trigger

with: {Duty.ar(1/100, 0, Dbjorklund(5, 8, 1)) * Impulse.ar(100) }.plot(0.1); // is shifted in time without an initial trigger

same is not true for Dbjorklund2

dietcv avatar Mar 13 '24 23:03 dietcv

I think it would be desirable to skip events instead of steps when offsetting the pattern.

I currently have the same problem with this bresenham implementation, that its offsetting steps instead of events. EDIT: fixed that with offset = (offset.neg / (n / k)).ceil; https://scsynth.org/t/bresenham-implementation-of-the-euclidean-rhythm-algorithm-in-supercollider/3127/4

dietcv avatar Mar 14 '24 21:03 dietcv