Skip to content

FL Studio 25.x: restore semantic mixer parsing for mixer diff #1

@aernw

Description

@aernw

Describe the feature

Stemhub’s FL Studio mixer diff relies on pyflp semantic extraction (project.mixer).
With FL Studio 25.2.4 snapshots, pyflp.parse() succeeds but the mixer model is empty (NoModelsFound / 0 inserts), so downstream diff reports 0 changes even when mixer state changed (pan, insert FX, slot mix, routing/send, etc.).

We need full semantic mixer support for modern FL Studio snapshots so backend compare can produce real change types (insert_pan_changed, slot_plugin_changed, etc.) instead of fallback binary-only detection.

What version of PyFLP are you using?

stemhub-org/PyFLP_v2 (branch dev), currently vendored in Stemhub backend at commit 54d2b9628ee9e95909199e7230353577ebe8394c.

Screenshots, Additional info

Context and observed behavior

  • Input FLP version in failing samples: 25.2.4.4960.
  • pyflp.parse() returns a Project, but:
    • list(project.mixer) -> NoModelsFound / empty
    • no expected mixer event IDs (MixerID.Params, InsertID.Flags, InsertID.Name, SlotID.Index) in parsed events
  • The FLP files themselves are different at binary level across versions (different SHA256 + size), confirming real project changes exist.

Goal

Implement robust mixer parsing for FL Studio 25.x artifacts in PyFLP_v2, with regression tests and compatibility guarantees for previously supported FLP versions.

Non-goals

  • No DAW UI or plugin-side diff logic in this issue.
  • No backend API schema change required here (handled in Stemhub).

Implementation plan (iterative)

Iteration 1 — Repro harness + failing fixtures

  • Add minimal reproducible fixtures in tests/assets/ (or equivalent): at least two FLP files from FL 25.x with known mixer differences.
  • Add a parser report script (or test helper) to inspect event IDs/chunks present in these fixtures.
  • Add failing tests documenting expected mixer extraction behavior:
    • project.mixer must expose inserts
    • changed fixture pair must differ on at least one mixer semantic field (pan/slot/plugin/etc.).

Deliverable: deterministic failing tests proving current gap.

Iteration 2 — Event mapping reverse-engineering for FL 25.x mixer data

  • Identify where FL 25.x stores mixer data when legacy IDs are absent/shifted.
  • Document mapping candidates between raw events/chunks and mixer concepts:
    • insert identity/index/name/enabled/pan/volume
    • slot index/enabled/mix/plugin key
    • send/routing value where available
  • Add inline parser documentation/comments with source evidence (event IDs/chunk shapes).

Deliverable: documented mapping table and decoded sample outputs.

Iteration 3 — Parser/model updates

  • Update relevant event enums/constructs/model selectors to include FL 25.x mixer layout.
  • Ensure parser remains tolerant:
    • unknown chunks continue as unknown
    • mixer extraction works when possible, without regressing parse for older versions.
  • Keep existing public API stable (Project.mixer, Insert, Slot semantics).

Deliverable: parser returns non-empty mixer model for FL 25.x fixtures.

Iteration 4 — Regression and compatibility test suite

  • Add/expand tests:
    • FL 25.x fixture semantic assertions
    • legacy fixtures still pass unchanged
    • malformed/partial chunks do not crash global parse path.
  • Add focused tests for each mixer field used by Stemhub diff:
    • insert name/enabled/pan/volume
    • slot index/plugin/enabled/mix
    • (optional) routing/send where supported.

Deliverable: green test suite covering new and old behavior.

Iteration 5 — Release/integration handoff

  • Publish changelog entry describing FL 25.x mixer support additions and limitations.
  • Tag/release PyFLP_v2 version used by Stemhub.
  • Provide integration notes for vendoring:
    • required dependency versions
    • any new parser caveats
    • expected behavior when mixer data still unavailable in edge files.

Deliverable: releasable parser update ready for Stemhub vendor bump.


Acceptance criteria

  • For FL Studio 25.x fixture projects, project.mixer yields inserts/slots with stable semantic fields.
  • A fixture pair with known mixer edits yields semantic differences at parser/model level (not only binary file hash changes).
  • Existing supported fixture versions do not regress.
  • Unknown/non-mixer chunks do not prevent parsing other valid mixer data.
  • Documentation/changelog clearly state supported FL Studio versions and known limits.

Suggested task checklist

  • Add FL 25.x fixtures + failing tests
  • Map new mixer-related event/chunk layout
  • Implement parser/model support
  • Add regression tests for fields consumed by Stemhub diff
  • Validate backward compatibility with existing fixtures
  • Document + release for vendor update

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions