Conversation
7c67e8a to
55c673d
Compare
| self.state_ = 0; | ||
| self.pulse_duration_counter_ = 0; | ||
|
|
||
| // Prime the first external interval as steps 0|1 so callers that read |
There was a problem hiding this comment.
HI @ArthurGibert I am struggling to understand what this code does, and why it is necessary.
When I now call generator.reset(), then query the generator.getSteps(), it is already set to 2 ...?
This means that code that should be triggered at the start of a pattern sequence after a reset is never executed, like this https://github.com/ATOVproject/faderpunk/pull/467/changes#diff-0a1fb26733375c0300e1f03e83ace8d18a39cbde92ddb571fa966037075aa848R404.
| if matches!(div, 2 | 4 | 8 | 16) { | ||
| leds.set(3, Led::Bottom, Color::Orange, Brightness::High); | ||
| } else { | ||
| leds.set(3, Led::Bottom, Color::Blue, Brightness::High); | ||
| } |
There was a problem hiding this comment.
Hi @ArthurGibert I've experimented with this variation instead , I find it really useful to quickly be able to land on 1/16th notes visually
if matches!(div, 2 | 4 | 8 | 16) {
leds.set(3, Led::Bottom, Color::Orange, Brightness::Mid);
} else if div == 6 {
// Highlight 1/16th note default
leds.set(3, Led::Bottom, Color::Yellow, Brightness::High);
} else {
leds.set(3, Led::Bottom, Color::Blue, Brightness::Mid);
}
| return; | ||
| } | ||
|
|
||
| const INTERNAL_STEPS_PER_EXTERNAL_TICK: u8 = 2; |
There was a problem hiding this comment.
Perhaps a simpler alternative for FP-Grids is just to run it on a fixed clock division per output mode:
- div = 6 for Euclidean (16 steps in one bar)
- div = 3 for Drum Mode (32 steps in one bar)
- div = 6, 4 depending on the number of steps per bar in the DnB pattern
This merging solution is going to mask the original underlying drum patterns I think.
Fix timing and phase issue