SoundFont 2: skip "marker" presets that reference no samples#175
Merged
Merged
Conversation
Commercial SoundFonts frequently include one or two presets that carry no playable content and exist only to stamp the file with the vendor or copyright - e.g. an E-mu Orbit.SF2 has presets named "E-mu Systems 2007" and "DigitalSoundFactory", each with a preset zone pointing at an instrument that has no instrument zones (zero samples). The detector created an IMultisampleSource for every preset regardless, so these produced empty instruments in the destination format (e.g. an empty Waldorf QPAT, or an empty Renoise XRNI). Skip any preset whose multi-sample has no non-empty groups, mirroring the existing guard in the Ensoniq EPS/ASR detector, and log which preset was skipped. Verified on Orbit.SF2: 236 presets -> 234 written, the two marker presets skipped with a log line, all real presets unaffected.
douglas-carmichael
added a commit
to douglas-carmichael/ConvertWithMoss
that referenced
this pull request
Jul 7, 2026
…ng rename (PR git-moss#176) - SoundFont 2: skip presets that reference no samples (the commercial-bank 'marker' presets like 'E-mu Systems 2007'), so they no longer become empty instruments. Mirrors the Ensoniq detector guard; new IDS_NOTIFY_SF2_SKIP_EMPTY_PRESET. - UI: rename the 'Process' button to 'Processing' (matches the dialog title, non-imperative, Alt+P) and reword its tooltip.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
Commercial SoundFonts frequently include one or two presets that carry no playable content and exist only to stamp the file with the vendor or copyright. For example, an E-mu Orbit.SF2 has presets named "E-mu Systems 2007" and "DigitalSoundFactory", each with a preset zone that points at an instrument which has no instrument zones (zero samples).
Sf2Detectorcreated anIMultisampleSourcefor every preset unconditionally, so these produced empty instruments in the destination format — an empty Waldorf QPAT, an empty Renoise XRNI, etc. The user noticed empty.qpatfiles named after those two "presets".Fix
After building the multi-sample for a preset, skip it if it has no non-empty groups (no samples), and log which preset was skipped. This mirrors the existing guard in
EnsoniqEpsAsrDetector(if (multisampleSource.getNonEmptyGroups(...).isEmpty()) continue;), so it follows an established pattern, and it fixes the problem once at the source for every destination format rather than per-creator.getNonEmptyGroups(false)is used (rather thantrue) so a preset is skipped only when it has literally no sample zones — never merely because its zones are release-triggers.Verification
Analyzed
Orbit.SF2before/after:Skipping SoundFont preset 'E-mu Systems 2007' because it contains no samples.and the same forDigitalSoundFactory.A new
IDS_NOTIFY_SF2_SKIP_EMPTY_PRESETstring is added; CHANGELOG updated.(Note:
mainHEAD currently has an unrelatedXMLUtils.escapeAttributecompile error inOmnisphereCreatoragainst the vendoreduitoolsjar; it is independent of this change — the modifiedSf2Detectorcompiles clean.)