Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions documentation/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@
* Omnisphere
* Fixed: Reading an Omnisphere preset with multiple sample voice elements did only return the samples of the last voice.
* Fixed: Save formatting of ampersand character when writing.
* SoundFont 2 (thanks to Douglas Carmichael)
* Fixed: "Marker" presets that reference no samples (commercial SoundFonts often include one or two named after the vendor or copyright, e.g. "E-mu Systems 2007") were converted into empty instruments. Presets without any samples are now skipped.
* TX16W
* Fixed: First check if the referenced absolute sample file path exists before searching all local folders.
* Waldorf Quantum/Iridium (thanks to Douglas Carmichael)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -140,6 +140,17 @@ private List<IMultisampleSource> parseSF2File (final File sourceFile, final Sf2F
if (this.settingsConfiguration.addFileName () || this.settingsConfiguration.addProgramNumber ())
presetName = this.addPrefixes (presetName, preset.getProgramNumber (), FileUtils.getNameWithoutType (sourceFile));
final IMultisampleSource multisampleSource = this.createMultisampleSource (sourceFile, parts, presetName, this.combineToStereo (groups));

// Skip "empty" presets which reference no samples. Commercial SoundFonts often carry
// marker presets named after the vendor or the copyright (e.g. "E-mu Systems 2007")
// whose instrument has no zones; without this guard they would be written as empty
// instruments.
if (multisampleSource.getNonEmptyGroups (false).isEmpty ())
{
this.notifier.log ("IDS_NOTIFY_SF2_SKIP_EMPTY_PRESET", presetName);
continue;
}

this.fillMetadata (sf2File, parts, multisampleSource.getMetadata ());
multisamples.add (multisampleSource);
}
Expand Down
1 change: 1 addition & 0 deletions src/main/resources/Strings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ IDS_NOTIFY_SFZ_PARTIALLY_UNSUPPORTED_TRIGGER=Partially unsupported trigger value
IDS_NOTIFY_SFZ_UNSUPPORTED_TRIGGER=Unsupported trigger value: %1\n
IDS_NOTIFY_UNSUPPORTED_OPCODES=Unused SFZ opcodes: %1\n
IDS_NOTIFY_UNSUPPORTED_GENERATORS=Unused SF2 generators: %1\n
IDS_NOTIFY_SF2_SKIP_EMPTY_PRESET=Skipping SoundFont preset '%1' because it contains no samples.\n
IDS_NOTIFY_UNSUPPORTED_ATTRIBUTES=Unused <%1> attributes: %2\n
IDS_NOTIFY_UNSUPPORTED_ELEMENTS=Unused <%1> child elements: %2\n
IDS_NOTIFY_ERR_NO_SAMPLE_LENGTH=Could not retrieve length of sample.\n
Expand Down