diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 11eeefe..0eb7352 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -1,5 +1,5 @@
name: Public source build
-on: [push, pull_request]
+on: [push, pull_request, workflow_dispatch]
permissions:
contents: read
jobs:
@@ -13,3 +13,92 @@ jobs:
run: cmake --build build --parallel 3
- name: Test
run: ctest --test-dir build --output-on-failure
+ windows:
+ runs-on: windows-2022
+ timeout-minutes: 45
+ steps:
+ - uses: actions/checkout@v4
+ - name: Configure without private data
+ shell: cmd
+ run: |
+ call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
+ cmake -S . -B build-windows -G Ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_C_COMPILER=clang-cl -DCMAKE_CXX_COMPILER=clang-cl -DCMAKE_LINKER=lld-link -DCMAKE_AR=llvm-lib -DWAVE_EMBED_PRIVATE_ASSETS=OFF -DWAVE_BUILD_TESTS=ON
+ - name: Build
+ shell: cmd
+ run: |
+ call "%ProgramFiles%\Microsoft Visual Studio\2022\Enterprise\VC\Auxiliary\Build\vcvars64.bat"
+ cmake --build build-windows --parallel 3
+ - name: Check embedded Windows manifests
+ run: >-
+ python scripts/check-windows-manifests.py
+ --exe "build-windows/WaveEmulation_artefacts/Release/Standalone/Wave Emulation.exe"
+ --vst3 "build-windows/WaveEmulation_artefacts/Release/VST3/Wave Emulation.vst3"
+ - name: Test
+ env:
+ WAVE_TEST_ARTIFACT_DIR: ${{ github.workspace }}/build-windows/test-results
+ WAVE_TEST_NATIVE_WINDOW: "1"
+ run: ctest --test-dir build-windows -C Release --output-on-failure
+ - name: Check Windows artifacts
+ shell: pwsh
+ run: |
+ $output = "build-windows/WaveEmulation_artefacts/Release"
+ if (-not (Test-Path "$output/Standalone/Wave Emulation.exe")) { throw "Standalone app is missing" }
+ if (-not (Test-Path "$output/VST3/Wave Emulation.vst3")) { throw "VST3 bundle is missing" }
+ - name: Launch and close standalone on Windows
+ shell: pwsh
+ run: |
+ $exe = (Resolve-Path "build-windows/WaveEmulation_artefacts/Release/Standalone/Wave Emulation.exe").Path
+ $app = Start-Process -FilePath $exe -PassThru
+ try {
+ $deadline = (Get-Date).AddSeconds(30)
+ do {
+ Start-Sleep -Milliseconds 500
+ $app.Refresh()
+ if ($app.HasExited) { throw "Standalone exited before opening a window ($($app.ExitCode))" }
+ } while ($app.MainWindowHandle -eq 0 -and (Get-Date) -lt $deadline)
+ if ($app.MainWindowHandle -eq 0) { throw "Standalone did not open a window" }
+ Start-Sleep -Seconds 5
+ $app.Refresh()
+ if ($app.HasExited -or -not $app.Responding) { throw "Standalone crashed or stopped responding" }
+ if (-not $app.CloseMainWindow()) { throw "Standalone refused to close" }
+ if (-not $app.WaitForExit(30000)) { throw "Standalone shutdown timed out" }
+ if ($app.ExitCode -ne 0) { throw "Standalone exited with code $($app.ExitCode)" }
+ } finally {
+ if (-not $app.HasExited) { Stop-Process -Id $app.Id -Force }
+ }
+ - name: Validate VST3 with pluginval
+ shell: pwsh
+ run: |
+ Invoke-WebRequest "https://github.com/Tracktion/pluginval/releases/download/v1.0.4/pluginval_Windows.zip" -OutFile "$env:RUNNER_TEMP/pluginval.zip"
+ Expand-Archive "$env:RUNNER_TEMP/pluginval.zip" "$env:RUNNER_TEMP/pluginval"
+ $validator = (Get-ChildItem "$env:RUNNER_TEMP/pluginval" -Recurse -Filter pluginval.exe | Select-Object -First 1).FullName
+ if (-not $validator) { throw "pluginval executable is missing" }
+ $plugin = (Resolve-Path "build-windows/WaveEmulation_artefacts/Release/VST3/Wave Emulation.vst3").Path
+ & $validator --strictness-level 5 --validate $plugin 2>&1 | Tee-Object -FilePath "build-windows/test-results/pluginval.log"
+ if ($LASTEXITCODE -ne 0) { throw "VST3 validation failed ($LASTEXITCODE)" }
+ - name: Upload Windows test evidence
+ if: always()
+ uses: actions/upload-artifact@v4
+ with:
+ name: wave-emulation-windows-test-results
+ path: |
+ build-windows/test-results/
+ build-windows/Testing/Temporary/
+ if-no-files-found: warn
+ - name: Include license and source information
+ shell: pwsh
+ run: |
+ $package = "build-windows/package"
+ New-Item -ItemType Directory -Force "$package/Standalone", "$package/VST3" | Out-Null
+ Copy-Item "build-windows/WaveEmulation_artefacts/Release/Standalone/Wave Emulation.exe" "$package/Standalone/"
+ Copy-Item "build-windows/WaveEmulation_artefacts/Release/VST3/Wave Emulation.vst3" "$package/VST3/" -Recurse
+ Copy-Item LICENSE, THIRD_PARTY_NOTICES.md, README.md $package
+ Copy-Item "data/BlankWave.img" "$package/Blank Wave.img"
+ Copy-Item LICENSES "$package/LICENSES" -Recurse
+ "Source: https://github.com/${{ github.repository }}/tree/${{ github.sha }}`nBuild: Windows x64 Release, private assets disabled" | Set-Content "$package/BUILD.txt"
+ - name: Upload Windows app and VST3
+ uses: actions/upload-artifact@v4
+ with:
+ name: wave-emulation-windows-x64
+ path: build-windows/package/
+ if-no-files-found: error
diff --git a/.gitignore b/.gitignore
index 4b34084..eba2184 100644
--- a/.gitignore
+++ b/.gitignore
@@ -12,6 +12,7 @@
*.pkg
*.rom
*.img
+!/data/BlankWave.img
*.zip
*.log
*.jucer
diff --git a/BUILDING-0.1.11.md b/BUILDING-0.1.11.md
new file mode 100644
index 0000000..931b6cd
--- /dev/null
+++ b/BUILDING-0.1.11.md
@@ -0,0 +1,13 @@
+# Building Wave Emulation 0.1.11
+
+This source archive contains the release source and the JUCE and Musashi sources used for the build, including local dependency patches. It contains no Git history or private instrument data.
+
+On macOS, from this directory:
+
+```sh
+cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWAVE_EMBED_PRIVATE_ASSETS=OFF -DFETCHCONTENT_SOURCE_DIR_JUCE="$PWD/vendor/juce" -DFETCHCONTENT_SOURCE_DIR_MUSASHI="$PWD/vendor/musashi"
+cmake --build build --parallel 4
+ctest --test-dir build --output-on-failure
+```
+
+Release bundles target macOS 13.0 and contain arm64 and x86_64 binaries. Public tests run without instrument firmware. Signing, PACE wrapping, and notarization require your own release credentials. See README.md and THIRD_PARTY_NOTICES.md for build and license details.
diff --git a/BUILDING-0.1.12.md b/BUILDING-0.1.12.md
new file mode 100644
index 0000000..aeee152
--- /dev/null
+++ b/BUILDING-0.1.12.md
@@ -0,0 +1,21 @@
+# Building Wave Emulation 0.1.12
+
+This archive includes the source and the JUCE/Musashi dependencies used for this release, including local patches. It contains no Git history or private instrument data.
+
+On macOS, from this directory:
+
+```sh
+cmake -S . -B build -DCMAKE_BUILD_TYPE=Release -DWAVE_EMBED_PRIVATE_ASSETS=OFF -DWAVE_SIGN_RELEASE_ARTIFACTS=OFF -DFETCHCONTENT_SOURCE_DIR_JUCE="$PWD/vendor/juce" -DFETCHCONTENT_SOURCE_DIR_MUSASHI="$PWD/vendor/musashi"
+cmake --build build --parallel 4
+ctest --test-dir build --output-on-failure
+```
+
+On Windows with Visual Studio 2022 and CMake:
+
+```powershell
+cmake -S . -B build -G "Visual Studio 17 2022" -A x64 -DWAVE_EMBED_PRIVATE_ASSETS=OFF -DFETCHCONTENT_SOURCE_DIR_JUCE="$PWD/vendor/juce" -DFETCHCONTENT_SOURCE_DIR_MUSASHI="$PWD/vendor/musashi"
+cmake --build build --config Release --parallel 4
+ctest --test-dir build -C Release --output-on-failure
+```
+
+macOS bundles are universal arm64/x86_64 and target macOS 13.0. Windows bundles target x64 and use the static release CRT. Signing, PACE wrapping and notarization require the maintainer's separate account configuration; no credentials are included. See README.md for cross-compilation and firmware setup.
diff --git a/CMakeLists.txt b/CMakeLists.txt
index b3dbb7f..3c023da 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -6,7 +6,7 @@ if(CMAKE_HOST_APPLE AND NOT CMAKE_OSX_DEPLOYMENT_TARGET)
"Minimum supported macOS version" FORCE)
endif()
-project(WaveEmulationSample VERSION 0.1.6 LANGUAGES C CXX)
+project(WaveEmulationSample VERSION 0.1.13 LANGUAGES C CXX)
include(FetchContent)
@@ -14,6 +14,13 @@ set(CMAKE_CXX_STANDARD 20)
set(CMAKE_CXX_STANDARD_REQUIRED ON)
set(CMAKE_CXX_EXTENSIONS OFF)
+# Keep Windows downloads self-contained, including the standalone executable.
+# Apply the same CRT choice to JUCE, Musashi, plugins and tests.
+if(MSVC AND NOT DEFINED CMAKE_MSVC_RUNTIME_LIBRARY)
+ set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>"
+ CACHE STRING "MSVC runtime library")
+endif()
+
option(WAVE_BUILD_TESTS "Build deterministic DSP and firmware tests" ON)
# Build universal macOS bundles. Distribution signing is an explicit opt-in.
@@ -33,6 +40,8 @@ FetchContent_Declare(
GIT_TAG 8.0.15
GIT_SHALLOW TRUE)
FetchContent_MakeAvailable(JUCE)
+include(cmake/PrepareJuce.cmake)
+wave_prepare_juce("${juce_SOURCE_DIR}")
FetchContent_Declare(
Musashi
@@ -83,7 +92,9 @@ target_compile_definitions(WaveM68k PRIVATE
M68K_INSTRUCTION_HOOK=1)
set(WAVE_ASSET_SOURCES
+ data/BlankWave.img
media/WaldorfWaveUI_NOLOGO.svg
+ media/WaldorfWaveUI_Compact.svg
media/Slider.svg
media/Knob1.svg
media/Knob_red1.svg
@@ -138,10 +149,13 @@ set(WAVE_CORE_SOURCES
Source/Dsp/DspMath.h
Source/Dsp/Cem3387.cpp
Source/Dsp/Cem3387.h
+ Source/Dsp/Cem3387Transfer.h
Source/Dsp/ReferenceComparator.cpp
Source/Dsp/ReferenceComparator.h
Source/Dsp/PpgWaveRom.cpp
Source/Dsp/PpgWaveRom.h
+ Source/Dsp/WaveFactoryRom.cpp
+ Source/Dsp/WaveFactoryRom.h
Source/Dsp/WaldorfAsic.cpp
Source/Dsp/WaldorfAsic.h
Source/Dsp/WaldorfEngine.cpp
@@ -179,6 +193,8 @@ set(WAVE_CORE_SOURCES
Source/WaveParameters.h)
add_library(WaveCore STATIC ${WAVE_CORE_SOURCES})
+# Both libraries contain thread-local state and are linked into shared plugins.
+set_target_properties(WaveCore WaveM68k PROPERTIES POSITION_INDEPENDENT_CODE ON)
target_include_directories(WaveCore PUBLIC Source)
target_link_libraries(WaveCore
PUBLIC
@@ -209,18 +225,38 @@ target_include_directories(DecodePpgWavetables PRIVATE Source)
add_executable(CreateWaveDisk EXCLUDE_FROM_ALL Tools/CreateWaveDisk.cpp)
target_link_libraries(CreateWaveDisk PRIVATE WaveCore juce::juce_recommended_config_flags)
+add_executable(ProbeWaveFilter EXCLUDE_FROM_ALL Tools/ProbeWaveFilter.cpp)
+target_link_libraries(ProbeWaveFilter PRIVATE WaveCore juce::juce_recommended_config_flags)
+
+add_executable(DecodeWaveFactoryWavetables EXCLUDE_FROM_ALL Tools/DecodeWaveFactoryWavetables.cpp)
+target_link_libraries(DecodeWaveFactoryWavetables PRIVATE WaveCore juce::juce_recommended_config_flags)
+
if(MSVC)
target_compile_options(WaveCore PRIVATE /W4 /permissive-)
else()
target_compile_options(WaveCore PRIVATE -Wall -Wextra -Wpedantic -Wconversion -Wshadow)
endif()
+if(APPLE)
+ set(WAVE_PLUGIN_FORMATS AU VST3 AAX Standalone)
+else()
+ set(WAVE_PLUGIN_FORMATS VST3 Standalone)
+endif()
+
+# JUCE's manifest helper is executed directly after linking and cannot run on
+# the build host during Windows cross-compilation. VST3 hosts can scan the
+# bundle without this optional JSON manifest.
+set(WAVE_VST3_AUTO_MANIFEST TRUE)
+if(CMAKE_CROSSCOMPILING)
+ set(WAVE_VST3_AUTO_MANIFEST FALSE)
+endif()
+
juce_add_plugin(WaveEmulation
COMPANY_NAME "DJW"
BUNDLE_ID "com.DJW.WaveEmulation"
PLUGIN_MANUFACTURER_CODE Djwh
PLUGIN_CODE WvSm
- FORMATS AU VST3 AAX Standalone
+ FORMATS ${WAVE_PLUGIN_FORMATS}
PRODUCT_NAME "Wave Emulation"
DESCRIPTION "Firmware-aware Waldorf Wave hardware modelling research sample"
AAX_CATEGORY AAX_ePlugInCategory_SWGenerators
@@ -229,6 +265,7 @@ juce_add_plugin(WaveEmulation
NEEDS_MIDI_OUTPUT FALSE
IS_MIDI_EFFECT FALSE
EDITOR_WANTS_KEYBOARD_FOCUS TRUE
+ VST3_AUTO_MANIFEST ${WAVE_VST3_AUTO_MANIFEST}
COPY_PLUGIN_AFTER_BUILD FALSE)
target_sources(WaveEmulation PRIVATE
diff --git a/Installer/build_installer.sh b/Installer/build_installer.sh
index 3307350..ecbca4a 100755
--- a/Installer/build_installer.sh
+++ b/Installer/build_installer.sh
@@ -7,8 +7,8 @@
# are stored in this script.
#
# Common overrides:
-# VERSION=0.1.6 (must match the built bundles)
-# RELEASE_LABEL=0.1.6-resizable (shown in file names and the installer)
+# VERSION=0.1.13 (must match the built bundles)
+# RELEASE_LABEL=0.1.13-resizable (shown in file names and the installer)
# BUILD_JOBS=8
# SKIP_PLUGIN_BUILD=1
# SKIP_WRAP=1
@@ -38,7 +38,7 @@ PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)"
if [ -f "$PROJECT_ROOT/Installer/.env.local" ]; then
source "$PROJECT_ROOT/Installer/.env.local"
fi
-BUILD_DIR="$PROJECT_ROOT/build"
+BUILD_DIR="${BUILD_DIR:-$PROJECT_ROOT/build}"
INSTALLER_DIR="$PROJECT_ROOT/Installer"
WORK_DIR="$INSTALLER_DIR/.release-work"
STAGING_DIR="$WORK_DIR/staging"
@@ -46,9 +46,9 @@ PACKAGES_DIR="$WORK_DIR/packages"
RESOURCES_DIR="$WORK_DIR/resources"
DMG_STAGING_DIR="$WORK_DIR/dmg"
-VERSION="${VERSION:-0.1.6}"
-# Label for a derived release; the bundle version itself stays numeric.
-RELEASE_LABEL="${RELEASE_LABEL:-$VERSION}"
+VERSION="${VERSION:-0.1.13}"
+# Label for this derived release; the bundle version itself stays numeric.
+RELEASE_LABEL="${RELEASE_LABEL:-$VERSION-resizable}"
TEAM_ID="${TEAM_ID:-}"
BUILD_CONFIG="${BUILD_CONFIG:-Release}"
CMAKE_BUILD_TYPE="${CMAKE_BUILD_TYPE:-$BUILD_CONFIG}"
@@ -85,6 +85,13 @@ NOTARIZE_APPLE_ID="${NOTARIZE_APPLE_ID:-${APPLE_ID:-}}"
NOTARIZE_PASSWORD="${NOTARIZE_PASSWORD:-${APP_SPECIFIC_PASSWORD:-}}"
NOTARIZE_TEAM_ID="${NOTARIZE_TEAM_ID:-$TEAM_ID}"
NOTARIZE_DMG="${NOTARIZE_DMG:-1}"
+# An AAX bundle that is not PACE-wrapped will not load in Pro Tools and cannot
+# pass notarization unsigned, so it is left out of the installer by default.
+if is_truthy "${SKIP_WRAP:-}"; then
+ INCLUDE_AAX="${INCLUDE_AAX:-0}"
+else
+ INCLUDE_AAX="${INCLUDE_AAX:-1}"
+fi
FINAL_PKG_NAME="${FINAL_PKG_NAME:-DJW $PRODUCT_NAME Installer $RELEASE_LABEL.pkg}"
FINAL_DMG_NAME="${FINAL_DMG_NAME:-DJW $PRODUCT_NAME $RELEASE_LABEL.dmg}"
@@ -99,14 +106,16 @@ find_signing_identities() {
: "${TEAM_ID:?Set TEAM_ID for release signing, or use SKIP_SIGN=1}"
if [ -z "${CODESIGN_IDENTITY:-}" ]; then
+ # Use the SHA-1 fingerprint, not the name: names with non-ASCII letters
+ # (e.g. Polish diacritics) get mangled and are then "not found".
CODESIGN_IDENTITY="$(security find-identity -v -p codesigning |
grep "Developer ID Application" | grep "$TEAM_ID" | head -1 |
- sed -E 's/.*"([^"]+)".*/\1/' || true)"
+ awk '{print $2}' || true)"
fi
if [ -z "${INSTALLER_IDENTITY:-}" ]; then
INSTALLER_IDENTITY="$(security find-identity -v |
grep "Developer ID Installer" | grep "$TEAM_ID" | head -1 |
- sed -E 's/.*"([^"]+)".*/\1/' || true)"
+ awk '{print $2}' || true)"
fi
if [ -z "$CODESIGN_IDENTITY" ] || [ -z "$INSTALLER_IDENTITY" ]; then
@@ -277,8 +286,26 @@ stage_plugins() {
"$STAGING_DIR/au/Library/Audio/Plug-Ins/Components/$AU_NAME"
/usr/bin/ditto --noextattr --norsrc "$VST3_SOURCE" \
"$STAGING_DIR/vst3/Library/Audio/Plug-Ins/VST3/$VST3_NAME"
- /usr/bin/ditto --noextattr --norsrc "$AAX_SOURCE" \
- "$STAGING_DIR/aax/Library/Application Support/Avid/Audio/Plug-Ins/$AAX_NAME"
+ if is_truthy "$INCLUDE_AAX"; then
+ /usr/bin/ditto --noextattr --norsrc "$AAX_SOURCE" \
+ "$STAGING_DIR/aax/Library/Application Support/Avid/Audio/Plug-Ins/$AAX_NAME"
+ fi
+
+ local notices="$STAGING_DIR/standalone/Library/Application Support/DJW/Wave Emulation"
+ mkdir -p "$notices"
+ /usr/bin/ditto --noextattr --norsrc "$PROJECT_ROOT/data/BlankWave.img" \
+ "$notices/Blank Wave.img"
+ for file in LICENSE THIRD_PARTY_NOTICES.md; do
+ /usr/bin/ditto --noextattr --norsrc "$PROJECT_ROOT/$file" "$notices/$file"
+ done
+ /usr/bin/ditto --noextattr --norsrc "$PROJECT_ROOT/LICENSES" "$notices/LICENSES"
+ cat >"$notices/BUILD.txt" <"
+ aax_ref="WaveEmulation_AAX.pkg"
+ formats="AU, VST3 and AAX"
+ fi
MODIFIED_BY="${MODIFIED_BY:-Bronisław Hońca}"
- MODIFIED_DATE="${MODIFIED_DATE:-2026-09-27}"
+ MODIFIED_DATE="${MODIFIED_DATE:-2026-10-11}"
MODIFIED_URL="${MODIFIED_URL:-https://bronislawhonca.pl}"
cat >"$RESOURCES_DIR/welcome.html" <
$PRODUCT_NAME $RELEASE_LABEL
-This installer provides the Wave Emulation standalone app in /Applications, plus AU, VST3 and AAX instrument formats.
+This installer provides the Wave Emulation standalone app in /Applications, plus $formats instrument formats.
Authors
Original software: Wave Emulation © 2026 Dave Whiting
(github.com/mo0kid/wave).
This is a modified version, changed by $MODIFIED_BY
(${MODIFIED_URL#https://}) on $MODIFIED_DATE:
-resizable editor window that fits the screen, zoom steps and shortcuts (Cmd +, Cmd −, Cmd 0),
-compact layouts without the on-screen keyboard, remembered window size and layout.
-The sound engine is unchanged.
+the editor opens at a size that fits your screen instead of the full 2338-pixel panel,
+remembers its zoom and keyboard visibility between sessions, and adds Fit to Screen
+(System menu or Cmd/Ctrl + Shift + 0). The sound engine is unchanged.
License
Free software under the GNU General Public License, version 3 or later, with no warranty.
The complete source code of this version is included on this disk image
(Wave Emulation $RELEASE_LABEL Source.zip). JUCE is used under the AGPLv3; see the
third-party notices on the disk image.
-No Waldorf system firmware, sound sets or floppy images are included –
-supply your own Wave OS 1.700 files. Waldorf and Wave are trademarks of their respective owner;
+
No Waldorf system firmware or factory sound sets are included (only an empty
+Blank Wave.img) – supply your own Wave OS 1.700 files. Waldorf and Wave are trademarks of their respective owner;
this project is not affiliated with or endorsed by Waldorf Music.
WELCOME
@@ -379,16 +413,16 @@ WELCOME
-
+ $aax_outline
-
+ $aax_choice
WaveEmulation_Standalone.pkg
WaveEmulation_AU.pkg
WaveEmulation_VST3.pkg
- WaveEmulation_AAX.pkg
+ $aax_ref
DISTRIBUTION
@@ -461,6 +495,11 @@ build_dmg() {
mkdir -p "$DMG_STAGING_DIR"
/usr/bin/ditto --noextattr --norsrc "$FINAL_PKG" \
"$DMG_STAGING_DIR/$FINAL_PKG_NAME"
+ /usr/bin/ditto --noextattr --norsrc "$PROJECT_ROOT/data/BlankWave.img" \
+ "$DMG_STAGING_DIR/Blank Wave.img"
+ /usr/bin/ditto --noextattr --norsrc \
+ "$STAGING_DIR/standalone/Library/Application Support/DJW/Wave Emulation" \
+ "$DMG_STAGING_DIR/License and Source Information"
if [ -n "$MANUAL_PDF" ]; then
/usr/bin/ditto --noextattr --norsrc "$MANUAL_PDF" \
"$DMG_STAGING_DIR/$(basename "$MANUAL_PDF")"
@@ -473,9 +512,6 @@ build_dmg() {
"$(basename "$PROJECT_ROOT")" \
-x "*/build/*" "*/build-*/*" "*/.release-work/*" "*/Firmware/*" \
"*.dmg" "*.pkg" "*.set" "*/.env.local" "*/.git/*" "*.DS_Store")
- for doc in LICENSE THIRD_PARTY_NOTICES.md; do
- /usr/bin/ditto --noextattr --norsrc "$PROJECT_ROOT/$doc" "$DMG_STAGING_DIR/$doc"
- done
rm -f "$FINAL_DMG"
hdiutil create -volname "DJW $PRODUCT_NAME" -srcfolder "$DMG_STAGING_DIR" \
-ov -format UDZO "$FINAL_DMG"
@@ -514,8 +550,10 @@ build_plugins
validate_bundle "$APP_SOURCE"
validate_bundle "$AU_SOURCE"
validate_bundle "$VST3_SOURCE"
-validate_bundle "$AAX_SOURCE"
-wrap_aax
+if is_truthy "$INCLUDE_AAX"; then
+ validate_bundle "$AAX_SOURCE"
+ wrap_aax
+fi
stage_plugins
sign_staged_plugins
build_packages
diff --git a/PUBLIC_RELEASE.md b/PUBLIC_RELEASE.md
index 1d103f1..62ba0d0 100644
--- a/PUBLIC_RELEASE.md
+++ b/PUBLIC_RELEASE.md
@@ -27,16 +27,21 @@ git commit -m "Initial public source release"
The exporter includes current working-tree edits and approved source directories.
It excludes the old logo artwork, factory-table payload header, firmware,
-Wave sound libraries, ROM archives, disk images, installers, build directories,
+Wave sound libraries, ROM archives, other disk images, installers, build directories,
and all existing Git history. It refuses to overwrite a destination.
Review new source files before exporting; a file allowlist is not a substitute
for reviewing newly added data or secrets.
Public builds default to `WAVE_EMBED_PRIVATE_ASSETS=OFF` and
`WAVE_SIGN_RELEASE_ARTIFACTS=OFF`, even if private assets are present locally.
-The approved decoded PPG sample bank in `data/` is included.
-The upper Wave factory tables use the procedural fallback unless explicitly enabled
-in a private development build. Users may import their own wavetable data.
+The approved decoded PPG sample bank and maintainer-supplied blank INIT disk
+in `data/` are included. The blank disk is embedded for new-instance startup
+and included separately in release packages.
+Loading the authenticated Wave OS 1.700 firmware supplied by the user generates
+all 64 original factory tables by executing the firmware's own routines. Before
+Wave firmware is loaded, the public build uses its PPG/procedural fallback.
+Firmware and derived factory-table payloads are not included in the snapshot.
+See [wavetable authenticity](docs/wavetable-authenticity.md) for verification details.
Publish only the new snapshot repository after reviewing its files. No remote
is configured by the exporter. Existing private installers and DMGs may embed
diff --git a/README.md b/README.md
index bc79057..6fe1758 100644
--- a/README.md
+++ b/README.md
@@ -4,12 +4,47 @@
A JUCE C++ research instrument that recreates the documented Waldorf Wave signal path: 250 kHz 8-bit/time-multiplexed wavetable voices, the ES2 ASIC's signed mixer overflow, the ASIC's 12 dB digital high-pass, CEM3387 three-pole reconstruction and separately saturating nonlinear resonant four-pole low-pass sections, 12-bit control-voltage stepping, VCA/panning, and the 480 x 64 monochrome graphic LCD.
+## This modified version (0.1.13-resizable)
+
+This fork of Wave Emulation 0.1.13 by Dave Whiting was modified by
+Bronisław Hońca ([bronislawhonca.pl](https://bronislawhonca.pl)) on 2026-10-11.
+On top of the original zoom and compact-skin features, the editor now opens at
+a size that fits the screen instead of the full 2338-pixel panel, remembers its
+zoom and keyboard visibility between sessions, and offers **System → Fit to
+Screen** (Cmd/Ctrl + Shift + 0). `build-mac.sh` makes a quick local build, and
+the installer adds an author and modification notice, shows the GPL and puts
+the complete source code on the DMG. The sound engine is unchanged. Distributed
+under the same GPL-3.0-or-later license.
+
+Build the DMG on a Mac:
+
+```sh
+SKIP_WRAP=1 SKIP_SIGN=1 SKIP_NOTARIZE=1 ./Installer/build_installer.sh
+```
+
+## Downloads
+
+| Platform | Download | Included formats |
+| --- | --- | --- |
+| Windows x64 — 0.1.13 | [Windows ZIP](https://github.com/mo0kid/wave/releases/download/v0.1.13/Wave-Emulation-0.1.13-Windows-x64.zip) | Standalone EXE and VST3 |
+| macOS 13.0 or later, Apple Silicon and Intel — 0.1.13 | [macOS installer DMG](https://github.com/mo0kid/wave/releases/download/v0.1.13/DJW.Wave.Emulation.0.1.13.dmg) | Standalone app, AU, VST3 and AAX |
+
+See the [0.1.13 release page](https://github.com/mo0kid/wave/releases/tag/v0.1.13)
+for release notes. The DMG contains the installer and Blank Wave.img.
+The [corresponding source ZIP](https://github.com/mo0kid/wave/releases/download/v0.1.13/Wave-Emulation-0.1.13-Source.zip)
+is a separate download and includes the modified dependencies used for the build.
+The public source is also available [in the repository](https://github.com/mo0kid/wave/tree/v0.1.13).
+
+Supply your own Wave OS 1.700 firmware and sound disks. The release contains
+no firmware, ROM archives or Wave factory sound SETs.
+
Enjoying Wave Emulation? [Leave a tip on Ko-fi](https://ko-fi.com/djw_audio) to support its development.
-The public build includes the decoded PPG V6 wavetable sample bank, with
-procedural fallback for the remaining tables. It contains no executable firmware,
+Loading authenticated Wave OS 1.700 firmware generates all 64 original factory
+wavetables using the firmware’s own routines. Before firmware is loaded, the public
+build uses the decoded PPG V6 sample bank and procedural fallback tables. It contains no executable firmware,
ROM archives, Wave factory sound sets, or upper Wave factory wavetable payload.
See [data provenance and format](data/README.md). You can load your own
Wave OS 1.700 firmware (`w2sys.bin` and `wdv.sys`) and wavetable images locally.
@@ -18,6 +53,33 @@ its [legacy Wave page](https://waldorfmusic.com/legacy-wave/).
The editor embeds `media/WaldorfWaveUI_NOLOGO.svg` as its 2338 x 1042 source artwork. JUCE controls are transparent hit regions aligned to the artwork coordinates, and the live framebuffer is rendered only inside the LCD rectangle at `(939, 237, 448, 70)`. Additional panel switch, rotary, and fader regions are derived at runtime from the circles and rounded rectangles already in that SVG. The eight Performance faders use relative mouse dragging, retain their physical positions across Performance changes, and apply the destination/parameter assignments stored in each native factory Performance record only after a fader is moved. A playable 61-note keyboard spans C2 through C7 in the lower black keyboard bed, with pressed-key feedback and drag glissando.
+Use **Cmd/Ctrl + =** and **Cmd/Ctrl + -** to zoom the editor in and out, **Cmd/Ctrl + 0** for actual size, and **Cmd/Ctrl + K** to show or hide the lower keyboard and controller area. The same actions are in the System menu. Hiding the lower area shortens the window while keeping the upper panel at the same scale.
+
+Hover over any knob or fader to see its tooltip. Knob names follow the selected LFO and envelope page; hold Shift while dragging a knob for finer adjustment. Fader tips identify the numbered control and whether it uses a Performance assignment or the current LCD parameter.
+
+Choose **System → Panel Skin → Compact Skin** for the bundled 1693 × 768 layout, with the controls rearranged around the LCD and no keyboard, wheels, or transport controls. The selection is remembered for future instances. Choose **Original** to return to the full panel.
+
+To use your own artwork in the original layout, choose **System → Panel Skin → Load Alternative SVG Skin…**. The selected file is remembered for future instances; keep it at the same path. Missing or invalid files fall back to the original skin.
+
+Create a larger-label skin by copying [the original panel SVG](media/WaldorfWaveUI_NOLOGO.svg) and editing its labels, colours, or decoration. Keep `width="2338"`, `height="1042"`, and `viewBox="0 0 2338 1042"`, and leave all control, LCD, LED, and keyboard positions unchanged. Only panel artwork is replaced; the moving controls, keyboard, LEDs, LCD, and interaction geometry retain their original layout. Export text as paths for consistent rendering across machines. Reload the SVG from the menu after editing it.
+
+## Installing the Windows release
+
+1. Download and extract the Windows ZIP. Run
+ `Standalone/Wave Emulation.exe` to use the portable standalone application.
+2. To install the VST3, quit your DAW and copy the entire
+ `VST3/Wave Emulation.vst3` folder into
+ `C:\Program Files\Common Files\VST3`. Copying into Program Files may require
+ administrator permission. Reopen your DAW and rescan plug-ins, then add
+ **Wave Emulation** as a virtual instrument.
+3. Load your firmware folder and sound disk in the standalone or plug-in using
+ the [firmware and sound-disk instructions](#before-you-start-system-and-sound-floppies).
+
+The Windows binaries are unsigned and do not require a separate Visual C++
+redistributable installation. The ZIP includes installation instructions and
+licenses. Windows builds include VST3 and standalone formats; AU and AAX are
+available in the macOS release.
+
## Installing the macOS release
Builds target macOS Ventura 13.0 or later on Apple Silicon and Intel Macs.
@@ -25,13 +87,72 @@ Plugin use also requires a host compatible with your macOS version. CPU and RAM
minimums have not yet been established by testing. Earlier release binaries may
have a higher macOS minimum; they must be rebuilt to support Ventura.
-Run the installer inside the release DMG. Starting with version 0.1.2, it installs
+Download the macOS DMG linked above and run the installer inside it.
+Starting with version 0.1.2, it installs
**Wave Emulation.app** in `/Applications` as well as the AU, VST3, and AAX plugins.
Quit any older standalone instance, then launch `/Applications/Wave Emulation.app`.
Older development copies named **Wave Emulation Sample.app** are separate files
and are not updated by this installer. Versions 0.1.0 and 0.1.1 installed only
the plugins, so they did not update a standalone app you already had open.
+## What's new in 0.1.13
+
+New instances automatically mount the bundled blank INIT disk and load its SET,
+with Instrument 1 active and editable. The release also adds the compact panel
+skin, improves panel input and firmware-derived voice behavior, and refines
+the CEM3387 filter model. See [the release notes](docs/release-0.1.13.md).
+
+## What's new in 0.1.12
+
+Version 0.1.12 fixes original factory/user wavetable loading, saved
+wavetable selections, LCD browsing and Store state, Instrument voice allocation,
+and Button 1/2 touch/toggle and MIDI routing. It adds WTB-to-disk-image conversion
+and automatic flushing of emulated disk writes. The full internal oscillator
+sampling rate is retained. See [the release notes](docs/release-0.1.12.md).
+
+## What's new in 0.1.11
+
+[Version 0.1.11](https://github.com/mo0kid/wave/releases/tag/v0.1.11) restores complete Performance and Sound banks when reopening, including native Store names containing NUL bytes. It fixes Total Recall after cancelling optional machine-specific adjustments, mode lamps after Store, repeated + browsing after Store, and pending writes when remounting the same disk image.
+
+The macOS installer is signed, notarized, and contains universal Apple Silicon and Intel builds of the standalone app, AU, VST3, and PACE-wrapped AAX. The [macOS source archive](https://github.com/mo0kid/wave/releases/download/v0.1.11/Wave-Emulation-0.1.11-Source.zip) includes the modified dependencies used for the build. [Checksums](https://github.com/mo0kid/wave/releases/download/v0.1.11/SHA256SUMS.txt) cover the installer, source archive, and release notes.
+
+## What's new in 0.1.10
+
+[Version 0.1.10](https://github.com/mo0kid/wave/releases/tag/v0.1.10) is a Windows
+maintenance release. It restores embedded Common Controls v6 manifests in the
+standalone EXE and VST3 DLL, addressing the **Ordinal 345 not found** startup
+error reported on Windows 10 in [issue #2](https://github.com/mo0kid/wave/issues/2).
+The build workflow now checks both manifests before running tests.
+
+At publication of 0.1.10, Windows 10 runtime confirmation and native MSVC CPU-test
+issues remained under investigation. See the current release validation report
+for the checks completed for 0.1.12.
+
+## Version history
+
+### Version 0.1.8
+
+Version 0.1.8 is available for Windows x64 as a standalone EXE and VST3, as well
+as the macOS formats above. The Windows build improves window startup,
+shutdown and UI refresh when display refresh notifications are unavailable.
+
+[Version 0.1.8](https://github.com/mo0kid/wave/releases/tag/v0.1.8) preserves saved Sound parameters, including oscillator octave,
+when switching Performances and layers. It also prevents a display refresh
+from replacing a Performance name during Store, clears inactive destination
+layers when overwriting a Performance, and handles brief Store Cancel clicks.
+Store also keeps mode buttons and their LEDs in sync with the firmware page.
+Instrument Edit faders follow the firmware's current page so a tuning change
+cannot write to Transpose or another page's parameter. The TuneTable slider's
+choices now follow the displayed positions, and HMT changes preserve the pitch
+of held and newly played notes. Window zoom and keyboard visibility shortcuts
+are available in the System menu.
+
+### Earlier releases
+
+[Version 0.1.7](https://github.com/mo0kid/wave/releases/tag/v0.1.7) fixes repeated or missed front-panel actions in Disk, Store, and
+Instrument Edit, including name cursors and Load-menu stepping. It also keeps
+Performance program names and layered sounds consistent when switching modes.
+
[Version 0.1.6](https://github.com/mo0kid/wave/releases/tag/v0.1.6) targets
macOS Ventura 13.0 and later in universal Apple Silicon/Intel builds of the
standalone app, AU, VST3 and AAX plugins. The installer checks the minimum OS,
@@ -52,7 +173,7 @@ instances' firmware-emulator execution state independent, and connects voice-car
workers to the host's macOS audio workgroup when provided. Version 0.1.3 remains
withdrawn; users of that version should update to 0.1.5.
-### CPU load in Logic Pro
+## CPU load in Logic Pro
Wave can split voice processing across three threads at higher polyphony.
Light loads and very short audio segments run serially to avoid worker overhead;
@@ -64,35 +185,10 @@ Multithreading > Playback & Live Tracks**. This lets Logic distribute eligible
live tracks across processing threads; it does not automatically divide one
plugin's processing. See [Apple's multithreading guide](https://support.apple.com/en-ae/101975).
-## Modified version
-
-This is a modified version of Wave Emulation 0.1.6 by Dave Whiting, changed by
-Bronisław Hońca ([bronislawhonca.pl](https://bronislawhonca.pl)) on 2026-09-27. Changes: resizable, screen-fitting editor
-window with zoom steps and shortcuts, compact layouts without the on-screen
-keyboard, remembered window size and layout, a local macOS build script
-(`build-mac.sh`), and an installer/DMG that includes this source code, the
-license and author information. The sound engine and firmware handling are
-unchanged. Distributed under the same GPL-3.0-or-later license.
-
-## Window size and compact layouts
-
-The editor opens at a size that fits the current screen and remembers the last
-zoom and layout (stored in `~/Library/Application Support/Wave Emulation/`).
-Open the floppy-icon **System** menu at the top left and choose **View**:
-
-- **Full Panel with Keyboard** – the original layout.
-- **Hide On-Screen Keyboard** – keeps the transport, Shift and Glide controls but
- removes the keybed, wheels, octave buttons and System Volume.
-- **Upper Panel Only** – just the synthesis panel and display.
-- **Fit to Screen**, **Zoom In/Out** and fixed zoom steps from 35 % to 100 %.
-
-Shortcuts while the editor has focus: Cmd + / Cmd − to zoom, Cmd 0 to fit the
-screen. The window can also be resized by dragging its lower-right corner.
-
## Before you start: system and sound floppies
**You must obtain your own Waldorf Wave system floppy files to run the original
-operating system in this emulation.** The installer/DMG does not contain the
+operating system in this emulation.** The release packages do not contain the
Wave system ROM, voice firmware, factory sound disks, or floppy images. The
included PPG wavetables are sound data, not the Wave operating system.
@@ -114,8 +210,50 @@ included PPG wavetables are sound data, not the Wave operating system.
image. These extensions must contain a supported raw floppy image, not a ZIP.
Use the Wave panel's Disk controls to load its contents.
4. If you have a Wave `.set` file instead, choose **Create Disk Image from Wave
- Setup...** to create and mount a 720 KB DD image. A new blank disk contains
+ Setup...** to create and mount a 720 KB DD image, then confirm the SET import
+ with the Wave panel's **OK** button. Creating a blank disk instead provides
no system firmware or factory sounds.
+5. For a native Wave `.wtb` file, choose **Create Disk Image from WTB...**,
+ select the file and save the new `.img`. The image is mounted automatically;
+ load the WTB using the Wave panel's Disk controls. WTB bytes, including any
+ attached Wave data, are preserved unchanged.
+
+Additional sound banks and wavetables are available from the **Sounds**
+download on [Waldorf's legacy Wave page](https://waldorfmusic.com/legacy-wave/).
+The archive includes contributions credited to Dirk Gehl and Peter Eulert,
+Till Kopper, and other sound designers. Download and extract it from Waldorf,
+then use the SET or WTB conversion instructions above to create disk images.
+These third-party banks are not bundled with this project; their contents
+remain subject to the original authors' terms and are not covered by this
+repository's licence.
+
+Fresh instances mount a private, writable copy of the bundled **Blank Wave.img**
+and automatically load its SET. Both banks contain INIT Sounds and **MULTI INIT**
+Performances, with Instrument 1 active and selected, so the panel has an editable
+Sound immediately after system firmware is loaded. No Disk/Import confirmation
+is needed. The blank image is also included separately in the macOS DMG and
+Windows ZIP. Choosing **Create Blank Disk Image...** still creates an empty disk.
+Each plug-in instance has its own sound-bank state. Saving a DAW project embeds
+that instance's mounted disk image and bank, so reopening restores them even if
+the original image has moved. The standalone restores its last saved session.
+For an older session containing stale bank entries, **System > Reload Performance
+Bank from Mounted Image** replaces the bank with the mounted image's SET;
+save the project afterwards to retain the corrected bank.
+
+A SET with a few malformed records can still load its valid bank. Those damaged
+slots are treated as empty in the working sound/performance banks, with the
+source image preserved. Selecting an empty Performance clears its Instruments
+and completes the native LCD recall instead of retaining the preceding patch.
+
+Wave Disk-page writes (including Save, Delete and Format) automatically overwrite
+the currently mounted image. Sector writes are batched and saved in the
+background, with a complete temporary file replacing the image only after a
+successful write. Read-only images remain write-protected. If saving fails, the
+System menu's disk status reports it; pending changes stay in memory and are
+retried. **Save Mounted Disk Image** also commits pending changes immediately.
+Recalled DAW disks remain private copies of the project's embedded snapshot;
+use **Save Mounted Disk Image As...** to save that copy to an external image,
+which then becomes the mounted file for subsequent writes.
The app can open without firmware and provide its behavioural synthesis
fallback, but that does not run the original Wave operating system. Mounting a
@@ -133,22 +271,22 @@ This sample is honest about a hard distinction:
- The master 68000 runs continuously on a 16 MHz emulated clock with a 1 kHz timer source. The model exposes the documented UART, timer/mode, RTC/latch, front-panel switch/LED, ADC-selection/readback, shared-memory, and LCD windows used by the authenticated boot path.
- The WDV voice image's 32-byte loader header is decoded and its genuine 68000 body publishes at shared mailbox `$105086`, waits for the main CPU at `$10508A`, and reaches its service state after that externally visible acknowledgement. Production code no longer inserts a synthetic acknowledgement.
- Both CPU runtimes use the same shared program/work SRAM object. The genuine master `w2sys.bin` executes its cold-start hardware writes and its OS 1.700 post-copy loader handoff, writing the observed acknowledgement value `1` to `$10508A`; the WDV CPU then publishes service at `$10508E`.
-- The decoded WDV service transport uses a per-board 16-voice update mask at `$105092`, per-voice TAS semaphores at `$1050A2`, and 256-byte voice records beginning at `$100000`. The WDV runtime maps its observed waveform RAM at `$600000`, CV banks at `$880000/$8A0000`, and two oscillator-chip register pages at `$980000/$980100`. All writes are timestamped on the WDV clock for correlation with captures.
+- The decoded WDV service transport uses a per-board 16-voice update mask at `$105092`, per-voice TAS semaphores at `$1050A2`, and 256-byte voice records beginning at `$100000`. The WDV runtime maps its two wave RAMs at `$040000`/`$050000` (with a write-both alias at `$060000`), CV banks at `$880000/$8A0000`, and two oscillator-chip register pages at `$980000/$980100`. All writes are timestamped on the WDV clock for correlation with captures.
- The current bridge supplies `INIT.SND` and `INIT.PFM` through a narrowly scoped virtual system-disk service, and the genuine OS 1.700 loader opens, reads, and closes both files. Until original factory files are available, their contents are byte-exact copies of the genuine safe sound and performance records embedded in OS 1.700; they are conservative defaults, not claimed factory banks. The same records are preloaded as a defensive fallback. The CPU board's DP8473 floppy controller is modelled for mounted raw MS-DOS disk images; the separate boot-time `WDV.SYS` copy remains bypassed because the authenticated WDV body is installed directly into shared SRAM before the genuine master instructions resume at the verified post-copy handoff. This is not presented as a complete main-OS boot.
- The CPU-board LCD is represented as two byte-wide 5563 SRAMs forming a 16-bit word, four 4 KiB pages, two parallel 74LS166 shifters, and the firmware page latch at `$BE0001`. The genuine OS renderer proves a 64-byte hardware scanline: 60 visible bytes for 480 pixels followed by four blanking bytes. Writes in the `$FEA00000-$FEA03FFF` video window automatically replace the model diagnostics with correctly decoded firmware scanout.
- The oscillator ASIC is an undocumented black box. Its internal algorithms cannot be recovered or claimed from the available documentation. The DSP is explicitly an external behavioural proxy, using Waldorf's documented 250 kHz rate and ES2 eight-bit numerical mix-overflow boundary; its exact accumulator ordering and truncation remain to be validated against real-hardware measurements. Firmware register traces reveal only the external contract.
-- The included procedural wavetable bank is a neutral fallback. The loader accepts a user-supplied exact 64 or 128 x 64 x 128 signed-eight-bit dump, a 32 x 64 x 128 first-table dump, or a raw PPG Wave 2.2/2.3 EPROM image. Raw PPG images are decoded from their 768-byte sparse table directory and 256 stored 64-sample half waves. The V6 firmware's recursive midpoint averaging, complemented half-cycle, calculated tables 28/29, and byte-exact triangle/pulse/square/saw tail are reproduced, yielding all 30 original lower tables. Native Wave SET images also install all 64 user Wavetables and their 1000-Wave pool. The lower 30 PPG tables are included as decoded samples. Remaining tables retain procedural fallback data until a user imports a bank.
+- Loading the authenticated Wave OS 1.700 firmware installs all 64 original factory wavetables by executing its own 68000 table routines, including slot 60 and the original triangle/square/saw standards. Saved PPG paths cannot replace this bank during startup or project recall. Native Wave SET images supply their own 64 user tables and 1000-Wave pool. Without Wave firmware, the included lower 30 PPG tables and procedural upper tables remain a fallback. Explicit imports of signed-eight-bit 64/128-table banks, first-32-table banks and PPG EPROM images remain available for research. See [wavetable verification](docs/wavetable-authenticity.md) for provenance, hashes and limits.
- The filter path implements all four sound-record modes: analogue 24 dB low-pass, digital 12 dB high-pass, linked serial band-pass with width, and Dual mode with independently modulated HP/LP cutoffs. The WDV frequency table establishes semitone-spaced cutoff values beginning at 20 Hz. The fixed CEM3387 three-pole 1 dB Chebyshev reconstruction section and nonlinear resonant four-pole low-pass are separate from the pre-analogue ASIC high-pass. Envelope selection, velocity, key tracking, both modulation routes, resonance modulation, and maximum-resonance self-oscillation are active. Unknown ASIC arithmetic and unmeasured component tolerances remain explicit calibration hypotheses.
-- The mixed-signal path explicitly models eight-bit multiplexed conversion, signed ES2 mixer wrap, sample-and-hold behaviour, three-pole reconstruction and AC coupling, the distinct VCF input saturation around 70% mixer output, AD7545-style 12-bit CV quantisation, nonlinear four-pole CEM3387 filtering, VCA bleed/noise, panning, output coupling, slew, and rails. Values without measurements remain documented calibration hypotheses.
+- The mixed-signal path explicitly models eight-bit multiplexed conversion, signed ES2 mixer wrap, sample-and-hold behaviour, three-pole reconstruction and AC coupling, estimated VCF input/output headroom, AD7545-style 12-bit CV quantisation, nonlinear four-pole CEM3387 filtering, VCA bleed/noise, panning, output coupling, slew, and rails. The [CEM3387 model notes](docs/cem3387-filter.md) document the datasheet-guided distortion estimate and assumed signal-voltage scale; hardware measurements are still needed to calibrate them.
- MIDI bytes are delivered to the master UART at their host-sample offsets while the behavioural audio engine receives the same event timeline. This preserves a useful audible instrument during protocol research without falsely claiming that every high-level WDV voice-record field has already been named.
- `ReferenceComparator` and `reference-captures/README.md` provide the real-hardware validation path: alignment, fitted gain, normalized correlation, RMS error, and peak error. Set `WAVE_REFERENCE_CAPTURE` when running tests to compare a capture.
- The live LCD scanout is 480 x 64 at one bit per pixel. Before genuine firmware produces video writes, the same framebuffer shows the sound and firmware diagnostic pages.
-That makes this a useful, buildable hardware-model foundation rather than a false claim of bit-perfect emulation. A real-Wave capture set, factory wavetable data supplied by its owner, and oscillator-chip bus/audio measurements are still required before the words “sample accurate” or “circuit accurate” would be defensible.
+That makes this a useful, buildable hardware-model foundation rather than a false claim of bit-perfect emulation. A real-Wave capture set and oscillator-chip bus/audio measurements are still required before the words “sample accurate” or “circuit accurate” would be defensible.
## Build
-Requirements: CMake 3.25+, Ninja or Xcode, and a C++20 compiler. JUCE 8.0.15 is fetched automatically.
+Requirements: CMake 3.25+, Ninja, Xcode or Visual Studio 2022, and a C++20 compiler. JUCE 8.0.15 is fetched automatically.
```sh
cmake -S . -B build -G Ninja -DCMAKE_BUILD_TYPE=Release
@@ -158,12 +296,29 @@ ctest --test-dir build --output-on-failure
For private development only, place your own images in
`Firmware/wave_sys1_700`, an optional factory set at `wave.set`, and an optional
-private upper-table header at `Firmware/private/FactoryUpperWavetables.h`.
+legacy upper-table fallback at `Firmware/private/FactoryUpperWavetables.h`.
+The authenticated firmware supplies the complete original bank at startup.
Configure a separate build with `-DWAVE_EMBED_PRIVATE_ASSETS=ON` to embed them.
Do not distribute artifacts from that build. The installer explicitly disables
private embedding. Firmware-backed integration/editor tests are enabled only
when all three private ROM inputs are present and embedding is enabled.
+The private build also provides `WavePerformanceBenchmark`. Its arguments are
+block size, voice count, DSP resonance (0–1), sample rate, rendered seconds,
+and full-processor program index (defaults: 512, 48, 0.18, 48000, 2, 12):
+
+```sh
+build/Tests/WavePerformanceBenchmark 512 48 0.18 48000 2 12
+```
+
+Compare repeated Release runs on the same machine. The benchmark reports
+elapsed rendering time separately from process CPU time summed across all
+threads, whether firmware is loaded, and how many voices actually rendered.
+CPU time per second of rendered audio measures processor work; elapsed time
+also includes scheduling and worker waits. The resonance
+argument controls the standalone DSP fixture; the full-processor fixture uses
+its selected Performance.
+
For the authenticated continuous-firmware core tests:
```sh
@@ -185,7 +340,9 @@ PPG_WAVETABLE_ROM=/path/to/ppg-eprom.bin \
ctest --test-dir build --output-on-failure
```
-The Standalone, Audio Unit, VST3, and AAX artifacts are written below
+### macOS bundles and installer DMG
+
+On macOS, the Standalone, Audio Unit, VST3, and AAX artifacts are written below
`build/WaveEmulation_artefacts`. macOS Release bundles are universal
`arm64`/`x86_64` binaries and are unsigned by default. To sign a local release, explicitly set
`WAVE_SIGN_RELEASE_ARTIFACTS=ON` and `WAVE_CODESIGN_IDENTITY` when configuring CMake. Distribution to normal Pro Tools systems additionally
@@ -208,9 +365,117 @@ environment overrides documented at its top. For a local packaging check that
does not contact PACE or Apple, use `SKIP_WRAP=1 SKIP_SIGN=1
SKIP_NOTARIZE=1 SKIP_DMG=1`.
+### Windows x64 build
+
+Install Visual Studio 2022 with Desktop development with C++ and CMake 3.25 or
+newer. From a PowerShell terminal, build the standalone app and VST3 plugin:
+
+```powershell
+cmake -S . -B build-windows -G "Visual Studio 17 2022" -A x64 -DWAVE_EMBED_PRIVATE_ASSETS=OFF
+cmake --build build-windows --config Release --parallel 3
+ctest --test-dir build-windows -C Release --output-on-failure
+```
+
+The `.exe` and `.vst3` bundle are under
+`build-windows/WaveEmulation_artefacts/Release`. Copy the VST3 bundle to
+`C:\Program Files\Common Files\VST3` to use it in a VST3 host. The standalone
+app can run directly from its build folder. Windows builds do not include AU or
+AAX. The default Windows build links the C++ runtime statically, so these
+downloads do not require a separate Visual C++ redistributable installer.
+
+### Testing Windows without a Windows computer
+
+For local testing on macOS, `cmake/WindowsLLVMToolchain.cmake` builds Windows
+x64 binaries with `clang-cl`, `lld-link`, and Microsoft's headers/libraries
+downloaded with [xwin](https://github.com/Jake-Shadle/xwin). Accept Microsoft's
+license before downloading the SDK. JUCE 8 does not support MinGW compilation;
+use the MSVC target provided by this toolchain. The build applies a small JUCE
+VBlank-thread fallback so unsupported DXGI refresh calls in Wine still trigger
+repaints and cannot deadlock window creation or teardown.
+
+With CrossOver installed and a Windows 10 64-bit bottle named
+`Wave Windows Testing`, configure a Release build:
+
+```sh
+cmake -S . -B build-windows-local/msvc -G Ninja \
+ -DCMAKE_BUILD_TYPE=Release \
+ -DCMAKE_TOOLCHAIN_FILE="$PWD/cmake/WindowsLLVMToolchain.cmake" \
+ -DWAVE_WINDOWS_SDK_ROOT="$PWD/build-windows-local/sdk" \
+ -DWAVE_CLANG_CL=/opt/homebrew/opt/llvm/bin/clang-cl \
+ -DWAVE_LLD_LINK="$PWD/build-windows-local/toolchain/bin/lld-link" \
+ -DCMAKE_CROSSCOMPILING_EMULATOR="/usr/bin/python3;$PWD/scripts/run-windows-crossover.py" \
+ -DWAVE_EMBED_PRIVATE_ASSETS=OFF
+cmake --build build-windows-local/msvc --parallel 4
+WAVE_TEST_NATIVE_WINDOW=1 WAVE_TEST_ARTIFACT_DIR="$PWD/build-windows-local/evidence" \
+ ctest --test-dir build-windows-local/msvc --output-on-failure
+```
+
+Supply the paths to your installed tools and xwin SDK. The SDK must include
+the x64 release CRT. Cross builds omit the optional VST3 `moduleinfo.json`;
+hosts can scan the plugin DLL directly. The runner uses CrossOver's configured
+bottle directory, or `CX_BOTTLE_PATH`, and accepts an alternate bottle name
+through `WAVE_CROSSOVER_BOTTLE`. It also runs the standalone executable:
+
+```sh
+WAVE_CROSSOVER_GUI=1 python3 scripts/run-windows-crossover.py \
+ 'build-windows-local/msvc/WaveEmulation_artefacts/Release/Standalone/Wave Emulation.exe'
+```
+
+Install Windows REAPER in the same bottle and copy the complete VST3 bundle to
+that bottle's `C:\Program Files\Common Files\VST3` directory for DAW testing.
+Load your locally obtained firmware through Wave's System menu. CrossOver
+testing covers Windows binaries on Wine; native Windows audio/MIDI drivers
+still require a Windows computer or VM.
+
+`WAVE_TEST_NATIVE_WINDOW=1` also opens, recreates and closes a real editor window
+in the public editor test. `WAVE_CROSSOVER_GUI=1` uses Windows ShellExecute for
+interactive launches; omit it for test executables and build generators.
+
+The **Public source build** GitHub Actions workflow uses a Windows x64 runner
+to build the standalone app and VST3. It runs on pushes and pull requests and
+can also be started from the workflow's **Run workflow** button. Its Windows
+job checks:
+
+- DSP/core tests, concurrent 68000 instances, and host state save/recall.
+- Editor creation, rendering, zoom, keyboard visibility and reopening, using
+ public assets without embedded firmware.
+- The actual standalone executable opens a responsive window and closes cleanly.
+- The built VST3 passes pluginval 1.0.4 at strictness level 5.
+
+After a successful job, download **wave-emulation-windows-x64** from the run's
+Artifacts section. The ZIP contains `Standalone/Wave Emulation.exe`, the
+`VST3/Wave Emulation.vst3` bundle, licenses, and the source revision in `BUILD.txt`.
+**wave-emulation-windows-test-results** contains editor PNGs, CTest logs and
+the pluginval log, including available diagnostics from failed jobs.
+
+For example, download a particular run's build from your Mac using GitHub CLI:
+
+```sh
+gh run download RUN_ID --repo mo0kid/wave --name wave-emulation-windows-x64
+```
+
+CI verifies Windows execution and plugin API behaviour without an audio device.
+It does not establish audio-driver latency, MIDI hardware compatibility, DAW
+compatibility or firmware-backed operation. Before calling the Windows build
+a tested release, use a Windows VM or a Windows tester to check a VST3 DAW,
+audio/MIDI devices, loading locally obtained firmware, and preset save/recall.
+Review the uploaded editor PNGs for rendering problems as well.
+
+## MIDI and wavetable loading
+
+Instrument Page 2's **Alloc** setting controls audible allocation independently
+for each Instrument. Dynamic mode reuses only that Instrument's sounding voices
+when the shared pool is full. Poly 1–16 sets its allowance for reclaiming voices
+from other Instruments; it does not cap normal polyphony. The six mono modes
+provide last/lowest/highest-key priority with retrigger or single-trigger
+envelopes, held-key return, sustain and fingered glide. The setting is retained
+in the native Performance record and DAW state.
+
The Standalone automatically enables present and newly connected MIDI inputs. The on-screen keyboard plays MIDI notes 36–96, and the computer keyboard mapping `A W S E D F T G Y H U J K` plays C4 through C5. Host MIDI supports note velocity, sustain pedal, pitch bend, mod wheel, channel pressure, all-notes-off, and all-sound-off.
-If a legal PPG EPROM or expanded wavetable image is placed beside the selected firmware files with a `.bin` or `.rom` extension, it is detected automatically. Names containing `ppg` or `wavetable` are tried first. The image path is retained in plug-in state without modifying the supplied SVG interface.
+The lower-panel **Button 1** and **Button 2** feed their dedicated Sound modulation sources. Their touch/toggle modes and incoming MIDI controller assignments come from the current Performance's Controls page. Physical button presses remain independent when the two MIDI assignments coincide; received MIDI then addresses both assigned sources. Instruments follow their keyboard/MIDI source and MIDI channel settings.
+
+If the firmware does not supply the authenticated OS 1.700 factory bank, a legal PPG EPROM or expanded wavetable image placed beside the selected firmware files with a `.bin` or `.rom` extension is detected automatically. Names containing `ppg` or `wavetable` are tried first. The image path is retained in plug-in state without modifying the supplied SVG interface.
For the original seven-file PPG Wave 2.3 V6 EPROM archive, run `scripts/import-ppg-wave-23-v6-rom.sh`. It combines the physical `w23_64`/`w23_66` wavetable pair and the adjacent V6 program-ROM bytes exposed by the original out-of-range wavetable-13 references, then places the resulting private image beside the Waldorf firmware for automatic loading.
diff --git a/Source/Dsp/Cem3387.cpp b/Source/Dsp/Cem3387.cpp
index 1cb7d41..2ceec32 100644
--- a/Source/Dsp/Cem3387.cpp
+++ b/Source/Dsp/Cem3387.cpp
@@ -1,6 +1,8 @@
#include "Cem3387.h"
+#include "Cem3387Transfer.h"
#include
+#include
#include
#include
@@ -26,17 +28,22 @@ Cem3387::coefficientTableForSampleRate(double targetSampleRate)
const auto unit = static_cast(index)
/ static_cast(table->size() - 1);
const auto cv = minimumCv + unit * (maximumCv - minimumCv);
- // Measurements from a Wave voice card at full resonance place the
- // oscillation at approximately 28 Hz, 957 Hz and 7.78 kHz for Sound
- // cutoff values 0, 62 and 100. The nominal OS table alone produces
- // 20 Hz, 710 Hz and 5.88 kHz in this four-pole topology. This stable
- // 1.35 analogue scale factor belongs at the CEM control-law boundary,
- // while the firmware-facing semitone table remains unchanged.
- constexpr auto waveCemFrequencyScale = 1.35f;
+ // Wave voice-card oscillation measurements: 28 Hz, 957 Hz and
+ // 7779 Hz at Sound cutoff 0, 62 and 100. Interpolate in log frequency
+ // at the analogue control-law boundary. A constant scale previously
+ // concealed digital feedback delay at high cutoff. Above the last
+ // measured point, retain its scale; that range still needs captures.
+ const auto step = cv * 127.0f;
+ const auto scaleAt62 = 957.0f / (20.0f * std::exp2(62.0f / 12.0f));
+ const auto scaleAt100 = 7779.0f / (20.0f * std::exp2(100.0f / 12.0f));
+ const auto logScale = step <= 62.0f
+ ? std::log2(1.4f) + juce::jlimit(0.0f, 1.0f, step / 62.0f)
+ * (std::log2(scaleAt62) - std::log2(1.4f))
+ : std::log2(scaleAt62) + juce::jlimit(0.0f, 1.0f, (step - 62.0f) / 38.0f)
+ * (std::log2(scaleAt100) - std::log2(scaleAt62));
const auto cutoff = juce::jlimit(
12.0f, static_cast(targetSampleRate * 0.225),
- waveCemFrequencyScale * 20.0f
- * std::exp2(cv * cutoffRangeOctaves));
+ 20.0f * std::exp2(cv * cutoffRangeOctaves + logScale));
const auto g = std::tan(juce::MathConstants::pi * cutoff
/ static_cast(targetSampleRate));
(*table)[index] = g / (1.0f + g);
@@ -83,6 +90,7 @@ void Cem3387::setControls(float cutoffHz, float resonance, float driveDb, float
if (limitedAge != lastAgeInput)
{
age = lastAgeInput = limitedAge;
+ transconductorScale = cem3387::linearityScale / (1.0f + age * 0.08f);
constexpr auto settlingTimeSeconds = 0.00028f;
const auto hostSampleRate = static_cast(sampleRate * 0.5);
const auto timeConstant = settlingTimeSeconds * (1.0f + age * 0.15f);
@@ -191,8 +199,10 @@ Cem3387::StereoSample Cem3387::process(float input, float vcaLevel) noexcept
const auto vcaCurvature = vcaCv * vcaCv * (3.0f - 2.0f * vcaCv);
const auto componentNoise = noise * (0.0000025f + age * 0.000008f);
const auto vcaBleed = 0.000018f * (1.0f + age * 2.0f);
- const auto rawOutput = std::tanh(filtered * (1.0f + age * 0.08f))
- * (vcaCurvature + vcaBleed) + componentNoise;
+ // Headroom is already limited at the VCF output, inside its feedback loop.
+ // A second unity-drive tanh here previously added substantial distortion
+ // even with the filter fully open and the VCA below its current limit.
+ const auto rawOutput = filtered * (vcaCurvature + vcaBleed) + componentNoise;
const auto output = rawOutput - couplingInput
+ couplingCoefficient * couplingOutput;
couplingInput = rawOutput;
@@ -203,14 +213,10 @@ Cem3387::StereoSample Cem3387::process(float input, float vcaLevel) noexcept
float Cem3387::saturateVcfInput(float input) noexcept
{
- // Waldorf specifies the original input circuit as beginning to saturate
- // at about 70% of maximum oscillator mixer output (a level setting near
- // 75). A normalised tanh with modest drive is essentially unity for small
- // signals, is about 8% compressed at that boundary, and remains smooth
- // beyond it. Do not normalise its full-scale result back to one: that
- // would add makeup gain which is absent from the passive input network.
- constexpr auto inputDriveAtKnee = 0.75f;
- return std::tanh(input * inputDriveAtKnee) / inputDriveAtKnee;
+ // Interpret the datasheet's ~6.5 V signal-handling figure as Vpp and
+ // assume a nominal full-scale input of 5 Vpp. This voltage mapping and
+ // shoulder shape remain estimates; digital signed wrap stays separate.
+ return cem3387::limitHeadroom(input, cem3387::inputHeadroom).value;
}
void Cem3387::updateControlVoltages(float vcaLevel) noexcept
@@ -273,13 +279,9 @@ void Cem3387::updateControlVoltages(float vcaLevel) noexcept
/ (1.0f - std::exp(-lossCurve));
const auto measuredPassbandGain = std::pow(
10.0f, -maximumPassbandLossDb * lossPosition / 20.0f);
- const auto selfOscillationPosition = juce::jmax(
- 0.0f, (resonanceCv - 0.5f) * 2.0f);
- const auto drivenLoopMakeup
- = 1.0f + 0.64f * std::pow(selfOscillationPosition, 0.6f);
resonanceInputGain
= (1.0f + feedbackGain * resonanceAmount)
- * measuredPassbandGain * drivenLoopMakeup;
+ * measuredPassbandGain;
}
if (panCv != coefficientPanCv)
{
@@ -294,20 +296,81 @@ void Cem3387::updateControlVoltages(float vcaLevel) noexcept
float Cem3387::runFilter(float input) noexcept
{
- const auto saturatedInput = saturateVcfInput(input);
- auto stageInput = std::tanh((saturatedInput * resonanceInputGain
- - integrators[3] * resonanceAmount * 4.15f)
- * inputDrive);
+ // Datasheet pp. 5-6: with Ca = 4 Cb the two second-order
+ // sections have H(s) = 1 / (1 + s/wc)^4. Four trapezoidal
+ // one-poles give that equivalent small-signal response. Close the
+ // resonance loop around their *current outputs*, not their stored
+ // integrator states: the latter adds artificial feedback phase delay.
+ const auto drivenInput = saturateVcfInput(input * inputDrive) * resonanceInputGain;
+ const auto feedback = resonanceAmount * 4.15f;
+ std::array outputs{};
+ auto vcfOutput = 0.0f;
+ const auto evaluate = [&](float stageInput) {
+ auto derivative = 1.0f;
+ for (size_t stage = 0; stage < outputs.size(); ++stage)
+ {
+ outputs[stage] = integrators[stage]
+ + coefficient * (stageInput - integrators[stage]);
+ derivative *= coefficient;
+ if (stage + 1 < outputs.size())
+ {
+ const auto transfer = cem3387::linearisedTransconductor(
+ outputs[stage], transconductorScale);
+ stageInput = transfer.value;
+ derivative *= transfer.derivative;
+ }
+ }
+ const auto transfer = cem3387::limitHeadroom(
+ outputs[3], cem3387::outputHeadroom);
+ vcfOutput = transfer.value;
+ return derivative * transfer.derivative;
+ };
- for (auto& state : integrators)
+ // The scalar feedback equation is monotone, with derivative >= 1.
+ // A safeguarded Newton solve handles saturation without updating any
+ // state until the whole loop has been evaluated. Drive acts on the
+ // incoming signal only; multiplying feedback by it changes the chip's Q.
+ auto stageInput = cem3387::linearisedTransconductor(
+ drivenInput - feedback * cem3387::limitHeadroom(
+ integrators[3], cem3387::outputHeadroom).value,
+ transconductorScale).value;
+ if (feedback == 0.0f)
{
- const auto delta = (stageInput - state) * coefficient;
- const auto output = state + delta;
- state = output + delta;
- stageInput = std::tanh(output);
+ // With no feedback the first evaluation is already the solution.
+ // Keep the same stage arithmetic and saturation as the general solver.
+ (void) evaluate(stageInput);
+ for (size_t stage = 0; stage < outputs.size(); ++stage)
+ integrators[stage] = 2.0f * outputs[stage] - integrators[stage];
+ return vcfOutput;
}
-
- return integrators[3];
+ auto lower = -transconductorScale;
+ auto upper = transconductorScale;
+ for (int iteration = 0; iteration < 8; ++iteration)
+ {
+ const auto derivative = evaluate(stageInput);
+ const auto feedbackInput = cem3387::linearisedTransconductor(
+ drivenInput - feedback * vcfOutput, transconductorScale);
+ const auto residual = stageInput - feedbackInput.value;
+ // Four float stages and the feedback subtraction have several ULPs
+ // of rounding noise. Chasing it adds Newton iterations without
+ // improving the signal, especially in the nearly linear regime.
+ constexpr auto relativeTolerance = 4.0f * std::numeric_limits::epsilon();
+ if (std::abs(residual) < relativeTolerance * std::abs(stageInput) + 1.0e-12f
+ || iteration == 7)
+ break;
+ if (residual < 0.0f)
+ lower = stageInput;
+ else
+ upper = stageInput;
+ const auto next = stageInput - residual
+ / (1.0f + feedback * feedbackInput.derivative * derivative);
+ if (next == stageInput)
+ break;
+ stageInput = next > lower && next < upper ? next : 0.5f * (lower + upper);
+ }
+ for (size_t stage = 0; stage < outputs.size(); ++stage)
+ integrators[stage] = 2.0f * outputs[stage] - integrators[stage];
+ return vcfOutput;
}
float Cem3387::quantiseCv(float normalised) noexcept
diff --git a/Source/Dsp/Cem3387.h b/Source/Dsp/Cem3387.h
index dd12728..d25dd33 100644
--- a/Source/Dsp/Cem3387.h
+++ b/Source/Dsp/Cem3387.h
@@ -24,8 +24,8 @@ class Cem3387
void setCutoffCalibrationCode(uint16_t code) noexcept;
[[nodiscard]] StereoSample process(float input, float vcaLevel) noexcept;
- // The Wave/Microwave voice input begins compressing at roughly 70% of
- // maximum mixer output. This is separate from the ES2 digital mix wrap.
+ // Estimated input headroom, assuming full scale = 5 Vpp at the chip.
+ // This behavioral voltage mapping is separate from ES2 digital mix wrap.
[[nodiscard]] static float saturateVcfInput(float input) noexcept;
// Exposed for mixed-signal regression tests. These are the voltages after
@@ -62,6 +62,7 @@ class Cem3387
float resonanceAmount = 0.0f;
float resonanceInputGain = 1.0f;
float inputDrive = 1.0f;
+ float transconductorScale = 26.0f;
float panPosition = 0.0f;
float targetCutoffCv = 0.0f;
float targetResonanceCv = 0.0f;
diff --git a/Source/Dsp/Cem3387Transfer.h b/Source/Dsp/Cem3387Transfer.h
new file mode 100644
index 0000000..f10cabd
--- /dev/null
+++ b/Source/Dsp/Cem3387Transfer.h
@@ -0,0 +1,67 @@
+#pragma once
+
+#include
+
+namespace wave::dsp::cem3387
+{
+// Educated behavioral calibration, not measured Wave pin voltages. Full-scale
+// peak 1 is assumed to be 2.5 V (5 Vpp, the datasheet's typical 0.1% THD point).
+// The weak OTA curve approximates linearised transconductors; its scale is not
+// an internal voltage rail. Only input/output headroom has a pin-voltage mapping.
+inline constexpr auto nominalPeakVolts = 2.5f;
+inline constexpr auto linearityScale = 26.0f;
+inline constexpr auto inputHeadroom = 3.25f / nominalPeakVolts;
+inline constexpr auto outputHeadroom = 3.5f / nominalPeakVolts;
+
+struct Transfer
+{
+ float value;
+ float derivative;
+};
+
+[[nodiscard]] inline Transfer linearisedTransconductor(
+ float input, float scale = linearityScale) noexcept
+{
+ const auto argument = input / scale;
+ // Linearised stages spend almost all their time in this small interval.
+ // Through x^9 the tanh series is accurate to float precision here; use
+ // the library curve for larger overloads rather than extending the series.
+ auto unit = 0.0f;
+ if (std::abs(argument) <= 0.25f)
+ {
+ const auto squared = argument * argument;
+ unit = argument * (1.0f + squared * (-1.0f / 3.0f
+ + squared * (2.0f / 15.0f + squared * (-17.0f / 315.0f
+ + squared * (62.0f / 2835.0f)))));
+ }
+ else
+ unit = std::tanh(argument);
+ return { scale * unit, 1.0f - unit * unit };
+}
+
+// Smooth, symmetric headroom shoulder. The 16th-power shape keeps the nominal
+// signal nearly linear while approaching the rail without a hard clip.
+[[nodiscard]] inline Transfer limitHeadroom(float input, float rail) noexcept
+{
+ const auto unit = input / rail;
+ if (std::abs(unit) >= 16.0f)
+ return { std::copysign(rail, input), 0.0f };
+ const auto squared = unit * unit;
+ const auto fourth = squared * squared;
+ const auto eighth = fourth * fourth;
+ const auto shoulder = eighth * eighth;
+ if (shoulder <= 0.01f)
+ {
+ // Binomial series avoids four square roots below the rail shoulder.
+ // Value and slope agree with the full curve to float precision.
+ const auto gain = 1.0f + shoulder * (-1.0f / 16.0f
+ + shoulder * (17.0f / 512.0f - shoulder * (187.0f / 8192.0f)));
+ const auto slope = 1.0f + shoulder * (-17.0f / 16.0f
+ + shoulder * (561.0f / 512.0f - shoulder * (9163.0f / 8192.0f)));
+ return { input * gain, slope };
+ }
+ const auto term = 1.0f + shoulder;
+ const auto divisor = std::sqrt(std::sqrt(std::sqrt(std::sqrt(term))));
+ return { input / divisor, 1.0f / (term * divisor) };
+}
+} // namespace wave::dsp::cem3387
diff --git a/Source/Dsp/WaldorfAsic.cpp b/Source/Dsp/WaldorfAsic.cpp
index 4cc8d5c..00b4f26 100644
--- a/Source/Dsp/WaldorfAsic.cpp
+++ b/Source/Dsp/WaldorfAsic.cpp
@@ -1,15 +1,25 @@
#include "WaldorfAsic.h"
+#include "Cem3387Transfer.h"
#if WAVE_HAS_PRIVATE_UPPER_TABLES
#include "FactoryUpperWavetables.h"
#endif
#include "PpgWaveRom.h"
+#include "WaveFactoryRom.h"
#include
#include
#include
#include
+#include