Skip to content

[ENHANCEMENT]: feat: user feedback for onset quantisation — snap detected hits to nearest musical grid position, Already in place but have a look #274

Description

@victoria-mckinney

Background

Feedback from musician tester during alpha testing period.

Problem

Even when audio classification is accurate, slight timing imperfections
in onset detection cause notes to be placed at incorrect positions in
the score. For example, a snare hit detected at 0.503s instead of
exactly 0.500s may be notated in the wrong rhythmic position or
generate spurious rests.

Proposed Solution

Implement onset quantisation — snapping detected onset times to the
nearest musical grid position within a tolerance window.

Example approach:

  • Define grid positions based on detected BPM (8th notes, 16th notes)
  • For each detected onset, find the nearest grid position
  • If within tolerance (e.g. ±30ms), snap to that grid position
  • If outside tolerance, flag as off-beat/grace note

Test Data

Piers has provided structured test files covering:

  • Quarter, 8th and 16th note patterns
  • Mixed rhythms
  • Concurrent hits (multiple drums simultaneously)
  • Triplets
  • Multiple voice combinations

Files: MP3 (input), MIDI (ground truth digital), PDF (ground truth score)

References

  • Standard ADT quantisation approaches
  • mir_eval onset tolerance window (currently 50ms in nanaoto's benchmark)

Acceptance Criteria

  • Quantisation implemented and configurable (tolerance window)
  • Tested against Piers' test suite
  • Notation output visibly improved on timing-sensitive patterns
  • No regression on existing test suite

Activity

  1. bellescoincidences commented on Jun 2, 2026

    @bellescoincidences
  2. bellescoincidences commented on Jun 2, 2026

    @bellescoincidences
  3. changed the title [-][ENHANCEMENT]: feat: onset quantisation — snap detected hits to nearest musical grid position[/-] [+][ENHANCEMENT]: feat: user feedback for onset quantisation — snap detected hits to nearest musical grid position, Already in place but have a look[/+] on Jun 7, 2026
  4. victoria-mckinney commented on Jun 7, 2026

    @victoria-mckinney
    MemberAuthor

    This will be looked at in future releases as there is already some quantisation and the primary focus is classification model

  5. linked a pull request that will close this issuerelease/0.2.0 #286on Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

featureNew feature or request. Enhancementgood first issueGood for newcomershelp wantedExtra attention is needed

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions