Skip to content

fix: Audio-to-MIDI conversion should respect clip trim/offset and validate confidence display end-to-end #1802

@ChuxiJ

Description

@ChuxiJ

Problem

Audio-to-MIDI conversion appears to use the full audio key and BPM without passing clip trim or audioOffset. Confidence rendering is unit-tested, but there is no E2E coverage for convert -> piano roll confidence display.

Root Cause

Conversion service integration was added before trimmed clip semantics and confidence visualization were validated together in a browser workflow.

Solution

  • Pass clip trim/start/end/audioOffset into transcription or pre-slice the audio sent for conversion.
  • Preserve timing alignment between the converted MIDI and the clip region.
  • Add E2E coverage for conversion and confidence visualization in the piano roll.

Verification

  • Add unit tests for trimmed clip conversion input ranges.
  • Add E2E or integration test for an offset clip converted to MIDI with confidence colors visible.
  • Run focused audio-to-MIDI tests.

Files to Touch

  • src/store/projectStore.ts
  • src/services/audioToMidi.ts
  • src/components/pianoroll/PianoRollRenderer.ts
  • tests/e2e/*audio-to-midi*

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions