Skip to content

Shared MIDI channels, organs matched to known libraries, and a cheaper true-stereo reverb - #30

Merged
bonninr merged 3 commits into
mainfrom
fix/shared-midi-channels
Sep 23, 2026
Merged

bonninr merged 3 commits into
mainfrom
fix/shared-midi-channels

Conversation

@bonninr

@bonninr bonninr commented Sep 23, 2026 •

Copy link
Copy Markdown
Owner

Three fixes for 0.5.4.

Several manuals on one MIDI channel (#29). With one keyboard on Friesach, only two manuals could be mapped to one channel: assigning a third unassigned the others, and a mapping that shared a channel was stripped on the next load. Both rules came from #3. Sharing is now kept, since it is how one keyboard plays two divisions.

  • Learning a manual from a pressed key still takes the channel.
  • A channel chosen in Settings shares it, and the MIDI tab names the manuals sharing one.
  • Repair still drops bindings for keyboards the organ lacks, and exact duplicates.

Organs matched to a known library (#12, reported again after 0.5.3). With both standard Hauptwerk folders linked to unrelated drives, the definition's real path shares no parent with its audio, so no path search can find it.

  • Masterpiece keeps a list of sample libraries, seeded with the standard Hauptwerk location and added to by every successful load.
  • When a definition's path leads to no packages, each library is asked whether it holds the packages the definition names; the first that does is used. A library holding other organs is passed over.
  • The per-organ folder setting from 0.5.3 still overrides it.
  • Tested with two unrelated locations; needs no symlinks, so it runs on every platform.

Room reverb (#29, second half: Augustine's IRs gave "just scratching" on ASIO). Offline the IR renders clean; timed, it does not keep up at ASIO buffer sizes.

before after
64-sample blocks 2.5x real time —
32-sample blocks slower than at 64 6.7x real time
  • Non-uniform partitioning: zero-latency head, large partitions for the tail.
  • Four-channel Hauptwerk IRs are true stereo, and all four paths are now used; previously two were dropped.
  • The file matching the device's sample rate is chosen from the package, instead of resampling another.
  • Normalised by energy across all paths with one gain: level matches the previous behaviour (Lemmer room: -6.4 dBFS against -7.4 before), no clipping, no broadband noise.

Verified against Augustine's Lemmer IR package (four-channel, 44.1/48/96 kHz). Not verified on the reporter's ASIO interface.

Tests: 88/88.

Reported in #29: with one keyboard on Friesach, only two manuals could be
mapped to the same channel. Assigning a third silently unassigned the
others, and a mapping that shared a channel was stripped of every such
binding the next time it loaded.

Both rules came from #3, where a saved mapping sent one keyboard to several
divisions by accident. Sharing a channel is a legitimate choice, though: it
is how one keyboard plays two divisions at once, and a rig with fewer
keyboards than manuals has no other way to reach them.

Learning a manual from a pressed key still takes the channel, which is what
teaching a rig one keyboard at a time means. A channel chosen in Settings
now shares it, and the MIDI tab names the manuals that share one, so a
player who did it unawares can see why two divisions are sounding.

Repair keeps its other work: a binding for a keyboard the organ does not
have still goes, and so does one listed twice over in every field.
Reported again in #12 after 0.5.3: both standard Hauptwerk folders were
links, OrganDefinitions into Dropbox and the packages onto an external
disk. The definition's real path shares no parent with its audio, so no
search of the path can find it.

Masterpiece now keeps a list of sample libraries -- folders holding an
OrganInstallationPackages directory. It is seeded with the standard
Hauptwerk location when that exists, and every load that works adds the
folder it used. When a definition's own path leads to no packages, each
known library is asked whether it holds the packages the definition names,
and the first that does is used.

Checking the package ids is what makes this safe: a library holding other
organs is passed over rather than reporting every sample missing. The
per-organ folder setting still overrides it.

The matching lives in the core so it can be tested without a processor
writing to real settings. The test builds two unrelated locations, as the
reporter suggested, and needs no symlinks, so it runs everywhere.
Reported in #29: Augustine's impulse responses gave "just scratching
sound" through a Focusrite on ASIO. Rendered offline, the same IR is clean;
timed, it is not. At a 64-sample block the convolution took the engine from
33 to 2.5 times real time, because JUCE's convolution partitioned a
two-and-a-half-second room at the audio block size. At the 32-sample
buffers ASIO users choose, with a full registration or a slower machine,
that falls behind real time, and live that is a crackle.

The convolution is now non-uniform: a short zero-latency head, the tail in
large partitions. Measured on the Lemmer room at 32-sample blocks it runs at
6.7 times real time -- with twice the work, because of the next change.

Hauptwerk impulse responses are four-channel true stereo: left to left,
left to right, right to left, right to right. They were read as stereo,
which kept the first two paths and dropped the other two. Each input now
runs through its own pair, and the four are summed.

A Hauptwerk IR package also ships one file per sample rate; the one
matching the device is now used, instead of resampling another, which
changes the apparent size of the room. And the IR is normalised by its
energy across all four paths with one gain, so the room keeps its balance
and sits at the level it did.
@bonninr bonninr changed the title Shared MIDI channels, and organs matched to known libraries Shared MIDI channels, organs matched to known libraries, and a cheaper true-stereo reverb Sep 23, 2026
@bonninr
bonninr merged commit b64e92e into main Sep 23, 2026
12 checks passed
@bonninr
bonninr deleted the fix/shared-midi-channels branch September 23, 2026 01:15
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