Skip to content

Slight rework of FP Grids#467

Open
ArthurGibert wants to merge 4 commits intomainfrom
feat/fp-grid-rework
Open

Slight rework of FP Grids#467
ArthurGibert wants to merge 4 commits intomainfrom
feat/fp-grid-rework

Conversation

@ArthurGibert
Copy link
Contributor

Fix timing and phase issue

@ArthurGibert ArthurGibert marked this pull request as draft March 3, 2026 19:06
@ArthurGibert ArthurGibert marked this pull request as ready for review March 6, 2026 15:47
self.state_ = 0;
self.pulse_duration_counter_ = 0;

// Prime the first external interval as steps 0|1 so callers that read
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Comment on lines +419 to +423
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);
}
Copy link
Collaborator

@rjsmith rjsmith Mar 9, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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;
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants