Skip to content

Improve Procedural Audio Mix and Role Mapping (melody clarity + depth) #3

Description

@joenb33

Improve procedural mix + role mapping clarity

Hi! First of all, thanks for this great project. It is very fun to use and it produces a lot of good sounding music.

I noticed that in procedural mode, some MIDI files (especially simple/game-style files) can sound:

  • too low/muddy
  • missing clear lead notes
  • flatter than expected

I tested a few focused changes locally that improved this a lot.

What seems to cause it

  1. Role overwrite in synthesis setup
    When multiple assignments share the same role, later assignments can overwrite earlier ones.

  2. No melody fallback in some mappings
    Some files end up mostly as texture (or with weak lead presence), so the main tune is not clear.

  3. Mix balance favors low/soft layers
    Bass/texture can dominate while melody is too soft/dull.

Suggested fixes

  1. Merge same-role assignments in src/synthesis/SynthesisEngine.ts before layer setup
    (combine events/chords instead of last-write-wins).

  2. Add melody safeguard in src/core/RoleMapper.ts
    If no melody is assigned but tracks exist, promote the best melody candidate above a threshold.

  3. Rebalance synth mix in src/synthesis/SynthesisEngine.ts
    Slightly reduce bass dominance and make melody more present/bright.

Result (local testing)

  • Better melody clarity
  • Less “missing notes” feeling
  • More consistent depth across mixed MIDI quality

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions