Replace VST audio engine option with a custom SoundFont/SFZ file - #28
Merged
Merged
Conversation
Good free VST2 instrument plugins have become hard to find now that Steinberg pulled the VST2 SDK, so the Audio Engine dialog's VST2 option is no longer a practical way to get better piano/guitar/cello sounds. Instead, the Audio Engine dialog now lets the user point playback at a custom SoundFont (.sf2) or SFZ (.sfz) instrument file. Both formats load through the same BASSMIDI engine already used for the bundled GeneralUser GS SoundFont (BASS_MIDI_FontInit natively supports SFZ, not just SF2), so multi-timbral melody/chord playback, GM instrument selection, and MIDI export all keep working unchanged -- just with a higher-quality sample library. There are much better free SFZ/SF2 libraries available (e.g. dedicated piano, guitar, and orchestral string libraries) than any generic General MIDI soundfont. - AppTheme gains a persisted CustomSoundFontPath setting, following the same pattern as the VST plugin path settings. - AppBootstrapper.CreateMidiOutput() uses it when set and the file exists, falling back to the bundled SoundFont (and, if that also fails, the system MIDI device) otherwise. - AudioEngineDialog no longer offers the VST2 radio option; it just has a single instrument-file field with a matching SF2/SFZ file browser. - BASSVST support (BassVstSynthesizer, the VstMelodyPluginPath/ VstChordPluginPath settings) is left in place in the backend -- not removed, just no longer exposed in the dialog -- so it can be revived later without re-plumbing it, and a plugin path saved by an older build's settings.json is still honored. Verified via the same sandbox pipeline as prior BASS-touching changes this session: dotnet build and dotnet format --verify-no-changes both pass, and the full existing regression suite (23 tests across Harness.cs and MainFormHarness.cs, covering MainForm, DI wiring, and non-UI services) passes unmodified under Mono + Xvfb against the rebuilt assembly, confirming no regressions to tab/session/playback- coordinator behavior. Actually loading a real SFZ/SF2 file through BASSMIDI isn't exercised here (no audio hardware in this sandbox), same caveat as all prior BASS-touching work this session. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01Pguj4XSScE141p1ScWoqEr
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.
Summary
Good free VST2 instrument plugins have become hard to find now that Steinberg pulled the VST2
SDK, so the Audio Engine dialog's VST2 option is no longer a practical way to get better
piano/guitar/cello sounds.
Instead, the Audio Engine dialog now lets the user point playback at a custom SoundFont (
.sf2)or SFZ (
.sfz) instrument file. Both formats load through the same BASSMIDI engine already usedfor the bundled GeneralUser GS SoundFont (
BASS_MIDI_FontInitnatively supports SFZ, not justSF2), so multi-timbral melody/chord playback, GM instrument selection, and MIDI export all keep
working unchanged — just with a higher-quality sample library. There are much better free SFZ/SF2
libraries available (e.g. dedicated piano, guitar, and orchestral string libraries) than any
generic General MIDI soundfont.
What changed
AppTheme: gains a persistedCustomSoundFontPathsetting, following the same pattern asthe VST plugin path settings.
AppBootstrapper.CreateMidiOutput(): uses the custom SoundFont/SFZ path when it's set andthe file exists, falling back to the bundled SoundFont (and, if that also fails, the system
MIDI device) otherwise.
AudioEngineDialog: no longer offers the VST2 radio option; it just has a singleinstrument-file field with a matching SF2/SFZ file browser.
BassVstSynthesizerand theVstMelodyPluginPath/VstChordPluginPathsettings are left inplace in the backend — not removed, just no longer exposed in the dialog — so VST support can be
revived later without re-plumbing it, and a plugin path saved by an older build's
settings.jsonis still honored.
README.md: updated the feature bullet accordingly.Test plan
Verified via the same sandbox pipeline as prior BASS-touching changes this session:
dotnet buildsucceeds against the real project/package graph.dotnet format --verify-no-changespasses.Harness.csandMainFormHarness.cs,covering
MainForm, DI wiring, and non-UI services) passes unmodified under Mono + Xvfb againstthe rebuilt assembly, confirming no regressions to tab/session/playback-coordinator behavior.
Not verified in this sandbox (same caveat as all prior BASS-touching work this session):
actually loading a real SFZ/SF2 file through BASSMIDI requires real audio hardware.
🤖 Generated with Claude Code
https://claude.ai/code/session_01Pguj4XSScE141p1ScWoqEr
Generated by Claude Code