diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 51af949..1d2a36b 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -3,7 +3,7 @@ on: push: branches: - '**' - + concurrency: group: build-${{ github.ref || github.run_id }} @@ -11,26 +11,58 @@ jobs: build: name: Build runs-on: ${{ matrix.os }} + timeout-minutes: 60 strategy: + fail-fast: false matrix: - os: [ubuntu-20.04, windows-latest, macos-latest] + include: + - name: Windows + os: windows-latest + - name: Linux + os: ubuntu-latest + - name: macOS + os: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - name: "Run script" + + - name: Install Linux dependencies + if: matrix.name == 'Linux' run: | - ./ci/build.sh + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ninja-build clang g++ \ + libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev \ + libfreetype-dev libfontconfig1-dev \ + libx11-dev libxcomposite-dev libxcursor-dev libxext-dev \ + libxinerama-dev libxrandr-dev libxrender-dev \ + libwebkit2gtk-4.1-dev libglu1-mesa-dev mesa-common-dev + shell: bash + + - name: Install Inno Setup (Windows) + if: matrix.name == 'Windows' + run: choco install innosetup --no-progress -y + shell: bash + + - name: Build installer + run: ./Installer/build.sh shell: bash env: + # macOS signing / notarization APPLICATION: ${{ secrets.APPLICATION }} - INSTALLER: ${{ secrets.INSTALLER }} - APPLE_PASS: ${{ secrets.APPLE_PASS }} - APPLE_USER: ${{ secrets.APPLE_USER }} - APIKEY: ${{ secrets.APIKEY }} + INSTALLER: ${{ secrets.INSTALLER }} + APPLE_USER: ${{ secrets.APPLE_USER }} + APPLE_PASS: ${{ secrets.APPLE_PASS }} + # Windows Trusted Signing (Azure) + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 + if: always() with: - name: Binaries - path: ci/bin/*.zip - retention-days: 30 \ No newline at end of file + name: Binaries ${{ matrix.name }} + path: bin/* + retention-days: 30 diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 70ebdeb..b651fb4 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -8,51 +8,75 @@ jobs: build: name: Build runs-on: ${{ matrix.os }} + timeout-minutes: 60 strategy: + fail-fast: false matrix: - os: [ubuntu-20.04, windows-latest, macos-latest] + include: + - name: Windows + os: windows-latest + - name: Linux + os: ubuntu-latest + - name: macOS + os: macos-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 with: submodules: recursive - - name: "Build" + + - name: Install Linux dependencies + if: matrix.name == 'Linux' run: | - ./ci/build.sh + sudo apt-get update + sudo apt-get install -y --no-install-recommends \ + ninja-build clang g++ \ + libasound2-dev libjack-jackd2-dev ladspa-sdk libcurl4-openssl-dev \ + libfreetype-dev libfontconfig1-dev \ + libx11-dev libxcomposite-dev libxcursor-dev libxext-dev \ + libxinerama-dev libxrandr-dev libxrender-dev \ + libwebkit2gtk-4.1-dev libglu1-mesa-dev mesa-common-dev + shell: bash + + - name: Install Inno Setup (Windows) + if: matrix.name == 'Windows' + run: choco install innosetup --no-progress -y + shell: bash + + - name: Build installer + run: ./Installer/build.sh shell: bash env: APPLICATION: ${{ secrets.APPLICATION }} - INSTALLER: ${{ secrets.INSTALLER }} - APPLE_PASS: ${{ secrets.APPLE_PASS }} - APPLE_USER: ${{ secrets.APPLE_USER }} - APIKEY: ${{ secrets.APIKEY }} - - name: "Upload" - run: | - ./ci/upload.sh - shell: bash - env: - APPLICATION: ${{ secrets.APPLICATION }} - INSTALLER: ${{ secrets.INSTALLER }} - APPLE_PASS: ${{ secrets.APPLE_PASS }} - APPLE_USER: ${{ secrets.APPLE_USER }} - APIKEY: ${{ secrets.APIKEY }} + INSTALLER: ${{ secrets.INSTALLER }} + APPLE_USER: ${{ secrets.APPLE_USER }} + APPLE_PASS: ${{ secrets.APPLE_PASS }} + AZURE_TENANT_ID: ${{ secrets.AZURE_TENANT_ID }} + AZURE_CLIENT_ID: ${{ secrets.AZURE_CLIENT_ID }} + AZURE_CLIENT_SECRET: ${{ secrets.AZURE_CLIENT_SECRET }} + - name: Upload Artifact - uses: actions/upload-artifact@v3 + uses: actions/upload-artifact@v4 + if: always() with: - name: Binaries - path: ci/bin/*.zip + name: Binaries ${{ matrix.name }} + path: bin/* retention-days: 30 release: name: Release needs: build runs-on: ubuntu-latest - + timeout-minutes: 30 + permissions: + contents: write steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v4 - name: Download Artifacts - uses: actions/download-artifact@v3 + uses: actions/download-artifact@v4 - name: Create Release run: ./release.sh shell: bash env: - GH_TOKEN: ${{ secrets.ACCESS_TOKEN }} + GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} + APIKEY: ${{ secrets.APIKEY }} + SYMBOL_API_KEY: ${{ secrets.SYMBOL_API_KEY }} diff --git a/.gitignore b/.gitignore index cda1704..792c923 100644 --- a/.gitignore +++ b/.gitignore @@ -33,4 +33,13 @@ xcuserdata Builds JuceLibraryCode -ci/bin +bin +Installer/macOS/bin +Installer/win/bin +Installer/_flat_presets +.DS_Store +.claude + +# modules +modules + diff --git a/.gitmodules b/.gitmodules index 227274c..965f7d0 100644 --- a/.gitmodules +++ b/.gitmodules @@ -1,12 +1,19 @@ [submodule "modules/gin"] path = modules/gin - url = git@github.com:FigBug/Gin.git + url = https://github.com/FigBug/Gin.git [submodule "modules/juce"] path = modules/juce - url = git@github.com:juce-framework/JUCE.git + url = https://github.com/juce-framework/JUCE.git [submodule "modules/plugin_sdk"] path = modules/plugin_sdk - url = git@github.com:TurnipHat/plugin_sdk.git + url = https://github.com/TurnipHat/plugin_sdk.git [submodule "modules/melatonin_inspector"] path = modules/melatonin_inspector - url = git@github.com:sudara/melatonin_inspector.git + url = https://github.com/sudara/melatonin_inspector.git +[submodule "modules/MTS-ESP"] + path = modules/MTS-ESP + url = https://github.com/ODDSound/MTS-ESP.git +[submodule "modules/clap-juce-extensions"] + path = modules/clap-juce-extensions + url = https://github.com/free-audio/clap-juce-extensions.git + branch = main diff --git a/AGENTS.md b/AGENTS.md new file mode 100644 index 0000000..6814a83 --- /dev/null +++ b/AGENTS.md @@ -0,0 +1,174 @@ +# AGENTS.md — Wavetable Synth Project Context + +## Project Overview + +Wavetable is a polyphonic wavetable synthesizer audio plugin (VST3, AU, CLAP, LV2, Standalone) built with **JUCE** and the **Gin** framework. It's developed by SocaLabs (Roland Rabien). + +- **Version**: 1.0.34 (tracked in `VERSION` file) +- **Language**: C++20 +- **Build system**: CMake (minimum 3.24) +- **Bundle ID**: `com.socalabs.wavetable` + +## Repository Structure + +``` +Wavetable/ +├── CMakeLists.txt # Main build config +├── CMakePresets.json # Presets: xcode (macOS), vs (Windows), ninja-gcc (Linux) +├── VERSION # Current version string +├── Changelist.txt # Version history (used by release.sh) +├── release.sh # GitHub release script +├── tag.sh # Tags current VERSION and pushes +├── plugin/ +│ ├── Source/ +│ │ ├── PluginProcessor.h/cpp # Main processor (WavetableAudioProcessor) +│ │ ├── PluginEditor.h/cpp # Editor (WavetableAudioProcessorEditor) +│ │ ├── Editor.h/cpp # Main UI layout component +│ │ ├── Panels.h # All section UI boxes (OscillatorBox, FilterBox, etc.) +│ │ ├── WavetableVoice.h/cpp # Synth voice +│ │ ├── Cfg.h # Compile-time constants +│ │ └── FX/ # Custom FX (DeRez2, FireAmp, GrindAmp) +│ └── Resources/ +│ ├── layout.json # UI layout +│ ├── Presets/ # Factory presets (XML, per-category subdirs) +│ ├── Wavetables/ # Factory wavetables +│ └── WavetablesFLAC/ # FLAC-compressed wavetables +├── modules/ # Git submodules +│ ├── gin/ # Gin framework (core dependency) +│ ├── juce/ # JUCE framework +│ ├── clap-juce-extensions/ # CLAP format support +│ ├── MTS-ESP/ # Microtuning support +│ ├── plugin_sdk/ # VST2 SDK (optional) +│ └── melatonin_inspector/ # Debug UI inspector +├── installer/ +│ ├── build.sh # Full installer build script (macOS/Linux/Windows) +│ ├── macOS/ # macOS pkg installer resources +│ └── win/ # Windows Inno Setup installer +└── .github/workflows/ + ├── build.yaml # CI build on push + └── release.yaml # Release build on tag push +``` + +## Key Architecture + +### Plugin Core +- **`WavetableAudioProcessor`** (`plugin/Source/PluginProcessor.h`) — inherits `gin::Processor` + `gin::Synthesiser` +- **`WavetableAudioProcessorEditor`** (`plugin/Source/PluginEditor.h`) — inherits `gin::ProcessorEditor` +- **`Editor`** (`plugin/Source/Editor.h`) — the main content component with all section boxes + +### UI Panels (Panels.h) +All section UIs are `gin::ParamBox` subclasses: +- `OscillatorBox` — wavetable osc with navigation buttons in header +- `SubBox`, `NoiseBox` — simple boxes +- `FilterBox` — complex with ADSR, routing buttons +- `ADSRBox` — envelope display + knobs +- `LFOBox`, `ENVBox` — tabbed (addHeader with HeaderButton) +- `StepBox` — step sequencer +- `ModBox`, `MatrixBox` — modulation source/matrix tabs +- `GlobalBox` — global controls +- FX boxes: `GateBox`, `ChorusBox`, `DistortBox`, `DelayBox`, `ReverbBox` + +### Gin Framework (submodule) +- **`gin::ParamBox`** (`modules/gin/.../gin_parambox.h`) — base for all section boxes +- **`gin::ParamHeader`** — header bar with gradient background + label text +- **`gin::CopperLookAndFeel`** (`modules/gin/.../gin_copperlookandfeel.cpp`) — default LookAndFeel +- **Colors**: title1/title2 (header gradient), matte1/matte2 (body gradient), accent (copper) +- **`gradientRect()`** helper — vertical linear gradient fill + +### Custom LookAndFeel +The project uses `gin::CopperLookAndFeel` by default (set in `gin_processor.cpp`). Colors can be overridden per-component via `findColour()`. + +**Important**: `ParamHeader::paint()` is **private** and has hardcoded font size and gradient colors. To customize header appearance, you must edit `gin_parambox.h` directly in the submodule. This is a local modification that will be overwritten on `git submodule update`. + +## Build Instructions + +### Quick Build (macOS) +```bash +git clone --recursive https://github.com/FigBug/Wavetable.git +cd Wavetable +cmake --preset xcode +cmake --build --preset xcode --config Release +# Output: Builds/xcode/Wavetable_artefacts/Release/ +``` + +### CMake Presets +- **macOS**: `xcode` — generates Xcode project, builds universal (arm64 + x86_64) +- **Windows**: `vs` — generates Visual Studio solution +- **Linux**: `ninja-gcc` — generates Ninja build files with GCC + +### Build Outputs (macOS) +``` +Builds/xcode/Wavetable_artefacts/Release/ +├── Standalone/Wavetable.app +├── VST/Wavetable.vst +├── VST3/Wavetable.vst3 +├── AU/Wavetable.component +└── CLAP/Wavetable.clap +``` + +### Installer (macOS) +```bash +./installer/build.sh +# Output: installer/macOS/bin/Wavetable.pkg +# Requires Xcode CLI tools; signing/notarization optional (needs secrets) +``` + +The installer pkg installs: +- VST → `/Library/Audio/Plug-Ins/VST/` +- VST3 → `/Library/Audio/Plug-Ins/VST3/` +- AU → `/Library/Audio/Plug-Ins/Components/` +- CLAP → `/Library/Audio/Plug-Ins/CLAP/` +- Factory wavetables + presets → `/Library/Audio/Presets/SocaLabs/Wavetable/` + +### Manual Plugin Install (macOS, no installer) +Copy built bundles manually: +```bash +cp -R Builds/xcode/Wavetable_artefacts/Release/AU/Wavetable.component ~/Library/Audio/Plug-Ins/Components/ +cp -R Builds/xcode/Wavetable_artefacts/Release/VST3/Wavetable.vst3 ~/Library/Audio/Plug-Ins/VST3/ +cp -R Builds/xcode/Wavetable_artefacts/Release/CLAP/Wavetable.clap ~/Library/Audio/Plug-Ins/CLAP/ +``` +Factory resources: +```bash +mkdir -p ~/Library/Audio/Presets/SocaLabs/Wavetable +cp -R plugin/Resources/WavetablesFLAC ~/Library/Audio/Presets/SocaLabs/Wavetable/Wavetables +# Presets (flatten subdirs): +find plugin/Resources/Presets -name "*.xml" -exec cp {} ~/Library/Audio/Presets/SocaLabs/Wavetable/ \; +``` + +## Release Process + +1. Update `VERSION` file +2. Add changelog entry in `Changelist.txt` under the version +3. Commit and push +4. Run `./tag.sh` — tags `v{VERSION}` and pushes the tag +5. GitHub Actions (`release.yaml`) builds installers for all platforms +6. `release.sh` creates a GitHub release and uploads to socalabs.com + +## Submodule Notes + +The Gin submodule is pinned at commit `414fecf`. Local modifications to Gin files (e.g., `gin_parambox.h`, `gin_copperlookandfeel.cpp`) are intentional and should not be committed to the submodule. Be aware that `git submodule update` will overwrite these changes. + +## Coding Conventions + +- Standard JUCE/Gin code style (camelCase methods, PascalCase classes) +- `gin::Parameter::Ptr` for all synth parameters +- `gin::ParamBox` subclassed for each UI section +- Parameters defined as nested structs in `WavetableAudioProcessor` (e.g., `OSCParams`, `FilterParams`) +- No comments unless explicitly requested +- Build with `-ffast-math -fno-finite-math-only` on macOS/Release + +## Common Tasks + +### Changing header label appearance +Edit `modules/gin/modules/gin_plugin/components/gin_parambox.h` → `ParamHeader::paint()`. The font and gradient are hardcoded there. + +### Changing header gradient colors +Edit `modules/gin/modules/gin_plugin/lookandfeel/gin_copperlookandfeel.cpp` → `title1ColourId` / `title2ColourId` in constructor. + +### Adding new parameters +1. Add to the relevant Params struct in `PluginProcessor.h` +2. Initialize in `PluginProcessor.cpp` (`setup()` method) +3. Add UI control in the appropriate Box class in `Panels.h` + +### Changing UI layout +Edit `plugin/Resources/layout.json` — positions are grid-based (56px columns, 70px rows, 23px header height). diff --git a/CMakeLists.txt b/CMakeLists.txt index 016e45d..7504482 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -4,6 +4,7 @@ cmake_minimum_required (VERSION 3.16.0 FATAL_ERROR) # Set for each plugin # file (READ "${CMAKE_CURRENT_LIST_DIR}/VERSION" PLUGIN_VERSION) +string (STRIP "${PLUGIN_VERSION}" PLUGIN_VERSION) set (PLUGIN_NAME Wavetable) set (BUNDLE_ID com.socalabs.wavetable) set (AU_ID WavetableAU) @@ -13,7 +14,10 @@ set (PLUGIN_CODE Wave) set (CMAKE_POLICY_DEFAULT_CMP0077 NEW) set(CMAKE_MSVC_RUNTIME_LIBRARY "MultiThreaded$<$:Debug>") set (CMAKE_SUPPRESS_REGENERATION true) -set (CMAKE_SKIP_INSTALL_RULES YES) +# Skip install rules everywhere except Linux, where CPack/DEB needs them. +if (NOT (UNIX AND NOT APPLE)) + set (CMAKE_SKIP_INSTALL_RULES YES) +endif() set (CMAKE_POSITION_INDEPENDENT_CODE ON) set_property (GLOBAL PROPERTY DEBUG_CONFIGURATIONS "Debug") @@ -29,7 +33,7 @@ set_property (DIRECTORY APPEND PROPERTY LABELS ${PLUGIN_NAME}) set_property (DIRECTORY APPEND PROPERTY LABELS SocaLabs) set_property(DIRECTORY ${CMAKE_CURRENT_SOURCE_DIR} PROPERTY VS_STARTUP_PROJECT ${PLUGIN_NAME}_Standalone) -set (CMAKE_OSX_DEPLOYMENT_TARGET 10.9) +set (CMAKE_OSX_DEPLOYMENT_TARGET 10.13) set (CMAKE_EXPORT_COMPILE_COMMANDS ON) set (CMAKE_ERROR_ON_ABSOLUTE_INSTALL_DESTINATION ON) @@ -59,7 +63,7 @@ endif() set_property (GLOBAL PROPERTY USE_FOLDERS YES) set_property (GLOBAL PROPERTY PREDEFINED_TARGETS_FOLDER utility) set_property (GLOBAL PROPERTY REPORT_UNDEFINED_PROPERTIES "${CMAKE_BINARY_DIR}/undefined_properties.log") -set_property (GLOBAL PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD YES) +set_property (GLOBAL PROPERTY JUCE_COPY_PLUGIN_AFTER_BUILD NO) set_property (DIRECTORY APPEND PROPERTY LABELS External) @@ -71,6 +75,7 @@ set (JUCE_BUILD_EXTRAS OFF) set (JUCE_BUILD_EXAMPLES OFF) add_subdirectory (modules/juce) +add_subdirectory (modules/clap-juce-extensions EXCLUDE_FROM_ALL) set_property (DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/modules/juce" APPEND PROPERTY LABELS JUCE) @@ -78,7 +83,7 @@ set_property (DIRECTORY "${CMAKE_CURRENT_LIST_DIR}/modules/juce" APPEND PROPERTY # Gin modules -foreach(module_name IN ITEMS gin gin_dsp gin_graphics gin_gui gin_metadata gin_network gin_plugin gin_simd) +foreach(module_name IN ITEMS gin gin_dsp gin_graphics gin_gui gin_metadata gin_network gin_plugin gin_simd gin_standaloneplugin) juce_add_module ( "${CMAKE_CURRENT_LIST_DIR}/modules/gin/modules/${module_name}" ) @@ -94,263 +99,10 @@ set_property (TARGET melatonin_inspector APPEND PROPERTY LABELS melatonin) set_property (DIRECTORY APPEND PROPERTY LABELS Assets) -juce_add_binary_data (${PLUGIN_NAME}_Assets SOURCES - "./plugin/Resources/layout.json" +file (GLOB_RECURSE binary_files CONFIGURE_DEPENDS + "./plugin/Resources/layout.json") - "./plugin/Resources/WavetablesFLAC/Analog/Analog Classic.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Square 03.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 06.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 07.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Square 02.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 05.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 04.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Square 01.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Square 05.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 01.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Square 04.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Square 06.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 03.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 02.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 20.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 08.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 09.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 19.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 18.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 02.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 16.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Saw 01.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 17.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 03.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 15.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 01.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Saw 03.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Saw 02.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 14.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 10.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 04.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Saw 06.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Saw 07.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 05.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 11.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 07.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 13.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Saw 05.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Saw 04.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 12.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Custom 06.wt2048" - "./plugin/Resources/WavetablesFLAC/Analog/Analog PWM Sub 08.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 04.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 10.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 11.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 05.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 13.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 07.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 06.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 12.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 16.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 02.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 03.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 17.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 01.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 15.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 14.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 08.wt2048" - "./plugin/Resources/WavetablesFLAC/FM/FM 09.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Diode 2.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Diode 1.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Asym.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Lin.Fold.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Zero Square.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Soft Clipping.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Tape.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Hard Clipping.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Tube.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Filter Drive.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Sin.Fold.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Rectify.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Sine Shaper.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Hard Clipping Extra.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Stomp Box.wt2048" - "./plugin/Resources/WavetablesFLAC/Distorted/Dist - Downsample.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 15.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 01.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 14.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 02.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 16.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 17.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 03.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 07.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 13.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 12.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 06.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 10.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 04.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 05.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 11.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 08.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 09.wt2048" - "./plugin/Resources/WavetablesFLAC/Growl/Growl 18.wt2048" - "./plugin/Resources/WavetablesFLAC/Hyper/Hyper 02.wt2048" - "./plugin/Resources/WavetablesFLAC/Hyper/Hyper 03.wt2048" - "./plugin/Resources/WavetablesFLAC/Hyper/Hyper 01.wt2048" - "./plugin/Resources/WavetablesFLAC/Hyper/Hyper 04.wt2048" - "./plugin/Resources/WavetablesFLAC/Hyper/Hyper 05.wt2048" - "./plugin/Resources/WavetablesFLAC/Hyper/Hyper 07.wt2048" - "./plugin/Resources/WavetablesFLAC/Hyper/Hyper 06.wt2048" - - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ACTIVE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - AGE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ALIGN.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ALKALINE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CHEMICAL.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COKE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COLOR.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COMMERCIAL.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COMPOSE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CONVENT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CRUCIAL.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - DISPENSE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - EFFECT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - EFFICIENT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - FINISH.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - FRESH.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - HELP.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - INDIFFERENT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - INERT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - LATENT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MODIFY.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MONOLITH.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MORAL.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NEUTRAL.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NOBLE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NUCLEUS.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - OBJECT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - OXIDIZE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PERSONAL.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POLYMER.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POROUS.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POTENT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POWDER.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PREFER.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PRIME.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PROMISE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - REACT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - REDUCE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - RESIDUE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SELECT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SOLID.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SOLUBLE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUBJECT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUIT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUPPORT.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SYNTHETIC.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - TERTIARY.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - USE.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - VIEW.wt2048" - "./plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - WIT.wt2048" - - "./plugin/Resources/Presets/HavenSteps/E-Bass.xml" - "./plugin/Resources/Presets/HavenSteps/90sEP.xml" - "./plugin/Resources/Presets/HavenSteps/Medas4.xml" - "./plugin/Resources/Presets/HavenSteps/Flutish.xml" - "./plugin/Resources/Presets/HavenSteps/Game Bass.xml" - "./plugin/Resources/Presets/HavenSteps/BrokenCom.xml" - "./plugin/Resources/Presets/HavenSteps/Rhodeys.xml" - "./plugin/Resources/Presets/HavenSteps/80s Dirty Lead.xml" - "./plugin/Resources/Presets/HavenSteps/NylonSteel.xml" - "./plugin/Resources/Presets/HavenSteps/Raiser.xml" - "./plugin/Resources/Presets/HavenSteps/Duke Bass.xml" - "./plugin/Resources/Presets/HavenSteps/Simbad.xml" - "./plugin/Resources/Presets/HavenSteps/DramaLead.xml" - "./plugin/Resources/Presets/HavenSteps/SteelS.xml" - "./plugin/Resources/Presets/HavenSteps/16bit Dream.xml" - "./plugin/Resources/Presets/HavenSteps/Play That Funky Music.xml" - "./plugin/Resources/Presets/HavenSteps/BossB.xml" - "./plugin/Resources/Presets/HavenSteps/MovieTrailerS.xml" - "./plugin/Resources/Presets/HavenSteps/Lazzzer.xml" - "./plugin/Resources/Presets/HavenSteps/PadThai.xml" - "./plugin/Resources/Presets/HavenSteps/Bassison.xml" - "./plugin/Resources/Presets/HavenSteps/8bit dream.xml" - "./plugin/Resources/Presets/HavenSteps/The Classic.xml" - "./plugin/Resources/Presets/HavenSteps/Dramahit.xml" - "./plugin/Resources/Presets/HavenSteps/Unistep.xml" - "./plugin/Resources/Presets/HavenSteps/LostTechno.xml" - "./plugin/Resources/Presets/HavenSteps/Monoglis Madness.xml" - "./plugin/Resources/Presets/HavenSteps/Concuas.xml" - "./plugin/Resources/Presets/HavenSteps/CrazyBrass.xml" - "./plugin/Resources/Presets/HavenSteps/DayDreaming.xml" - "./plugin/Resources/Presets/HavenSteps/BeauKeys.xml" - "./plugin/Resources/Presets/HavenSteps/Pulse Droner.xml" - "./plugin/Resources/Presets/HavenSteps/Nostromo.xml" - "./plugin/Resources/Presets/HavenSteps/Cimbalom.xml" - "./plugin/Resources/Presets/HavenSteps/Shamisen.xml" - "./plugin/Resources/Presets/HavenSteps/Decisive.xml" - "./plugin/Resources/Presets/HavenSteps/HavenSteps.xml" - "./plugin/Resources/Presets/HavenSteps/Angles.xml" - "./plugin/Resources/Presets/HavenSteps/CrazyOrgan.xml" - "./plugin/Resources/Presets/HavenSteps/80's 4th.xml" - "./plugin/Resources/Presets/HavenSteps/Stars.xml" - "./plugin/Resources/Presets/HavenSteps/PLead.xml" - "./plugin/Resources/Presets/HavenSteps/SomeChurch.xml" - "./plugin/Resources/Presets/HavenSteps/Bassity.xml" - "./plugin/Resources/Presets/HavenSteps/WoW.xml" - "./plugin/Resources/Presets/HavenSteps/Snare.xml" - "./plugin/Resources/Presets/HavenSteps/Sweeper.xml" - "./plugin/Resources/Presets/HavenSteps/PalmBlass.xml" - "./plugin/Resources/Presets/HavenSteps/Alejandr0.xml" - "./plugin/Resources/Presets/HavenSteps/Navi.xml" - - "./plugin/Resources/Presets/murti/Vide Bells.xml" - "./plugin/Resources/Presets/murti/Lurkin.xml" - "./plugin/Resources/Presets/murti/Vindicate.xml" - "./plugin/Resources/Presets/murti/A1.xml" - "./plugin/Resources/Presets/murti/Plucky Juno.xml" - "./plugin/Resources/Presets/murti/Sign Pad.xml" - "./plugin/Resources/Presets/murti/Self-Made.xml" - "./plugin/Resources/Presets/murti/Chop Saw.xml" - "./plugin/Resources/Presets/murti/Swelter.xml" - "./plugin/Resources/Presets/murti/Hollow Bells.xml" - "./plugin/Resources/Presets/murti/Triplet Pluck.xml" - "./plugin/Resources/Presets/murti/Polyrhythmz.xml" - "./plugin/Resources/Presets/murti/Omni Box.xml" - "./plugin/Resources/Presets/murti/Shimmy Time.xml" - "./plugin/Resources/Presets/murti/Swelling.xml" - "./plugin/Resources/Presets/murti/5th Wheel.xml" - "./plugin/Resources/Presets/murti/Vernacular.xml" - "./plugin/Resources/Presets/murti/Dirty Dog.xml" - "./plugin/Resources/Presets/murti/Pluckd.xml" - "./plugin/Resources/Presets/murti/Magnet Bass.xml" - "./plugin/Resources/Presets/murti/Psy Opp.xml" - "./plugin/Resources/Presets/murti/Big Boy Sub.xml" - "./plugin/Resources/Presets/murti/Clean Dirt.xml" - "./plugin/Resources/Presets/murti/Chill Son.xml" - "./plugin/Resources/Presets/murti/Pulse.xml" - "./plugin/Resources/Presets/murti/Super Saw.xml" - "./plugin/Resources/Presets/murti/Strings.xml" - "./plugin/Resources/Presets/murti/Munch Growl.xml" - "./plugin/Resources/Presets/murti/Bag Drone.xml" - "./plugin/Resources/Presets/murti/Collide.xml" - "./plugin/Resources/Presets/murti/Heaven Ascent.xml" - "./plugin/Resources/Presets/murti/Madness.xml" - "./plugin/Resources/Presets/murti/Big Boy Reese.xml" - "./plugin/Resources/Presets/murti/Delay Compass.xml" - "./plugin/Resources/Presets/murti/Square-1.xml" - "./plugin/Resources/Presets/murti/Talky.xml" - "./plugin/Resources/Presets/murti/Space Organ.xml" - "./plugin/Resources/Presets/murti/Flower.xml" - "./plugin/Resources/Presets/murti/7th Heaven.xml" - "./plugin/Resources/Presets/murti/The Deep.xml" - "./plugin/Resources/Presets/murti/Modular Waves.xml" - "./plugin/Resources/Presets/murti/Sine Wub.xml" - "./plugin/Resources/Presets/murti/Petal Swell.xml" - "./plugin/Resources/Presets/murti/Biter.xml" - "./plugin/Resources/Presets/murti/Foul Snap.xml" - "./plugin/Resources/Presets/murti/Distant Relative.xml" - "./plugin/Resources/Presets/murti/Breathe.xml" - "./plugin/Resources/Presets/murti/Tree of Eden.xml" - "./plugin/Resources/Presets/murti/Dragonball.xml" - "./plugin/Resources/Presets/murti/Augmented Reality.xml" - ) +juce_add_binary_data (${PLUGIN_NAME}_Assets SOURCES ${binary_files}) set_target_properties(${PLUGIN_NAME}_Assets PROPERTIES UNITY_BUILD ON UNITY_BUILD_MODE BATCH UNITY_BUILD_BATCH_SIZE 10) @@ -377,13 +129,20 @@ juce_add_plugin (${PLUGIN_NAME} AU_SANDBOX_SAFE FALSE LV2URI ${LV2_URI}) +clap_juce_extensions_plugin (TARGET ${PLUGIN_NAME} + CLAP_ID "${BUNDLE_ID}" + CLAP_FEATURES instrument synthesizer) + file (GLOB_RECURSE source_files CONFIGURE_DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.cpp ${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.c ${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.cc ${CMAKE_CURRENT_SOURCE_DIR}/plugin/*.h) -target_sources (${PLUGIN_NAME} PRIVATE ${source_files}) +target_sources (${PLUGIN_NAME} PRIVATE + ${source_files} + ${CMAKE_CURRENT_SOURCE_DIR}/modules/MTS-ESP/Client/libMTSClient.h + ${CMAKE_CURRENT_SOURCE_DIR}/modules/MTS-ESP/Client/libMTSClient.cpp) source_group (TREE ${CMAKE_CURRENT_SOURCE_DIR}/plugin PREFIX Source FILES ${source_files}) file (GLOB_RECURSE asset_files CONFIGURE_DEPENDS @@ -401,6 +160,7 @@ target_link_libraries (${PLUGIN_NAME} PRIVATE gin_gui gin_plugin gin_simd + gin_standaloneplugin melatonin_inspector @@ -429,7 +189,6 @@ juce_generate_juce_header (${PLUGIN_NAME}) target_compile_definitions (${PLUGIN_NAME} PRIVATE JUCE_USE_CUSTOM_PLUGIN_STANDALONE_APP=1 - JUCE_DISPLAY_SPLASH_SCREEN=0 JUCE_COREGRAPHICS_DRAW_ASYNC=1 JUCE_MODAL_LOOPS_PERMITTED=0 JUCE_WEB_BROWSER=0 @@ -438,12 +197,12 @@ target_compile_definitions (${PLUGIN_NAME} PRIVATE JUCE_USE_MP3AUDIOFORMAT=0 JUCE_USE_LAME_AUDIO_FORMAT=0 JUCE_USE_WINDOWS_MEDIA_FORMAT=0 + JUCE_SILENCE_XCODE_15_LINKER_WARNING=1 + JUCE_IGNORE_VST3_MISMATCHED_PARAMETER_ID_WARNING=1 _CRT_SECURE_NO_WARNINGS ) if (APPLE) - set_target_properties("juce_vst3_helper" PROPERTIES XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME NO) - foreach(t ${FORMATS} "Assets" "All" "") set(tgt ${CMAKE_PROJECT_NAME}) if (NOT t STREQUAL "") @@ -454,6 +213,7 @@ if (APPLE) XCODE_ATTRIBUTE_CLANG_LINK_OBJC_RUNTIME NO #XCODE_ATTRIBUTE_DEPLOYMENT_POSTPROCESSING[variant=Release] YES XCODE_ATTRIBUTE_ONLY_ACTIVE_ARCH[variant=Debug] "YES" + XCODE_ATTRIBUTE_DEBUG_INFORMATION_FORMAT[variant=Release] "dwarf-with-dsym" ) if (NOT t STREQUAL "All") target_compile_options(${tgt} PRIVATE @@ -478,6 +238,22 @@ if (WIN32) set_target_properties(${tgt} PROPERTIES LINK_FLAGS "/ignore:4099") endif() endforeach() + + # Generate debug symbols (PDBs) for Release builds so crashes can be symbolicated. + # /Zi emits full debug info; /DEBUG produces the .pdb; /OPT:REF and /OPT:ICF + # restore the size optimisations that /DEBUG otherwise disables. + foreach(t ${FORMATS} "CLAP" "") + set(tgt ${CMAKE_PROJECT_NAME}) + if (NOT t STREQUAL "") + set(tgt ${tgt}_${t}) + endif() + if (TARGET ${tgt}) + target_compile_options(${tgt} PRIVATE "$<$:/Zi>") + target_link_options(${tgt} PRIVATE "$<$:/DEBUG>") + target_link_options(${tgt} PRIVATE "$<$:/OPT:REF>") + target_link_options(${tgt} PRIVATE "$<$:/OPT:ICF>") + endif() + endforeach() endif() if(UNIX AND NOT APPLE) @@ -485,10 +261,59 @@ if(UNIX AND NOT APPLE) endif() -if(WIN32) - set (dest "Program Files") -else() - set (dest "Applications") -endif() +# +# Install + CPack (Linux only — macOS uses pkgbuild/productbuild, Windows uses Inno Setup) +# +if (UNIX AND NOT APPLE) + set (_artefact_dir "${CMAKE_BINARY_DIR}/${PLUGIN_NAME}_artefacts/$") -install (TARGETS ${PLUGIN_NAME} DESTINATION "${dest}") + install (FILES "${_artefact_dir}/VST/lib${PLUGIN_NAME}.so" + DESTINATION lib/vst + RENAME "${PLUGIN_NAME}.so" + COMPONENT VST) + + install (DIRECTORY "${_artefact_dir}/VST3/${PLUGIN_NAME}.vst3" + DESTINATION lib/vst3 + COMPONENT VST3 + USE_SOURCE_PERMISSIONS) + + install (DIRECTORY "${_artefact_dir}/LV2/${PLUGIN_NAME}.lv2" + DESTINATION lib/lv2 + COMPONENT LV2 + USE_SOURCE_PERMISSIONS) + + install (FILES "${_artefact_dir}/CLAP/${PLUGIN_NAME}.clap" + DESTINATION lib/clap + COMPONENT CLAP) + + # Presets ship flat — gin's loadDirectory doesn't recurse, and the pre-installer + # BinaryData flow stored them flat in the user dir. + file (GLOB_RECURSE _preset_xmls "${CMAKE_CURRENT_SOURCE_DIR}/plugin/Resources/Presets/*.xml") + install (FILES ${_preset_xmls} + DESTINATION share/SocaLabs/${PLUGIN_NAME}/Presets + COMPONENT Resources) + + install (DIRECTORY "${CMAKE_CURRENT_SOURCE_DIR}/plugin/Resources/WavetablesFLAC/" + DESTINATION share/SocaLabs/${PLUGIN_NAME}/Wavetables + COMPONENT Resources + FILES_MATCHING PATTERN "*.wt2048") + + set (CPACK_PACKAGE_NAME "wavetable") + set (CPACK_PACKAGE_VERSION "${PLUGIN_VERSION}") + set (CPACK_PACKAGE_VENDOR "SocaLabs") + set (CPACK_PACKAGE_HOMEPAGE_URL "https://socalabs.com/") + set (CPACK_PACKAGE_DESCRIPTION_SUMMARY "Wavetable synthesizer plugin") + set (CPACK_PACKAGE_CONTACT "support@socalabs.com") + set (CPACK_PACKAGING_INSTALL_PREFIX "/usr") + set (CPACK_GENERATOR "DEB") + set (CPACK_DEB_COMPONENT_INSTALL OFF) + set (CPACK_COMPONENTS_ALL VST VST3 LV2 CLAP Resources) + set (CPACK_COMPONENTS_GROUPING ALL_COMPONENTS_IN_ONE) + set (CPACK_DEBIAN_PACKAGE_MAINTAINER "Roland Rabien ") + set (CPACK_DEBIAN_PACKAGE_SECTION "sound") + set (CPACK_DEBIAN_PACKAGE_PRIORITY "optional") + set (CPACK_DEBIAN_PACKAGE_SHLIBDEPS ON) + set (CPACK_DEBIAN_FILE_NAME "Wavetable.deb") + + include (CPack) +endif() diff --git a/Changelist.txt b/Changelist.txt index 645ea32..d3f543d 100644 --- a/Changelist.txt +++ b/Changelist.txt @@ -1,3 +1,102 @@ +1.0.34: +- Crash reporting improvements + +1.0.33: +- Added crash reporting + +1.0.32: +- Fixed fix wavetable menus +- Fixed deadlock + +1.0.31: +- Fixed ADSR attack when time is 0 + +1.0.30: +- VST2 install path + +1.0.29: +- AGPL license + +1.0.28: +- Created installers + +1.0.27: +- Zip file updated + +1.0.26: +- Fixed crash with midi learn + +1.0.25: +- Added manual +- Added cable when dragging mod sources +- Fixed right click on mod depth button + +1.0.24: +- Added MIDI learn +- Fixed glitch in noise LFO +- Made LFO more random +- Minimum macOS requirement is now 10.13 + +1.0.23: +- Fixed mod matrix crash + +1.0.22: +- Added microtonal support + +1.0.21: +- Improved audio quality +- Added unipolar/bipolar mappings to mod matrix +- Added linear, quadratic, exponential, sine functions to mod matrix +- Preset menu/arrows now match selection in preset browser + +1.0.20: + +- Added Adventure Kit Wavetables + +1.0.19: + +- Patch browser saves selection when close / reopen editor + +1.0.18: + +- Fixed FX not being in the correct order when opening GUI +- Removed dither from crush, grind and fire fx, was causing noise +- MPE default is now a global setting +- Ignore editor size when loading presets + +1.0.17: + +- Added 50 more presets +- Fixed ADSR drawing glitch when segments are flat +- Fixed pitch bend after release + +1.0.16: + +- Drag wavetable graphic to adjust position +- Fix preset name disappearing (hopefully) +- Pre populate preset name, author, etc with current values + +1.0.15: + +- FX can now be dragged to reorder +- Added a few more distortion types + +1.0.14: + +- Fixed crash adding 0 length wavetables +- Fixed pan in wt oscillators + +1.0.13: + +- Fix SSE on Windows + +1.0.12: + +- Increase performance of Wavetable oscillator +- Increase clickable size of next/prev preset buttons +- Add dots to ADSRs +- Add retrig to ADSRs (mono + glissando/portamento only) + 1.0.11: - Fix signing on macOS @@ -91,7 +190,7 @@ 0.0.8: -- Added UI for mod matrix +- Added UI for mod matrix - Fixed poly params modulated by mono source not showing their live value 0.0.7: diff --git a/Installer/EULA.rtf b/Installer/EULA.rtf new file mode 100644 index 0000000..bfb3f36 --- /dev/null +++ b/Installer/EULA.rtf @@ -0,0 +1,668 @@ +{\rtf1\ansi\ansicpg1252\cocoartf2868 +\cocoatextscaling0\cocoaplatform0{\fonttbl\f0\fswiss\fcharset0 Helvetica-Light;} +{\colortbl;\red255\green255\blue255;} +{\*\expandedcolortbl;;} +\pard\tx560\tx1120\tx1680\tx2240\tx2800\tx3360\tx3920\tx4480\tx5040\tx5600\tx6160\tx6720\pardirnatural\partightenfactor0 + +\f0\fs24 \cf0 GNU AFFERO GENERAL PUBLIC LICENSE\ + Version 3, 19 November 2007\ +\ + Copyright (C) 2007 Free Software Foundation, Inc. \ + Everyone is permitted to copy and distribute verbatim copies\ + of this license document, but changing it is not allowed.\ +\ + Preamble\ +\ + The GNU Affero General Public License is a free, copyleft license for\ +software and other kinds of works, specifically designed to ensure\ +cooperation with the community in the case of network server software.\ +\ + The licenses for most software and other practical works are designed\ +to take away your freedom to share and change the works. By contrast,\ +our General Public Licenses are intended to guarantee your freedom to\ +share and change all versions of a program--to make sure it remains free\ +software for all its users.\ +\ + When we speak of free software, we are referring to freedom, not\ +price. Our General Public Licenses are designed to make sure that you\ +have the freedom to distribute copies of free software (and charge for\ +them if you wish), that you receive source code or can get it if you\ +want it, that you can change the software or use pieces of it in new\ +free programs, and that you know you can do these things.\ +\ + Developers that use our General Public Licenses protect your rights\ +with two steps: (1) assert copyright on the software, and (2) offer\ +you this License which gives you legal permission to copy, distribute\ +and/or modify the software.\ +\ + A secondary benefit of defending all users' freedom is that\ +improvements made in alternate versions of the program, if they\ +receive widespread use, become available for other developers to\ +incorporate. Many developers of free software are heartened and\ +encouraged by the resulting cooperation. However, in the case of\ +software used on network servers, this result may fail to come about.\ +The GNU General Public License permits making a modified version and\ +letting the public access it on a server without ever releasing its\ +source code to the public.\ +\ + The GNU Affero General Public License is designed specifically to\ +ensure that, in such cases, the modified source code becomes available\ +to the community. It requires the operator of a network server to\ +provide the source code of the modified version running there to the\ +users of that server. Therefore, public use of a modified version, on\ +a publicly accessible server, gives the public access to the source\ +code of the modified version.\ +\ + An older license, called the Affero General Public License and\ +published by Affero, was designed to accomplish similar goals. This is\ +a different license, not a version of the Affero GPL, but Affero has\ +released a new version of the Affero GPL which permits relicensing under\ +this license.\ +\ + The precise terms and conditions for copying, distribution and\ +modification follow.\ +\ + TERMS AND CONDITIONS\ +\ + 0. Definitions.\ +\ + "This License" refers to version 3 of the GNU Affero General Public License.\ +\ + "Copyright" also means copyright-like laws that apply to other kinds of\ +works, such as semiconductor masks.\ +\ + "The Program" refers to any copyrightable work licensed under this\ +License. Each licensee is addressed as "you". "Licensees" and\ +"recipients" may be individuals or organizations.\ +\ + To "modify" a work means to copy from or adapt all or part of the work\ +in a fashion requiring copyright permission, other than the making of an\ +exact copy. The resulting work is called a "modified version" of the\ +earlier work or a work "based on" the earlier work.\ +\ + A "covered work" means either the unmodified Program or a work based\ +on the Program.\ +\ + To "propagate" a work means to do anything with it that, without\ +permission, would make you directly or secondarily liable for\ +infringement under applicable copyright law, except executing it on a\ +computer or modifying a private copy. Propagation includes copying,\ +distribution (with or without modification), making available to the\ +public, and in some countries other activities as well.\ +\ + To "convey" a work means any kind of propagation that enables other\ +parties to make or receive copies. Mere interaction with a user through\ +a computer network, with no transfer of a copy, is not conveying.\ +\ + An interactive user interface displays "Appropriate Legal Notices"\ +to the extent that it includes a convenient and prominently visible\ +feature that (1) displays an appropriate copyright notice, and (2)\ +tells the user that there is no warranty for the work (except to the\ +extent that warranties are provided), that licensees may convey the\ +work under this License, and how to view a copy of this License. If\ +the interface presents a list of user commands or options, such as a\ +menu, a prominent item in the list meets this criterion.\ +\ + 1. Source Code.\ +\ + The "source code" for a work means the preferred form of the work\ +for making modifications to it. "Object code" means any non-source\ +form of a work.\ +\ + A "Standard Interface" means an interface that either is an official\ +standard defined by a recognized standards body, or, in the case of\ +interfaces specified for a particular programming language, one that\ +is widely used among developers working in that language.\ +\ + The "System Libraries" of an executable work include anything, other\ +than the work as a whole, that (a) is included in the normal form of\ +packaging a Major Component, but which is not part of that Major\ +Component, and (b) serves only to enable use of the work with that\ +Major Component, or to implement a Standard Interface for which an\ +implementation is available to the public in source code form. A\ +"Major Component", in this context, means a major essential component\ +(kernel, window system, and so on) of the specific operating system\ +(if any) on which the executable work runs, or a compiler used to\ +produce the work, or an object code interpreter used to run it.\ +\ + The "Corresponding Source" for a work in object code form means all\ +the source code needed to generate, install, and (for an executable\ +work) run the object code and to modify the work, including scripts to\ +control those activities. However, it does not include the work's\ +System Libraries, or general-purpose tools or generally available free\ +programs which are used unmodified in performing those activities but\ +which are not part of the work. For example, Corresponding Source\ +includes interface definition files associated with source files for\ +the work, and the source code for shared libraries and dynamically\ +linked subprograms that the work is specifically designed to require,\ +such as by intimate data communication or control flow between those\ +subprograms and other parts of the work.\ +\ + The Corresponding Source need not include anything that users\ +can regenerate automatically from other parts of the Corresponding\ +Source.\ +\ + The Corresponding Source for a work in source code form is that\ +same work.\ +\ + 2. Basic Permissions.\ +\ + All rights granted under this License are granted for the term of\ +copyright on the Program, and are irrevocable provided the stated\ +conditions are met. This License explicitly affirms your unlimited\ +permission to run the unmodified Program. The output from running a\ +covered work is covered by this License only if the output, given its\ +content, constitutes a covered work. This License acknowledges your\ +rights of fair use or other equivalent, as provided by copyright law.\ +\ + You may make, run and propagate covered works that you do not\ +convey, without conditions so long as your license otherwise remains\ +in force. You may convey covered works to others for the sole purpose\ +of having them make modifications exclusively for you, or provide you\ +with facilities for running those works, provided that you comply with\ +the terms of this License in conveying all material for which you do\ +not control copyright. Those thus making or running the covered works\ +for you must do so exclusively on your behalf, under your direction\ +and control, on terms that prohibit them from making any copies of\ +your copyrighted material outside their relationship with you.\ +\ + Conveying under any other circumstances is permitted solely under\ +the conditions stated below. Sublicensing is not allowed; section 10\ +makes it unnecessary.\ +\ + 3. Protecting Users' Legal Rights From Anti-Circumvention Law.\ +\ + No covered work shall be deemed part of an effective technological\ +measure under any applicable law fulfilling obligations under article\ +11 of the WIPO copyright treaty adopted on 20 December 1996, or\ +similar laws prohibiting or restricting circumvention of such\ +measures.\ +\ + When you convey a covered work, you waive any legal power to forbid\ +circumvention of technological measures to the extent such circumvention\ +is effected by exercising rights under this License with respect to\ +the covered work, and you disclaim any intention to limit operation or\ +modification of the work as a means of enforcing, against the work's\ +users, your or third parties' legal rights to forbid circumvention of\ +technological measures.\ +\ + 4. Conveying Verbatim Copies.\ +\ + You may convey verbatim copies of the Program's source code as you\ +receive it, in any medium, provided that you conspicuously and\ +appropriately publish on each copy an appropriate copyright notice;\ +keep intact all notices stating that this License and any\ +non-permissive terms added in accord with section 7 apply to the code;\ +keep intact all notices of the absence of any warranty; and give all\ +recipients a copy of this License along with the Program.\ +\ + You may charge any price or no price for each copy that you convey,\ +and you may offer support or warranty protection for a fee.\ +\ + 5. Conveying Modified Source Versions.\ +\ + You may convey a work based on the Program, or the modifications to\ +produce it from the Program, in the form of source code under the\ +terms of section 4, provided that you also meet all of these conditions:\ +\ + a) The work must carry prominent notices stating that you modified\ + it, and giving a relevant date.\ +\ + b) The work must carry prominent notices stating that it is\ + released under this License and any conditions added under section\ + 7. This requirement modifies the requirement in section 4 to\ + "keep intact all notices".\ +\ + c) You must license the entire work, as a whole, under this\ + License to anyone who comes into possession of a copy. This\ + License will therefore apply, along with any applicable section 7\ + additional terms, to the whole of the work, and all its parts,\ + regardless of how they are packaged. This License gives no\ + permission to license the work in any other way, but it does not\ + invalidate such permission if you have separately received it.\ +\ + d) If the work has interactive user interfaces, each must display\ + Appropriate Legal Notices; however, if the Program has interactive\ + interfaces that do not display Appropriate Legal Notices, your\ + work need not make them do so.\ +\ + A compilation of a covered work with other separate and independent\ +works, which are not by their nature extensions of the covered work,\ +and which are not combined with it such as to form a larger program,\ +in or on a volume of a storage or distribution medium, is called an\ +"aggregate" if the compilation and its resulting copyright are not\ +used to limit the access or legal rights of the compilation's users\ +beyond what the individual works permit. Inclusion of a covered work\ +in an aggregate does not cause this License to apply to the other\ +parts of the aggregate.\ +\ + 6. Conveying Non-Source Forms.\ +\ + You may convey a covered work in object code form under the terms\ +of sections 4 and 5, provided that you also convey the\ +machine-readable Corresponding Source under the terms of this License,\ +in one of these ways:\ +\ + a) Convey the object code in, or embodied in, a physical product\ + (including a physical distribution medium), accompanied by the\ + Corresponding Source fixed on a durable physical medium\ + customarily used for software interchange.\ +\ + b) Convey the object code in, or embodied in, a physical product\ + (including a physical distribution medium), accompanied by a\ + written offer, valid for at least three years and valid for as\ + long as you offer spare parts or customer support for that product\ + model, to give anyone who possesses the object code either (1) a\ + copy of the Corresponding Source for all the software in the\ + product that is covered by this License, on a durable physical\ + medium customarily used for software interchange, for a price no\ + more than your reasonable cost of physically performing this\ + conveying of source, or (2) access to copy the\ + Corresponding Source from a network server at no charge.\ +\ + c) Convey individual copies of the object code with a copy of the\ + written offer to provide the Corresponding Source. This\ + alternative is allowed only occasionally and noncommercially, and\ + only if you received the object code with such an offer, in accord\ + with subsection 6b.\ +\ + d) Convey the object code by offering access from a designated\ + place (gratis or for a charge), and offer equivalent access to the\ + Corresponding Source in the same way through the same place at no\ + further charge. You need not require recipients to copy the\ + Corresponding Source along with the object code. If the place to\ + copy the object code is a network server, the Corresponding Source\ + may be on a different server (operated by you or a third party)\ + that supports equivalent copying facilities, provided you maintain\ + clear directions next to the object code saying where to find the\ + Corresponding Source. Regardless of what server hosts the\ + Corresponding Source, you remain obligated to ensure that it is\ + available for as long as needed to satisfy these requirements.\ +\ + e) Convey the object code using peer-to-peer transmission, provided\ + you inform other peers where the object code and Corresponding\ + Source of the work are being offered to the general public at no\ + charge under subsection 6d.\ +\ + A separable portion of the object code, whose source code is excluded\ +from the Corresponding Source as a System Library, need not be\ +included in conveying the object code work.\ +\ + A "User Product" is either (1) a "consumer product", which means any\ +tangible personal property which is normally used for personal, family,\ +or household purposes, or (2) anything designed or sold for incorporation\ +into a dwelling. In determining whether a product is a consumer product,\ +doubtful cases shall be resolved in favor of coverage. For a particular\ +product received by a particular user, "normally used" refers to a\ +typical or common use of that class of product, regardless of the status\ +of the particular user or of the way in which the particular user\ +actually uses, or expects or is expected to use, the product. A product\ +is a consumer product regardless of whether the product has substantial\ +commercial, industrial or non-consumer uses, unless such uses represent\ +the only significant mode of use of the product.\ +\ + "Installation Information" for a User Product means any methods,\ +procedures, authorization keys, or other information required to install\ +and execute modified versions of a covered work in that User Product from\ +a modified version of its Corresponding Source. The information must\ +suffice to ensure that the continued functioning of the modified object\ +code is in no case prevented or interfered with solely because\ +modification has been made.\ +\ + If you convey an object code work under this section in, or with, or\ +specifically for use in, a User Product, and the conveying occurs as\ +part of a transaction in which the right of possession and use of the\ +User Product is transferred to the recipient in perpetuity or for a\ +fixed term (regardless of how the transaction is characterized), the\ +Corresponding Source conveyed under this section must be accompanied\ +by the Installation Information. But this requirement does not apply\ +if neither you nor any third party retains the ability to install\ +modified object code on the User Product (for example, the work has\ +been installed in ROM).\ +\ + The requirement to provide Installation Information does not include a\ +requirement to continue to provide support service, warranty, or updates\ +for a work that has been modified or installed by the recipient, or for\ +the User Product in which it has been modified or installed. Access to a\ +network may be denied when the modification itself materially and\ +adversely affects the operation of the network or violates the rules and\ +protocols for communication across the network.\ +\ + Corresponding Source conveyed, and Installation Information provided,\ +in accord with this section must be in a format that is publicly\ +documented (and with an implementation available to the public in\ +source code form), and must require no special password or key for\ +unpacking, reading or copying.\ +\ + 7. Additional Terms.\ +\ + "Additional permissions" are terms that supplement the terms of this\ +License by making exceptions from one or more of its conditions.\ +Additional permissions that are applicable to the entire Program shall\ +be treated as though they were included in this License, to the extent\ +that they are valid under applicable law. If additional permissions\ +apply only to part of the Program, that part may be used separately\ +under those permissions, but the entire Program remains governed by\ +this License without regard to the additional permissions.\ +\ + When you convey a copy of a covered work, you may at your option\ +remove any additional permissions from that copy, or from any part of\ +it. (Additional permissions may be written to require their own\ +removal in certain cases when you modify the work.) You may place\ +additional permissions on material, added by you to a covered work,\ +for which you have or can give appropriate copyright permission.\ +\ + Notwithstanding any other provision of this License, for material you\ +add to a covered work, you may (if authorized by the copyright holders of\ +that material) supplement the terms of this License with terms:\ +\ + a) Disclaiming warranty or limiting liability differently from the\ + terms of sections 15 and 16 of this License; or\ +\ + b) Requiring preservation of specified reasonable legal notices or\ + author attributions in that material or in the Appropriate Legal\ + Notices displayed by works containing it; or\ +\ + c) Prohibiting misrepresentation of the origin of that material, or\ + requiring that modified versions of such material be marked in\ + reasonable ways as different from the original version; or\ +\ + d) Limiting the use for publicity purposes of names of licensors or\ + authors of the material; or\ +\ + e) Declining to grant rights under trademark law for use of some\ + trade names, trademarks, or service marks; or\ +\ + f) Requiring indemnification of licensors and authors of that\ + material by anyone who conveys the material (or modified versions of\ + it) with contractual assumptions of liability to the recipient, for\ + any liability that these contractual assumptions directly impose on\ + those licensors and authors.\ +\ + All other non-permissive additional terms are considered "further\ +restrictions" within the meaning of section 10. If the Program as you\ +received it, or any part of it, contains a notice stating that it is\ +governed by this License along with a term that is a further\ +restriction, you may remove that term. If a license document contains\ +a further restriction but permits relicensing or conveying under this\ +License, you may add to a covered work material governed by the terms\ +of that license document, provided that the further restriction does\ +not survive such relicensing or conveying.\ +\ + If you add terms to a covered work in accord with this section, you\ +must place, in the relevant source files, a statement of the\ +additional terms that apply to those files, or a notice indicating\ +where to find the applicable terms.\ +\ + Additional terms, permissive or non-permissive, may be stated in the\ +form of a separately written license, or stated as exceptions;\ +the above requirements apply either way.\ +\ + 8. Termination.\ +\ + You may not propagate or modify a covered work except as expressly\ +provided under this License. Any attempt otherwise to propagate or\ +modify it is void, and will automatically terminate your rights under\ +this License (including any patent licenses granted under the third\ +paragraph of section 11).\ +\ + However, if you cease all violation of this License, then your\ +license from a particular copyright holder is reinstated (a)\ +provisionally, unless and until the copyright holder explicitly and\ +finally terminates your license, and (b) permanently, if the copyright\ +holder fails to notify you of the violation by some reasonable means\ +prior to 60 days after the cessation.\ +\ + Moreover, your license from a particular copyright holder is\ +reinstated permanently if the copyright holder notifies you of the\ +violation by some reasonable means, this is the first time you have\ +received notice of violation of this License (for any work) from that\ +copyright holder, and you cure the violation prior to 30 days after\ +your receipt of the notice.\ +\ + Termination of your rights under this section does not terminate the\ +licenses of parties who have received copies or rights from you under\ +this License. If your rights have been terminated and not permanently\ +reinstated, you do not qualify to receive new licenses for the same\ +material under section 10.\ +\ + 9. Acceptance Not Required for Having Copies.\ +\ + You are not required to accept this License in order to receive or\ +run a copy of the Program. Ancillary propagation of a covered work\ +occurring solely as a consequence of using peer-to-peer transmission\ +to receive a copy likewise does not require acceptance. However,\ +nothing other than this License grants you permission to propagate or\ +modify any covered work. These actions infringe copyright if you do\ +not accept this License. Therefore, by modifying or propagating a\ +covered work, you indicate your acceptance of this License to do so.\ +\ + 10. Automatic Licensing of Downstream Recipients.\ +\ + Each time you convey a covered work, the recipient automatically\ +receives a license from the original licensors, to run, modify and\ +propagate that work, subject to this License. You are not responsible\ +for enforcing compliance by third parties with this License.\ +\ + An "entity transaction" is a transaction transferring control of an\ +organization, or substantially all assets of one, or subdividing an\ +organization, or merging organizations. If propagation of a covered\ +work results from an entity transaction, each party to that\ +transaction who receives a copy of the work also receives whatever\ +licenses to the work the party's predecessor in interest had or could\ +give under the previous paragraph, plus a right to possession of the\ +Corresponding Source of the work from the predecessor in interest, if\ +the predecessor has it or can get it with reasonable efforts.\ +\ + You may not impose any further restrictions on the exercise of the\ +rights granted or affirmed under this License. For example, you may\ +not impose a license fee, royalty, or other charge for exercise of\ +rights granted under this License, and you may not initiate litigation\ +(including a cross-claim or counterclaim in a lawsuit) alleging that\ +any patent claim is infringed by making, using, selling, offering for\ +sale, or importing the Program or any portion of it.\ +\ + 11. Patents.\ +\ + A "contributor" is a copyright holder who authorizes use under this\ +License of the Program or a work on which the Program is based. The\ +work thus licensed is called the contributor's "contributor version".\ +\ + A contributor's "essential patent claims" are all patent claims\ +owned or controlled by the contributor, whether already acquired or\ +hereafter acquired, that would be infringed by some manner, permitted\ +by this License, of making, using, or selling its contributor version,\ +but do not include claims that would be infringed only as a\ +consequence of further modification of the contributor version. For\ +purposes of this definition, "control" includes the right to grant\ +patent sublicenses in a manner consistent with the requirements of\ +this License.\ +\ + Each contributor grants you a non-exclusive, worldwide, royalty-free\ +patent license under the contributor's essential patent claims, to\ +make, use, sell, offer for sale, import and otherwise run, modify and\ +propagate the contents of its contributor version.\ +\ + In the following three paragraphs, a "patent license" is any express\ +agreement or commitment, however denominated, not to enforce a patent\ +(such as an express permission to practice a patent or covenant not to\ +sue for patent infringement). To "grant" such a patent license to a\ +party means to make such an agreement or commitment not to enforce a\ +patent against the party.\ +\ + If you convey a covered work, knowingly relying on a patent license,\ +and the Corresponding Source of the work is not available for anyone\ +to copy, free of charge and under the terms of this License, through a\ +publicly available network server or other readily accessible means,\ +then you must either (1) cause the Corresponding Source to be so\ +available, or (2) arrange to deprive yourself of the benefit of the\ +patent license for this particular work, or (3) arrange, in a manner\ +consistent with the requirements of this License, to extend the patent\ +license to downstream recipients. "Knowingly relying" means you have\ +actual knowledge that, but for the patent license, your conveying the\ +covered work in a country, or your recipient's use of the covered work\ +in a country, would infringe one or more identifiable patents in that\ +country that you have reason to believe are valid.\ +\ + If, pursuant to or in connection with a single transaction or\ +arrangement, you convey, or propagate by procuring conveyance of, a\ +covered work, and grant a patent license to some of the parties\ +receiving the covered work authorizing them to use, propagate, modify\ +or convey a specific copy of the covered work, then the patent license\ +you grant is automatically extended to all recipients of the covered\ +work and works based on it.\ +\ + A patent license is "discriminatory" if it does not include within\ +the scope of its coverage, prohibits the exercise of, or is\ +conditioned on the non-exercise of one or more of the rights that are\ +specifically granted under this License. You may not convey a covered\ +work if you are a party to an arrangement with a third party that is\ +in the business of distributing software, under which you make payment\ +to the third party based on the extent of your activity of conveying\ +the work, and under which the third party grants, to any of the\ +parties who would receive the covered work from you, a discriminatory\ +patent license (a) in connection with copies of the covered work\ +conveyed by you (or copies made from those copies), or (b) primarily\ +for and in connection with specific products or compilations that\ +contain the covered work, unless you entered into that arrangement,\ +or that patent license was granted, prior to 28 March 2007.\ +\ + Nothing in this License shall be construed as excluding or limiting\ +any implied license or other defenses to infringement that may\ +otherwise be available to you under applicable patent law.\ +\ + 12. No Surrender of Others' Freedom.\ +\ + If conditions are imposed on you (whether by court order, agreement or\ +otherwise) that contradict the conditions of this License, they do not\ +excuse you from the conditions of this License. If you cannot convey a\ +covered work so as to satisfy simultaneously your obligations under this\ +License and any other pertinent obligations, then as a consequence you may\ +not convey it at all. For example, if you agree to terms that obligate you\ +to collect a royalty for further conveying from those to whom you convey\ +the Program, the only way you could satisfy both those terms and this\ +License would be to refrain entirely from conveying the Program.\ +\ + 13. Remote Network Interaction; Use with the GNU General Public License.\ +\ + Notwithstanding any other provision of this License, if you modify the\ +Program, your modified version must prominently offer all users\ +interacting with it remotely through a computer network (if your version\ +supports such interaction) an opportunity to receive the Corresponding\ +Source of your version by providing access to the Corresponding Source\ +from a network server at no charge, through some standard or customary\ +means of facilitating copying of software. This Corresponding Source\ +shall include the Corresponding Source for any work covered by version 3\ +of the GNU General Public License that is incorporated pursuant to the\ +following paragraph.\ +\ + Notwithstanding any other provision of this License, you have\ +permission to link or combine any covered work with a work licensed\ +under version 3 of the GNU General Public License into a single\ +combined work, and to convey the resulting work. The terms of this\ +License will continue to apply to the part which is the covered work,\ +but the work with which it is combined will remain governed by version\ +3 of the GNU General Public License.\ +\ + 14. Revised Versions of this License.\ +\ + The Free Software Foundation may publish revised and/or new versions of\ +the GNU Affero General Public License from time to time. Such new versions\ +will be similar in spirit to the present version, but may differ in detail to\ +address new problems or concerns.\ +\ + Each version is given a distinguishing version number. If the\ +Program specifies that a certain numbered version of the GNU Affero General\ +Public License "or any later version" applies to it, you have the\ +option of following the terms and conditions either of that numbered\ +version or of any later version published by the Free Software\ +Foundation. If the Program does not specify a version number of the\ +GNU Affero General Public License, you may choose any version ever published\ +by the Free Software Foundation.\ +\ + If the Program specifies that a proxy can decide which future\ +versions of the GNU Affero General Public License can be used, that proxy's\ +public statement of acceptance of a version permanently authorizes you\ +to choose that version for the Program.\ +\ + Later license versions may give you additional or different\ +permissions. However, no additional obligations are imposed on any\ +author or copyright holder as a result of your choosing to follow a\ +later version.\ +\ + 15. Disclaimer of Warranty.\ +\ + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY\ +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT\ +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY\ +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,\ +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR\ +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM\ +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF\ +ALL NECESSARY SERVICING, REPAIR OR CORRECTION.\ +\ + 16. Limitation of Liability.\ +\ + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING\ +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS\ +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY\ +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE\ +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF\ +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD\ +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),\ +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF\ +SUCH DAMAGES.\ +\ + 17. Interpretation of Sections 15 and 16.\ +\ + If the disclaimer of warranty and limitation of liability provided\ +above cannot be given local legal effect according to their terms,\ +reviewing courts shall apply local law that most closely approximates\ +an absolute waiver of all civil liability in connection with the\ +Program, unless a warranty or assumption of liability accompanies a\ +copy of the Program in return for a fee.\ +\ + END OF TERMS AND CONDITIONS\ +\ + How to Apply These Terms to Your New Programs\ +\ + If you develop a new program, and you want it to be of the greatest\ +possible use to the public, the best way to achieve this is to make it\ +free software which everyone can redistribute and change under these terms.\ +\ + To do so, attach the following notices to the program. It is safest\ +to attach them to the start of each source file to most effectively\ +state the exclusion of warranty; and each file should have at least\ +the "copyright" line and a pointer to where the full notice is found.\ +\ + \ + Copyright (C) \ +\ + This program is free software: you can redistribute it and/or modify\ + it under the terms of the GNU Affero General Public License as published by\ + the Free Software Foundation, either version 3 of the License, or\ + (at your option) any later version.\ +\ + This program is distributed in the hope that it will be useful,\ + but WITHOUT ANY WARRANTY; without even the implied warranty of\ + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the\ + GNU Affero General Public License for more details.\ +\ + You should have received a copy of the GNU Affero General Public License\ + along with this program. If not, see .\ +\ +Also add information on how to contact you by electronic and paper mail.\ +\ + If your software can interact with users remotely through a computer\ +network, you should also make sure that it provides a way for users to\ +get its source. For example, if your program is a web application, its\ +interface could display a "Source" link that leads users to an archive\ +of the code. There are many ways you could offer source, and different\ +solutions will be better for different programs; see section 13 for the\ +specific requirements.\ +\ + You should also get your employer (if you work as a programmer) or school,\ +if any, to sign a "copyright disclaimer" for the program, if necessary.\ +For more information on this, and how to apply and follow the GNU AGPL, see\ +.\ +} \ No newline at end of file diff --git a/Installer/build.sh b/Installer/build.sh new file mode 100755 index 0000000..43dca8b --- /dev/null +++ b/Installer/build.sh @@ -0,0 +1,367 @@ +#!/bin/bash -e +set -x + +# +# Resolve repo root +# +cd "$(dirname "$0")" +cd .. +PROJECT_ROOT=$(pwd) +PLUGIN="Wavetable" +VENDOR="SocaLabs" +BUNDLE_BASE="com.socalabs.wavetable" + +if [ "$(uname)" = "Darwin" ]; then + PLATFORM="macOS" +elif [ "$(expr substr "$(uname -s)" 1 5)" = "Linux" ]; then + PLATFORM="linux" +else + PLATFORM="win" +fi + +VERSION=$(cat "$PROJECT_ROOT/VERSION") + +# +# Crash reporting: bundle the latest CrashReporter app + this plugin's +# registration JSON. Debug symbols are zipped into bin/ and uploaded later by +# the release job (release.sh), never from this build. +# The CrashReporter download is a public distribution channel (no key needed). +# +CRASH_BASE="https://crashreports.rabiensoftware.com" + +# Native (non-MSYS) curl on Windows can't read Git-Bash paths like /d/a/..., +# so translate to a Windows path there. No-op on macOS/Linux. +curl_path () { + if command -v cygpath >/dev/null 2>&1; then cygpath -m "$1"; else printf '%s' "$1"; fi +} + +# Download the latest CrashReporter build for a platform. Non-fatal: if none is +# published yet we still ship the registration JSON so crashes register. +fetch_reporter () { # $1 platform, $2 output file + if curl -fsSL "$CRASH_BASE/reporter/latest/?platform=$1" -o "$(curl_path "$2")"; then + return 0 + fi + echo "WARNING: could not fetch CrashReporter for $1 (none published yet?)" + return 1 +} + +# +# Reset staging +# +rm -Rf "$PROJECT_ROOT/installer/$PLATFORM/bin" +mkdir -p "$PROJECT_ROOT/installer/$PLATFORM/bin" +rm -Rf "$PROJECT_ROOT/bin" +mkdir -p "$PROJECT_ROOT/bin" + +# +# Flatten the nested Presets//*.xml tree into a single flat directory. +# gin's loadDirectory() doesn't recurse, and the legacy BinaryData flow stored +# presets flat in the user directory — keeping flat matches what users see. +# +FLAT_PRESETS="$PROJECT_ROOT/installer/_flat_presets" +rm -Rf "$FLAT_PRESETS" +mkdir -p "$FLAT_PRESETS" +find "$PROJECT_ROOT/plugin/Resources/Presets" -name "*.xml" -type f -exec cp {} "$FLAT_PRESETS/" \; + +############################################################ +# macOS — pkgbuild + productbuild +############################################################ +if [ "$PLATFORM" = "macOS" ]; then + TEAM_ID="${TEAM_ID:-3FS7DJDG38}" + DEV_APP_ID="${DEV_APP_ID:-Developer ID Application: Roland Rabien (${TEAM_ID})}" + DEV_INST_ID="${DEV_INST_ID:-Developer ID Installer: Roland Rabien (${TEAM_ID})}" + + # + # Bootstrap a temp keychain from base64-encoded p12 secrets when running in CI. + # APPLICATION = base64 of Developer ID Application .p12 + # INSTALLER = base64 of Developer ID Installer .p12 + # + if [ -n "${APPLICATION:-}" ] && [ -n "${INSTALLER:-}" ]; then + KC_PASS="${KEYCHAIN_PASSWORD:-nr4aGPyz}" + P12_PASS="${P12_PASSWORD:-aym9PKWB}" + + security create-keychain -p "$KC_PASS" Keys.keychain || true + + echo "$APPLICATION" | base64 -D -o /tmp/Application.p12 + echo "$INSTALLER" | base64 -D -o /tmp/Installer.p12 + + security import /tmp/Application.p12 -t agg -k Keys.keychain -P "$P12_PASS" -A -T /usr/bin/codesign + security import /tmp/Installer.p12 -t agg -k Keys.keychain -P "$P12_PASS" -A -T /usr/bin/productsign + + security list-keychains -s Keys.keychain + security default-keychain -s Keys.keychain + security unlock-keychain -p "$KC_PASS" Keys.keychain + security set-keychain-settings -l -u -t 13600 Keys.keychain + security set-key-partition-list -S apple-tool:,apple: -s -k "$KC_PASS" Keys.keychain + fi + + ART_DIR="$PROJECT_ROOT/Builds/xcode/${PLUGIN}_artefacts/Release" + + cd "$PROJECT_ROOT" + cmake --preset xcode + cmake --build --preset xcode --config Release + + STAGE="$PROJECT_ROOT/installer/macOS/bin/stage" + PKG_DIR="$PROJECT_ROOT/installer/macOS/bin/pkgs" + rm -Rf "$STAGE" "$PKG_DIR" + mkdir -p "$STAGE/vst" "$STAGE/vst3" "$STAGE/au" "$STAGE/clap" + mkdir -p "$STAGE/resources/Library/Audio/Presets/$VENDOR/$PLUGIN" + mkdir -p "$PKG_DIR" + + cp -RL "$ART_DIR/VST/$PLUGIN.vst" "$STAGE/vst/" + cp -RL "$ART_DIR/VST3/$PLUGIN.vst3" "$STAGE/vst3/" + cp -RL "$ART_DIR/AU/$PLUGIN.component" "$STAGE/au/" + cp -RL "$ART_DIR/CLAP/$PLUGIN.clap" "$STAGE/clap/" + + # Resources component: factory Wavetables and Presets (presets flattened above) + mkdir -p "$STAGE/resources/Library/Audio/Presets/$VENDOR/$PLUGIN/Presets" + cp "$FLAT_PRESETS/"*.xml "$STAGE/resources/Library/Audio/Presets/$VENDOR/$PLUGIN/Presets/" + cp -R "$PROJECT_ROOT/plugin/Resources/WavetablesFLAC" "$STAGE/resources/Library/Audio/Presets/$VENDOR/$PLUGIN/Wavetables" + find "$STAGE/resources" -name ".DS_Store" -delete + + # Strip symbols from the shipped binaries so end-user crash logs are NOT + # symbolicated locally by macOS — the server symbolicates them from the dSYMs + # (built below from the unstripped products in $ART_DIR). strip preserves the + # Mach-O UUID, so the dSYM still matches. Before codesign. + strip -x "$STAGE/vst/$PLUGIN.vst/Contents/MacOS/$PLUGIN" + strip -x "$STAGE/vst3/$PLUGIN.vst3/Contents/MacOS/$PLUGIN" + strip -x "$STAGE/au/$PLUGIN.component/Contents/MacOS/$PLUGIN" + strip -x "$STAGE/clap/$PLUGIN.clap/Contents/MacOS/$PLUGIN" + + if [ -n "${APPLICATION:-}" ]; then + codesign -s "$DEV_APP_ID" --options=runtime --timestamp --force -v "$STAGE/vst/$PLUGIN.vst" + codesign -s "$DEV_APP_ID" --options=runtime --timestamp --force -v "$STAGE/vst3/$PLUGIN.vst3" + codesign -s "$DEV_APP_ID" --options=runtime --timestamp --force -v "$STAGE/au/$PLUGIN.component" + codesign -s "$DEV_APP_ID" --options=runtime --timestamp --force -v "$STAGE/clap/$PLUGIN.clap" + else + echo "Skipping codesign — APPLICATION secret not set" + fi + + # Component packages + pkgbuild --root "$STAGE/vst" \ + --install-location "/Library/Audio/Plug-Ins/VST" \ + --identifier "${BUNDLE_BASE}.vst.pkg" \ + --version "$VERSION" \ + "$PKG_DIR/vst.pkg" + + pkgbuild --root "$STAGE/vst3" \ + --install-location "/Library/Audio/Plug-Ins/VST3" \ + --identifier "${BUNDLE_BASE}.vst3.pkg" \ + --version "$VERSION" \ + "$PKG_DIR/vst3.pkg" + + pkgbuild --root "$STAGE/au" \ + --install-location "/Library/Audio/Plug-Ins/Components" \ + --identifier "${BUNDLE_BASE}.au.pkg" \ + --version "$VERSION" \ + "$PKG_DIR/au.pkg" + + pkgbuild --root "$STAGE/clap" \ + --install-location "/Library/Audio/Plug-Ins/CLAP" \ + --identifier "${BUNDLE_BASE}.clap.pkg" \ + --version "$VERSION" \ + "$PKG_DIR/clap.pkg" + + pkgbuild --root "$STAGE/resources" \ + --install-location "/" \ + --identifier "${BUNDLE_BASE}.resources.pkg" \ + --version "$VERSION" \ + --scripts "$PROJECT_ROOT/installer/macOS/scripts" \ + "$PKG_DIR/resources.pkg" + + # CrashReporter component: latest signed CrashReporter.app + this plugin's + # registration JSON. Staged under .incoming and promoted by the postinstall + # only if strictly newer (shared component, never downgraded). + REP_STAGE="$PROJECT_ROOT/installer/macOS/bin/reporter" + REP_ROOT="$REP_STAGE/Library/Application Support/Rabien Software/Crash Reporter" + rm -Rf "$REP_STAGE" + mkdir -p "$REP_ROOT/Plugins" "$REP_ROOT/.incoming" + if fetch_reporter mac "$REP_STAGE/CrashReporter_Mac.zip"; then + ( cd "$REP_STAGE" && unzip -qo CrashReporter_Mac.zip && rm CrashReporter_Mac.zip ) + mv "$REP_STAGE/CrashReporter.app" "$REP_ROOT/.incoming/" + fi + cp "$PROJECT_ROOT/installer/crashreporter.json" "$REP_ROOT/Plugins/wavetable.json" + find "$REP_STAGE" -name ".DS_Store" -delete + + if [ -n "${APPLICATION:-}" ] && [ -d "$REP_ROOT/.incoming/CrashReporter.app" ]; then + codesign -s "$DEV_APP_ID" --options=runtime --timestamp --force -v "$REP_ROOT/.incoming/CrashReporter.app" + fi + + chmod +x "$PROJECT_ROOT/installer/macOS/reporter-scripts/postinstall" + + # Disable bundle relocation so the installer installs to our staged path + # instead of redirecting to a CrashReporter.app found elsewhere via Spotlight. + COMP_PLIST="$PROJECT_ROOT/installer/macOS/bin/reporter-component.plist" + pkgbuild --analyze --root "$REP_STAGE" "$COMP_PLIST" + /usr/libexec/PlistBuddy -c "Set :0:BundleIsRelocatable false" "$COMP_PLIST" 2>/dev/null || true + + pkgbuild --root "$REP_STAGE" --install-location "/" \ + --identifier "${BUNDLE_BASE}.crashreporter.pkg" --version "$VERSION" \ + --component-plist "$COMP_PLIST" \ + --scripts "$PROJECT_ROOT/installer/macOS/reporter-scripts" \ + "$PKG_DIR/reporter.pkg" + + # productbuild — combine into one signed installer + cp "$PROJECT_ROOT/installer/EULA.rtf" "$PKG_DIR/EULA.rtf" + cp "$PROJECT_ROOT/installer/macOS/welcome.txt" "$PKG_DIR/welcome.txt" + + PKG_OUT="$PROJECT_ROOT/installer/macOS/bin/${PLUGIN}.pkg" + + productbuild --distribution "$PROJECT_ROOT/installer/macOS/distribution.xml" \ + --package-path "$PKG_DIR" \ + --resources "$PKG_DIR" \ + --version "$VERSION" \ + "$PKG_OUT.unsigned" + + if [ -n "${INSTALLER:-}" ]; then + productsign --sign "$DEV_INST_ID" "$PKG_OUT.unsigned" "$PKG_OUT" + rm "$PKG_OUT.unsigned" + else + echo "Skipping productsign — INSTALLER secret not set" + mv "$PKG_OUT.unsigned" "$PKG_OUT" + fi + + if [ -n "${APPLE_USER:-}" ] && [ -n "${APPLE_PASS:-}" ]; then + SUBMISSION_OUTPUT=$(xcrun notarytool submit --verbose --apple-id "$APPLE_USER" --password "$APPLE_PASS" --team-id "$TEAM_ID" --wait --timeout 30m "$PKG_OUT" 2>&1) || NOTARY_FAILED=1 + echo "$SUBMISSION_OUTPUT" + SUBMISSION_ID=$(echo "$SUBMISSION_OUTPUT" | awk "/^ id:/ { print \$2; exit }") + if [ "${NOTARY_FAILED:-0}" = "1" ] && [ -n "$SUBMISSION_ID" ]; then + echo "Notarization failed — fetching log for $SUBMISSION_ID" + xcrun notarytool log "$SUBMISSION_ID" --apple-id "$APPLE_USER" --password "$APPLE_PASS" --team-id "$TEAM_ID" || true + exit 1 + fi + xcrun stapler staple "$PKG_OUT" + else + echo "Skipping notarization — APPLE_USER / APPLE_PASS not set" + fi + + cp "$PKG_OUT" "$PROJECT_ROOT/bin/" + + # Symbols zip. Some Xcode/CMake combos don't emit .dSYMs next to the product, + # so generate any that are missing straight from the built binaries. + for pair in "VST:$PLUGIN.vst" "VST3:$PLUGIN.vst3" "AU:$PLUGIN.component" "CLAP:$PLUGIN.clap"; do + d="${pair%%:*}"; b="${pair#*:}" + dsym="$ART_DIR/$d/$b.dSYM" + bin="$ART_DIR/$d/$b/Contents/MacOS/$PLUGIN" + if [ ! -d "$dsym" ] && [ -f "$bin" ]; then + echo "Generating dSYM for $d/$b" + dsymutil "$bin" -o "$dsym" || true + fi + done + + cd "$ART_DIR" + zip -r "$PROJECT_ROOT/bin/Symbols_Mac.zip" \ + AU/$PLUGIN.component.dSYM \ + VST/$PLUGIN.vst.dSYM \ + VST3/$PLUGIN.vst3.dSYM \ + CLAP/$PLUGIN.clap.dSYM 2>/dev/null || true + +############################################################ +# Linux — cpack DEB (VST + VST3 + LV2 + CLAP + Resources) +############################################################ +elif [ "$PLATFORM" = "linux" ]; then + cd "$PROJECT_ROOT" + cmake --preset ninja-gcc + cmake --build --preset ninja-gcc --config Release + + cd "$PROJECT_ROOT/Builds/ninja-gcc" + cpack -G DEB -C Release + + cp "$PROJECT_ROOT/Builds/ninja-gcc/"*.deb "$PROJECT_ROOT/bin/" + +############################################################ +# Windows — Inno Setup + Azure Trusted Signing +############################################################ +else + cd "$PROJECT_ROOT" + cmake --preset vs + cmake --build --preset vs --config Release + + ART_DIR="$PROJECT_ROOT/Builds/vs/${PLUGIN}_artefacts/Release" + STAGE="$PROJECT_ROOT/installer/win/bin" + + rm -Rf "$STAGE" + mkdir -p "$STAGE/VST" "$STAGE/VST3" "$STAGE/CLAP" + cp -R "$ART_DIR/VST/$PLUGIN.dll" "$STAGE/VST/" + cp -R "$ART_DIR/VST3/$PLUGIN.vst3" "$STAGE/VST3/" + cp -R "$ART_DIR/CLAP/$PLUGIN.clap" "$STAGE/CLAP/" + + # CrashReporter: latest signed build + this plugin's registration JSON. + REP_DIR="$STAGE/CrashReporter" + rm -Rf "$REP_DIR"; mkdir -p "$REP_DIR" + if fetch_reporter win "$REP_DIR/CrashReporter_Win.zip"; then + ( cd "$REP_DIR" && 7z x -y CrashReporter_Win.zip >/dev/null && rm CrashReporter_Win.zip ) + fi + cp "$PROJECT_ROOT/installer/crashreporter.json" "$REP_DIR/wavetable.json" + + # + # Sign binaries via Microsoft Trusted Signing. + # Required env: AZURE_TENANT_ID, AZURE_CLIENT_ID, AZURE_CLIENT_SECRET. + # Cert is referenced via installer/win/metadata.json. + # + uuid_re='^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12}$' + WIN_SIGN=0 + if [ -n "${AZURE_TENANT_ID:-}" ] || [ -n "${AZURE_CLIENT_ID:-}" ] || [ -n "${AZURE_CLIENT_SECRET:-}" ]; then + if [[ ! "${AZURE_TENANT_ID:-}" =~ $uuid_re ]]; then + echo "ERROR: AZURE_TENANT_ID is not a valid GUID — set the secret on the repo or unset all three to skip signing."; exit 1 + elif [[ ! "${AZURE_CLIENT_ID:-}" =~ $uuid_re ]]; then + echo "ERROR: AZURE_CLIENT_ID is not a valid GUID — set the secret on the repo or unset all three to skip signing."; exit 1 + elif [ -z "${AZURE_CLIENT_SECRET:-}" ]; then + echo "ERROR: AZURE_CLIENT_SECRET is empty — set the secret on the repo or unset all three to skip signing."; exit 1 + else + WIN_SIGN=1 + fi + fi + + if [ "$WIN_SIGN" = "1" ]; then + # Locate signtool — the version dir under Windows Kits varies by runner image. + SIGNTOOL=$(ls -1 "/c/Program Files (x86)/Windows Kits/10/bin/"*/x64/signtool.exe 2>/dev/null | sort | tail -1) + if [ -z "$SIGNTOOL" ]; then + echo "signtool.exe not found in Windows Kits"; exit 1 + fi + + TOOLS_DIR="$STAGE/_signingtools" + mkdir -p "$TOOLS_DIR" + nuget install Microsoft.Trusted.Signing.Client -Version 1.0.86 \ + -OutputDirectory "$TOOLS_DIR" -ExcludeVersion -NonInteractive + DLIB="$TOOLS_DIR/Microsoft.Trusted.Signing.Client/bin/x64/Azure.CodeSigning.Dlib.dll" + METADATA="$PROJECT_ROOT/installer/win/metadata.json" + + sign_file () { + "$SIGNTOOL" sign -v -fd SHA256 \ + -tr "http://timestamp.acs.microsoft.com" -td SHA256 \ + -dlib "$DLIB" -dmdf "$METADATA" "$1" + } + + sign_file "$STAGE/VST/$PLUGIN.dll" + sign_file "$STAGE/VST3/$PLUGIN.vst3/Contents/x86_64-win/$PLUGIN.vst3" + sign_file "$STAGE/CLAP/$PLUGIN.clap" + else + echo "Skipping Windows binary signing — Azure secrets not set" + fi + + # Build installer .exe + cd "$PROJECT_ROOT/installer/win" + ISCC="/c/Program Files (x86)/Inno Setup 6/ISCC.exe" + if [ ! -f "$ISCC" ]; then + ISCC="/c/Program Files/Inno Setup 6/ISCC.exe" + fi + "$ISCC" "$PROJECT_ROOT/installer/win/${PLUGIN}.iss" + + EXE_OUT="$PROJECT_ROOT/installer/win/bin/${PLUGIN}.exe" + + # Sign installer + if [ "$WIN_SIGN" = "1" ]; then + sign_file "$EXE_OUT" + fi + + cp "$EXE_OUT" "$PROJECT_ROOT/bin/" + + # Symbols zip — PDBs for crash symbolication. + SYM_DIR="$STAGE/symbols" + rm -Rf "$SYM_DIR"; mkdir -p "$SYM_DIR/VST" "$SYM_DIR/VST3" "$SYM_DIR/CLAP" + cp "$ART_DIR/VST/$PLUGIN.pdb" "$SYM_DIR/VST/" 2>/dev/null || true + cp "$ART_DIR/VST3/$PLUGIN.pdb" "$SYM_DIR/VST3/" 2>/dev/null || true + cp "$ART_DIR/CLAP/$PLUGIN.pdb" "$SYM_DIR/CLAP/" 2>/dev/null || true + ( cd "$SYM_DIR" && 7z a "$PROJECT_ROOT/bin/Symbols_Win.zip" VST VST3 CLAP ) +fi diff --git a/Installer/crashreporter.json b/Installer/crashreporter.json new file mode 100644 index 0000000..cc52a9c --- /dev/null +++ b/Installer/crashreporter.json @@ -0,0 +1,6 @@ +{ + "name": "Wavetable", + "pluginID": "com.socalabs.wavetable", + "crashUrl": "https://crashreports.rabiensoftware.com/post/", + "apiKey": "da8b3bc4e5fcb9b5ba8b5960d0ef805b62d4097b956082c87fcf82cab40cc2c8" +} diff --git a/Installer/eula.md b/Installer/eula.md new file mode 100644 index 0000000..be3f7b2 --- /dev/null +++ b/Installer/eula.md @@ -0,0 +1,661 @@ + GNU AFFERO GENERAL PUBLIC LICENSE + Version 3, 19 November 2007 + + Copyright (C) 2007 Free Software Foundation, Inc. + Everyone is permitted to copy and distribute verbatim copies + of this license document, but changing it is not allowed. + + Preamble + + The GNU Affero General Public License is a free, copyleft license for +software and other kinds of works, specifically designed to ensure +cooperation with the community in the case of network server software. + + The licenses for most software and other practical works are designed +to take away your freedom to share and change the works. By contrast, +our General Public Licenses are intended to guarantee your freedom to +share and change all versions of a program--to make sure it remains free +software for all its users. + + When we speak of free software, we are referring to freedom, not +price. Our General Public Licenses are designed to make sure that you +have the freedom to distribute copies of free software (and charge for +them if you wish), that you receive source code or can get it if you +want it, that you can change the software or use pieces of it in new +free programs, and that you know you can do these things. + + Developers that use our General Public Licenses protect your rights +with two steps: (1) assert copyright on the software, and (2) offer +you this License which gives you legal permission to copy, distribute +and/or modify the software. + + A secondary benefit of defending all users' freedom is that +improvements made in alternate versions of the program, if they +receive widespread use, become available for other developers to +incorporate. Many developers of free software are heartened and +encouraged by the resulting cooperation. However, in the case of +software used on network servers, this result may fail to come about. +The GNU General Public License permits making a modified version and +letting the public access it on a server without ever releasing its +source code to the public. + + The GNU Affero General Public License is designed specifically to +ensure that, in such cases, the modified source code becomes available +to the community. It requires the operator of a network server to +provide the source code of the modified version running there to the +users of that server. Therefore, public use of a modified version, on +a publicly accessible server, gives the public access to the source +code of the modified version. + + An older license, called the Affero General Public License and +published by Affero, was designed to accomplish similar goals. This is +a different license, not a version of the Affero GPL, but Affero has +released a new version of the Affero GPL which permits relicensing under +this license. + + The precise terms and conditions for copying, distribution and +modification follow. + + TERMS AND CONDITIONS + + 0. Definitions. + + "This License" refers to version 3 of the GNU Affero General Public License. + + "Copyright" also means copyright-like laws that apply to other kinds of +works, such as semiconductor masks. + + "The Program" refers to any copyrightable work licensed under this +License. Each licensee is addressed as "you". "Licensees" and +"recipients" may be individuals or organizations. + + To "modify" a work means to copy from or adapt all or part of the work +in a fashion requiring copyright permission, other than the making of an +exact copy. The resulting work is called a "modified version" of the +earlier work or a work "based on" the earlier work. + + A "covered work" means either the unmodified Program or a work based +on the Program. + + To "propagate" a work means to do anything with it that, without +permission, would make you directly or secondarily liable for +infringement under applicable copyright law, except executing it on a +computer or modifying a private copy. Propagation includes copying, +distribution (with or without modification), making available to the +public, and in some countries other activities as well. + + To "convey" a work means any kind of propagation that enables other +parties to make or receive copies. Mere interaction with a user through +a computer network, with no transfer of a copy, is not conveying. + + An interactive user interface displays "Appropriate Legal Notices" +to the extent that it includes a convenient and prominently visible +feature that (1) displays an appropriate copyright notice, and (2) +tells the user that there is no warranty for the work (except to the +extent that warranties are provided), that licensees may convey the +work under this License, and how to view a copy of this License. If +the interface presents a list of user commands or options, such as a +menu, a prominent item in the list meets this criterion. + + 1. Source Code. + + The "source code" for a work means the preferred form of the work +for making modifications to it. "Object code" means any non-source +form of a work. + + A "Standard Interface" means an interface that either is an official +standard defined by a recognized standards body, or, in the case of +interfaces specified for a particular programming language, one that +is widely used among developers working in that language. + + The "System Libraries" of an executable work include anything, other +than the work as a whole, that (a) is included in the normal form of +packaging a Major Component, but which is not part of that Major +Component, and (b) serves only to enable use of the work with that +Major Component, or to implement a Standard Interface for which an +implementation is available to the public in source code form. A +"Major Component", in this context, means a major essential component +(kernel, window system, and so on) of the specific operating system +(if any) on which the executable work runs, or a compiler used to +produce the work, or an object code interpreter used to run it. + + The "Corresponding Source" for a work in object code form means all +the source code needed to generate, install, and (for an executable +work) run the object code and to modify the work, including scripts to +control those activities. However, it does not include the work's +System Libraries, or general-purpose tools or generally available free +programs which are used unmodified in performing those activities but +which are not part of the work. For example, Corresponding Source +includes interface definition files associated with source files for +the work, and the source code for shared libraries and dynamically +linked subprograms that the work is specifically designed to require, +such as by intimate data communication or control flow between those +subprograms and other parts of the work. + + The Corresponding Source need not include anything that users +can regenerate automatically from other parts of the Corresponding +Source. + + The Corresponding Source for a work in source code form is that +same work. + + 2. Basic Permissions. + + All rights granted under this License are granted for the term of +copyright on the Program, and are irrevocable provided the stated +conditions are met. This License explicitly affirms your unlimited +permission to run the unmodified Program. The output from running a +covered work is covered by this License only if the output, given its +content, constitutes a covered work. This License acknowledges your +rights of fair use or other equivalent, as provided by copyright law. + + You may make, run and propagate covered works that you do not +convey, without conditions so long as your license otherwise remains +in force. You may convey covered works to others for the sole purpose +of having them make modifications exclusively for you, or provide you +with facilities for running those works, provided that you comply with +the terms of this License in conveying all material for which you do +not control copyright. Those thus making or running the covered works +for you must do so exclusively on your behalf, under your direction +and control, on terms that prohibit them from making any copies of +your copyrighted material outside their relationship with you. + + Conveying under any other circumstances is permitted solely under +the conditions stated below. Sublicensing is not allowed; section 10 +makes it unnecessary. + + 3. Protecting Users' Legal Rights From Anti-Circumvention Law. + + No covered work shall be deemed part of an effective technological +measure under any applicable law fulfilling obligations under article +11 of the WIPO copyright treaty adopted on 20 December 1996, or +similar laws prohibiting or restricting circumvention of such +measures. + + When you convey a covered work, you waive any legal power to forbid +circumvention of technological measures to the extent such circumvention +is effected by exercising rights under this License with respect to +the covered work, and you disclaim any intention to limit operation or +modification of the work as a means of enforcing, against the work's +users, your or third parties' legal rights to forbid circumvention of +technological measures. + + 4. Conveying Verbatim Copies. + + You may convey verbatim copies of the Program's source code as you +receive it, in any medium, provided that you conspicuously and +appropriately publish on each copy an appropriate copyright notice; +keep intact all notices stating that this License and any +non-permissive terms added in accord with section 7 apply to the code; +keep intact all notices of the absence of any warranty; and give all +recipients a copy of this License along with the Program. + + You may charge any price or no price for each copy that you convey, +and you may offer support or warranty protection for a fee. + + 5. Conveying Modified Source Versions. + + You may convey a work based on the Program, or the modifications to +produce it from the Program, in the form of source code under the +terms of section 4, provided that you also meet all of these conditions: + + a) The work must carry prominent notices stating that you modified + it, and giving a relevant date. + + b) The work must carry prominent notices stating that it is + released under this License and any conditions added under section + 7. This requirement modifies the requirement in section 4 to + "keep intact all notices". + + c) You must license the entire work, as a whole, under this + License to anyone who comes into possession of a copy. This + License will therefore apply, along with any applicable section 7 + additional terms, to the whole of the work, and all its parts, + regardless of how they are packaged. This License gives no + permission to license the work in any other way, but it does not + invalidate such permission if you have separately received it. + + d) If the work has interactive user interfaces, each must display + Appropriate Legal Notices; however, if the Program has interactive + interfaces that do not display Appropriate Legal Notices, your + work need not make them do so. + + A compilation of a covered work with other separate and independent +works, which are not by their nature extensions of the covered work, +and which are not combined with it such as to form a larger program, +in or on a volume of a storage or distribution medium, is called an +"aggregate" if the compilation and its resulting copyright are not +used to limit the access or legal rights of the compilation's users +beyond what the individual works permit. Inclusion of a covered work +in an aggregate does not cause this License to apply to the other +parts of the aggregate. + + 6. Conveying Non-Source Forms. + + You may convey a covered work in object code form under the terms +of sections 4 and 5, provided that you also convey the +machine-readable Corresponding Source under the terms of this License, +in one of these ways: + + a) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by the + Corresponding Source fixed on a durable physical medium + customarily used for software interchange. + + b) Convey the object code in, or embodied in, a physical product + (including a physical distribution medium), accompanied by a + written offer, valid for at least three years and valid for as + long as you offer spare parts or customer support for that product + model, to give anyone who possesses the object code either (1) a + copy of the Corresponding Source for all the software in the + product that is covered by this License, on a durable physical + medium customarily used for software interchange, for a price no + more than your reasonable cost of physically performing this + conveying of source, or (2) access to copy the + Corresponding Source from a network server at no charge. + + c) Convey individual copies of the object code with a copy of the + written offer to provide the Corresponding Source. This + alternative is allowed only occasionally and noncommercially, and + only if you received the object code with such an offer, in accord + with subsection 6b. + + d) Convey the object code by offering access from a designated + place (gratis or for a charge), and offer equivalent access to the + Corresponding Source in the same way through the same place at no + further charge. You need not require recipients to copy the + Corresponding Source along with the object code. If the place to + copy the object code is a network server, the Corresponding Source + may be on a different server (operated by you or a third party) + that supports equivalent copying facilities, provided you maintain + clear directions next to the object code saying where to find the + Corresponding Source. Regardless of what server hosts the + Corresponding Source, you remain obligated to ensure that it is + available for as long as needed to satisfy these requirements. + + e) Convey the object code using peer-to-peer transmission, provided + you inform other peers where the object code and Corresponding + Source of the work are being offered to the general public at no + charge under subsection 6d. + + A separable portion of the object code, whose source code is excluded +from the Corresponding Source as a System Library, need not be +included in conveying the object code work. + + A "User Product" is either (1) a "consumer product", which means any +tangible personal property which is normally used for personal, family, +or household purposes, or (2) anything designed or sold for incorporation +into a dwelling. In determining whether a product is a consumer product, +doubtful cases shall be resolved in favor of coverage. For a particular +product received by a particular user, "normally used" refers to a +typical or common use of that class of product, regardless of the status +of the particular user or of the way in which the particular user +actually uses, or expects or is expected to use, the product. A product +is a consumer product regardless of whether the product has substantial +commercial, industrial or non-consumer uses, unless such uses represent +the only significant mode of use of the product. + + "Installation Information" for a User Product means any methods, +procedures, authorization keys, or other information required to install +and execute modified versions of a covered work in that User Product from +a modified version of its Corresponding Source. The information must +suffice to ensure that the continued functioning of the modified object +code is in no case prevented or interfered with solely because +modification has been made. + + If you convey an object code work under this section in, or with, or +specifically for use in, a User Product, and the conveying occurs as +part of a transaction in which the right of possession and use of the +User Product is transferred to the recipient in perpetuity or for a +fixed term (regardless of how the transaction is characterized), the +Corresponding Source conveyed under this section must be accompanied +by the Installation Information. But this requirement does not apply +if neither you nor any third party retains the ability to install +modified object code on the User Product (for example, the work has +been installed in ROM). + + The requirement to provide Installation Information does not include a +requirement to continue to provide support service, warranty, or updates +for a work that has been modified or installed by the recipient, or for +the User Product in which it has been modified or installed. Access to a +network may be denied when the modification itself materially and +adversely affects the operation of the network or violates the rules and +protocols for communication across the network. + + Corresponding Source conveyed, and Installation Information provided, +in accord with this section must be in a format that is publicly +documented (and with an implementation available to the public in +source code form), and must require no special password or key for +unpacking, reading or copying. + + 7. Additional Terms. + + "Additional permissions" are terms that supplement the terms of this +License by making exceptions from one or more of its conditions. +Additional permissions that are applicable to the entire Program shall +be treated as though they were included in this License, to the extent +that they are valid under applicable law. If additional permissions +apply only to part of the Program, that part may be used separately +under those permissions, but the entire Program remains governed by +this License without regard to the additional permissions. + + When you convey a copy of a covered work, you may at your option +remove any additional permissions from that copy, or from any part of +it. (Additional permissions may be written to require their own +removal in certain cases when you modify the work.) You may place +additional permissions on material, added by you to a covered work, +for which you have or can give appropriate copyright permission. + + Notwithstanding any other provision of this License, for material you +add to a covered work, you may (if authorized by the copyright holders of +that material) supplement the terms of this License with terms: + + a) Disclaiming warranty or limiting liability differently from the + terms of sections 15 and 16 of this License; or + + b) Requiring preservation of specified reasonable legal notices or + author attributions in that material or in the Appropriate Legal + Notices displayed by works containing it; or + + c) Prohibiting misrepresentation of the origin of that material, or + requiring that modified versions of such material be marked in + reasonable ways as different from the original version; or + + d) Limiting the use for publicity purposes of names of licensors or + authors of the material; or + + e) Declining to grant rights under trademark law for use of some + trade names, trademarks, or service marks; or + + f) Requiring indemnification of licensors and authors of that + material by anyone who conveys the material (or modified versions of + it) with contractual assumptions of liability to the recipient, for + any liability that these contractual assumptions directly impose on + those licensors and authors. + + All other non-permissive additional terms are considered "further +restrictions" within the meaning of section 10. If the Program as you +received it, or any part of it, contains a notice stating that it is +governed by this License along with a term that is a further +restriction, you may remove that term. If a license document contains +a further restriction but permits relicensing or conveying under this +License, you may add to a covered work material governed by the terms +of that license document, provided that the further restriction does +not survive such relicensing or conveying. + + If you add terms to a covered work in accord with this section, you +must place, in the relevant source files, a statement of the +additional terms that apply to those files, or a notice indicating +where to find the applicable terms. + + Additional terms, permissive or non-permissive, may be stated in the +form of a separately written license, or stated as exceptions; +the above requirements apply either way. + + 8. Termination. + + You may not propagate or modify a covered work except as expressly +provided under this License. Any attempt otherwise to propagate or +modify it is void, and will automatically terminate your rights under +this License (including any patent licenses granted under the third +paragraph of section 11). + + However, if you cease all violation of this License, then your +license from a particular copyright holder is reinstated (a) +provisionally, unless and until the copyright holder explicitly and +finally terminates your license, and (b) permanently, if the copyright +holder fails to notify you of the violation by some reasonable means +prior to 60 days after the cessation. + + Moreover, your license from a particular copyright holder is +reinstated permanently if the copyright holder notifies you of the +violation by some reasonable means, this is the first time you have +received notice of violation of this License (for any work) from that +copyright holder, and you cure the violation prior to 30 days after +your receipt of the notice. + + Termination of your rights under this section does not terminate the +licenses of parties who have received copies or rights from you under +this License. If your rights have been terminated and not permanently +reinstated, you do not qualify to receive new licenses for the same +material under section 10. + + 9. Acceptance Not Required for Having Copies. + + You are not required to accept this License in order to receive or +run a copy of the Program. Ancillary propagation of a covered work +occurring solely as a consequence of using peer-to-peer transmission +to receive a copy likewise does not require acceptance. However, +nothing other than this License grants you permission to propagate or +modify any covered work. These actions infringe copyright if you do +not accept this License. Therefore, by modifying or propagating a +covered work, you indicate your acceptance of this License to do so. + + 10. Automatic Licensing of Downstream Recipients. + + Each time you convey a covered work, the recipient automatically +receives a license from the original licensors, to run, modify and +propagate that work, subject to this License. You are not responsible +for enforcing compliance by third parties with this License. + + An "entity transaction" is a transaction transferring control of an +organization, or substantially all assets of one, or subdividing an +organization, or merging organizations. If propagation of a covered +work results from an entity transaction, each party to that +transaction who receives a copy of the work also receives whatever +licenses to the work the party's predecessor in interest had or could +give under the previous paragraph, plus a right to possession of the +Corresponding Source of the work from the predecessor in interest, if +the predecessor has it or can get it with reasonable efforts. + + You may not impose any further restrictions on the exercise of the +rights granted or affirmed under this License. For example, you may +not impose a license fee, royalty, or other charge for exercise of +rights granted under this License, and you may not initiate litigation +(including a cross-claim or counterclaim in a lawsuit) alleging that +any patent claim is infringed by making, using, selling, offering for +sale, or importing the Program or any portion of it. + + 11. Patents. + + A "contributor" is a copyright holder who authorizes use under this +License of the Program or a work on which the Program is based. The +work thus licensed is called the contributor's "contributor version". + + A contributor's "essential patent claims" are all patent claims +owned or controlled by the contributor, whether already acquired or +hereafter acquired, that would be infringed by some manner, permitted +by this License, of making, using, or selling its contributor version, +but do not include claims that would be infringed only as a +consequence of further modification of the contributor version. For +purposes of this definition, "control" includes the right to grant +patent sublicenses in a manner consistent with the requirements of +this License. + + Each contributor grants you a non-exclusive, worldwide, royalty-free +patent license under the contributor's essential patent claims, to +make, use, sell, offer for sale, import and otherwise run, modify and +propagate the contents of its contributor version. + + In the following three paragraphs, a "patent license" is any express +agreement or commitment, however denominated, not to enforce a patent +(such as an express permission to practice a patent or covenant not to +sue for patent infringement). To "grant" such a patent license to a +party means to make such an agreement or commitment not to enforce a +patent against the party. + + If you convey a covered work, knowingly relying on a patent license, +and the Corresponding Source of the work is not available for anyone +to copy, free of charge and under the terms of this License, through a +publicly available network server or other readily accessible means, +then you must either (1) cause the Corresponding Source to be so +available, or (2) arrange to deprive yourself of the benefit of the +patent license for this particular work, or (3) arrange, in a manner +consistent with the requirements of this License, to extend the patent +license to downstream recipients. "Knowingly relying" means you have +actual knowledge that, but for the patent license, your conveying the +covered work in a country, or your recipient's use of the covered work +in a country, would infringe one or more identifiable patents in that +country that you have reason to believe are valid. + + If, pursuant to or in connection with a single transaction or +arrangement, you convey, or propagate by procuring conveyance of, a +covered work, and grant a patent license to some of the parties +receiving the covered work authorizing them to use, propagate, modify +or convey a specific copy of the covered work, then the patent license +you grant is automatically extended to all recipients of the covered +work and works based on it. + + A patent license is "discriminatory" if it does not include within +the scope of its coverage, prohibits the exercise of, or is +conditioned on the non-exercise of one or more of the rights that are +specifically granted under this License. You may not convey a covered +work if you are a party to an arrangement with a third party that is +in the business of distributing software, under which you make payment +to the third party based on the extent of your activity of conveying +the work, and under which the third party grants, to any of the +parties who would receive the covered work from you, a discriminatory +patent license (a) in connection with copies of the covered work +conveyed by you (or copies made from those copies), or (b) primarily +for and in connection with specific products or compilations that +contain the covered work, unless you entered into that arrangement, +or that patent license was granted, prior to 28 March 2007. + + Nothing in this License shall be construed as excluding or limiting +any implied license or other defenses to infringement that may +otherwise be available to you under applicable patent law. + + 12. No Surrender of Others' Freedom. + + If conditions are imposed on you (whether by court order, agreement or +otherwise) that contradict the conditions of this License, they do not +excuse you from the conditions of this License. If you cannot convey a +covered work so as to satisfy simultaneously your obligations under this +License and any other pertinent obligations, then as a consequence you may +not convey it at all. For example, if you agree to terms that obligate you +to collect a royalty for further conveying from those to whom you convey +the Program, the only way you could satisfy both those terms and this +License would be to refrain entirely from conveying the Program. + + 13. Remote Network Interaction; Use with the GNU General Public License. + + Notwithstanding any other provision of this License, if you modify the +Program, your modified version must prominently offer all users +interacting with it remotely through a computer network (if your version +supports such interaction) an opportunity to receive the Corresponding +Source of your version by providing access to the Corresponding Source +from a network server at no charge, through some standard or customary +means of facilitating copying of software. This Corresponding Source +shall include the Corresponding Source for any work covered by version 3 +of the GNU General Public License that is incorporated pursuant to the +following paragraph. + + Notwithstanding any other provision of this License, you have +permission to link or combine any covered work with a work licensed +under version 3 of the GNU General Public License into a single +combined work, and to convey the resulting work. The terms of this +License will continue to apply to the part which is the covered work, +but the work with which it is combined will remain governed by version +3 of the GNU General Public License. + + 14. Revised Versions of this License. + + The Free Software Foundation may publish revised and/or new versions of +the GNU Affero General Public License from time to time. Such new versions +will be similar in spirit to the present version, but may differ in detail to +address new problems or concerns. + + Each version is given a distinguishing version number. If the +Program specifies that a certain numbered version of the GNU Affero General +Public License "or any later version" applies to it, you have the +option of following the terms and conditions either of that numbered +version or of any later version published by the Free Software +Foundation. If the Program does not specify a version number of the +GNU Affero General Public License, you may choose any version ever published +by the Free Software Foundation. + + If the Program specifies that a proxy can decide which future +versions of the GNU Affero General Public License can be used, that proxy's +public statement of acceptance of a version permanently authorizes you +to choose that version for the Program. + + Later license versions may give you additional or different +permissions. However, no additional obligations are imposed on any +author or copyright holder as a result of your choosing to follow a +later version. + + 15. Disclaimer of Warranty. + + THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY +APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT +HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY +OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, +THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR +PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM +IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF +ALL NECESSARY SERVICING, REPAIR OR CORRECTION. + + 16. Limitation of Liability. + + IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING +WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS +THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY +GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE +USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF +DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD +PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), +EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF +SUCH DAMAGES. + + 17. Interpretation of Sections 15 and 16. + + If the disclaimer of warranty and limitation of liability provided +above cannot be given local legal effect according to their terms, +reviewing courts shall apply local law that most closely approximates +an absolute waiver of all civil liability in connection with the +Program, unless a warranty or assumption of liability accompanies a +copy of the Program in return for a fee. + + END OF TERMS AND CONDITIONS + + How to Apply These Terms to Your New Programs + + If you develop a new program, and you want it to be of the greatest +possible use to the public, the best way to achieve this is to make it +free software which everyone can redistribute and change under these terms. + + To do so, attach the following notices to the program. It is safest +to attach them to the start of each source file to most effectively +state the exclusion of warranty; and each file should have at least +the "copyright" line and a pointer to where the full notice is found. + + + Copyright (C) + + This program is free software: you can redistribute it and/or modify + it under the terms of the GNU Affero General Public License as published by + the Free Software Foundation, either version 3 of the License, or + (at your option) any later version. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License + along with this program. If not, see . + +Also add information on how to contact you by electronic and paper mail. + + If your software can interact with users remotely through a computer +network, you should also make sure that it provides a way for users to +get its source. For example, if your program is a web application, its +interface could display a "Source" link that leads users to an archive +of the code. There are many ways you could offer source, and different +solutions will be better for different programs; see section 13 for the +specific requirements. + + You should also get your employer (if you work as a programmer) or school, +if any, to sign a "copyright disclaimer" for the program, if necessary. +For more information on this, and how to apply and follow the GNU AGPL, see +. diff --git a/Installer/macOS/distribution.xml b/Installer/macOS/distribution.xml new file mode 100644 index 0000000..6846ef7 --- /dev/null +++ b/Installer/macOS/distribution.xml @@ -0,0 +1,71 @@ + + + Wavetable + com.socalabs + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + vst.pkg + vst3.pkg + au.pkg + clap.pkg + resources.pkg + reporter.pkg + diff --git a/Installer/macOS/reporter-scripts/postinstall b/Installer/macOS/reporter-scripts/postinstall new file mode 100755 index 0000000..9ae4a00 --- /dev/null +++ b/Installer/macOS/reporter-scripts/postinstall @@ -0,0 +1,38 @@ +#!/bin/bash +# +# CrashReporter is a SHARED component across all SocaLabs/Rabien plugins, so we +# never downgrade it and never remove it. The pkg payload stages the incoming +# app under .incoming; here we promote it to the live location only if it is +# strictly newer than what's already installed (or nothing is installed yet). +# +set -e + +BASE="/Library/Application Support/Rabien Software/Crash Reporter" +NEW="$BASE/.incoming/CrashReporter.app" +LIVE="$BASE/CrashReporter.app" +PB="/usr/libexec/PlistBuddy" + +version_of () { # $1 = .app path -> prints CFBundleShortVersionString or 0 + if [ -d "$1" ]; then + "$PB" -c "Print :CFBundleShortVersionString" "$1/Contents/Info.plist" 2>/dev/null || echo 0 + else + echo 0 + fi +} + +if [ -d "$NEW" ]; then + newver="$(version_of "$NEW")" + livever="$(version_of "$LIVE")" + + # Promote if nothing installed, or the incoming build is strictly newer. + highest="$(printf '%s\n%s\n' "$livever" "$newver" | sort -V | tail -1)" + if [ ! -d "$LIVE" ] || { [ "$highest" = "$newver" ] && [ "$newver" != "$livever" ]; }; then + rm -rf "$LIVE" + mv "$NEW" "$LIVE" + fi +fi + +# Always clear the staging area. +rm -rf "$BASE/.incoming" + +exit 0 diff --git a/Installer/macOS/scripts/postinstall b/Installer/macOS/scripts/postinstall new file mode 100755 index 0000000..cb438fc --- /dev/null +++ b/Installer/macOS/scripts/postinstall @@ -0,0 +1,6 @@ +#!/bin/sh +# Force the AU host registrar to rescan so the freshly installed Component is +# visible without a logout/reboot. +killall -9 AudioComponentRegistrar >/dev/null 2>&1 + +exit 0 diff --git a/Installer/macOS/scripts/preinstall b/Installer/macOS/scripts/preinstall new file mode 100755 index 0000000..bbaaf87 --- /dev/null +++ b/Installer/macOS/scripts/preinstall @@ -0,0 +1,14 @@ +#!/bin/sh +# Remove any prior install of Wavetable so the new bundle takes its place cleanly. + +rm -Rf "/Library/Audio/Plug-Ins/VST/Wavetable.vst" +rm -Rf "/Library/Audio/Plug-Ins/VST3/Wavetable.vst3" +rm -Rf "/Library/Audio/Plug-Ins/Components/Wavetable.component" +rm -Rf "/Library/Audio/Plug-Ins/CLAP/Wavetable.clap" + +# Wipe the previous shipped factory content so removed wavetables/presets from +# the old version don't linger. User content lives under ~/Library and is left alone. +rm -Rf "/Library/Audio/Presets/SocaLabs/Wavetable/Presets" +rm -Rf "/Library/Audio/Presets/SocaLabs/Wavetable/Wavetables" + +exit 0 diff --git a/Installer/macOS/welcome.txt b/Installer/macOS/welcome.txt new file mode 100644 index 0000000..1d7254a --- /dev/null +++ b/Installer/macOS/welcome.txt @@ -0,0 +1,17 @@ +Wavetable by SocaLabs +===================== + +This installer places the Wavetable plug-in in your system audio plug-in +folders along with the factory wavetable bank and factory presets. + +Components: + • VST /Library/Audio/Plug-Ins/VST + • VST3 /Library/Audio/Plug-Ins/VST3 + • Audio Unit /Library/Audio/Plug-Ins/Components + • CLAP /Library/Audio/Plug-Ins/CLAP + • Factory content /Library/Audio/Presets/SocaLabs/Wavetable + +User-saved presets live under + ~/Library/Audio/Presets/SocaLabs/Wavetable + +and are not touched by this installer. diff --git a/Installer/win/Wavetable.iss b/Installer/win/Wavetable.iss new file mode 100644 index 0000000..1aa5ae1 --- /dev/null +++ b/Installer/win/Wavetable.iss @@ -0,0 +1,84 @@ +; Wavetable installer (Inno Setup) + +#define MyAppName "Wavetable" +#define MyAppCompany "SocaLabs" +#define MyAppPublisher "SocaLabs" +#define MyAppCopyright "2026 SocaLabs" +#define MyAppURL "https://socalabs.com/" +#define MyAppVersion GetStringFileInfo("bin\VST3\Wavetable.vst3\Contents\x86_64-win\Wavetable.vst3", "ProductVersion") +#define MyDefaultDirName "{commoncf64}\VST3" + +[Setup] +AppID={{FB36B27A-9328-4438-8612-3B4E73021845} +AppName={#MyAppCompany} {#MyAppName} {#MyAppVersion} +AppVerName={#MyAppCompany} {#MyAppName} {#MyAppVersion} +AppVersion={#MyAppVersion} +AppCopyright={#MyAppCopyright} +AppPublisher={#MyAppPublisher} +AppPublisherURL={#MyAppURL} +AppSupportURL={#MyAppURL} +AppUpdatesURL={#MyAppURL} +DefaultDirName={#MyDefaultDirName} +DisableProgramGroupPage=yes +OutputDir=.\bin +OutputBaseFilename=Wavetable +Compression=lzma/ultra +SolidCompression=true +ShowLanguageDialog=auto +LicenseFile=..\EULA.rtf +InternalCompressLevel=ultra +MinVersion=0,6.1.7600 +FlatComponentsList=false +AppendDefaultDirName=false +AlwaysShowDirOnReadyPage=yes +DirExistsWarning=no +DisableDirPage=yes +DisableWelcomePage=no +DisableReadyPage=no +DisableReadyMemo=no +ArchitecturesAllowed=x64compatible +ArchitecturesInstallIn64BitMode=x64compatible +VersionInfoVersion={#MyAppVersion} +VersionInfoCompany={#MyAppPublisher} +VersionInfoCopyright={#MyAppCopyright} +VersionInfoProductName={#MyAppCompany} {#MyAppName} {#MyAppVersion} (64-bit) +VersionInfoProductVersion={#MyAppVersion} +VersionInfoProductTextVersion={#MyAppVersion} +UsePreviousGroup=False +Uninstallable=no +PrivilegesRequired=admin + +[Languages] +Name: english; MessagesFile: compiler:Default.isl + +[Components] +Name: "vst"; Description: "VST plug-in"; Types: full custom; Flags: checkablealone +Name: "vst3"; Description: "VST3 plug-in"; Types: full custom; Flags: checkablealone +Name: "clap"; Description: "CLAP plug-in"; Types: full custom; Flags: checkablealone +Name: "resources"; Description: "Factory wavetables and presets"; Types: full custom; Flags: fixed +Name: "crashreporter"; Description: "Crash reporter (shared component, only updated if newer)"; Types: full custom; Flags: checkablealone + +[InstallDelete] +Type: files; Name: "{commoncf64}\VST2\Wavetable.dll"; Components: vst +Type: filesandordirs; Name: "{commoncf64}\VST3\Wavetable.vst3"; Components: vst3 +Type: files; Name: "{commoncf64}\CLAP\Wavetable.clap"; Components: clap +Type: filesandordirs; Name: "{commonappdata}\SocaLabs\Wavetable\Presets"; Components: resources +Type: filesandordirs; Name: "{commonappdata}\SocaLabs\Wavetable\Wavetables"; Components: resources + +[Files] +; Plug-in formats +Source: "bin\VST\Wavetable.dll"; DestDir: "{commoncf64}\VST2"; Flags: ignoreversion overwritereadonly; Components: vst +Source: "bin\VST3\Wavetable.vst3\*"; DestDir: "{commoncf64}\VST3\Wavetable.vst3\"; Flags: ignoreversion overwritereadonly recursesubdirs; Components: vst3 +Source: "bin\CLAP\Wavetable.clap"; DestDir: "{commoncf64}\CLAP"; Flags: ignoreversion overwritereadonly; Components: clap + +; Factory content (Wavetables, Presets) → C:\ProgramData\SocaLabs\Wavetable\ +; Presets are flattened by installer/build.sh into installer/_flat_presets/. +Source: "..\_flat_presets\*.xml"; DestDir: "{commonappdata}\SocaLabs\Wavetable\Presets\"; Flags: ignoreversion; Components: resources +Source: "..\..\plugin\Resources\WavetablesFLAC\*.wt2048"; DestDir: "{commonappdata}\SocaLabs\Wavetable\Wavetables\"; Flags: ignoreversion recursesubdirs createallsubdirs; Components: resources + +; CrashReporter app → C:\Program Files\Rabien Software\Crash Reporter, plus this +; plugin's registration JSON → C:\ProgramData\Rabien Software\Crash Reporter\Plugins. +; Shared across plugins: the app is only updated if newer and never removed on +; uninstall; the registration JSON is always installed and never removed. +Source: "bin\CrashReporter\CrashReporter.exe"; DestDir: "{commonpf}\Rabien Software\Crash Reporter"; Flags: skipifsourcedoesntexist uninsneveruninstall; Components: crashreporter +Source: "bin\CrashReporter\wavetable.json"; DestDir: "{commonappdata}\Rabien Software\Crash Reporter\Plugins"; Flags: ignoreversion uninsneveruninstall diff --git a/Installer/win/metadata.json b/Installer/win/metadata.json new file mode 100644 index 0000000..ff5df89 --- /dev/null +++ b/Installer/win/metadata.json @@ -0,0 +1,5 @@ +{ + "Endpoint": "https://wus.codesigning.azure.net/", + "CodeSigningAccountName": "Signing2025", + "CertificateProfileName": "rabien" +} diff --git a/LICENSE b/LICENSE index f386d22..5c36cb9 100644 --- a/LICENSE +++ b/LICENSE @@ -27,3 +27,4 @@ SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + diff --git a/Manual.md b/Manual.md new file mode 100644 index 0000000..6ce68ea --- /dev/null +++ b/Manual.md @@ -0,0 +1,478 @@ +# Wavetable Synthesizer Manual + +## Overview + +Wavetable is a polyphonic wavetable synthesizer featuring two wavetable oscillators, a sub-oscillator, noise generator, filter, multiple modulation sources, a flexible mod matrix, and a comprehensive effects section. + +--- + +## Oscillators + +### Wavetable Oscillators (OSC1 & OSC2) + +Two identical wavetable oscillators provide the main sound source. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the oscillator | +| Wavetable | - | Select from built-in wavetables or load custom WAV files | +| Tune | -36 to +36 semitones | Coarse pitch adjustment | +| Fine | -100 to +100 cents | Fine pitch adjustment | +| Level | -100 to 0 dB | Oscillator volume | +| Pos | 0-100% | Wavetable position - morphs through the wavetable frames | +| Pan | -100% to +100% | Stereo panning | +| Formant | -1.0 to +1.0 | Formant shifting for tonal variation | +| Bend | -1.0 to +1.0 | Pitch bend modulation amount | +| Voices | 1-8 | Number of unison voices | +| Detune | 0-0.5 | Pitch spread between unison voices (enabled when Voices > 1) | +| Spread | -100% to +100% | Stereo spread of unison voices (enabled when Voices > 1) | +| Retrig | On/Off | Retrigger oscillator phase on each new note | + +**Tip:** Drag on the wavetable display to adjust the position in real-time. + +### Sub-Oscillator + +A simple oscillator typically used one octave below the main oscillators. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the sub-oscillator | +| Wave | Sine, Triangle, Saw Up, Pulse 50%, Pulse 25%, Pulse 12% | Waveform selection | +| Tune | -36 to +36 semitones | Pitch adjustment | +| Level | -100 to 0 dB | Volume | +| Pan | -100% to +100% | Stereo panning | +| Retrig | On/Off | Retrigger phase on new notes | + +### Noise Generator + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable noise | +| Type | White, Pink | Noise color | +| Level | -100 to 0 dB | Volume | +| Pan | -100% to +100% | Stereo panning | + +--- + +## Filter + +A multi-mode filter with envelope control and key/velocity tracking. + +### Filter Types + +- **LP 12** - Low-pass 12 dB/octave +- **LP 24** - Low-pass 24 dB/octave +- **HP 12** - High-pass 12 dB/octave +- **HP 24** - High-pass 24 dB/octave +- **BP 12** - Band-pass 12 dB/octave +- **BP 24** - Band-pass 24 dB/octave +- **NT 12** - Notch 12 dB/octave +- **NT 24** - Notch 24 dB/octave + +### Filter Parameters + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the filter | +| Type | See above | Filter type selection | +| Frequency | 20 Hz - 20 kHz | Cutoff frequency | +| Resonance | 0-100% | Filter resonance/Q | +| Key | 0-100% | Keyboard tracking amount | +| Velocity | 0-100% | Velocity to filter frequency modulation | +| Amount | -1.0 to +1.0 | Filter envelope modulation depth | + +### Filter Envelope + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Attack | 0-60 seconds | Attack time | +| Decay | 0-60 seconds | Decay time | +| Sustain | 0-100% | Sustain level | +| Release | 0-60 seconds | Release time | +| Retrig | On/Off | Retrigger envelope on new notes | + +### Filter Routing + +Use the routing buttons (WT1, WT2, Sub, Noise) to select which sound sources are processed by the filter. + +--- + +## Amplitude Envelope + +The main volume envelope applied to all sound sources. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Attack | 0-60 seconds | Attack time | +| Decay | 0-60 seconds | Decay time | +| Sustain | 0-100% | Sustain level | +| Release | 0-60 seconds | Release time | +| Velocity | 0-100% | Velocity sensitivity | +| Retrig | On/Off | Retrigger on new notes (mono mode with glide only) | + +--- + +## Modulation Sources + +### Modulation Envelopes (ENV 1, 2, 3) + +Three independent ADSR envelopes for modulation purposes. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the envelope | +| Attack | 0-60 seconds | Attack time | +| Decay | 0-60 seconds | Decay time | +| Sustain | 0-100% | Sustain level | +| Release | 0-60 seconds | Release time | +| Retrig | On/Off | Retrigger on new notes | + +### LFOs (LFO 1, 2, 3) + +Three independent LFOs with multiple waveforms. + +#### LFO Waveforms + +- None, Sine, Triangle +- Saw Up, Saw Down +- Square, Square+ +- Sample & Hold, Noise +- Step Up (3, 4, 8 steps) +- Step Down (3, 4, 8 steps) +- Pyramid (3, 5, 9 steps) + +#### LFO Parameters + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the LFO | +| Wave | See above | Waveform selection | +| Sync | On/Off | Sync to host tempo | +| Rate | 0-50 Hz | LFO speed (when Sync is off) | +| Beat | Note values | LFO speed (when Sync is on) | +| Depth | -1.0 to +1.0 | Modulation amount | +| Phase | -1.0 to +1.0 | Starting phase offset | +| Offset | -1.0 to +1.0 | DC offset/center bias | +| Fade | -60 to +60 seconds | Fade in (positive) or fade out (negative) time | +| Delay | 0-60 seconds | Delay before LFO starts | +| Retrig | On/Off | Retrigger phase on new notes | + +### Step LFO + +A 32-step sequencer for rhythmic modulation. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable | +| Beat | Note values | Step clock speed (tempo-synced) | +| Length | 2-32 steps | Number of active steps | +| Retrig | On/Off | Retrigger sequence on new notes | +| Steps 1-32 | -1.0 to +1.0 | Individual step values | + +--- + +## Modulation Matrix + +The mod matrix allows routing any modulation source to any parameter with flexible depth, curve shaping, and polarity controls. + +### Modulation Source Icons + +Modulation sources are displayed with ring icons that indicate their type: + +- **Single Ring** - Mono (global) modulation source. The modulation value is the same for all voices. +- **Double Ring** - Poly (per-voice) modulation source. Each voice has its own independent modulation value. + +### Available Modulation Sources + +**MIDI:** +- Pitch Bend (mono) +- Note Number (poly) +- Velocity (poly) +- All MIDI CC controllers CC 1-120 (mono) + +**MPE (when enabled):** +- MPE Pressure (poly) - per-note aftertouch +- MPE Timbre (poly) - per-note slide/CC74 +- MPE Pitch Bend (poly) - per-note pitch bend + +**Internal:** +- LFO 1, 2, 3 Poly (per-voice LFO) +- LFO 1, 2, 3 Mono (global LFO) +- Step LFO Poly (per-voice) +- Step LFO Mono (global) +- Filter Envelope (poly) +- Mod Envelopes 1, 2, 3 (poly) + +### Assigning Modulation + +**Method 1: Drag and Drop** +1. Find the modulation source in the mod source list (left panel) +2. Click and drag the source icon (single or double ring) +3. Drop it onto any parameter knob you want to modulate +4. A small modulation depth indicator will appear on the knob + +**Method 2: Learn Mode** +1. Click on a modulation source icon to enter learn mode +2. The source name appears in the title bar with a pulsing indicator +3. Click on any parameter knob to assign the modulation +4. Click elsewhere or press the source again to cancel learn mode + +### Adjusting Modulation + +Once a modulation is assigned, a **modulation depth slider** appears on the parameter. This small circular indicator shows the current modulation depth: + +- Drag the depth slider to adjust modulation amount +- The filled portion shows positive depth, extending clockwise +- Negative depth extends counter-clockwise +- Double-click to reset to zero +- The popup shows the resulting parameter value range + +### Modulation Matrix Panel + +The mod matrix panel shows all active modulation assignments in a list: + +| Control | Description | +|---------|-------------| +| Enable (power icon) | Toggle this modulation on/off without deleting it | +| Depth Slider | Adjust modulation depth (-1.0 to +1.0) | +| Bipolar Button | Toggle unipolar/bipolar mapping mode | +| Curve Button | Select modulation curve/shape | +| Source | Name of the modulation source | +| Destination | Name of the modulated parameter | +| Delete (X icon) | Remove this modulation assignment | + +### Polarity Modes + +Click the **bipolar button** to toggle between: + +- **Unipolar** - Modulation ranges from 0 to 1 (positive only). Source value of 0 = no modulation, 1 = full modulation. +- **Bipolar** - Modulation ranges from -1 to +1. Source value of 0 = center, negative values modulate downward. + +### Modulation Curves + +Click the **curve button** to select how modulation is shaped: + +**Linear:** +- Linear - Direct 1:1 mapping (default) + +**Quadratic (smooth acceleration):** +- Quadratic In - Slow start, fast end +- Quadratic Out - Fast start, slow end +- Quadratic In/Out - Smooth both ends + +**Sine (S-curve):** +- Sine In - Slow start, fast end +- Sine Out - Fast start, slow end +- Sine In/Out - Smooth both ends + +**Exponential (rapid acceleration):** +- Exponential In - Very slow start, very fast end +- Exponential Out - Very fast start, very slow end +- Exponential In/Out - Smooth both ends + +**Inverted versions** of all curves are also available (Inv Linear, Inv Quadratic In, etc.) which flip the response. + +### Tips for Modulation + +1. **Subtle movement**: Use LFO with low depth on wavetable position for evolving pads +2. **Velocity response**: Map Velocity to filter cutoff and amp envelope for dynamic playing +3. **Per-voice variation**: Use poly mod sources for each voice to respond independently +4. **Complex modulation**: Stack multiple sources on the same parameter with different curves +5. **Disable without deleting**: Use the enable button to A/B compare with/without modulation + +--- + +## Effects + +Effects can be reordered by dragging. The signal flows through effects in the displayed order. + +### Gate + +A rhythmic gate/tremolo effect. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable the gate | +| Beat | Note values | Gate clock speed | +| Length | 2-16 steps | Pattern length | +| Attack | 0-1 second | Gate opening time | +| Release | 0-1 second | Gate closing time | +| Steps | On/Off per step | L/R channel gate pattern | + +### Chorus + +A stereo chorus effect. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable chorus | +| Delay | 0.1-30 ms | Base delay time | +| Rate | 0.1-10 Hz | Modulation speed | +| Depth | 0.1-20 ms | Modulation depth | +| Width | 0-100% | Stereo width | +| Mix | 0-100% | Dry/wet balance | + +### Distortion + +Four distortion modes available: + +**Simple Distortion:** +- Amount (0-100%) + +**Bitcrusher (DeRez):** +- Rate - Sample rate reduction +- Rez - Bit depth reduction +- Hard - Drive amount +- Mix - Dry/wet balance + +**Fire Amp:** +- Gain - Input drive +- Tone - Tone shaping +- Output - Output level +- Mix - Dry/wet balance + +**Grind Amp:** +- Gain - Input drive +- Tone - Tone control +- Output - Output level +- Mix - Dry/wet balance + +### Delay + +A stereo delay with tempo sync. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable delay | +| Sync | On/Off | Sync to host tempo | +| Time | 0-120 seconds | Delay time (when Sync is off) | +| Beat | Note values | Delay time (when Sync is on) | +| Feedback | -100 to 0 dB | Delay repeats | +| Crossfeed | -100 to 0 dB | Channel crossfeed | +| Mix | 0-100% | Dry/wet balance | + +### Reverb + +A studio-quality reverb. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable reverb | +| Size | 0-100% | Room size | +| Decay | 0-100% | Reverb tail length | +| Lowpass | 16 Hz - 20 kHz | High frequency damping | +| Damping | 16 Hz - 20 kHz | Additional damping | +| Predelay | 0-100 ms | Delay before reverb | +| Mix | 0-100% | Dry/wet balance | + +--- + +## Global Settings + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Level | -100 to 0 dB | Master output volume | +| Voices | 2-40 | Maximum polyphony | +| Mono | On/Off | Monophonic mode | +| Glide | Off, Glissando, Portamento | Pitch glide mode | +| Glide Time | 0.001-20 seconds | Glide duration | +| Legato | On/Off | Legato mode (mono only) | +| Pitch Bend | 0-48 semitones | MIDI pitch bend range | +| MPE | On/Off | Enable MPE support | + +--- + +## MPE Support + +When MPE (MIDI Polyphonic Expression) is enabled: + +- Each voice responds to its own MIDI channel +- Per-note pitch bend is available +- Per-note pressure (aftertouch) is available +- Per-note timbre (slide/CC74) is available + +These can be used as modulation sources in the mod matrix for expressive per-voice control. + +--- + +## MIDI Learn + +Right-click on any parameter to access MIDI Learn: + +- **Start Learning** - Move a MIDI CC controller to assign it +- **Cancel Learning** - Cancel the current learn operation +- **Clear CC** - Remove the current CC assignment + +MIDI mappings are saved globally and persist across sessions. + +### MIDI Map Files + +From the menu: +- **Load MIDI Map...** - Load a saved MIDI mapping file (.midimap) +- **Save MIDI Map...** - Save current MIDI mappings to a file + +--- + +## Preset Management + +### Saving Presets + +1. Click the **+** button in the title bar +2. Enter a preset name +3. Optionally add author and tags (when using the preset browser) +4. Click OK + +### Loading Presets + +- Use the dropdown menu to select a preset +- Use the **<** and **>** buttons to step through presets +- Click the browse button to open the full preset browser + +### Preset Browser + +The preset browser allows: +- Browsing presets by category/tags +- Searching for presets +- Managing user presets +- Deleting presets (right-click menu) + +--- + +## Wavetable Import + +To load custom wavetables: + +1. Click the **+** button on an oscillator +2. Select a WAV file containing wavetable data +3. The plugin will auto-detect the wavetable frame size, or you can specify it manually + +Supported frame sizes: 256, 512, 1024, 2048 samples + +Custom wavetables are embedded in presets when saved. + +--- + +## Tips & Tricks + +1. **Rich Pads**: Use both oscillators with different wavetables, slight detune, and long filter envelope +2. **Punchy Basses**: Enable the sub-oscillator, use LP24 filter with short decay envelope +3. **Movement**: Modulate wavetable position with an LFO for evolving textures +4. **Rhythmic Effects**: Use the Step LFO or Gate effect for pulsing sounds +5. **Expression**: Enable MPE and map pressure/timbre to filter cutoff and wavetable position +6. **Layering**: Route oscillators differently through the filter for complex timbres + +--- + +## System Requirements + +- macOS 10.13 or later +- Windows 10 or later +- Linux (Ubuntu 20.04 or compatible) + +Available formats: VST3, AU, Standalone + +--- + +## Credits + +Wavetable Synthesizer by SocaLabs diff --git a/README.md b/README.md index 60d6bb6..a23f073 100644 --- a/README.md +++ b/README.md @@ -1,15 +1,344 @@ -# Wavetable -Wavetable VST3 / AU / LV plugin +# Wavetable - personal fork with some modifications -![Build](https://github.com/FigBug/Wavetable/workflows/Build/badge.svg) +A 2 oscillator wavetable synthesizer with flexible modulation options. See https://github.com/FigBug/Wavetable for the upstream code project and https://socalabs.com/synths/Wavetable/ for the product page. -A 2 oscillator wavetable synth with flexible modulation options. +![Screenshot](screenshots/Screenshot1.png) -![Screenshot 1](Screenshots/Screenshot1.png) +## Features -[Download](https://github.com/FigBug/Wavetable/releases) +### Oscillators +- 2 wavetable oscillators with position, tune, fine tune, level, and pan controls +- Unison with up to 8 voices per oscillator, detune, and stereo spread +- Formant and bend controls for wavetable manipulation +- Load custom wavetables from WAV files (supports 256, 512, 1024, 2048 sample sizes) +- Sub oscillator with selectable waveforms +- Noise generator with multiple noise types -[Product page](https://socalabs.com/synths/Wavetable/) +### Filter +- Multi-mode filter (LP, HP, BP, Notch, etc.) +- Dedicated filter ADSR envelope +- Key tracking and velocity tracking +- Per-source routing (OSC1, OSC2, Sub, Noise) +### Modulation +- 3 LFOs with sync-to-tempo option +- 3 modulation envelopes +- 32-step sequencer +- Comprehensive modulation matrix +- MPE support +### Effects +- Gate (16-step pattern sequencer) +- Chorus +- Distortion (Simple, Bitcrusher, Fire Amp, Grind Amp modes) +- Delay (free or tempo-synced) +- Reverb + +### Global +- Mono/Poly modes +- Glide with legato option +- MTS-ESP microtuning support + +## Formats + +- VST3 +- VST2 (requires VST2 SDK) +- AU (macOS) +- CLAP +- LV2 +- Standalone + +## System Requirements + +- macOS 10.13 or later +- Windows 10 or later +- Linux (Ubuntu 20.04 or compatible) + +--- + +## Building on macOS (ARM64 / Apple Silicon) + +### Prerequisites + +- Xcode (with Command Line Tools) +- CMake 3.24+ (`brew install cmake`) +- Git + +### Clone & Build + +```bash +git clone --recursive https://github.com/FigBug/Wavetable.git +cd Wavetable + +# Configure (generates Xcode project, universal arm64 + x86_64) +cmake --preset xcode + +# Build Release +cmake --build --preset xcode --config Release +``` + +Build products are in `Builds/xcode/Wavetable_artefacts/Release/`: + +| Format | Path | +|--------|------| +| Standalone | `Standalone/Wavetable.app` | +| VST | `VST/Wavetable.vst` | +| VST3 | `VST3/Wavetable.vst3` | +| AU | `AU/Wavetable.component` | +| CLAP | `CLAP/Wavetable.clap` | + +### Install via Installer (.pkg) + +Build the signed/notarized installer (or unsigned for local use): + +```bash +./installer/build.sh +# Output: installer/macOS/bin/Wavetable.pkg +``` + +Open `Wavetable.pkg` and follow the installer. It installs: + +| Component | Install Location | +|-----------|-----------------| +| VST | `/Library/Audio/Plug-Ins/VST/` | +| VST3 | `/Library/Audio/Plug-Ins/VST3/` | +| AU | `/Library/Audio/Plug-Ins/Components/` | +| CLAP | `/Library/Audio/Plug-Ins/CLAP/` | +| Factory wavetables & presets | `/Library/Audio/Presets/SocaLabs/Wavetable/` | + +### Install Manually (no installer) + +Copy the built bundles to the system plugin directories: + +```bash +# AU (Logic Pro, GarageBand) +cp -R Builds/xcode/Wavetable_artefacts/Release/AU/Wavetable.component \ + ~/Library/Audio/Plug-Ins/Components/ + +# VST3 (Ableton Live, Reaper, Bitwig, etc.) +cp -R Builds/xcode/Wavetable_artefacts/Release/VST3/Wavetable.vst3 \ + ~/Library/Audio/Plug-Ins/VST3/ + +# CLAP (Ableton Live 12+, Bitwig, Reaper) +cp -R Builds/xcode/Wavetable_artefacts/Release/CLAP/Wavetable.clap \ + ~/Library/Audio/Plug-Ins/CLAP/ + +# VST (legacy) +cp -R Builds/xcode/Wavetable_artefacts/Release/VST/Wavetable.vst \ + ~/Library/Audio/Plug-Ins/VST/ +``` + +Install factory wavetables and presets: + +```bash +mkdir -p ~/Library/Audio/Presets/SocaLabs/Wavetable +cp -R plugin/Resources/WavetablesFLAC \ + ~/Library/Audio/Presets/SocaLabs/Wavetable/Wavetables + +# Presets must be flattened (subdirectories are not scanned by the plugin) +find plugin/Resources/Presets -name "*.xml" -exec \ + cp {} ~/Library/Audio/Presets/SocaLabs/Wavetable/ \; +``` + +After copying, rescan plugins in your DAW. For AU, you may need to log out and back in, or run: + +```bash +killall -9 AudioComponentRegistrar +``` + +--- + +## Parameter Reference + +### Oscillators + +Two identical wavetable oscillators provide the main sound source. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the oscillator | +| Wavetable | - | Select from built-in wavetables or load custom WAV files | +| Tune | -36 to +36 semitones | Coarse pitch adjustment | +| Fine | -100 to +100 cents | Fine pitch adjustment | +| Level | -100 to 0 dB | Oscillator volume | +| Pos | 0-100% | Wavetable position - morphs through the wavetable frames | +| Pan | -100% to +100% | Stereo panning | +| Formant | -1.0 to +1.0 | Formant shifting for tonal variation | +| Bend | -1.0 to +1.0 | Pitch bend modulation amount | +| Voices | 1-8 | Number of unison voices | +| Detune | 0-0.5 | Pitch spread between unison voices (enabled when Voices > 1) | +| Spread | -100% to +100% | Stereo spread of unison voices (enabled when Voices > 1) | +| Retrig | On/Off | Retrigger oscillator phase on each new note | + +**Tip:** Drag on the wavetable display to adjust the position in real-time. + +### Sub-Oscillator + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the sub-oscillator | +| Wave | Sine, Triangle, Saw Up, Pulse 50%, Pulse 25%, Pulse 12% | Waveform selection | +| Tune | -36 to +36 semitones | Pitch adjustment | +| Level | -100 to 0 dB | Volume | +| Pan | -100% to +100% | Stereo panning | +| Retrig | On/Off | Retrigger phase on new notes | + +### Noise Generator + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable noise | +| Type | White, Pink | Noise color | +| Level | -100 to 0 dB | Volume | +| Pan | -100% to +100% | Stereo panning | + +### Filter + +Multi-mode filter with envelope control and key/velocity tracking. + +**Filter Types:** LP 12, LP 24, HP 12, HP 24, BP 12, BP 24, NT 12, NT 24 + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the filter | +| Type | See above | Filter type selection | +| Frequency | 20 Hz - 20 kHz | Cutoff frequency | +| Resonance | 0-100% | Filter resonance/Q | +| Key | 0-100% | Keyboard tracking amount | +| Velocity | 0-100% | Velocity to filter frequency modulation | +| Amount | -1.0 to +1.0 | Filter envelope modulation depth | + +**Filter Envelope:** + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Attack | 0-60 seconds | Attack time | +| Decay | 0-60 seconds | Decay time | +| Sustain | 0-100% | Sustain level | +| Release | 0-60 seconds | Release time | +| Retrig | On/Off | Retrigger envelope on new notes | + +**Filter Routing:** Use the routing buttons (WT1, WT2, Sub, Noise) to select which sound sources are processed by the filter. + +### Amplitude Envelope + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Attack | 0-60 seconds | Attack time | +| Decay | 0-60 seconds | Decay time | +| Sustain | 0-100% | Sustain level | +| Release | 0-60 seconds | Release time | +| Velocity | 0-100% | Velocity sensitivity | +| Retrig | On/Off | Retrigger on new notes (mono mode with glide only) | + +### LFOs + +Three independent LFOs with multiple waveforms. + +**Waveforms:** None, Sine, Triangle, Saw Up, Saw Down, Square, Square+, Sample & Hold, Noise, Step Up (3/4/8 steps), Step Down (3/4/8 steps), Pyramid (3/5/9 steps) + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the LFO | +| Wave | See above | Waveform selection | +| Sync | On/Off | Sync to host tempo | +| Rate | 0-50 Hz | LFO speed (when Sync is off) | +| Beat | Note values | LFO speed (when Sync is on) | +| Depth | -1.0 to +1.0 | Modulation amount | +| Phase | -1.0 to +1.0 | Starting phase offset | +| Offset | -1.0 to +1.0 | DC offset/center bias | +| Fade | -60 to +60 seconds | Fade in (positive) or fade out (negative) time | +| Delay | 0-60 seconds | Delay before LFO starts | +| Retrig | On/Off | Retrigger phase on new notes | + +### Modulation Envelopes + +Three independent ADSR envelopes for modulation. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable the envelope | +| Attack | 0-60 seconds | Attack time | +| Decay | 0-60 seconds | Decay time | +| Sustain | 0-100% | Sustain level | +| Release | 0-60 seconds | Release time | +| Retrig | On/Off | Retrigger on new notes | + +### Step LFO + +A 32-step sequencer for rhythmic modulation. + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Enable | On/Off | Enable or disable | +| Beat | Note values | Step clock speed (tempo-synced) | +| Length | 2-32 steps | Number of active steps | +| Retrig | On/Off | Retrigger sequence on new notes | +| Steps 1-32 | -1.0 to +1.0 | Individual step values | + +### Modulation Matrix + +The mod matrix routes any modulation source to any parameter with flexible depth, curve shaping, and polarity controls. + +**Source types:** Single ring = mono (global), double ring = poly (per-voice). + +**MIDI sources:** Pitch Bend (mono), Note Number (poly), Velocity (poly), CC 1-120 (mono) + +**MPE sources (when enabled):** Pressure (poly), Timbre (poly), Pitch Bend (poly) + +**Internal sources:** LFO 1-3 poly/mono, Step LFO poly/mono, Filter Envelope, Mod Envelopes 1-3 + +**Assigning modulation:** +1. **Drag and Drop** - Drag a source icon from the mod source list onto any knob +2. **Learn Mode** - Click a source icon, then click a knob to assign + +**Matrix panel controls:** Enable toggle, depth slider, bipolar button, curve button, delete button. + +**Polarity:** Unipolar (0 to 1) or Bipolar (-1 to +1). + +**Curves:** Linear, Quadratic (In/Out/In-Out), Sine (In/Out/In-Out), Exponential (In/Out/In-Out), plus inverted versions of all. + +### Effects + +Effects can be reordered by dragging. + +**Gate:** Beat, Length (2-16 steps), Attack, Release, L/R step pattern + +**Chorus:** Delay (0.1-30 ms), Rate (0.1-10 Hz), Depth (0.1-20 ms), Width, Mix + +**Distortion:** Simple (Amount), Bitcrusher (Rate/Rez/Hard/Mix), Fire Amp (Gain/Tone/Output/Mix), Grind Amp (Gain/Tone/Output/Mix) + +**Delay:** Sync, Time/Beat, Feedback, Crossfeed, Mix + +**Reverb:** Size, Decay, Lowpass, Damping, Predelay, Mix + +### Global Settings + +| Parameter | Range | Description | +|-----------|-------|-------------| +| Level | -100 to 0 dB | Master output volume | +| Voices | 2-40 | Maximum polyphony | +| Mono | On/Off | Monophonic mode | +| Glide | Off, Glissando, Portamento | Pitch glide mode | +| Glide Time | 0.001-20 seconds | Glide duration | +| Legato | On/Off | Legato mode (mono only) | +| Pitch Bend | 0-48 semitones | MIDI pitch bend range | +| MPE | On/Off | Enable MPE support | + +--- + +## Tips & Tricks + +1. **Rich Pads:** Use both oscillators with different wavetables, slight detune, and long filter envelope +2. **Punchy Basses:** Enable the sub-oscillator, use LP24 filter with short decay envelope +3. **Movement:** Modulate wavetable position with an LFO for evolving textures +4. **Rhythmic Effects:** Use the Step LFO or Gate effect for pulsing sounds +5. **Expression:** Enable MPE and map pressure/timbre to filter cutoff and wavetable position +6. **Layering:** Route oscillators differently through the filter for complex timbres + +--- + +## License + +See the LICENSE file for license information. diff --git a/VERSION b/VERSION index 8684498..ffcbe71 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -1.0.11 \ No newline at end of file +1.0.34 diff --git a/ci/build.sh b/ci/build.sh deleted file mode 100755 index 18020ef..0000000 --- a/ci/build.sh +++ /dev/null @@ -1,124 +0,0 @@ -#!/bin/bash -e -set +x - -PLUGIN="Wavetable" - -# linux specific stiff -if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - sudo apt-get update - sudo apt-get install clang git ninja-build ladspa-sdk freeglut3-dev g++ libasound2-dev libcurl4-openssl-dev libfreetype6-dev libjack-jackd2-dev libx11-dev libxcomposite-dev libxcursor-dev libxinerama-dev libxrandr-dev mesa-common-dev webkit2gtk-4.0 juce-tools xvfb -fi - -# mac specific stuff -if [ "$(uname)" == "Darwin" ]; then - # Create a temp keychain - if [ -n "$GITHUB_ACTIONS" ]; then - if [ -n "$APPLICATION" ]; then - echo "Create a keychain" - security create-keychain -p nr4aGPyz Keys.keychain - - echo $APPLICATION | base64 -D -o /tmp/Application.p12 - echo $INSTALLER | base64 -D -o /tmp/Installer.p12 - - security import /tmp/Application.p12 -t agg -k Keys.keychain -P aym9PKWB -A -T /usr/bin/codesign - security import /tmp/Installer.p12 -t agg -k Keys.keychain -P aym9PKWB -A -T /usr/bin/codesign - - security list-keychains -s Keys.keychain - security default-keychain -s Keys.keychain - security unlock-keychain -p nr4aGPyz Keys.keychain - security set-keychain-settings -l -u -t 13600 Keys.keychain - security set-key-partition-list -S apple-tool:,apple: -s -k nr4aGPyz Keys.keychain - fi - DEV_APP_ID="Developer ID Application: Roland Rabien (3FS7DJDG38)" - DEV_INST_ID="Developer ID Installer: Roland Rabien (3FS7DJDG38)" - fi -fi - -ROOT=$(cd "$(dirname "$0")/.."; pwd) -cd "$ROOT" -echo "$ROOT" - -BRANCH=${GITHUB_REF##*/} -echo "$BRANCH" - -cd "$ROOT/ci" -rm -Rf bin -mkdir bin - -# Build mac version -if [ "$(uname)" == "Darwin" ]; then - cd "$ROOT" - cmake --preset xcode - cmake --build --preset xcode --config Release - - cp -R "$ROOT/Builds/xcode/${PLUGIN}_artefacts/Release/AU/$PLUGIN.component" "$ROOT/ci/bin" - cp -R "$ROOT/Builds/xcode/${PLUGIN}_artefacts/Release/VST/$PLUGIN.vst" "$ROOT/ci/bin" - cp -R "$ROOT/Builds/xcode/${PLUGIN}_artefacts/Release/VST3/$PLUGIN.vst3" "$ROOT/ci/bin" - - cd "$ROOT/ci/bin" - if [ -n "$APPLICATION" ]; then - codesign -s "$DEV_APP_ID" -v $PLUGIN.vst --options=runtime --timestamp --force - codesign -s "$DEV_APP_ID" -v $PLUGIN.vst3 --options=runtime --timestamp --force - codesign -s "$DEV_APP_ID" -v $PLUGIN.component --options=runtime --timestamp --force - else - echo "Not signing" - fi - - # Notarize - cd "$ROOT/ci/bin" - - if [[ -n "$APPLE_USER" ]]; then - zip -r ${PLUGIN}_Mac.zip $PLUGIN.vst $PLUGIN.vst3 $PLUGIN.component - xcrun notarytool submit --verbose --apple-id "$APPLE_USER" --password "$APPLE_PASS" --team-id "3FS7DJDG38" --wait --timeout 30m ${PLUGIN}_Mac.zip - - rm ${PLUGIN}_Mac.zip - xcrun stapler staple $PLUGIN.vst - xcrun stapler staple $PLUGIN.vst3 - xcrun stapler staple $PLUGIN.component - else - echo "Not notarizing" - fi - - zip -r ${PLUGIN}_Mac.zip $PLUGIN.vst $PLUGIN.vst3 $PLUGIN.component - - if [ "$BRANCH" = "release" ]; then - curl -F "files=@${PLUGIN}_Mac.zip" "https://socalabs.com/files/set.php?key=$APIKEY" - fi -# Build linux version -elif [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - cd "$ROOT" - - cmake --preset ninja-gcc - cmake --build --preset ninja-gcc --config Release - - cp -R "$ROOT/Builds/ninja-gcc/${PLUGIN}_artefacts/Release/LV2/$PLUGIN.lv2" "$ROOT/ci/bin" - cp -R "$ROOT/Builds/ninja-gcc/${PLUGIN}_artefacts/Release/VST/lib$PLUGIN.so" "$ROOT/ci/bin/$PLUGIN.so" - cp -R "$ROOT/Builds/ninja-gcc/${PLUGIN}_artefacts/Release/VST3/$PLUGIN.vst3" "$ROOT/ci/bin" - - cd "$ROOT/ci/bin" - - # Upload - cd "$ROOT/ci/bin" - zip -r ${PLUGIN}_Linux.zip $PLUGIN.so $PLUGIN.vst3 $PLUGIN.lv2 - - if [ "$BRANCH" = "release" ]; then - curl -F "files=@${PLUGIN}_Linux.zip" "https://socalabs.com/files/set.php?key=$APIKEY" - fi -# Build Win version -elif [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then - cd "$ROOT" - - cmake --preset vs - cmake --build --preset vs --config Release - - cd "$ROOT/ci/bin" - - cp -R "$ROOT/Builds/vs/${PLUGIN}_artefacts/Release/VST/$PLUGIN.dll" "$ROOT/ci/bin" - cp -R "$ROOT/Builds/vs/${PLUGIN}_artefacts/Release/VST3/$PLUGIN.vst3" "$ROOT/ci/bin" - - 7z a ${PLUGIN}_Win.zip $PLUGIN.dll $PLUGIN.vst3 - - if [ "$BRANCH" = "release" ]; then - curl -F "files=@${PLUGIN}_Win.zip" "https://socalabs.com/files/set.php?key=$APIKEY" - fi -fi diff --git a/ci/upload.sh b/ci/upload.sh deleted file mode 100755 index 986a3cd..0000000 --- a/ci/upload.sh +++ /dev/null @@ -1,26 +0,0 @@ -#!/bin/bash -e -set +x - -PLUGIN="Wavetable" - -ROOT=$(cd "$(dirname "$0")/.."; pwd) -cd "$ROOT" -echo "$ROOT" - -# Upload mac version -if [ "$(uname)" == "Darwin" ]; then - cd "$ROOT/ci/bin" - curl -F "files=@${PLUGIN}_Mac.zip" "https://socalabs.com/files/set.php?key=$APIKEY" -fi - -# Upload linux version -if [ "$(expr substr $(uname -s) 1 5)" == "Linux" ]; then - cd "$ROOT/ci/bin" - curl -F "files=@${PLUGIN}_Linux.zip" "https://socalabs.com/files/set.php?key=$APIKEY" -fi - -# Upload Win version -if [ "$(expr substr $(uname -s) 1 10)" == "MINGW64_NT" ]; then - cd "$ROOT/ci/bin" - curl -F "files=@${PLUGIN}_Win.zip" "https://socalabs.com/files/set.php?key=$APIKEY" -fi diff --git a/modules/gin b/modules/gin deleted file mode 160000 index d31158a..0000000 --- a/modules/gin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit d31158aff17cc717972f6d2f75439b9bc036b434 diff --git a/modules/juce b/modules/juce deleted file mode 160000 index 22df0d2..0000000 --- a/modules/juce +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 22df0d2266007bccb25d6ed52b9907f60d04e971 diff --git a/modules/melatonin_inspector b/modules/melatonin_inspector deleted file mode 160000 index 63e546e..0000000 --- a/modules/melatonin_inspector +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 63e546e92e2cea39bd7ed3d7518da872ebe0d76e diff --git a/modules/plugin_sdk b/modules/plugin_sdk deleted file mode 160000 index bcbef19..0000000 --- a/modules/plugin_sdk +++ /dev/null @@ -1 +0,0 @@ -Subproject commit bcbef199f4dd78b883aebd6477cc104dad850e1b diff --git a/plugin/Resources/Presets/DoubleTap/DT Bwaing.xml b/plugin/Resources/Presets/DoubleTap/DT Bwaing.xml new file mode 100644 index 0000000..226917d --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Bwaing.xml @@ -0,0 +1,70 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Cymbal intro.xml b/plugin/Resources/Presets/DoubleTap/DT Cymbal intro.xml new file mode 100644 index 0000000..224d935 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Cymbal intro.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Dive 2.xml b/plugin/Resources/Presets/DoubleTap/DT Dive 2.xml new file mode 100644 index 0000000..1179a11 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Dive 2.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Dive 3.xml b/plugin/Resources/Presets/DoubleTap/DT Dive 3.xml new file mode 100644 index 0000000..2780794 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Dive 3.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Dive 4.xml b/plugin/Resources/Presets/DoubleTap/DT Dive 4.xml new file mode 100644 index 0000000..5d834f8 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Dive 4.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Dive 5 panning.xml b/plugin/Resources/Presets/DoubleTap/DT Dive 5 panning.xml new file mode 100644 index 0000000..05cb2e1 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Dive 5 panning.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Dive.xml b/plugin/Resources/Presets/DoubleTap/DT Dive.xml new file mode 100644 index 0000000..491227c --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Dive.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Glitch 1.xml b/plugin/Resources/Presets/DoubleTap/DT Glitch 1.xml new file mode 100644 index 0000000..c42fcf5 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Glitch 1.xml @@ -0,0 +1,116 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Glitch 2.xml b/plugin/Resources/Presets/DoubleTap/DT Glitch 2.xml new file mode 100644 index 0000000..208c8bb --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Glitch 2.xml @@ -0,0 +1,124 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Glitch 3.xml b/plugin/Resources/Presets/DoubleTap/DT Glitch 3.xml new file mode 100644 index 0000000..44612fe --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Glitch 3.xml @@ -0,0 +1,125 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Kick 1.xml b/plugin/Resources/Presets/DoubleTap/DT Kick 1.xml new file mode 100644 index 0000000..154f6ca --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Kick 1.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Kick 2.xml b/plugin/Resources/Presets/DoubleTap/DT Kick 2.xml new file mode 100644 index 0000000..e953498 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Kick 2.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Noise Bass 1.xml b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 1.xml new file mode 100644 index 0000000..4d370d6 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 1.xml @@ -0,0 +1,79 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Noise Bass 2.xml b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 2.xml new file mode 100644 index 0000000..92cf22c --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 2.xml @@ -0,0 +1,97 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Noise Bass 3.xml b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 3.xml new file mode 100644 index 0000000..4e930eb --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 3.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Noise Bass 5.xml b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 5.xml new file mode 100644 index 0000000..93a52e4 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 5.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Noise Bass 6.xml b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 6.xml new file mode 100644 index 0000000..63a6f67 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Noise Bass 6.xml @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Noisy Pluck.xml b/plugin/Resources/Presets/DoubleTap/DT Noisy Pluck.xml new file mode 100644 index 0000000..581b366 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Noisy Pluck.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Pad 2.xml b/plugin/Resources/Presets/DoubleTap/DT Pad 2.xml new file mode 100644 index 0000000..b0291b4 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Pad 2.xml @@ -0,0 +1,105 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Pad.xml b/plugin/Resources/Presets/DoubleTap/DT Pad.xml new file mode 100644 index 0000000..abb241e --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Pad.xml @@ -0,0 +1,107 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Perc snare.xml b/plugin/Resources/Presets/DoubleTap/DT Perc snare.xml new file mode 100644 index 0000000..8932869 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Perc snare.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Pluck 1.xml b/plugin/Resources/Presets/DoubleTap/DT Pluck 1.xml new file mode 100644 index 0000000..b495b27 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Pluck 1.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Pluck 2.xml b/plugin/Resources/Presets/DoubleTap/DT Pluck 2.xml new file mode 100644 index 0000000..a95e7d2 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Pluck 2.xml @@ -0,0 +1,71 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Riser 1.xml b/plugin/Resources/Presets/DoubleTap/DT Riser 1.xml new file mode 100644 index 0000000..353f932 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Riser 1.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Seq 1.xml b/plugin/Resources/Presets/DoubleTap/DT Seq 1.xml new file mode 100644 index 0000000..b0227e3 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Seq 1.xml @@ -0,0 +1,110 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Seq 2.xml b/plugin/Resources/Presets/DoubleTap/DT Seq 2.xml new file mode 100644 index 0000000..8f665b0 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Seq 2.xml @@ -0,0 +1,103 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Siren 1.xml b/plugin/Resources/Presets/DoubleTap/DT Siren 1.xml new file mode 100644 index 0000000..103a56f --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Siren 1.xml @@ -0,0 +1,42 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Siren Complex 2.xml b/plugin/Resources/Presets/DoubleTap/DT Siren Complex 2.xml new file mode 100644 index 0000000..e9b8a1e --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Siren Complex 2.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Siren complex.xml b/plugin/Resources/Presets/DoubleTap/DT Siren complex.xml new file mode 100644 index 0000000..5812eda --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Siren complex.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Snare 1.xml b/plugin/Resources/Presets/DoubleTap/DT Snare 1.xml new file mode 100644 index 0000000..f52e44d --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Snare 1.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Snare 2.xml b/plugin/Resources/Presets/DoubleTap/DT Snare 2.xml new file mode 100644 index 0000000..560a99f --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Snare 2.xml @@ -0,0 +1,54 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Sweeper 1.xml b/plugin/Resources/Presets/DoubleTap/DT Sweeper 1.xml new file mode 100644 index 0000000..dc33da6 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Sweeper 1.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Sweeper 2.xml b/plugin/Resources/Presets/DoubleTap/DT Sweeper 2.xml new file mode 100644 index 0000000..c0fe115 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Sweeper 2.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Sweeper 3.xml b/plugin/Resources/Presets/DoubleTap/DT Sweeper 3.xml new file mode 100644 index 0000000..97aaf24 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Sweeper 3.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Sweeper 4.xml b/plugin/Resources/Presets/DoubleTap/DT Sweeper 4.xml new file mode 100644 index 0000000..35a6c73 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Sweeper 4.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Sweeper 5.xml b/plugin/Resources/Presets/DoubleTap/DT Sweeper 5.xml new file mode 100644 index 0000000..bd6df9c --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Sweeper 5.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/DoubleTap/DT Sweeper 6.xml b/plugin/Resources/Presets/DoubleTap/DT Sweeper 6.xml new file mode 100644 index 0000000..a571389 --- /dev/null +++ b/plugin/Resources/Presets/DoubleTap/DT Sweeper 6.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ARP Bass Pulse I.xml b/plugin/Resources/Presets/Flamedragonz/ARP Bass Pulse I.xml new file mode 100644 index 0000000..4615aa4 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ARP Bass Pulse I.xml @@ -0,0 +1,57 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ARP GrowlSaw Pulse I.xml b/plugin/Resources/Presets/Flamedragonz/ARP GrowlSaw Pulse I.xml new file mode 100644 index 0000000..1f95b3d --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ARP GrowlSaw Pulse I.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ARP Hype Pulse I.xml b/plugin/Resources/Presets/Flamedragonz/ARP Hype Pulse I.xml new file mode 100644 index 0000000..8935940 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ARP Hype Pulse I.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ARP Hype Pulse II.xml b/plugin/Resources/Presets/Flamedragonz/ARP Hype Pulse II.xml new file mode 100644 index 0000000..d204bde --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ARP Hype Pulse II.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ARP LSawSq I.xml b/plugin/Resources/Presets/Flamedragonz/ARP LSawSq I.xml new file mode 100644 index 0000000..57958db --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ARP LSawSq I.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ARP Psy I.xml b/plugin/Resources/Presets/Flamedragonz/ARP Psy I.xml new file mode 100644 index 0000000..728571d --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ARP Psy I.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ARP Voltage Pulse I.xml b/plugin/Resources/Presets/Flamedragonz/ARP Voltage Pulse I.xml new file mode 100644 index 0000000..12ee8ad --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ARP Voltage Pulse I.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BR Brass I.xml b/plugin/Resources/Presets/Flamedragonz/BR Brass I.xml new file mode 100644 index 0000000..1531a11 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BR Brass I.xml @@ -0,0 +1,95 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS FM Bass I.xml b/plugin/Resources/Presets/Flamedragonz/BS FM Bass I.xml new file mode 100644 index 0000000..66d9c3e --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS FM Bass I.xml @@ -0,0 +1,73 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Filter Bass I.xml b/plugin/Resources/Presets/Flamedragonz/BS Filter Bass I.xml new file mode 100644 index 0000000..3f238d5 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Filter Bass I.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Filter Bass II.xml b/plugin/Resources/Presets/Flamedragonz/BS Filter Bass II.xml new file mode 100644 index 0000000..41d6b4f --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Filter Bass II.xml @@ -0,0 +1,69 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Growl Bass I.xml b/plugin/Resources/Presets/Flamedragonz/BS Growl Bass I.xml new file mode 100644 index 0000000..86612e6 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Growl Bass I.xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Growl Bass II.xml b/plugin/Resources/Presets/Flamedragonz/BS Growl Bass II.xml new file mode 100644 index 0000000..628c0db --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Growl Bass II.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Jazz Bass Guitar I.xml b/plugin/Resources/Presets/Flamedragonz/BS Jazz Bass Guitar I.xml new file mode 100644 index 0000000..e75659b --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Jazz Bass Guitar I.xml @@ -0,0 +1,52 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Pluck Bass I.xml b/plugin/Resources/Presets/Flamedragonz/BS Pluck Bass I.xml new file mode 100644 index 0000000..a647dec --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Pluck Bass I.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Pluck Bass II.xml b/plugin/Resources/Presets/Flamedragonz/BS Pluck Bass II.xml new file mode 100644 index 0000000..275d34a --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Pluck Bass II.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Punch Bass I.xml b/plugin/Resources/Presets/Flamedragonz/BS Punch Bass I.xml new file mode 100644 index 0000000..98071a9 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Punch Bass I.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/BS Punch Bass II.xml b/plugin/Resources/Presets/Flamedragonz/BS Punch Bass II.xml new file mode 100644 index 0000000..98812ec --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/BS Punch Bass II.xml @@ -0,0 +1,142 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/CH Min Chord I.xml b/plugin/Resources/Presets/Flamedragonz/CH Min Chord I.xml new file mode 100644 index 0000000..64b6c1d --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/CH Min Chord I.xml @@ -0,0 +1,90 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/CH Min Chord II.xml b/plugin/Resources/Presets/Flamedragonz/CH Min Chord II.xml new file mode 100644 index 0000000..8bf2d17 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/CH Min Chord II.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/CH Min Chord III.xml b/plugin/Resources/Presets/Flamedragonz/CH Min Chord III.xml new file mode 100644 index 0000000..86f314b --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/CH Min Chord III.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/DR Basic Hat I.xml b/plugin/Resources/Presets/Flamedragonz/DR Basic Hat I.xml new file mode 100644 index 0000000..0c8cc3a --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/DR Basic Hat I.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/DR Basic Kick.xml b/plugin/Resources/Presets/Flamedragonz/DR Basic Kick.xml new file mode 100644 index 0000000..992bc6f --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/DR Basic Kick.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/DR Basic Snare I.xml b/plugin/Resources/Presets/Flamedragonz/DR Basic Snare I.xml new file mode 100644 index 0000000..9a7fe1a --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/DR Basic Snare I.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/DR Hardcore Kick I.xml b/plugin/Resources/Presets/Flamedragonz/DR Hardcore Kick I.xml new file mode 100644 index 0000000..5e207ac --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/DR Hardcore Kick I.xml @@ -0,0 +1,78 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/DR Noise Tom I.xml b/plugin/Resources/Presets/Flamedragonz/DR Noise Tom I.xml new file mode 100644 index 0000000..3cf6383 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/DR Noise Tom I.xml @@ -0,0 +1,75 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/FX Filter Growl I.xml b/plugin/Resources/Presets/Flamedragonz/FX Filter Growl I.xml new file mode 100644 index 0000000..86ac776 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/FX Filter Growl I.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/FX Glitch.xml b/plugin/Resources/Presets/Flamedragonz/FX Glitch.xml new file mode 100644 index 0000000..2dd19e4 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/FX Glitch.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/FX Noise Explosion.xml b/plugin/Resources/Presets/Flamedragonz/FX Noise Explosion.xml new file mode 100644 index 0000000..1f7250e --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/FX Noise Explosion.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/FX Red Alert I.xml b/plugin/Resources/Presets/Flamedragonz/FX Red Alert I.xml new file mode 100644 index 0000000..33277d6 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/FX Red Alert I.xml @@ -0,0 +1,92 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/FX Scratch I.xml b/plugin/Resources/Presets/Flamedragonz/FX Scratch I.xml new file mode 100644 index 0000000..4f36aa6 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/FX Scratch I.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/LD ACID KEY I.xml b/plugin/Resources/Presets/Flamedragonz/LD ACID KEY I.xml new file mode 100644 index 0000000..1a544a6 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/LD ACID KEY I.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/LD Accordion I.xml b/plugin/Resources/Presets/Flamedragonz/LD Accordion I.xml new file mode 100644 index 0000000..fb6950b --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/LD Accordion I.xml @@ -0,0 +1,48 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/LD EGuitar Dist I.xml b/plugin/Resources/Presets/Flamedragonz/LD EGuitar Dist I.xml new file mode 100644 index 0000000..d961193 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/LD EGuitar Dist I.xml @@ -0,0 +1,82 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/LD NoiseSaw Lead I.xml b/plugin/Resources/Presets/Flamedragonz/LD NoiseSaw Lead I.xml new file mode 100644 index 0000000..04d3dc5 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/LD NoiseSaw Lead I.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/LD SawSquare Lead I.xml b/plugin/Resources/Presets/Flamedragonz/LD SawSquare Lead I.xml new file mode 100644 index 0000000..2bd54f3 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/LD SawSquare Lead I.xml @@ -0,0 +1,74 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/LD Slide Saw I.xml b/plugin/Resources/Presets/Flamedragonz/LD Slide Saw I.xml new file mode 100644 index 0000000..d4b8ef1 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/LD Slide Saw I.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PD Abstract Choir I.xml b/plugin/Resources/Presets/Flamedragonz/PD Abstract Choir I.xml new file mode 100644 index 0000000..6202593 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PD Abstract Choir I.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PD Analog Pad I.xml b/plugin/Resources/Presets/Flamedragonz/PD Analog Pad I.xml new file mode 100644 index 0000000..59545c2 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PD Analog Pad I.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PD Fantasy Pad I.xml b/plugin/Resources/Presets/Flamedragonz/PD Fantasy Pad I.xml new file mode 100644 index 0000000..e409e97 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PD Fantasy Pad I.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PD Fantasy Pad II.xml b/plugin/Resources/Presets/Flamedragonz/PD Fantasy Pad II.xml new file mode 100644 index 0000000..07ad1b4 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PD Fantasy Pad II.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PD Neu Atmopad I.xml b/plugin/Resources/Presets/Flamedragonz/PD Neu Atmopad I.xml new file mode 100644 index 0000000..d738658 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PD Neu Atmopad I.xml @@ -0,0 +1,66 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PD Step Pad I.xml b/plugin/Resources/Presets/Flamedragonz/PD Step Pad I.xml new file mode 100644 index 0000000..6c8da75 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PD Step Pad I.xml @@ -0,0 +1,46 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PL Cow Bell II.xml b/plugin/Resources/Presets/Flamedragonz/PL Cow Bell II.xml new file mode 100644 index 0000000..6f77980 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PL Cow Bell II.xml @@ -0,0 +1,43 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PL Marimba I.xml b/plugin/Resources/Presets/Flamedragonz/PL Marimba I.xml new file mode 100644 index 0000000..bf65d1e --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PL Marimba I.xml @@ -0,0 +1,60 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PL Noise String I.xml b/plugin/Resources/Presets/Flamedragonz/PL Noise String I.xml new file mode 100644 index 0000000..8a5113f --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PL Noise String I.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PL SawSquare I.xml b/plugin/Resources/Presets/Flamedragonz/PL SawSquare I.xml new file mode 100644 index 0000000..1684d9a --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PL SawSquare I.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PL SawSquare II.xml b/plugin/Resources/Presets/Flamedragonz/PL SawSquare II.xml new file mode 100644 index 0000000..07b89b2 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PL SawSquare II.xml @@ -0,0 +1,61 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PL Trance Pluck I.xml b/plugin/Resources/Presets/Flamedragonz/PL Trance Pluck I.xml new file mode 100644 index 0000000..20ebfeb --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PL Trance Pluck I.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/PR 808 Cow Bell I.xml b/plugin/Resources/Presets/Flamedragonz/PR 808 Cow Bell I.xml new file mode 100644 index 0000000..042eb8a --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/PR 808 Cow Bell I.xml @@ -0,0 +1,51 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/ST Hype I.xml b/plugin/Resources/Presets/Flamedragonz/ST Hype I.xml new file mode 100644 index 0000000..dcd3529 --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/ST Hype I.xml @@ -0,0 +1,68 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/Flamedragonz/VOX Dist Vocal I.xml b/plugin/Resources/Presets/Flamedragonz/VOX Dist Vocal I.xml new file mode 100644 index 0000000..bb0894c --- /dev/null +++ b/plugin/Resources/Presets/Flamedragonz/VOX Dist Vocal I.xml @@ -0,0 +1,94 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Cyber Lead (MW).xml b/plugin/Resources/Presets/IV/IV's Cyber Lead (MW).xml new file mode 100644 index 0000000..d2d123b --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Cyber Lead (MW).xml @@ -0,0 +1,99 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Heart Bells.xml b/plugin/Resources/Presets/IV/IV's Heart Bells.xml new file mode 100644 index 0000000..bdb356b --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Heart Bells.xml @@ -0,0 +1,49 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Init.xml b/plugin/Resources/Presets/IV/IV's Init.xml new file mode 100644 index 0000000..598e234 --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Init.xml @@ -0,0 +1,62 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Organ Advanced.xml b/plugin/Resources/Presets/IV/IV's Organ Advanced.xml new file mode 100644 index 0000000..b531247 --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Organ Advanced.xml @@ -0,0 +1,85 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Organ Basic.xml b/plugin/Resources/Presets/IV/IV's Organ Basic.xml new file mode 100644 index 0000000..c370f8b --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Organ Basic.xml @@ -0,0 +1,76 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Organ Superchorus.xml b/plugin/Resources/Presets/IV/IV's Organ Superchorus.xml new file mode 100644 index 0000000..5d18984 --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Organ Superchorus.xml @@ -0,0 +1,91 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Pseudo Pizzicato.xml b/plugin/Resources/Presets/IV/IV's Pseudo Pizzicato.xml new file mode 100644 index 0000000..fe90e1b --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Pseudo Pizzicato.xml @@ -0,0 +1,58 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Rhytmic Metall Bass.xml b/plugin/Resources/Presets/IV/IV's Rhytmic Metall Bass.xml new file mode 100644 index 0000000..d033f84 --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Rhytmic Metall Bass.xml @@ -0,0 +1,83 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/IV/IV's Simple Plucks.xml b/plugin/Resources/Presets/IV/IV's Simple Plucks.xml new file mode 100644 index 0000000..ac6203e --- /dev/null +++ b/plugin/Resources/Presets/IV/IV's Simple Plucks.xml @@ -0,0 +1,96 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Angel Voice.xml b/plugin/Resources/Presets/MadMcMan/Angel Voice.xml new file mode 100644 index 0000000..c137be3 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Angel Voice.xml @@ -0,0 +1,89 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Bowed Pad.xml b/plugin/Resources/Presets/MadMcMan/Bowed Pad.xml new file mode 100644 index 0000000..bc5b7ea --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Bowed Pad.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Chorus Lead.xml b/plugin/Resources/Presets/MadMcMan/Chorus Lead.xml new file mode 100644 index 0000000..ae835bd --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Chorus Lead.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Guitar Pad.xml b/plugin/Resources/Presets/MadMcMan/Guitar Pad.xml new file mode 100644 index 0000000..f418e5b --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Guitar Pad.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Hat.xml b/plugin/Resources/Presets/MadMcMan/Hat.xml new file mode 100644 index 0000000..8edeb29 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Hat.xml @@ -0,0 +1,20 @@ + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/High Pad.xml b/plugin/Resources/Presets/MadMcMan/High Pad.xml new file mode 100644 index 0000000..10ae9d5 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/High Pad.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Horny.xml b/plugin/Resources/Presets/MadMcMan/Horny.xml new file mode 100644 index 0000000..fed8317 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Horny.xml @@ -0,0 +1,63 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Kick.xml b/plugin/Resources/Presets/MadMcMan/Kick.xml new file mode 100644 index 0000000..8246e52 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Kick.xml @@ -0,0 +1,55 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Mice.xml b/plugin/Resources/Presets/MadMcMan/Mice.xml new file mode 100644 index 0000000..a991902 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Mice.xml @@ -0,0 +1,93 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Moving Pad.xml b/plugin/Resources/Presets/MadMcMan/Moving Pad.xml new file mode 100644 index 0000000..48ffff2 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Moving Pad.xml @@ -0,0 +1,59 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Noise Riserish.xml b/plugin/Resources/Presets/MadMcMan/Noise Riserish.xml new file mode 100644 index 0000000..e2416a7 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Noise Riserish.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/PLOP.xml b/plugin/Resources/Presets/MadMcMan/PLOP.xml new file mode 100644 index 0000000..7194c38 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/PLOP.xml @@ -0,0 +1,53 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Reverby Keys.xml b/plugin/Resources/Presets/MadMcMan/Reverby Keys.xml new file mode 100644 index 0000000..cb389c9 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Reverby Keys.xml @@ -0,0 +1,98 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Twinkle Mallet.xml b/plugin/Resources/Presets/MadMcMan/Twinkle Mallet.xml new file mode 100644 index 0000000..356f6a2 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Twinkle Mallet.xml @@ -0,0 +1,31 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Twinkle.xml b/plugin/Resources/Presets/MadMcMan/Twinkle.xml new file mode 100644 index 0000000..448434e --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Twinkle.xml @@ -0,0 +1,80 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Whip.xml b/plugin/Resources/Presets/MadMcMan/Whip.xml new file mode 100644 index 0000000..145517d --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Whip.xml @@ -0,0 +1,50 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/Wobly Pad.xml b/plugin/Resources/Presets/MadMcMan/Wobly Pad.xml new file mode 100644 index 0000000..8869d6c --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/Wobly Pad.xml @@ -0,0 +1,84 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/hh.xml b/plugin/Resources/Presets/MadMcMan/hh.xml new file mode 100644 index 0000000..73d2db3 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/hh.xml @@ -0,0 +1,28 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/Presets/MadMcMan/talky distortion.xml b/plugin/Resources/Presets/MadMcMan/talky distortion.xml new file mode 100644 index 0000000..f9551f1 --- /dev/null +++ b/plugin/Resources/Presets/MadMcMan/talky distortion.xml @@ -0,0 +1,109 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0001.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0001.wt2048 new file mode 100644 index 0000000..ce46803 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0001.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0002.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0002.wt2048 new file mode 100644 index 0000000..782f763 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0002.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0003.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0003.wt2048 new file mode 100644 index 0000000..b501b2e Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0003.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0004.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0004.wt2048 new file mode 100644 index 0000000..e01b6ff Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0004.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0005.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0005.wt2048 new file mode 100644 index 0000000..e369db7 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0005.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0006.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0006.wt2048 new file mode 100644 index 0000000..5978a0b Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0006.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0007.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0007.wt2048 new file mode 100644 index 0000000..ee4c2bb Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0007.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0008.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0008.wt2048 new file mode 100644 index 0000000..4826778 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0008.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0009.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0009.wt2048 new file mode 100644 index 0000000..ecdb425 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0009.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0010.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0010.wt2048 new file mode 100644 index 0000000..946465e Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0010.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0011.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0011.wt2048 new file mode 100644 index 0000000..72cb7d7 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0011.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0012.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0012.wt2048 new file mode 100644 index 0000000..9f813f7 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0012.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0013.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0013.wt2048 new file mode 100644 index 0000000..f8f54cd Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0013.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0014.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0014.wt2048 new file mode 100644 index 0000000..dcf0740 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0014.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0015.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0015.wt2048 new file mode 100644 index 0000000..11f0b92 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0015.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0016.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0016.wt2048 new file mode 100644 index 0000000..3e8f43d Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0016.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0017.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0017.wt2048 new file mode 100644 index 0000000..7f5dca1 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0017.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0018.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0018.wt2048 new file mode 100644 index 0000000..8ae5a90 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0018.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0019.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0019.wt2048 new file mode 100644 index 0000000..c71937a Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0019.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0020.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0020.wt2048 new file mode 100644 index 0000000..f9f0ef2 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP 0020.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP aguitar.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP aguitar.wt2048 new file mode 100644 index 0000000..46d48e9 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP aguitar.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP altosax.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP altosax.wt2048 new file mode 100644 index 0000000..127eaca Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP altosax.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP birds.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP birds.wt2048 new file mode 100644 index 0000000..f7cfbc3 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP birds.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bitreduced.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bitreduced.wt2048 new file mode 100644 index 0000000..71a6d74 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bitreduced.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_blended.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_blended.wt2048 new file mode 100644 index 0000000..f5b3ca4 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_blended.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_perfectwaves.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_perfectwaves.wt2048 new file mode 100644 index 0000000..160cb9c Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_perfectwaves.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_saw.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_saw.wt2048 new file mode 100644 index 0000000..134b068 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_saw.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawbright.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawbright.wt2048 new file mode 100644 index 0000000..af10f84 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawbright.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawgap.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawgap.wt2048 new file mode 100644 index 0000000..15e33db Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawgap.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawrounded.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawrounded.wt2048 new file mode 100644 index 0000000..574104d Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sawrounded.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sin.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sin.wt2048 new file mode 100644 index 0000000..a164d41 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_sin.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_squ.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_squ.wt2048 new file mode 100644 index 0000000..a61a832 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_squ.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_squrounded.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_squrounded.wt2048 new file mode 100644 index 0000000..2409891 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_squrounded.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_tri.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_tri.wt2048 new file mode 100644 index 0000000..8a644c5 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP bw_tri.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP c604.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP c604.wt2048 new file mode 100644 index 0000000..b302b34 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP c604.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP cello.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP cello.wt2048 new file mode 100644 index 0000000..34c0bdf Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP cello.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP clarinett.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP clarinett.wt2048 new file mode 100644 index 0000000..1e31218 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP clarinett.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP clavinet.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP clavinet.wt2048 new file mode 100644 index 0000000..a5aed63 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP clavinet.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP dbass.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP dbass.wt2048 new file mode 100644 index 0000000..6359701 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP dbass.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP distorted.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP distorted.wt2048 new file mode 100644 index 0000000..1f69d81 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP distorted.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP ebass.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP ebass.wt2048 new file mode 100644 index 0000000..3605ccd Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP ebass.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP eguitar.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP eguitar.wt2048 new file mode 100644 index 0000000..384b050 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP eguitar.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP eorgan.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP eorgan.wt2048 new file mode 100644 index 0000000..c0dd6cf Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP eorgan.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP epiano.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP epiano.wt2048 new file mode 100644 index 0000000..6ca7216 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP epiano.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP flute.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP flute.wt2048 new file mode 100644 index 0000000..dc1d074 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP flute.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP fmsynth.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP fmsynth.wt2048 new file mode 100644 index 0000000..ad9c46b Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP fmsynth.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP granular.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP granular.wt2048 new file mode 100644 index 0000000..f5a194c Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP granular.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP hdrawn.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP hdrawn.wt2048 new file mode 100644 index 0000000..5343f49 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP hdrawn.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP hvoice.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP hvoice.wt2048 new file mode 100644 index 0000000..8aefbf6 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP hvoice.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP linear.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP linear.wt2048 new file mode 100644 index 0000000..15abc5d Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP linear.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP oboe.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP oboe.wt2048 new file mode 100644 index 0000000..e0a51ad Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP oboe.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP oscchip.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP oscchip.wt2048 new file mode 100644 index 0000000..1e02609 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP oscchip.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP overtone.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP overtone.wt2048 new file mode 100644 index 0000000..6a6a66b Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP overtone.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP piano.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP piano.wt2048 new file mode 100644 index 0000000..8441dd1 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP piano.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP pluckalgo.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP pluckalgo.wt2048 new file mode 100644 index 0000000..16f7de8 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP pluckalgo.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP raw.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP raw.wt2048 new file mode 100644 index 0000000..beb0a53 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP raw.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP sinharm.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP sinharm.wt2048 new file mode 100644 index 0000000..221a61f Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP sinharm.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP snippets.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP snippets.wt2048 new file mode 100644 index 0000000..655d8f7 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP snippets.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP stereo.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP stereo.wt2048 new file mode 100644 index 0000000..836e6a9 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP stereo.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP stringbox.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP stringbox.wt2048 new file mode 100644 index 0000000..e1c20b2 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP stringbox.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP symetric.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP symetric.wt2048 new file mode 100644 index 0000000..de11db5 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP symetric.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP theremin.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP theremin.wt2048 new file mode 100644 index 0000000..92e546f Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP theremin.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP vgame.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP vgame.wt2048 new file mode 100644 index 0000000..2dba173 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP vgame.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP vgamebasic.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP vgamebasic.wt2048 new file mode 100644 index 0000000..0ee6f94 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP vgamebasic.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP violin.wt2048 b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP violin.wt2048 new file mode 100644 index 0000000..a09be06 Binary files /dev/null and b/plugin/Resources/WavetablesFLAC/Adventure Kid/AKWP violin.wt2048 differ diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ACTIVE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - ACTIVE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ACTIVE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - ACTIVE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - AGE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - AGE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - AGE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - AGE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ALIGN.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - ALIGN.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ALIGN.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - ALIGN.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ALKALINE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - ALKALINE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - ALKALINE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - ALKALINE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CHEMICAL.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - CHEMICAL.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CHEMICAL.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - CHEMICAL.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COKE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COKE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COKE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COKE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COLOR.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COLOR.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COLOR.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COLOR.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COMMERCIAL.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COMMERCIAL.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COMMERCIAL.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COMMERCIAL.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COMPOSE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COMPOSE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - COMPOSE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - COMPOSE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CONVENT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - CONVENT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CONVENT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - CONVENT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CRUCIAL.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - CRUCIAL.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - CRUCIAL.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - CRUCIAL.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - DISPENSE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - DISPENSE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - DISPENSE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - DISPENSE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - EFFECT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - EFFECT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - EFFECT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - EFFECT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - EFFICIENT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - EFFICIENT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - EFFICIENT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - EFFICIENT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - FINISH.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - FINISH.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - FINISH.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - FINISH.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - FRESH.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - FRESH.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - FRESH.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - FRESH.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - HELP.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - HELP.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - HELP.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - HELP.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - INDIFFERENT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - INDIFFERENT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - INDIFFERENT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - INDIFFERENT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - INERT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - INERT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - INERT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - INERT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - LATENT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - LATENT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - LATENT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - LATENT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MODIFY.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - MODIFY.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MODIFY.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - MODIFY.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MONOLITH.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - MONOLITH.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MONOLITH.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - MONOLITH.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MORAL.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - MORAL.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - MORAL.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - MORAL.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NEUTRAL.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - NEUTRAL.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NEUTRAL.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - NEUTRAL.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NOBLE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - NOBLE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NOBLE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - NOBLE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NUCLEUS.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - NUCLEUS.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - NUCLEUS.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - NUCLEUS.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - OBJECT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - OBJECT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - OBJECT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - OBJECT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - OXIDIZE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - OXIDIZE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - OXIDIZE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - OXIDIZE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PERSONAL.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PERSONAL.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PERSONAL.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PERSONAL.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POLYMER.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POLYMER.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POLYMER.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POLYMER.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POROUS.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POROUS.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POROUS.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POROUS.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POTENT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POTENT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POTENT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POTENT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POWDER.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POWDER.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - POWDER.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - POWDER.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PREFER.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PREFER.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PREFER.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PREFER.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PRIME.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PRIME.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PRIME.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PRIME.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PROMISE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PROMISE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - PROMISE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - PROMISE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - REACT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - REACT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - REACT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - REACT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - REDUCE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - REDUCE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - REDUCE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - REDUCE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - RESIDUE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - RESIDUE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - RESIDUE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - RESIDUE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SELECT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SELECT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SELECT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SELECT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SOLID.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SOLID.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SOLID.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SOLID.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SOLUBLE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SOLUBLE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SOLUBLE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SOLUBLE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUBJECT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SUBJECT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUBJECT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SUBJECT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUIT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SUIT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUIT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SUIT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUPPORT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SUPPORT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SUPPORT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SUPPORT.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SYNTHETIC.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SYNTHETIC.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - SYNTHETIC.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - SYNTHETIC.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - TERTIARY.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - TERTIARY.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - TERTIARY.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - TERTIARY.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - USE.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - USE.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - USE.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - USE.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - VIEW.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - VIEW.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - VIEW.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - VIEW.wt2048 diff --git a/plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - WIT.wt2048 b/plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - WIT.wt2048 similarity index 100% rename from plugin/Resources/WavetablesFLAC/Neu KatalYst WavetablesFLAC/NK - WIT.wt2048 rename to plugin/Resources/WavetablesFLAC/Neu KatalYst/NK - WIT.wt2048 diff --git a/plugin/Resources/layout.json b/plugin/Resources/layout.json index 95e8448..262e944 100644 --- a/plugin/Resources/layout.json +++ b/plugin/Resources/layout.json @@ -1,156 +1,198 @@ { - "children": + "components": [ - { "id": "osc[1..2]", "x": "0,prevR()+1", "y": 0, "w": "parW()/2", "h": 163, "children": + { "id": "osc[1..2]", "x": "0,prevR+1", "y": 0, "w": "parW/2", "h": 163, "components": [ - { "id": "Retrig", "r": "parW() - 6", "y": 6, "w": 12, "h": 12 }, + { "id": "Retrig", "r": "parW - 6", "y": 6, "w": 12, "h": 12 }, { "id": "Pos", "x": 0, "y": 23, "w": 56, "h": 70 }, - { "id": "Tune", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Fine", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Level", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Pan", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Unison", "x": 0, "y": "prevB()", "w": 56, "h": 70 }, - { "id": "Detune", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 }, - { "id": "Spread", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 }, - { "id": "Formant", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 }, - { "id": "Bend", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 }, - { "id": "wt", "x": "prevR()", "y": 23, "r": "parW()", "b": "parH()" }, - { "id": "add", "r": "parW() - 8", "b": "parH() - 8", "w": 16, "h": 16 } - ] + { "id": "Tune", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Fine", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Level", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Pan", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Unison", "x": 0, "y": "prevB", "w": 56, "h": 70 }, + { "id": "Detune", "x": "prevR", "y": "prevY", "w": 56, "h": 70 }, + { "id": "Spread", "x": "prevR", "y": "prevY", "w": 56, "h": 70 }, + { "id": "Formant", "x": "prevR", "y": "prevY", "w": 56, "h": 70 }, + { "id": "Bend", "x": "prevR", "y": "prevY", "w": 56, "h": 70 }, + { "id": "wt", "x": "prevR", "y": 23, "r": "parW", "b": "parH" }, + { "id": "add", "r": "parW - 8", "b": "parH - 8", "w": 16, "h": 16 } + ] }, - { "id": "noise", "x": "0", "y": "prevB()+1", "w": 120, "h": 163, "children": + { "id": "noise", "x": "0", "y": "prevB+1", "w": 120, "h": 163, "components": [ { "id": "Type", "x": "56/2", "y": 23, "w": 56, "h": 70 }, - { "id": "Level", "x": 0, "y": "prevB()", "w": 56, "h": 70 }, - { "id": "Pan", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 } - ] + { "id": "Level", "x": 0, "y": "prevB", "w": 56, "h": 70 }, + { "id": "Pan", "x": "prevR", "y": "prevY", "w": 56, "h": 70 } + ] }, - { "id": "sub", "x": "prevR()+1", "y": "prevY()", "w": 112, "h": 163, "children": + { "id": "sub", "x": "prevR+1", "y": "prevY", "w": 112, "h": 163, "components": [ - { "id": "Retrig", "r": "parW() - 6", "y": 6, "w": 12, "h": 12 }, + { "id": "Retrig", "r": "parW - 6", "y": 6, "w": 12, "h": 12 }, { "id": "Wave", "x": 0, "y": 23, "w": 56, "h": 70 }, - { "id": "Tune", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Level", "x": 0, "y": "prevB()", "w": 56, "h": 70 }, - { "id": "Pan", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 } - ] + { "id": "Tune", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Level", "x": 0, "y": "prevB", "w": 56, "h": 70 }, + { "id": "Pan", "x": "prevR", "y": "prevY", "w": 56, "h": 70 } + ] }, - { "id": "flt", "x": "prevR()+1", "y": "prevY()", "w": 336, "h": 163, "children": + { "id": "flt", "x": "prevR+1", "y": "prevY", "w": 336, "h": 163, "components": [ { "id": "FLT WT1", "x": 24, "y": 6, "w": 12, "h": 12 }, - { "id": "FLT WT2", "x": "prevR()+6", "y": 6, "w": 12, "h": 12 }, - { "id": "FLT sub", "x": "prevR()+6", "y": 6, "w": 12, "h": 12 }, - { "id": "FLT noise", "x": "prevR()+6", "y": 6, "w": 12, "h": 12 }, + { "id": "FLT WT2", "x": "prevR+6", "y": 6, "w": 12, "h": 12 }, + { "id": "FLT noise", "x": "prevR+6", "y": 6, "w": 12, "h": 12 }, + { "id": "FLT sub", "x": "prevR+6", "y": 6, "w": 12, "h": 12 }, { "id": "Type", "x": 0, "y": 23, "w": 56, "h": 70 }, - { "id": "Freq", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Res", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Key", "x": 0, "y": "prevB()", "w": 56, "h": 70 }, - { "id": "Amnt", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 }, - { "id": "Vel", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 }, - { "id": "A", "x": "prevR()", "y": "prevY() + 13", "w": 42, "h": 57 }, - { "id": "D", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "S", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "R", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "adsr", "x": "getX('A')", "y": "getY('Res')", "r": "getR('R')", "b": "getY('A')" } + { "id": "Freq", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Res", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Key", "x": 0, "y": "prevB", "w": 56, "h": 70 }, + { "id": "Amnt", "x": "prevR", "y": "prevY", "w": 56, "h": 70 }, + { "id": "Vel", "x": "prevR", "y": "prevY", "w": 56, "h": 70 }, + { "id": "A", "x": "prevR", "y": "prevY + 13", "w": 42, "h": 57 }, + { "id": "D", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "S", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "R", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "adsr", "x": "getX('A')", "y": "getY('Res')", "r": "getR('R')", "b": "getY('A')" }, + { "id": "Retrig", "r": "getR('adsr') - 3", "y": "getY('adsr') + 3", "w": 12, "h": 12 } ] }, - { "id": "adsr", "x": "prevR()+1", "y": "prevY()", "w": "210 + 160", "h": 163, "children": + { "id": "adsr", "x": "prevR+1", "y": "prevY", "w": "210 + 160", "h": 163, "components": [ { "id": "A", "x": "160/2", "y": 106, "w": 42, "h": 57 }, - { "id": "D", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "S", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "R", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Vel", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "adsr", "x": 0, "y": 23, "r": "parW()", "b": "getY('A')" } + { "id": "D", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "S", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "R", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Vel", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "adsr", "x": 0, "y": 23, "r": "parW", "b": "getY('A')" }, + { "id": "Retrig", "r": "getR('adsr') - 3", "y": "getY('adsr') + 3", "w": 12, "h": 12 } ] }, - { "id": "lfo[1..3]", "x": 0, "y": "prevB()+1,prevY()", "w": 280, "h": 163, "children": + { "id": "lfo[1..3]", "x": 0, "y": "prevB+1,prevY", "w": 280, "h": 163, "components": [ { "id": "Sync", "x": 0, "y": 23, "w": 56, "h": 70 }, - { "id": "Beat", "x": "prevR()", "y": 23, "w": 56, "h": 70 }, - { "id": "Rate", "x": "prevX()", "y": 23, "w": 56, "h": 70 }, - { "id": "Wave", "x": 0, "y": "prevB()", "w": 56, "h": 70 }, - { "id": "Depth", "x": "prevR()", "y": "prevY()", "w": 56, "h": 70 }, - { "id": "Offset", "x": "prevR()", "y": "prevY() + 13", "w": 42, "h": 57 }, - { "id": "Phase", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Delay", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Fade", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, + { "id": "Beat", "x": "prevR", "y": 23, "w": 56, "h": 70 }, + { "id": "Rate", "x": "prevX", "y": 23, "w": 56, "h": 70 }, + { "id": "Wave", "x": 0, "y": "prevB", "w": 56, "h": 70 }, + { "id": "Depth", "x": "prevR", "y": "prevY", "w": 56, "h": 70 }, + { "id": "Offset", "x": "prevR", "y": "prevY + 13", "w": 42, "h": 57 }, + { "id": "Phase", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Delay", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Fade", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, { "id": "lfo", "x": "getX('Offset')", "y": "getY('Rate')", "r": "getR('Fade')", "b": "getY('Fade')" }, { "id": "Retrig", "r": "getR('lfo') - 3", "y": "getY('lfo') + 3", "w": 12, "h": 12 } ] }, - { "id": "env[1..3]", "x": "getR('lfo1')+1", "y": "prevY()", "w": "168 + 50", "h": 163, "children": + { "id": "env[1..3]", "x": "getR('lfo1')+1", "y": "prevY", "w": "168 + 50", "h": 163, "components": [ { "id": "A", "x": 25, "y": 106, "w": 42, "h": 57 }, - { "id": "D", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "S", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "R", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "adsr", "x": 0, "y": 23, "r": "parW()", "b": "getY('A')" } + { "id": "D", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "S", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "R", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "adsr", "x": 0, "y": 23, "r": "parW", "b": "getY('A')" }, + { "id": "Retrig", "r": "getR('adsr') - 3", "y": "getY('adsr') + 3", "w": 12, "h": 12 } ] }, - { "id": "step", "x": "prevR()+1", "y": "prevY()", "w": 218, "h": 163, "children": + { "id": "step", "x": "prevR+1", "y": "prevY", "w": 218, "h": 163, "components": [ - { "id": "step", "x": 0, "y": 23, "r": "parW()", "h": 83 }, + { "id": "step", "x": 0, "y": 23, "r": "parW", "h": 83 }, { "id": "Beat", "x": 67, "y": 106, "w": 42, "h": 57 }, - { "id": "Length", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, + { "id": "Length", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, { "id": "Retrig", "r": "getR('step') - 3", "y": "getY('step') + 3", "w": 12, "h": 12 } ] }, - { "id": "mod", "x": "prevR()+1", "y": "prevY()", "r": "parW()", "h": 163, "children": + { "id": "mod", "x": "prevR+1", "y": "prevY", "r": "parW", "h": 163, "components": [ - { "id": "modlist", "x": 0, "y": 23, "r": "parW()", "b": "parH()" } - ] + { "id": "modlist", "x": 0, "y": 23, "r": "parW", "b": "parH" } + ] }, - { "id": "mtx", "x": "prevX()", "y": "prevY()", "r": "parR()", "h": 163, "children": + { "id": "mtx", "x": "prevX", "y": "prevY", "r": "parR", "h": 163, "components": [ - { "id": "matrix", "x": 0, "y": 23, "r": "parW()", "b": "parH()" } - ] + { "id": "matrix", "x": 0, "y": 23, "r": "parW", "b": "parH" } + ] }, - { "id": "gate", "x": "0", "y": "prevB()+1", "w": 290, "h": 137, "children": + { "id": "fx", "x": 0, "y": "prevB+1", "w": "parW - 169", "h": 137, "components": [ - { "id": "Beat", "x": 61, "y": 30, "w": 42, "h": 57 }, - { "id": "Length", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "A", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "R", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "pattern", "x": 2, "y": "prevB() + 5", "w": "parW() - 6", "b": "parH() - 15" } - ] + { "id": "gate", "x": "0", "y": 0, "w": 306, "h": 137, "components": + [ + { "id": "Beat", "x": 69, "y": 30, "w": 42, "h": 57 }, + { "id": "Length", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "A", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "R", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "pattern", "x": 2, "y": "prevB + 5", "w": "parW - 6", "b": "parH - 15" } + ] + }, + { "id": "chorus", "x": "prevR+1", "y": "prevY", "w": 126, "h": 137, "components": + [ + { "id": "Delay", "x": 0, "y": 23, "w": 42, "h": 57 }, + { "id": "Speed", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Mix", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Depth", "x": 21, "y": "prevB", "w": 42, "h": 57 }, + { "id": "Width", "x": "prevR", "y": "prevY", "w": 42, "h": 57 } + ] + }, + { "id": "distort", "x": "prevR+1", "y": "prevY", "w": 84, "h": 137, "components": + [ + { "id": "Distort", "components": + [ + { "id": "mode", "r": "parW - 4", "y": 4, "w": 16, "h": 16 } + ] + }, + { "id": "page1", "bounds": "parent", "components": + [ + { "id": "Amount", "x": 14, "y": "23 + 22", "w": 56, "h": 70 } + ] + }, + { "id": "page2", "bounds": "parent", "components": + [ + { "id": "Rate", "x": 0, "y": 23, "w": 42, "h": 57 }, + { "id": "Rez", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Hard", "x": 0, "y": "prevB", "w": 42, "h": 57 }, + { "id": "Mix", "x": "prevR", "y": "prevY", "w": 42, "h": 57 } + ] + }, + { "id": "page3", "bounds": "parent", "components": + [ + { "id": "Gain", "x": 0, "y": 23, "w": 42, "h": 57 }, + { "id": "Tone", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Output", "x": 0, "y": "prevB", "w": 42, "h": 57 }, + { "id": "Mix", "x": "prevR", "y": "prevY", "w": 42, "h": 57 } + ] + }, + { "id": "page4", "bounds": "parent", "components": + [ + { "id": "Gain", "x": 0, "y": 23, "w": 42, "h": 57 }, + { "id": "Tone", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Output", "x": 0, "y": "prevB", "w": 42, "h": 57 }, + { "id": "Mix", "x": "prevR", "y": "prevY", "w": 42, "h": 57 } + ] + } + ] + }, + { "id": "delay", "x": "prevR+1", "y": "prevY", "w": 126, "h": 137, "components": + [ + { "id": "Sync", "x": 0, "y": 23, "w": 42, "h": 57 }, + { "id": "Delay1", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Delay2", "x": "prevX", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Mix", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "FB", "x": 21, "y": "prevB", "w": 42, "h": 57 }, + { "id": "CF", "x": "prevR", "y": "prevY", "w": 42, "h": 57 } + ] }, + { "id": "reverb", "x": "prevR+1", "y": "prevY", "w": 126, "h": 137, "components": + [ + { "id": "Size", "x": 0, "y": 23, "w": 42, "h": 57 }, + { "id": "Decay", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Lowpass", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Damping", "x": 0, "y": "prevB", "w": 42, "h": 57 }, + { "id": "Predelay", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Mix", "x": "prevR", "y": "prevY", "w": 42, "h": 57 } + ] + } + ] }, - { "id": "chorus", "x": "prevR()+1", "y": "prevY()", "w": 126, "h": 137, "children": - [ - { "id": "Delay", "x": 0, "y": 23, "w": 42, "h": 57 }, - { "id": "Speed", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Mix", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Depth", "x": 21, "y": "prevB()", "w": 42, "h": 57 }, - { "id": "Width", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 } - ] - }, - { "id": "distort", "x": "prevR()+1", "y": "prevY()", "w": 100, "h": 137, "children": - [ - { "id": "Amount", "x": 22, "y": "23 + 22", "w": 56, "h": 70 } - ] - }, - { "id": "delay", "x": "prevR()+1", "y": "prevY()", "w": 126, "h": 137, "children": - [ - { "id": "Sync", "x": 0, "y": 23, "w": 42, "h": 57 }, - { "id": "Delay1", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Delay2", "x": "prevX()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Mix", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "FB", "x": 21, "y": "prevB()", "w": 42, "h": 57 }, - { "id": "CF", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 } - ] }, - { "id": "reverb", "x": "prevR()+1", "y": "prevY()", "w": 126, "h": 137, "children": - [ - { "id": "Size", "x": 0, "y": 23, "w": 42, "h": 57 }, - { "id": "Decay", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Lowpass", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Damping", "x": 0, "y": "prevB()", "w": 42, "h": 57 }, - { "id": "Predelay", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Mix", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 } - ] }, - { "id": "global", "x": "prevR()+1", "y": "prevY()", "w": 168, "h": 137, "children": + { "id": "global", "x": "prevR+1", "y": "prevY", "w": 168, "h": 137, "components": [ { "id": "Mono", "x": 0, "y": 23, "w": 42, "h": 57 }, - { "id": "Glide", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Time", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Legato", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "PB Range", "x": 0, "y": "prevB()", "w": 42, "h": 57 }, - { "id": "Voices", "x": "prevR()", "y": "prevY()", "w": 42, "h": 57 }, - { "id": "Level", "x": "prevR() + 42", "y": "prevY()", "w": 42, "h": 57 } - ] } + { "id": "Glide", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Time", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Legato", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "PB Range", "x": 0, "y": "prevB", "w": 42, "h": 57 }, + { "id": "Voices", "x": "prevR", "y": "prevY", "w": 42, "h": 57 }, + { "id": "Level", "x": "prevR + 42", "y": "prevY", "w": 42, "h": 57 } + ] + } ] } \ No newline at end of file diff --git a/plugin/Source/App.cpp b/plugin/Source/App.cpp index 07357cb..8804074 100644 --- a/plugin/Source/App.cpp +++ b/plugin/Source/App.cpp @@ -1,6 +1,8 @@ #include #include "PluginProcessor.h" +#if 0 + static void profile (juce::PropertiesFile& settings) { WavetableAudioProcessor proc; @@ -55,15 +57,4 @@ static void profile (juce::PropertiesFile& settings) printf ("Elapsed time: %.2fs\n", (end - start) / 1000); } -juce::JUCEApplicationBase* juce_CreateApplication() -{ - return new gin::StandaloneApp([] (juce::PropertiesFile& settings) - { - if (juce::JUCEApplication::getCommandLineParameters ().contains ("-profile")) - { - profile (settings); - return false; - } - return true; - }); -} +#endif diff --git a/plugin/Source/Editor.cpp b/plugin/Source/Editor.cpp index 4d6bd41..438d11b 100644 --- a/plugin/Source/Editor.cpp +++ b/plugin/Source/Editor.cpp @@ -1,7 +1,7 @@ #include "Editor.h" Editor::Editor (WavetableAudioProcessor& proc_) - : proc ( proc_ ) + : proc (proc_) { for (auto& o : oscillators) addAndMakeVisible (o); for (auto& l : lfos) addAndMakeVisible (l); @@ -15,13 +15,78 @@ Editor::Editor (WavetableAudioProcessor& proc_) addAndMakeVisible (mod); addAndMakeVisible (mtx); addAndMakeVisible (global); - addAndMakeVisible (gate); - addAndMakeVisible (chorus); - addAndMakeVisible (distort); - addAndMakeVisible (delay); - addAndMakeVisible (reverb); + + fx.addAndMakeVisible (gate); + fx.addAndMakeVisible (chorus); + fx.addAndMakeVisible (distort); + fx.addAndMakeVisible (delay); + fx.addAndMakeVisible (reverb); + + fx.onDragStart = [] (const juce::MouseEvent& e) + { + if (dynamic_cast (e.originalComponent)) + return true; + return false; + }; + fx.onOrderChanged = [this] (int, int) + { + proc.fxParams.fx1->setUserValue (fx.getChildComponent(0)->getProperties()["fxId"]); + proc.fxParams.fx2->setUserValue (fx.getChildComponent(1)->getProperties()["fxId"]); + proc.fxParams.fx3->setUserValue (fx.getChildComponent(2)->getProperties()["fxId"]); + proc.fxParams.fx4->setUserValue (fx.getChildComponent(3)->getProperties()["fxId"]); + proc.fxParams.fx5->setUserValue (fx.getChildComponent(4)->getProperties()["fxId"]); + + handleAsyncUpdate(); + }; + + proc.fxParams.fx1->addListener (this); + proc.fxParams.fx2->addListener (this); + proc.fxParams.fx3->addListener (this); + proc.fxParams.fx4->addListener (this); + proc.fxParams.fx5->addListener (this); + + addAndMakeVisible (fx); setupCallbacks(); + handleAsyncUpdate(); +} + +Editor::~Editor() +{ + proc.fxParams.fx1->removeListener (this); + proc.fxParams.fx2->removeListener (this); + proc.fxParams.fx3->removeListener (this); + proc.fxParams.fx4->removeListener (this); + proc.fxParams.fx5->removeListener (this); +} + +void Editor::handleAsyncUpdate() +{ + if (fx.isDragInProgress()) + return; + + fx.removeAllChildren(); + + auto getComp = [this] (int fxId) -> juce::Component* + { + if (fxId == fxGate) return &gate; + if (fxId == fxChorus) return &chorus; + if (fxId == fxDistort) return &distort; + if (fxId == fxDelay) return &delay; + if (fxId == fxReverb) return &reverb; + + jassertfalse; + return nullptr; + }; + + fx.addAndMakeVisible (getComp (proc.fxParams.fx1->getUserValueInt())); + fx.addAndMakeVisible (getComp (proc.fxParams.fx2->getUserValueInt())); + fx.addAndMakeVisible (getComp (proc.fxParams.fx3->getUserValueInt())); + fx.addAndMakeVisible (getComp (proc.fxParams.fx4->getUserValueInt())); + fx.addAndMakeVisible (getComp (proc.fxParams.fx5->getUserValueInt())); + + if (fx.getWidth() > 0) + fx.resized(); } void Editor::setupCallbacks() @@ -33,8 +98,10 @@ void Editor::resized() #if JUCE_DEBUG auto f = juce::File (__FILE__).getChildFile ("../../Resources/layout.json"); - layout.setLayout ("layout.json", f); + layout.setLayout ({f}); #else - layout.setLayout ("layout.json"); + layout.setLayout (juce::StringArray ("layout.json")); #endif + + handleAsyncUpdate(); } diff --git a/plugin/Source/Editor.h b/plugin/Source/Editor.h index 131cbb2..941bd74 100644 --- a/plugin/Source/Editor.h +++ b/plugin/Source/Editor.h @@ -5,15 +5,21 @@ #include "Panels.h" //============================================================================== -class Editor : public juce::Component +class Editor : public juce::Component, + private gin::Parameter::ParameterListener, + private juce::AsyncUpdater { public: Editor (WavetableAudioProcessor& proc_); + ~Editor() override; void setupCallbacks(); void resized() override; private: + void valueUpdated (gin::Parameter*) override { triggerAsyncUpdate(); } + void handleAsyncUpdate() override; + WavetableAudioProcessor& proc; OscillatorBox oscillators[Cfg::numOSCs] { { "oscillator 1", proc, 0 }, { "oscillator 2", proc, 1 } }; @@ -36,5 +42,7 @@ private: DelayBox delay { proc }; ReverbBox reverb { proc }; - gin::Layout layout { *this }; + gin::ComponentGrid fx { "fx" }; + + gin::LayoutSupport layout { *this }; }; diff --git a/plugin/Source/FX/DeRez2.cpp b/plugin/Source/FX/DeRez2.cpp new file mode 100755 index 0000000..e7a3d90 --- /dev/null +++ b/plugin/Source/FX/DeRez2.cpp @@ -0,0 +1,178 @@ +/* ======================================== + * DeRez2 - DeRez2.h + * Copyright (c) 2016 airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __DeRez2_H +#include "DeRez2.h" +#endif + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfloat-conversion", "-Wimplicit-float-conversion", "-Wunused-parameter") + +DeRez2::DeRez2(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 1.0; + B = 1.0; + C = 1.0; + D = 1.0; + lastSampleL = 0.0; + heldSampleL = 0.0; + lastDrySampleL = 0.0; + lastOutputSampleL = 0.0; + + lastSampleR = 0.0; + heldSampleR = 0.0; + lastDrySampleR = 0.0; + lastOutputSampleR = 0.0; + + position = 0.0; + incrementA = 0.0; + incrementB = 0.0; + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +DeRez2::~DeRez2() {} +VstInt32 DeRez2::getVendorVersion () {return 1000;} +void DeRez2::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void DeRez2::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +void DeRez2::reset() +{ + A = 1.0; + B = 1.0; + C = 1.0; + D = 1.0; + lastSampleL = 0.0; + heldSampleL = 0.0; + lastDrySampleL = 0.0; + lastOutputSampleL = 0.0; + + lastSampleR = 0.0; + heldSampleR = 0.0; + lastDrySampleR = 0.0; + lastOutputSampleR = 0.0; + + position = 0.0; + incrementA = 0.0; + incrementB = 0.0; + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; +} + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +VstInt32 DeRez2::getChunk (void** data, bool isPreset) +{ + float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); + chunkData[0] = A; + chunkData[1] = B; + chunkData[2] = C; + chunkData[3] = D; + /* Note: The way this is set up, it will break if you manage to save settings on an Intel + machine and load them on a PPC Mac. However, it's fine if you stick to the machine you + started with. */ + + *data = chunkData; + return kNumParameters * sizeof(float); +} + +VstInt32 DeRez2::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + float *chunkData = (float *)data; + A = pinParameter(chunkData[0]); + B = pinParameter(chunkData[1]); + C = pinParameter(chunkData[2]); + D = pinParameter(chunkData[3]); + /* We're ignoring byteSize as we found it to be a filthy liar */ + + /* calculate any other fields you need here - you could copy in + code from setParameter() here. */ + return 0; +} + +void DeRez2::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + default: throw; // unknown parameter, shouldn't happen! + } +} + +float DeRez2::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void DeRez2::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Rate", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Rez", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Hard", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Dry/Wet", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void DeRez2::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void DeRez2::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 DeRez2::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool DeRez2::getEffectName(char* name) { + vst_strncpy(name, "DeRez2", kVstMaxProductStrLen); return true; +} + +VstPlugCategory DeRez2::getPlugCategory() {return kPlugCategEffect;} + +bool DeRez2::getProductString(char* text) { + vst_strncpy (text, "airwindows DeRez2", kVstMaxProductStrLen); return true; +} + +bool DeRez2::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} diff --git a/plugin/Source/FX/DeRez2.h b/plugin/Source/FX/DeRez2.h new file mode 100755 index 0000000..4a791ce --- /dev/null +++ b/plugin/Source/FX/DeRez2.h @@ -0,0 +1,78 @@ +/* ======================================== + * DeRez2 - DeRez2.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) 2011 __MyCompanyName__, Airwindows uses the MIT license + * ======================================== */ + +#pragma once + +#include "FXBase.h" + +#include +#include +#include + +class DeRez2 final : public AudioEffectX +{ +public: + enum { + kParamA = 0, + kParamB = 1, + kParamC = 2, + kParamD = 3, + kNumParameters = 4 + }; // + + static constexpr int kNumPrograms = 0; + static constexpr int kNumInputs = 2; + static constexpr int kNumOutputs = 2; + + DeRez2(audioMasterCallback audioMaster); + ~DeRez2(); + void reset(); + bool getEffectName(char* name); // The plug-in name + VstPlugCategory getPlugCategory(); // The general category for the plug-in + bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + bool getVendorString(char* text); // Vendor info + VstInt32 getVendorVersion(); // Version number + void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + void getProgramName(char *name); // read the name from the host + void setProgramName(char *name); // changes the name of the preset displayed in the host + VstInt32 getChunk (void** data, bool isPreset); + VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset); + float getParameter(VstInt32 index); // get the parameter value at the specified index + void setParameter(VstInt32 index, float value); // set the parameter at index to value + void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + void getParameterName(VstInt32 index, char *text); // name of the parameter + void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + double lastSampleL; + double heldSampleL; + double lastDrySampleL; + double lastOutputSampleL; + + double lastSampleR; + double heldSampleR; + double lastDrySampleR; + double lastOutputSampleR; + + double position; + double incrementA; + double incrementB; + + uint32_t fpdL; + uint32_t fpdR; + //default stuff + + float A; + float B; + float C; + float D; + +}; + diff --git a/plugin/Source/FX/DeRez2Proc.cpp b/plugin/Source/FX/DeRez2Proc.cpp new file mode 100755 index 0000000..8b3ef70 --- /dev/null +++ b/plugin/Source/FX/DeRez2Proc.cpp @@ -0,0 +1,369 @@ +/* ======================================== + * DeRez2 - DeRez2.h + * Copyright (c) 2016 airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __DeRez2_H +#include "DeRez2.h" +#endif + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfloat-conversion", "-Wimplicit-float-conversion", "-Wunused-parameter", "-Wunused-value") + +void DeRez2::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double targetA = pow(A,3)+0.0005; + if (targetA > 1.0) targetA = 1.0; + double soften = (1.0 + targetA)/2; + double targetB = pow(1.0-B,3) / 3; + double hard = C; + double wet = D; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + targetA /= overallscale; + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + //if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + //if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + + incrementA = ((incrementA*999.0)+targetA)/1000.0; + incrementB = ((incrementB*999.0)+targetB)/1000.0; + //incrementA is the frequency derez + //incrementB is the bit depth derez + position += incrementA; + + double outputSampleL = heldSampleL; + double outputSampleR = heldSampleR; + if (position > 1.0) + { + position -= 1.0; + heldSampleL = (lastSampleL * position) + (inputSampleL * (1.0-position)); + outputSampleL = (outputSampleL * (1.0-soften)) + (heldSampleL * soften); + //softens the edge of the derez + heldSampleR = (lastSampleR * position) + (inputSampleR * (1.0-position)); + outputSampleR = (outputSampleR * (1.0-soften)) + (heldSampleR * soften); + //softens the edge of the derez + } + inputSampleL = outputSampleL; + inputSampleR = outputSampleR; + + double tempL = inputSampleL; + double tempR = inputSampleR; + + if (inputSampleL != lastOutputSampleL) { + tempL = inputSampleL; + inputSampleL = (inputSampleL * hard) + (lastDrySampleL * (1.0-hard)); + //transitions get an intermediate dry sample + lastOutputSampleL = tempL; //only one intermediate sample + } else { + lastOutputSampleL = inputSampleL; + } + + if (inputSampleR != lastOutputSampleR) { + tempR = inputSampleR; + inputSampleR = (inputSampleR * hard) + (lastDrySampleR * (1.0-hard)); + //transitions get an intermediate dry sample + lastOutputSampleR = tempR; //only one intermediate sample + } else { + lastOutputSampleR = inputSampleR; + } + + lastDrySampleL = drySampleL; + lastDrySampleR = drySampleR; + //freq section of soft/hard interpolates dry samples + + tempL = inputSampleL; + tempR = inputSampleR; + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + + if (inputSampleL > 0) inputSampleL = log(1.0+(255*fabs(inputSampleL))) / log(256); + if (inputSampleL < 0) inputSampleL = -log(1.0+(255*fabs(inputSampleL))) / log(256); + + if (inputSampleR > 0) inputSampleR = log(1.0+(255*fabs(inputSampleR))) / log(256); + if (inputSampleR < 0) inputSampleR = -log(1.0+(255*fabs(inputSampleR))) / log(256); + + inputSampleL = (tempL * hard) + (inputSampleL * (1.0-hard)); + inputSampleR = (tempR * hard) + (inputSampleR * (1.0-hard)); //uLaw encode as part of soft/hard + + tempL = inputSampleL; + tempR = inputSampleR; + + if (incrementB > 0.0005) + { + if (inputSampleL > 0) + { + tempL = inputSampleL; + while (tempL > 0) {tempL -= incrementB;} + inputSampleL -= tempL; + //it's below 0 so subtracting adds the remainder + } + if (inputSampleR > 0) + { + tempR = inputSampleR; + while (tempR > 0) {tempR -= incrementB;} + inputSampleR -= tempR; + //it's below 0 so subtracting adds the remainder + } + + if (inputSampleL < 0) + { + tempL = inputSampleL; + while (tempL < 0) {tempL += incrementB;} + inputSampleL -= tempL; + //it's above 0 so subtracting subtracts the remainder + } + if (inputSampleR < 0) + { + tempR = inputSampleR; + while (tempR < 0) {tempR += incrementB;} + inputSampleR -= tempR; + //it's above 0 so subtracting subtracts the remainder + } + + inputSampleL *= (1.0 - incrementB); + inputSampleR *= (1.0 - incrementB); + } + + tempL = inputSampleL; + tempR = inputSampleR; + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + + if (inputSampleL > 0) inputSampleL = (pow(256,fabs(inputSampleL))-1.0) / 255; + if (inputSampleL < 0) inputSampleL = -(pow(256,fabs(inputSampleL))-1.0) / 255; + + if (inputSampleR > 0) inputSampleR = (pow(256,fabs(inputSampleR))-1.0) / 255; + if (inputSampleR < 0) inputSampleR = -(pow(256,fabs(inputSampleR))-1.0) / 255; + + inputSampleL = (tempL * hard) + (inputSampleL * (1.0-hard)); + inputSampleR = (tempR * hard) + (inputSampleR * (1.0-hard)); //uLaw decode as part of soft/hard + + if (wet !=1.0) { + inputSampleL = (inputSampleL * wet) + (drySampleL * (1.0-wet)); + inputSampleR = (inputSampleR * wet) + (drySampleR * (1.0-wet)); + } + //Dry/Wet control, defaults to the last slider + + lastSampleL = drySampleL; + lastSampleR = drySampleR; + /* + //begin 32 bit stereo floating point dither + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + */ + + *out1 = inputSampleL; + *out2 = inputSampleR; + + *in1++; + *in2++; + *out1++; + *out2++; + } +} + +void DeRez2::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double targetA = pow(A,3)+0.0005; + if (targetA > 1.0) targetA = 1.0; + double soften = (1.0 + targetA)/2; + double targetB = pow(1.0-B,3) / 3; + double hard = C; + double wet = D; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + targetA /= overallscale; + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + //if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + //if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + + incrementA = ((incrementA*999.0)+targetA)/1000.0; + incrementB = ((incrementB*999.0)+targetB)/1000.0; + //incrementA is the frequency derez + //incrementB is the bit depth derez + position += incrementA; + + double outputSampleL = heldSampleL; + double outputSampleR = heldSampleR; + if (position > 1.0) + { + position -= 1.0; + heldSampleL = (lastSampleL * position) + (inputSampleL * (1.0-position)); + outputSampleL = (outputSampleL * (1.0-soften)) + (heldSampleL * soften); + //softens the edge of the derez + heldSampleR = (lastSampleR * position) + (inputSampleR * (1.0-position)); + outputSampleR = (outputSampleR * (1.0-soften)) + (heldSampleR * soften); + //softens the edge of the derez + } + inputSampleL = outputSampleL; + inputSampleR = outputSampleR; + + double tempL = inputSampleL; + double tempR = inputSampleR; + + if (inputSampleL != lastOutputSampleL) { + tempL = inputSampleL; + inputSampleL = (inputSampleL * hard) + (lastDrySampleL * (1.0-hard)); + //transitions get an intermediate dry sample + lastOutputSampleL = tempL; //only one intermediate sample + } else { + lastOutputSampleL = inputSampleL; + } + + if (inputSampleR != lastOutputSampleR) { + tempR = inputSampleR; + inputSampleR = (inputSampleR * hard) + (lastDrySampleR * (1.0-hard)); + //transitions get an intermediate dry sample + lastOutputSampleR = tempR; //only one intermediate sample + } else { + lastOutputSampleR = inputSampleR; + } + + lastDrySampleL = drySampleL; + lastDrySampleR = drySampleR; + //freq section of soft/hard interpolates dry samples + + tempL = inputSampleL; + tempR = inputSampleR; + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + + if (inputSampleL > 0) inputSampleL = log(1.0+(255*fabs(inputSampleL))) / log(256); + if (inputSampleL < 0) inputSampleL = -log(1.0+(255*fabs(inputSampleL))) / log(256); + + if (inputSampleR > 0) inputSampleR = log(1.0+(255*fabs(inputSampleR))) / log(256); + if (inputSampleR < 0) inputSampleR = -log(1.0+(255*fabs(inputSampleR))) / log(256); + + inputSampleL = (tempL * hard) + (inputSampleL * (1.0-hard)); + inputSampleR = (tempR * hard) + (inputSampleR * (1.0-hard)); //uLaw encode as part of soft/hard + + tempL = inputSampleL; + tempR = inputSampleR; + + if (incrementB > 0.0005) + { + if (inputSampleL > 0) + { + tempL = inputSampleL; + while (tempL > 0) {tempL -= incrementB;} + inputSampleL -= tempL; + //it's below 0 so subtracting adds the remainder + } + if (inputSampleR > 0) + { + tempR = inputSampleR; + while (tempR > 0) {tempR -= incrementB;} + inputSampleR -= tempR; + //it's below 0 so subtracting adds the remainder + } + + if (inputSampleL < 0) + { + tempL = inputSampleL; + while (tempL < 0) {tempL += incrementB;} + inputSampleL -= tempL; + //it's above 0 so subtracting subtracts the remainder + } + if (inputSampleR < 0) + { + tempR = inputSampleR; + while (tempR < 0) {tempR += incrementB;} + inputSampleR -= tempR; + //it's above 0 so subtracting subtracts the remainder + } + + inputSampleL *= (1.0 - incrementB); + inputSampleR *= (1.0 - incrementB); + } + + tempL = inputSampleL; + tempR = inputSampleR; + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + + if (inputSampleL > 0) inputSampleL = (pow(256,fabs(inputSampleL))-1.0) / 255; + if (inputSampleL < 0) inputSampleL = -(pow(256,fabs(inputSampleL))-1.0) / 255; + + if (inputSampleR > 0) inputSampleR = (pow(256,fabs(inputSampleR))-1.0) / 255; + if (inputSampleR < 0) inputSampleR = -(pow(256,fabs(inputSampleR))-1.0) / 255; + + inputSampleL = (tempL * hard) + (inputSampleL * (1.0-hard)); + inputSampleR = (tempR * hard) + (inputSampleR * (1.0-hard)); //uLaw decode as part of soft/hard + + if (wet !=1.0) { + inputSampleL = (inputSampleL * wet) + (drySampleL * (1.0-wet)); + inputSampleR = (inputSampleR * wet) + (drySampleR * (1.0-wet)); + } + //Dry/Wet control, defaults to the last slider + + lastSampleL = drySampleL; + lastSampleR = drySampleR; + + //begin 64 bit stereo floating point dither + /* + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + */ + + *out1 = inputSampleL; + *out2 = inputSampleR; + + *in1++; + *in2++; + *out1++; + *out2++; + } +} diff --git a/plugin/Source/FX/FXBase.h b/plugin/Source/FX/FXBase.h new file mode 100755 index 0000000..468fed8 --- /dev/null +++ b/plugin/Source/FX/FXBase.h @@ -0,0 +1,108 @@ +#pragma once + +#include + +#define VstInt32 int32_t +#define AudioEffect FXBase +#define AudioEffectX FXBase +#define audioMasterCallback FXBaseCallback +#define VstPlugCategory int +#define kPlugCategEffect 1 +#define kVstMaxProgNameLen 32 +#define kVstMaxParamStrLen 32 +#define kVstMaxProductStrLen 32 +#define kVstMaxVendorStrLen 32 +#define vst_strncpy strncpy + +inline void float2string (float f, char* text, int len) +{ + int decimals = 0; + if (std::fabs (f) >= 10.0f) + decimals = 1; + else if (std::fabs (f) > 1.0f) + decimals = 2; + else + decimals = 3; + + juce::String str (f, decimals); + str.copyToUTF8 (text, (size_t)len); +} + +inline void int2string (float i, char* text, int len) +{ + juce::String str (i); + str.copyToUTF8 (text, (size_t)len); +} + +inline void dB2string (float value, char* text, int maxLen) +{ + if (value <= 0) + vst_strncpy (text, "-oo", (size_t) maxLen); + else + float2string (20.0f * log10 (value), text, maxLen); +} + +//============================================================================== +class FXBaseCallback +{ +public: + FXBaseCallback (std::function cb_) : cb (cb_) {} + + double getSampleRate() + { + return cb(); + } + + std::function cb; +}; + +//============================================================================== +class FXBase +{ +public: + //============================================================================== + FXBase (FXBaseCallback c, int numPrograms_, int numParams_) + : numPrograms (numPrograms_), numParams (numParams_), callback (c) + { + } + + virtual ~FXBase() = default; + + int getNumInputs() { return numInputs; } + int getNumOutputs() { return numOutputs; } + int getNumParameters() { return numParams; } + + //============================================================================== + virtual bool getEffectName(char* name) = 0; + virtual VstPlugCategory getPlugCategory() = 0; + virtual bool getProductString(char* text) = 0; + virtual bool getVendorString(char* text) = 0; + virtual VstInt32 getVendorVersion() = 0; + virtual void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames) = 0; + virtual void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames) = 0; + virtual void getProgramName(char* name) = 0; + virtual void setProgramName(char* name) = 0; + virtual VstInt32 getChunk (void** data, bool isPreset) { juce::ignoreUnused (data, isPreset); return 0; } + virtual VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset) { juce::ignoreUnused (data, byteSize, isPreset); return 0; } + virtual float getParameter(VstInt32 index) { juce::ignoreUnused (index); return 0; } + virtual void setParameter(VstInt32 index, float value) { juce::ignoreUnused (index, value); } + virtual void getParameterLabel(VstInt32 index, char* text) { juce::ignoreUnused (index, text); } + virtual void getParameterName(VstInt32 index, char* text) { juce::ignoreUnused (index, text); } + virtual void getParameterDisplay(VstInt32 index, char* text) { juce::ignoreUnused (index, text); } + virtual VstInt32 canDo(char *text) = 0; + +protected: + //============================================================================== + void setNumInputs (int numIn) { numInputs = numIn; } + void setNumOutputs (int numOut) { numOutputs = numOut; } + void setUniqueID (int) {} + void canProcessReplacing() {} + void canDoubleReplacing() {} + void programsAreChunks (bool) {} + + int numInputs = 0, numOutputs = 0, numPrograms = 0, numParams = 0; + + FXBaseCallback callback; + + double getSampleRate() { return callback.getSampleRate(); } +}; diff --git a/plugin/Source/FX/FireAmp.cpp b/plugin/Source/FX/FireAmp.cpp new file mode 100755 index 0000000..112a502 --- /dev/null +++ b/plugin/Source/FX/FireAmp.cpp @@ -0,0 +1,343 @@ +/* ======================================== + * FireAmp - FireAmp.h + * Copyright (c) 2016 airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Gain_H +#include "FireAmp.h" +#endif + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfloat-conversion", "-Wimplicit-float-conversion", "-Wunused-parameter") + +FireAmp::FireAmp(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 0.5; + B = 0.5; + C = 0.8; + D = 1.0; + + lastSampleL = 0.0; + storeSampleL = 0.0; + smoothAL = 0.0; + smoothBL = 0.0; + smoothCL = 0.0; + smoothDL = 0.0; + smoothEL = 0.0; + smoothFL = 0.0; + smoothGL = 0.0; + smoothHL = 0.0; + smoothIL = 0.0; + smoothJL = 0.0; + smoothKL = 0.0; + smoothLL = 0.0; + iirSampleAL = 0.0; + iirSampleBL = 0.0; + iirSampleCL = 0.0; + iirSampleDL = 0.0; + iirSampleEL = 0.0; + iirSampleFL = 0.0; + iirSampleGL = 0.0; + iirSampleHL = 0.0; + iirSampleIL = 0.0; + iirSampleJL = 0.0; + iirSampleKL = 0.0; + iirSampleLL = 0.0; + iirLowpassL = 0.0; + iirSpkAL = 0.0; + iirSpkBL = 0.0; + iirSubL = 0.0; + + lastSampleR = 0.0; + storeSampleR = 0.0; + smoothAR = 0.0; + smoothBR = 0.0; + smoothCR = 0.0; + smoothDR = 0.0; + smoothER = 0.0; + smoothFR = 0.0; + smoothGR = 0.0; + smoothHR = 0.0; + smoothIR = 0.0; + smoothJR = 0.0; + smoothKR = 0.0; + smoothLR = 0.0; + iirSampleAR = 0.0; + iirSampleBR = 0.0; + iirSampleCR = 0.0; + iirSampleDR = 0.0; + iirSampleER = 0.0; + iirSampleFR = 0.0; + iirSampleGR = 0.0; + iirSampleHR = 0.0; + iirSampleIR = 0.0; + iirSampleJR = 0.0; + iirSampleKR = 0.0; + iirSampleLR = 0.0; + iirLowpassR = 0.0; + iirSpkAR = 0.0; + iirSpkBR = 0.0; + iirSubR = 0.0; + + for (int fcount = 0; fcount < 257; fcount++) { + OddL[fcount] = 0.0; + EvenL[fcount] = 0.0; + OddR[fcount] = 0.0; + EvenR[fcount] = 0.0; + } + + count = 0; + flip = false; //amp + + for(int fcount = 0; fcount < 90; fcount++) { + bL[fcount] = 0; + bR[fcount] = 0; + } + smoothCabAL = 0.0; smoothCabBL = 0.0; lastCabSampleL = 0.0; //cab + smoothCabAR = 0.0; smoothCabBR = 0.0; lastCabSampleR = 0.0; //cab + + for (int fcount = 0; fcount < 9; fcount++) { + lastRefL[fcount] = 0.0; + lastRefR[fcount] = 0.0; + } + cycle = 0; //undersampling + + for (int x = 0; x < fix_total; x++) { + fixA[x] = 0.0; + fixB[x] = 0.0; + fixC[x] = 0.0; + fixD[x] = 0.0; + fixE[x] = 0.0; + fixF[x] = 0.0; + } //filtering + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +FireAmp::~FireAmp() {} +VstInt32 FireAmp::getVendorVersion () {return 1000;} +void FireAmp::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void FireAmp::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +void FireAmp::reset() +{ + A = 0.5; + B = 0.5; + C = 0.8; + D = 1.0; + + lastSampleL = 0.0; + storeSampleL = 0.0; + smoothAL = 0.0; + smoothBL = 0.0; + smoothCL = 0.0; + smoothDL = 0.0; + smoothEL = 0.0; + smoothFL = 0.0; + smoothGL = 0.0; + smoothHL = 0.0; + smoothIL = 0.0; + smoothJL = 0.0; + smoothKL = 0.0; + smoothLL = 0.0; + iirSampleAL = 0.0; + iirSampleBL = 0.0; + iirSampleCL = 0.0; + iirSampleDL = 0.0; + iirSampleEL = 0.0; + iirSampleFL = 0.0; + iirSampleGL = 0.0; + iirSampleHL = 0.0; + iirSampleIL = 0.0; + iirSampleJL = 0.0; + iirSampleKL = 0.0; + iirSampleLL = 0.0; + iirLowpassL = 0.0; + iirSpkAL = 0.0; + iirSpkBL = 0.0; + iirSubL = 0.0; + + lastSampleR = 0.0; + storeSampleR = 0.0; + smoothAR = 0.0; + smoothBR = 0.0; + smoothCR = 0.0; + smoothDR = 0.0; + smoothER = 0.0; + smoothFR = 0.0; + smoothGR = 0.0; + smoothHR = 0.0; + smoothIR = 0.0; + smoothJR = 0.0; + smoothKR = 0.0; + smoothLR = 0.0; + iirSampleAR = 0.0; + iirSampleBR = 0.0; + iirSampleCR = 0.0; + iirSampleDR = 0.0; + iirSampleER = 0.0; + iirSampleFR = 0.0; + iirSampleGR = 0.0; + iirSampleHR = 0.0; + iirSampleIR = 0.0; + iirSampleJR = 0.0; + iirSampleKR = 0.0; + iirSampleLR = 0.0; + iirLowpassR = 0.0; + iirSpkAR = 0.0; + iirSpkBR = 0.0; + iirSubR = 0.0; + + for (int fcount = 0; fcount < 257; fcount++) { + OddL[fcount] = 0.0; + EvenL[fcount] = 0.0; + OddR[fcount] = 0.0; + EvenR[fcount] = 0.0; + } + + count = 0; + flip = false; //amp + + for(int fcount = 0; fcount < 90; fcount++) { + bL[fcount] = 0; + bR[fcount] = 0; + } + smoothCabAL = 0.0; smoothCabBL = 0.0; lastCabSampleL = 0.0; //cab + smoothCabAR = 0.0; smoothCabBR = 0.0; lastCabSampleR = 0.0; //cab + + for (int fcount = 0; fcount < 9; fcount++) { + lastRefL[fcount] = 0.0; + lastRefR[fcount] = 0.0; + } + cycle = 0; //undersampling + + for (int x = 0; x < fix_total; x++) { + fixA[x] = 0.0; + fixB[x] = 0.0; + fixC[x] = 0.0; + fixD[x] = 0.0; + fixE[x] = 0.0; + fixF[x] = 0.0; + } //filtering + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. +} + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +VstInt32 FireAmp::getChunk (void** data, bool isPreset) +{ + float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); + chunkData[0] = A; + chunkData[1] = B; + chunkData[2] = C; + chunkData[3] = D; + /* Note: The way this is set up, it will break if you manage to save settings on an Intel + machine and load them on a PPC Mac. However, it's fine if you stick to the machine you + started with. */ + + *data = chunkData; + return kNumParameters * sizeof(float); +} + +VstInt32 FireAmp::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + float *chunkData = (float *)data; + A = pinParameter(chunkData[0]); + B = pinParameter(chunkData[1]); + C = pinParameter(chunkData[2]); + D = pinParameter(chunkData[3]); + /* We're ignoring byteSize as we found it to be a filthy liar */ + + /* calculate any other fields you need here - you could copy in + code from setParameter() here. */ + return 0; +} + +void FireAmp::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + default: throw; // unknown parameter, shouldn't happen! + } +} + +float FireAmp::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void FireAmp::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Gain", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Tone", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Output", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Dry/Wet", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void FireAmp::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void FireAmp::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 FireAmp::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool FireAmp::getEffectName(char* name) { + vst_strncpy(name, "FireAmp", kVstMaxProductStrLen); return true; +} + +VstPlugCategory FireAmp::getPlugCategory() {return kPlugCategEffect;} + +bool FireAmp::getProductString(char* text) { + vst_strncpy (text, "airwindows FireAmp", kVstMaxProductStrLen); return true; +} + +bool FireAmp::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} diff --git a/plugin/Source/FX/FireAmp.h b/plugin/Source/FX/FireAmp.h new file mode 100755 index 0000000..9f1fb4f --- /dev/null +++ b/plugin/Source/FX/FireAmp.h @@ -0,0 +1,167 @@ +/* ======================================== + * FireAmp - FireAmp.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) 2011 __MyCompanyName__, Airwindows uses the MIT license + * ======================================== */ + +#pragma once + +#include "FXBase.h" + +#include +#include +#include + +class FireAmp final : public AudioEffectX +{ +public: + enum { + kParamA = 0, + kParamB = 1, + kParamC = 2, + kParamD = 3, + kNumParameters = 4 + }; // + + static constexpr int kNumPrograms = 0; + static constexpr int kNumInputs = 2; + static constexpr int kNumOutputs = 2; + + FireAmp(audioMasterCallback audioMaster); + ~FireAmp(); + void reset(); + bool getEffectName(char* name); // The plug-in name + VstPlugCategory getPlugCategory(); // The general category for the plug-in + bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + bool getVendorString(char* text); // Vendor info + VstInt32 getVendorVersion(); // Version number + void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + void getProgramName(char *name); // read the name from the host + void setProgramName(char *name); // changes the name of the preset displayed in the host + VstInt32 getChunk (void** data, bool isPreset); + VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset); + float getParameter(VstInt32 index); // get the parameter value at the specified index + void setParameter(VstInt32 index, float value); // set the parameter at index to value + void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + void getParameterName(VstInt32 index, char *text); // name of the parameter + void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + + double lastSampleL; + double storeSampleL; + double smoothAL; + double smoothBL; + double smoothCL; + double smoothDL; + double smoothEL; + double smoothFL; + double smoothGL; + double smoothHL; + double smoothIL; + double smoothJL; + double smoothKL; + double smoothLL; + double iirSampleAL; + double iirSampleBL; + double iirSampleCL; + double iirSampleDL; + double iirSampleEL; + double iirSampleFL; + double iirSampleGL; + double iirSampleHL; + double iirSampleIL; + double iirSampleJL; + double iirSampleKL; + double iirSampleLL; + double iirLowpassL; + double iirSpkAL; + double iirSpkBL; + double iirSubL; + double OddL[257]; + double EvenL[257]; + + double lastSampleR; + double storeSampleR; + double smoothAR; + double smoothBR; + double smoothCR; + double smoothDR; + double smoothER; + double smoothFR; + double smoothGR; + double smoothHR; + double smoothIR; + double smoothJR; + double smoothKR; + double smoothLR; + double iirSampleAR; + double iirSampleBR; + double iirSampleCR; + double iirSampleDR; + double iirSampleER; + double iirSampleFR; + double iirSampleGR; + double iirSampleHR; + double iirSampleIR; + double iirSampleJR; + double iirSampleKR; + double iirSampleLR; + double iirLowpassR; + double iirSpkAR; + double iirSpkBR; + double iirSubR; + double OddR[257]; + double EvenR[257]; + + bool flip; + int count; //amp + + double bL[90]; + double lastCabSampleL; + double smoothCabAL; + double smoothCabBL; //cab + + double bR[90]; + double lastCabSampleR; + double smoothCabAR; + double smoothCabBR; //cab + + double lastRefL[10]; + double lastRefR[10]; + int cycle; //undersampling + + enum { + fix_freq, + fix_reso, + fix_a0, + fix_a1, + fix_a2, + fix_b1, + fix_b2, + fix_sL1, + fix_sL2, + fix_sR1, + fix_sR2, + fix_total + }; //fixed frequency biquad filter for ultrasonics, stereo + double fixA[fix_total]; + double fixB[fix_total]; + double fixC[fix_total]; + double fixD[fix_total]; + double fixE[fix_total]; + double fixF[fix_total]; //filtering + + uint32_t fpdL; + uint32_t fpdR; + //default stuff + + float A; + float B; + float C; + float D; +}; diff --git a/plugin/Source/FX/FireAmpProc.cpp b/plugin/Source/FX/FireAmpProc.cpp new file mode 100755 index 0000000..2e47e87 --- /dev/null +++ b/plugin/Source/FX/FireAmpProc.cpp @@ -0,0 +1,1713 @@ +/* ======================================== + * FireAmp - FireAmp.h + * Copyright (c) 2016 airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Gain_H +#include "FireAmp.h" +#endif + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfloat-conversion", "-Wimplicit-float-conversion", "-Wunused-parameter") + +void FireAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double bassfill = A; + double outputlevel = C; + double wet = D; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + int cycleEnd = floor(overallscale); + if (cycleEnd < 1) cycleEnd = 1; + if (cycleEnd > 4) cycleEnd = 4; + //this is going to be 2 for 88.1 or 96k, 3 for silly people, 4 for 176 or 192k + if (cycle > cycleEnd-1) cycle = cycleEnd-1; //sanity check + + double startlevel = bassfill; + double samplerate = getSampleRate(); + double basstrim = bassfill / 16.0; + double toneEQ = (B / samplerate)*22050.0; + double EQ = (basstrim / samplerate)*22050.0; + double bleed = outputlevel/16.0; + double bassfactor = 1.0-(basstrim*basstrim); + double BEQ = (bleed / samplerate)*22050.0; + int diagonal = (int)(0.000861678*samplerate); + if (diagonal > 127) diagonal = 127; + int side = (int)(diagonal/1.4142135623730951); + int down = (side + diagonal)/2; + //now we've got down, side and diagonal as offsets and we also use three successive samples upfront + + double cutoff = (15000.0+(B*10000.0)) / getSampleRate(); + if (cutoff > 0.49) cutoff = 0.49; //don't crash if run at 44.1k + if (cutoff < 0.001) cutoff = 0.001; //or if cutoff's too low + + fixF[fix_freq] = fixE[fix_freq] = fixD[fix_freq] = fixC[fix_freq] = fixB[fix_freq] = fixA[fix_freq] = cutoff; + + fixA[fix_reso] = 4.46570214; + fixB[fix_reso] = 1.51387132; + fixC[fix_reso] = 0.93979296; + fixD[fix_reso] = 0.70710678; + fixE[fix_reso] = 0.52972649; + fixF[fix_reso] = 0.50316379; + + double K = tan(juce::MathConstants::pi * fixA[fix_freq]); //lowpass + double norm = 1.0 / (1.0 + K / fixA[fix_reso] + K * K); + fixA[fix_a0] = K * K * norm; + fixA[fix_a1] = 2.0 * fixA[fix_a0]; + fixA[fix_a2] = fixA[fix_a0]; + fixA[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixA[fix_b2] = (1.0 - K / fixA[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixB[fix_freq]); + norm = 1.0 / (1.0 + K / fixB[fix_reso] + K * K); + fixB[fix_a0] = K * K * norm; + fixB[fix_a1] = 2.0 * fixB[fix_a0]; + fixB[fix_a2] = fixB[fix_a0]; + fixB[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixB[fix_b2] = (1.0 - K / fixB[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixC[fix_freq]); + norm = 1.0 / (1.0 + K / fixC[fix_reso] + K * K); + fixC[fix_a0] = K * K * norm; + fixC[fix_a1] = 2.0 * fixC[fix_a0]; + fixC[fix_a2] = fixC[fix_a0]; + fixC[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixC[fix_b2] = (1.0 - K / fixC[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixD[fix_freq]); + norm = 1.0 / (1.0 + K / fixD[fix_reso] + K * K); + fixD[fix_a0] = K * K * norm; + fixD[fix_a1] = 2.0 * fixD[fix_a0]; + fixD[fix_a2] = fixD[fix_a0]; + fixD[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixD[fix_b2] = (1.0 - K / fixD[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixE[fix_freq]); + norm = 1.0 / (1.0 + K / fixE[fix_reso] + K * K); + fixE[fix_a0] = K * K * norm; + fixE[fix_a1] = 2.0 * fixE[fix_a0]; + fixE[fix_a2] = fixE[fix_a0]; + fixE[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixE[fix_b2] = (1.0 - K / fixE[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixF[fix_freq]); + norm = 1.0 / (1.0 + K / fixF[fix_reso] + K * K); + fixF[fix_a0] = K * K * norm; + fixF[fix_a1] = 2.0 * fixF[fix_a0]; + fixF[fix_a2] = fixF[fix_a0]; + fixF[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixF[fix_b2] = (1.0 - K / fixF[fix_reso] + K * K) * norm; + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + //if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + //if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + + double outSample = (inputSampleL * fixA[fix_a0]) + fixA[fix_sL1]; + fixA[fix_sL1] = (inputSampleL * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sL2]; + fixA[fix_sL2] = (inputSampleL * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixA[fix_a0]) + fixA[fix_sR1]; + fixA[fix_sR1] = (inputSampleR * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sR2]; + fixA[fix_sR2] = (inputSampleR * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + double basscutL = 0.98; + //we're going to be shifting this as the stages progress + double inputlevelL = startlevel; + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleAL = (iirSampleAL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleAL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + double bridgerectifier = (smoothAL + inputSampleL); + smoothAL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleBL = (iirSampleBL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleBL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothBL + inputSampleL); + smoothBL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + double basscutR = 0.98; + //we're going to be shifting this as the stages progress + double inputlevelR = startlevel; + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleAR = (iirSampleAR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleAR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654) ); + //overdrive + bridgerectifier = (smoothAR + inputSampleR); + smoothAR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleBR = (iirSampleBR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleBR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654) ); + //overdrive + bridgerectifier = (smoothBR + inputSampleR); + smoothBR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + + outSample = (inputSampleL * fixB[fix_a0]) + fixB[fix_sL1]; + fixB[fix_sL1] = (inputSampleL * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sL2]; + fixB[fix_sL2] = (inputSampleL * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixB[fix_a0]) + fixB[fix_sR1]; + fixB[fix_sR1] = (inputSampleR * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sR2]; + fixB[fix_sR2] = (inputSampleR * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleCL = (iirSampleCL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleCL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothCL + inputSampleL); + smoothCL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleDL = (iirSampleDL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleDL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654) ); + //overdrive + bridgerectifier = (smoothDL + inputSampleL); + smoothDL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleCR = (iirSampleCR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleCR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothCR + inputSampleR); + smoothCR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleDR = (iirSampleDR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleDR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654) ); + //overdrive + bridgerectifier = (smoothDR + inputSampleR); + smoothDR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixC[fix_a0]) + fixC[fix_sL1]; + fixC[fix_sL1] = (inputSampleL * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sL2]; + fixC[fix_sL2] = (inputSampleL * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixC[fix_a0]) + fixC[fix_sR1]; + fixC[fix_sR1] = (inputSampleR * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sR2]; + fixC[fix_sR2] = (inputSampleR * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleEL = (iirSampleEL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleEL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothEL + inputSampleL); + smoothEL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleFL = (iirSampleFL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleFL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothFL + inputSampleL); + smoothFL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleER = (iirSampleER * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleER*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothER + inputSampleR); + smoothER = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleFR = (iirSampleFR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleFR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothFR + inputSampleR); + smoothFR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixD[fix_a0]) + fixD[fix_sL1]; + fixD[fix_sL1] = (inputSampleL * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sL2]; + fixD[fix_sL2] = (inputSampleL * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixD[fix_a0]) + fixD[fix_sR1]; + fixD[fix_sR1] = (inputSampleR * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sR2]; + fixD[fix_sR2] = (inputSampleR * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleGL = (iirSampleGL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleGL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothGL + inputSampleL); + smoothGL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleHL = (iirSampleHL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleHL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothHL + inputSampleL); + smoothHL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleGR = (iirSampleGR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleGR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothGR + inputSampleR); + smoothGR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleHR = (iirSampleHR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleHR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothHR + inputSampleR); + smoothHR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixE[fix_a0]) + fixE[fix_sL1]; + fixE[fix_sL1] = (inputSampleL * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sL2]; + fixE[fix_sL2] = (inputSampleL * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixE[fix_a0]) + fixE[fix_sR1]; + fixE[fix_sR1] = (inputSampleR * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sR2]; + fixE[fix_sR2] = (inputSampleR * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleIL = (iirSampleIL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleIL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothIL + inputSampleL); + smoothIL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleJL = (iirSampleJL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleJL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothJL + inputSampleL); + smoothJL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleIR = (iirSampleIR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleIR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothIR + inputSampleR); + smoothIR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleJR = (iirSampleJR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleJR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothJR + inputSampleR); + smoothJR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixF[fix_a0]) + fixF[fix_sL1]; + fixF[fix_sL1] = (inputSampleL * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sL2]; + fixF[fix_sL2] = (inputSampleL * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixF[fix_a0]) + fixF[fix_sR1]; + fixF[fix_sR1] = (inputSampleR * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sR2]; + fixF[fix_sR2] = (inputSampleR * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleKL = (iirSampleKL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleKL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothKL + inputSampleL); + smoothKL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleLL = (iirSampleLL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleLL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothLL + inputSampleL); + smoothLL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleKR = (iirSampleKR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleKR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothKR + inputSampleR); + smoothKR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleLR = (iirSampleLR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleLR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothLR + inputSampleR); + smoothLR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + iirLowpassL = (iirLowpassL * (1.0 - toneEQ)) + (inputSampleL * toneEQ); + inputSampleL = iirLowpassL; + //lowpass. The only one of this type. + iirLowpassR = (iirLowpassR * (1.0 - toneEQ)) + (inputSampleR * toneEQ); + inputSampleR = iirLowpassR; + //lowpass. The only one of this type. + + iirSpkAL = (iirSpkAL * (1.0 - BEQ)) + (inputSampleL * BEQ); + //extra lowpass for 4*12" speakers + iirSpkAR = (iirSpkAR * (1.0 - BEQ)) + (inputSampleR * BEQ); + //extra lowpass for 4*12" speakers + + if (count < 0 || count > 128) {count = 128;} + double resultBL = 0.0; + double resultBR = 0.0; + if (flip) + { + OddL[count+128] = OddL[count] = iirSpkAL; + resultBL = (OddL[count+down] + OddL[count+side] + OddL[count+diagonal]); + OddR[count+128] = OddR[count] = iirSpkAR; + resultBR = (OddR[count+down] + OddR[count+side] + OddR[count+diagonal]); + } + else + { + EvenL[count+128] = EvenL[count] = iirSpkAL; + resultBL = (EvenL[count+down] + EvenL[count+side] + EvenL[count+diagonal]); + EvenR[count+128] = EvenR[count] = iirSpkAR; + resultBR = (EvenR[count+down] + EvenR[count+side] + EvenR[count+diagonal]); + } + count--; + iirSpkBL = (iirSpkBL * (1.0 - BEQ)) + (resultBL * BEQ); + inputSampleL += (iirSpkBL * bleed); + //extra lowpass for 4*12" speakers + iirSpkBR = (iirSpkBR * (1.0 - BEQ)) + (resultBR * BEQ); + inputSampleR += (iirSpkBR * bleed); + //extra lowpass for 4*12" speakers + + bridgerectifier = fabs(inputSampleL*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleL > 0) inputSampleL = bridgerectifier; + else inputSampleL = -bridgerectifier; + + bridgerectifier = fabs(inputSampleR*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleR > 0) inputSampleR = bridgerectifier; + else inputSampleR = -bridgerectifier; + + iirSubL = (iirSubL * (1.0 - BEQ)) + (inputSampleL * BEQ); + inputSampleL += (iirSubL * bassfill * outputlevel); + + iirSubR = (iirSubR * (1.0 - BEQ)) + (inputSampleR * BEQ); + inputSampleR += (iirSubR * bassfill * outputlevel); + + double randy = ((double(fpdL)/UINT32_MAX)*0.053); + inputSampleL = ((inputSampleL*(1.0-randy))+(storeSampleL*randy))*outputlevel; + storeSampleL = inputSampleL; + + randy = ((double(fpdR)/UINT32_MAX)*0.053); + inputSampleR = ((inputSampleR*(1.0-randy))+(storeSampleR*randy))*outputlevel; + storeSampleR = inputSampleR; + + flip = !flip; + + if (wet !=1.0) { + inputSampleL = (inputSampleL * wet) + (drySampleL * (1.0-wet)); + inputSampleR = (inputSampleR * wet) + (drySampleR * (1.0-wet)); + } + //Dry/Wet control, defaults to the last slider + //amp + + cycle++; + if (cycle == cycleEnd) { + double temp = (inputSampleL + smoothCabAL)/3.0; + smoothCabAL = inputSampleL; + inputSampleL = temp; + + bL[84] = bL[83]; bL[83] = bL[82]; bL[82] = bL[81]; bL[81] = bL[80]; bL[80] = bL[79]; + bL[79] = bL[78]; bL[78] = bL[77]; bL[77] = bL[76]; bL[76] = bL[75]; bL[75] = bL[74]; bL[74] = bL[73]; bL[73] = bL[72]; bL[72] = bL[71]; + bL[71] = bL[70]; bL[70] = bL[69]; bL[69] = bL[68]; bL[68] = bL[67]; bL[67] = bL[66]; bL[66] = bL[65]; bL[65] = bL[64]; bL[64] = bL[63]; + bL[63] = bL[62]; bL[62] = bL[61]; bL[61] = bL[60]; bL[60] = bL[59]; bL[59] = bL[58]; bL[58] = bL[57]; bL[57] = bL[56]; bL[56] = bL[55]; + bL[55] = bL[54]; bL[54] = bL[53]; bL[53] = bL[52]; bL[52] = bL[51]; bL[51] = bL[50]; bL[50] = bL[49]; bL[49] = bL[48]; bL[48] = bL[47]; + bL[47] = bL[46]; bL[46] = bL[45]; bL[45] = bL[44]; bL[44] = bL[43]; bL[43] = bL[42]; bL[42] = bL[41]; bL[41] = bL[40]; bL[40] = bL[39]; + bL[39] = bL[38]; bL[38] = bL[37]; bL[37] = bL[36]; bL[36] = bL[35]; bL[35] = bL[34]; bL[34] = bL[33]; bL[33] = bL[32]; bL[32] = bL[31]; + bL[31] = bL[30]; bL[30] = bL[29]; bL[29] = bL[28]; bL[28] = bL[27]; bL[27] = bL[26]; bL[26] = bL[25]; bL[25] = bL[24]; bL[24] = bL[23]; + bL[23] = bL[22]; bL[22] = bL[21]; bL[21] = bL[20]; bL[20] = bL[19]; bL[19] = bL[18]; bL[18] = bL[17]; bL[17] = bL[16]; bL[16] = bL[15]; + bL[15] = bL[14]; bL[14] = bL[13]; bL[13] = bL[12]; bL[12] = bL[11]; bL[11] = bL[10]; bL[10] = bL[9]; bL[9] = bL[8]; bL[8] = bL[7]; + bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; bL[1] = bL[0]; bL[0] = inputSampleL; + inputSampleL += (bL[1] * (1.31698250313308396 - (0.08140616497621633*fabs(bL[1])))); + inputSampleL += (bL[2] * (1.47229016949915326 - (0.27680278993637253*fabs(bL[2])))); + inputSampleL += (bL[3] * (1.30410109086044956 - (0.35629113432046489*fabs(bL[3])))); + inputSampleL += (bL[4] * (0.81766210474551260 - (0.26808782337659753*fabs(bL[4])))); + inputSampleL += (bL[5] * (0.19868872545506663 - (0.11105517193919669*fabs(bL[5])))); + inputSampleL -= (bL[6] * (0.39115909132567039 - (0.12630622002682679*fabs(bL[6])))); + inputSampleL -= (bL[7] * (0.76881891559343574 - (0.40879849500403143*fabs(bL[7])))); + inputSampleL -= (bL[8] * (0.87146861782680340 - (0.59529560488000599*fabs(bL[8])))); + inputSampleL -= (bL[9] * (0.79504575932563670 - (0.60877047551611796*fabs(bL[9])))); + inputSampleL -= (bL[10] * (0.61653017622406314 - (0.47662851438557335*fabs(bL[10])))); + inputSampleL -= (bL[11] * (0.40718195794382067 - (0.24955839378539713*fabs(bL[11])))); + inputSampleL -= (bL[12] * (0.31794900040616203 - (0.04169792259600613*fabs(bL[12])))); + inputSampleL -= (bL[13] * (0.41075032540217843 + (0.00368483996076280*fabs(bL[13])))); + inputSampleL -= (bL[14] * (0.56901352922170667 - (0.11027360805893105*fabs(bL[14])))); + inputSampleL -= (bL[15] * (0.62443222391889264 - (0.22198075154245228*fabs(bL[15])))); + inputSampleL -= (bL[16] * (0.53462856723129204 - (0.22933544545324852*fabs(bL[16])))); + inputSampleL -= (bL[17] * (0.34441703361995046 - (0.12956809502269492*fabs(bL[17])))); + inputSampleL -= (bL[18] * (0.13947052337867882 + (0.00339775055962799*fabs(bL[18])))); + inputSampleL += (bL[19] * (0.03771252648928484 - (0.10863931549251718*fabs(bL[19])))); + inputSampleL += (bL[20] * (0.18280210770271693 - (0.17413646599296417*fabs(bL[20])))); + inputSampleL += (bL[21] * (0.24621986701761467 - (0.14547053270435095*fabs(bL[21])))); + inputSampleL += (bL[22] * (0.22347075142737360 - (0.02493869490104031*fabs(bL[22])))); + inputSampleL += (bL[23] * (0.14346348482123716 + (0.11284054747963246*fabs(bL[23])))); + inputSampleL += (bL[24] * (0.00834364862916028 + (0.24284684053733926*fabs(bL[24])))); + inputSampleL -= (bL[25] * (0.11559740296078347 - (0.32623054435304538*fabs(bL[25])))); + inputSampleL -= (bL[26] * (0.18067604561283060 - (0.32311481551122478*fabs(bL[26])))); + inputSampleL -= (bL[27] * (0.22927997789035612 - (0.26991539052832925*fabs(bL[27])))); + inputSampleL -= (bL[28] * (0.28487666578669446 - (0.22437227250279349*fabs(bL[28])))); + inputSampleL -= (bL[29] * (0.31992973037153838 - (0.15289876100963865*fabs(bL[29])))); + inputSampleL -= (bL[30] * (0.35174606303520733 - (0.05656293023086628*fabs(bL[30])))); + inputSampleL -= (bL[31] * (0.36894898011375254 + (0.04333925421463558*fabs(bL[31])))); + inputSampleL -= (bL[32] * (0.32567576055307507 + (0.14594589410921388*fabs(bL[32])))); + inputSampleL -= (bL[33] * (0.27440135050585784 + (0.15529667398122521*fabs(bL[33])))); + inputSampleL -= (bL[34] * (0.21998973785078091 + (0.05083553737157104*fabs(bL[34])))); + inputSampleL -= (bL[35] * (0.10323624876862457 - (0.04651829594199963*fabs(bL[35])))); + inputSampleL += (bL[36] * (0.02091603687851074 + (0.12000046818439322*fabs(bL[36])))); + inputSampleL += (bL[37] * (0.11344930914138468 + (0.17697142512225839*fabs(bL[37])))); + inputSampleL += (bL[38] * (0.22766779627643968 + (0.13645102964003858*fabs(bL[38])))); + inputSampleL += (bL[39] * (0.38378309953638229 - (0.01997653307333791*fabs(bL[39])))); + inputSampleL += (bL[40] * (0.52789400804568076 - (0.21409137428422448*fabs(bL[40])))); + inputSampleL += (bL[41] * (0.55444630296938280 - (0.32331980931576626*fabs(bL[41])))); + inputSampleL += (bL[42] * (0.42333237669264601 - (0.26855847463044280*fabs(bL[42])))); + inputSampleL += (bL[43] * (0.21942831522035078 - (0.12051365248820624*fabs(bL[43])))); + inputSampleL -= (bL[44] * (0.00584169427830633 - (0.03706970171280329*fabs(bL[44])))); + inputSampleL -= (bL[45] * (0.24279799124660351 - (0.17296440491477982*fabs(bL[45])))); + inputSampleL -= (bL[46] * (0.40173760787507085 - (0.21717989835163351*fabs(bL[46])))); + inputSampleL -= (bL[47] * (0.43930035724188155 - (0.16425928481378199*fabs(bL[47])))); + inputSampleL -= (bL[48] * (0.41067765934041811 - (0.10390115786636855*fabs(bL[48])))); + inputSampleL -= (bL[49] * (0.34409235547165967 - (0.07268159377411920*fabs(bL[49])))); + inputSampleL -= (bL[50] * (0.26542883122568151 - (0.05483457497365785*fabs(bL[50])))); + inputSampleL -= (bL[51] * (0.22024754776138800 - (0.06484897950087598*fabs(bL[51])))); + inputSampleL -= (bL[52] * (0.20394367993632415 - (0.08746309731952180*fabs(bL[52])))); + inputSampleL -= (bL[53] * (0.17565242431124092 - (0.07611309538078760*fabs(bL[53])))); + inputSampleL -= (bL[54] * (0.10116623231246825 - (0.00642818706295112*fabs(bL[54])))); + inputSampleL -= (bL[55] * (0.00782648272053632 + (0.08004141267685004*fabs(bL[55])))); + inputSampleL += (bL[56] * (0.05059046006747323 - (0.12436676387548490*fabs(bL[56])))); + inputSampleL += (bL[57] * (0.06241531553254467 - (0.11530779547021434*fabs(bL[57])))); + inputSampleL += (bL[58] * (0.04952694587101836 - (0.08340945324333944*fabs(bL[58])))); + inputSampleL += (bL[59] * (0.00843873294401687 - (0.03279659052562903*fabs(bL[59])))); + inputSampleL -= (bL[60] * (0.05161338949440241 - (0.03428181149163798*fabs(bL[60])))); + inputSampleL -= (bL[61] * (0.08165520146902012 - (0.08196746092283110*fabs(bL[61])))); + inputSampleL -= (bL[62] * (0.06639532849935320 - (0.09797462781896329*fabs(bL[62])))); + inputSampleL -= (bL[63] * (0.02953430910661621 - (0.09175612938515763*fabs(bL[63])))); + inputSampleL += (bL[64] * (0.00741058547442938 + (0.05442091048731967*fabs(bL[64])))); + inputSampleL += (bL[65] * (0.01832866125391727 + (0.00306243693643687*fabs(bL[65])))); + inputSampleL += (bL[66] * (0.00526964230373573 - (0.04364102661136410*fabs(bL[66])))); + inputSampleL -= (bL[67] * (0.00300984373848200 + (0.09742737841278880*fabs(bL[67])))); + inputSampleL -= (bL[68] * (0.00413616769576694 + (0.14380661694523073*fabs(bL[68])))); + inputSampleL -= (bL[69] * (0.00588769034931419 + (0.16012843578892538*fabs(bL[69])))); + inputSampleL -= (bL[70] * (0.00688588239450581 + (0.14074464279305798*fabs(bL[70])))); + inputSampleL -= (bL[71] * (0.02277307992926315 + (0.07914752191801366*fabs(bL[71])))); + inputSampleL -= (bL[72] * (0.04627166091180877 - (0.00192787268067208*fabs(bL[72])))); + inputSampleL -= (bL[73] * (0.05562045897455786 - (0.05932868727665747*fabs(bL[73])))); + inputSampleL -= (bL[74] * (0.05134243784922165 - (0.08245334798868090*fabs(bL[74])))); + inputSampleL -= (bL[75] * (0.04719409472239919 - (0.07498680629253825*fabs(bL[75])))); + inputSampleL -= (bL[76] * (0.05889738914266415 - (0.06116127018043697*fabs(bL[76])))); + inputSampleL -= (bL[77] * (0.09428363535111127 - (0.06535868867863834*fabs(bL[77])))); + inputSampleL -= (bL[78] * (0.15181756953225126 - (0.08982979655234427*fabs(bL[78])))); + inputSampleL -= (bL[79] * (0.20878969456036670 - (0.10761070891499538*fabs(bL[79])))); + inputSampleL -= (bL[80] * (0.22647885581813790 - (0.08462542510349125*fabs(bL[80])))); + inputSampleL -= (bL[81] * (0.19723482443646323 - (0.02665160920736287*fabs(bL[81])))); + inputSampleL -= (bL[82] * (0.16441643451155163 + (0.02314691954338197*fabs(bL[82])))); + inputSampleL -= (bL[83] * (0.15201914054931515 + (0.04424903493886839*fabs(bL[83])))); + inputSampleL -= (bL[84] * (0.15454370641307855 + (0.04223203797913008*fabs(bL[84])))); + + temp = (inputSampleL + smoothCabBL)/3.0; + smoothCabBL = inputSampleL; + inputSampleL = temp/4.0; + + randy = ((double(fpdL)/UINT32_MAX)*0.057); + drySampleL = ((((inputSampleL*(1-randy))+(lastCabSampleL*randy))*wet)+(drySampleL*(1.0-wet)))*outputlevel; + lastCabSampleL = inputSampleL; + inputSampleL = drySampleL; //cab L + + temp = (inputSampleR + smoothCabAR)/3.0; + smoothCabAR = inputSampleR; + inputSampleR = temp; + + bR[84] = bR[83]; bR[83] = bR[82]; bR[82] = bR[81]; bR[81] = bR[80]; bR[80] = bR[79]; + bR[79] = bR[78]; bR[78] = bR[77]; bR[77] = bR[76]; bR[76] = bR[75]; bR[75] = bR[74]; bR[74] = bR[73]; bR[73] = bR[72]; bR[72] = bR[71]; + bR[71] = bR[70]; bR[70] = bR[69]; bR[69] = bR[68]; bR[68] = bR[67]; bR[67] = bR[66]; bR[66] = bR[65]; bR[65] = bR[64]; bR[64] = bR[63]; + bR[63] = bR[62]; bR[62] = bR[61]; bR[61] = bR[60]; bR[60] = bR[59]; bR[59] = bR[58]; bR[58] = bR[57]; bR[57] = bR[56]; bR[56] = bR[55]; + bR[55] = bR[54]; bR[54] = bR[53]; bR[53] = bR[52]; bR[52] = bR[51]; bR[51] = bR[50]; bR[50] = bR[49]; bR[49] = bR[48]; bR[48] = bR[47]; + bR[47] = bR[46]; bR[46] = bR[45]; bR[45] = bR[44]; bR[44] = bR[43]; bR[43] = bR[42]; bR[42] = bR[41]; bR[41] = bR[40]; bR[40] = bR[39]; + bR[39] = bR[38]; bR[38] = bR[37]; bR[37] = bR[36]; bR[36] = bR[35]; bR[35] = bR[34]; bR[34] = bR[33]; bR[33] = bR[32]; bR[32] = bR[31]; + bR[31] = bR[30]; bR[30] = bR[29]; bR[29] = bR[28]; bR[28] = bR[27]; bR[27] = bR[26]; bR[26] = bR[25]; bR[25] = bR[24]; bR[24] = bR[23]; + bR[23] = bR[22]; bR[22] = bR[21]; bR[21] = bR[20]; bR[20] = bR[19]; bR[19] = bR[18]; bR[18] = bR[17]; bR[17] = bR[16]; bR[16] = bR[15]; + bR[15] = bR[14]; bR[14] = bR[13]; bR[13] = bR[12]; bR[12] = bR[11]; bR[11] = bR[10]; bR[10] = bR[9]; bR[9] = bR[8]; bR[8] = bR[7]; + bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; bR[1] = bR[0]; bR[0] = inputSampleR; + inputSampleR += (bR[1] * (1.31698250313308396 - (0.08140616497621633*fabs(bR[1])))); + inputSampleR += (bR[2] * (1.47229016949915326 - (0.27680278993637253*fabs(bR[2])))); + inputSampleR += (bR[3] * (1.30410109086044956 - (0.35629113432046489*fabs(bR[3])))); + inputSampleR += (bR[4] * (0.81766210474551260 - (0.26808782337659753*fabs(bR[4])))); + inputSampleR += (bR[5] * (0.19868872545506663 - (0.11105517193919669*fabs(bR[5])))); + inputSampleR -= (bR[6] * (0.39115909132567039 - (0.12630622002682679*fabs(bR[6])))); + inputSampleR -= (bR[7] * (0.76881891559343574 - (0.40879849500403143*fabs(bR[7])))); + inputSampleR -= (bR[8] * (0.87146861782680340 - (0.59529560488000599*fabs(bR[8])))); + inputSampleR -= (bR[9] * (0.79504575932563670 - (0.60877047551611796*fabs(bR[9])))); + inputSampleR -= (bR[10] * (0.61653017622406314 - (0.47662851438557335*fabs(bR[10])))); + inputSampleR -= (bR[11] * (0.40718195794382067 - (0.24955839378539713*fabs(bR[11])))); + inputSampleR -= (bR[12] * (0.31794900040616203 - (0.04169792259600613*fabs(bR[12])))); + inputSampleR -= (bR[13] * (0.41075032540217843 + (0.00368483996076280*fabs(bR[13])))); + inputSampleR -= (bR[14] * (0.56901352922170667 - (0.11027360805893105*fabs(bR[14])))); + inputSampleR -= (bR[15] * (0.62443222391889264 - (0.22198075154245228*fabs(bR[15])))); + inputSampleR -= (bR[16] * (0.53462856723129204 - (0.22933544545324852*fabs(bR[16])))); + inputSampleR -= (bR[17] * (0.34441703361995046 - (0.12956809502269492*fabs(bR[17])))); + inputSampleR -= (bR[18] * (0.13947052337867882 + (0.00339775055962799*fabs(bR[18])))); + inputSampleR += (bR[19] * (0.03771252648928484 - (0.10863931549251718*fabs(bR[19])))); + inputSampleR += (bR[20] * (0.18280210770271693 - (0.17413646599296417*fabs(bR[20])))); + inputSampleR += (bR[21] * (0.24621986701761467 - (0.14547053270435095*fabs(bR[21])))); + inputSampleR += (bR[22] * (0.22347075142737360 - (0.02493869490104031*fabs(bR[22])))); + inputSampleR += (bR[23] * (0.14346348482123716 + (0.11284054747963246*fabs(bR[23])))); + inputSampleR += (bR[24] * (0.00834364862916028 + (0.24284684053733926*fabs(bR[24])))); + inputSampleR -= (bR[25] * (0.11559740296078347 - (0.32623054435304538*fabs(bR[25])))); + inputSampleR -= (bR[26] * (0.18067604561283060 - (0.32311481551122478*fabs(bR[26])))); + inputSampleR -= (bR[27] * (0.22927997789035612 - (0.26991539052832925*fabs(bR[27])))); + inputSampleR -= (bR[28] * (0.28487666578669446 - (0.22437227250279349*fabs(bR[28])))); + inputSampleR -= (bR[29] * (0.31992973037153838 - (0.15289876100963865*fabs(bR[29])))); + inputSampleR -= (bR[30] * (0.35174606303520733 - (0.05656293023086628*fabs(bR[30])))); + inputSampleR -= (bR[31] * (0.36894898011375254 + (0.04333925421463558*fabs(bR[31])))); + inputSampleR -= (bR[32] * (0.32567576055307507 + (0.14594589410921388*fabs(bR[32])))); + inputSampleR -= (bR[33] * (0.27440135050585784 + (0.15529667398122521*fabs(bR[33])))); + inputSampleR -= (bR[34] * (0.21998973785078091 + (0.05083553737157104*fabs(bR[34])))); + inputSampleR -= (bR[35] * (0.10323624876862457 - (0.04651829594199963*fabs(bR[35])))); + inputSampleR += (bR[36] * (0.02091603687851074 + (0.12000046818439322*fabs(bR[36])))); + inputSampleR += (bR[37] * (0.11344930914138468 + (0.17697142512225839*fabs(bR[37])))); + inputSampleR += (bR[38] * (0.22766779627643968 + (0.13645102964003858*fabs(bR[38])))); + inputSampleR += (bR[39] * (0.38378309953638229 - (0.01997653307333791*fabs(bR[39])))); + inputSampleR += (bR[40] * (0.52789400804568076 - (0.21409137428422448*fabs(bR[40])))); + inputSampleR += (bR[41] * (0.55444630296938280 - (0.32331980931576626*fabs(bR[41])))); + inputSampleR += (bR[42] * (0.42333237669264601 - (0.26855847463044280*fabs(bR[42])))); + inputSampleR += (bR[43] * (0.21942831522035078 - (0.12051365248820624*fabs(bR[43])))); + inputSampleR -= (bR[44] * (0.00584169427830633 - (0.03706970171280329*fabs(bR[44])))); + inputSampleR -= (bR[45] * (0.24279799124660351 - (0.17296440491477982*fabs(bR[45])))); + inputSampleR -= (bR[46] * (0.40173760787507085 - (0.21717989835163351*fabs(bR[46])))); + inputSampleR -= (bR[47] * (0.43930035724188155 - (0.16425928481378199*fabs(bR[47])))); + inputSampleR -= (bR[48] * (0.41067765934041811 - (0.10390115786636855*fabs(bR[48])))); + inputSampleR -= (bR[49] * (0.34409235547165967 - (0.07268159377411920*fabs(bR[49])))); + inputSampleR -= (bR[50] * (0.26542883122568151 - (0.05483457497365785*fabs(bR[50])))); + inputSampleR -= (bR[51] * (0.22024754776138800 - (0.06484897950087598*fabs(bR[51])))); + inputSampleR -= (bR[52] * (0.20394367993632415 - (0.08746309731952180*fabs(bR[52])))); + inputSampleR -= (bR[53] * (0.17565242431124092 - (0.07611309538078760*fabs(bR[53])))); + inputSampleR -= (bR[54] * (0.10116623231246825 - (0.00642818706295112*fabs(bR[54])))); + inputSampleR -= (bR[55] * (0.00782648272053632 + (0.08004141267685004*fabs(bR[55])))); + inputSampleR += (bR[56] * (0.05059046006747323 - (0.12436676387548490*fabs(bR[56])))); + inputSampleR += (bR[57] * (0.06241531553254467 - (0.11530779547021434*fabs(bR[57])))); + inputSampleR += (bR[58] * (0.04952694587101836 - (0.08340945324333944*fabs(bR[58])))); + inputSampleR += (bR[59] * (0.00843873294401687 - (0.03279659052562903*fabs(bR[59])))); + inputSampleR -= (bR[60] * (0.05161338949440241 - (0.03428181149163798*fabs(bR[60])))); + inputSampleR -= (bR[61] * (0.08165520146902012 - (0.08196746092283110*fabs(bR[61])))); + inputSampleR -= (bR[62] * (0.06639532849935320 - (0.09797462781896329*fabs(bR[62])))); + inputSampleR -= (bR[63] * (0.02953430910661621 - (0.09175612938515763*fabs(bR[63])))); + inputSampleR += (bR[64] * (0.00741058547442938 + (0.05442091048731967*fabs(bR[64])))); + inputSampleR += (bR[65] * (0.01832866125391727 + (0.00306243693643687*fabs(bR[65])))); + inputSampleR += (bR[66] * (0.00526964230373573 - (0.04364102661136410*fabs(bR[66])))); + inputSampleR -= (bR[67] * (0.00300984373848200 + (0.09742737841278880*fabs(bR[67])))); + inputSampleR -= (bR[68] * (0.00413616769576694 + (0.14380661694523073*fabs(bR[68])))); + inputSampleR -= (bR[69] * (0.00588769034931419 + (0.16012843578892538*fabs(bR[69])))); + inputSampleR -= (bR[70] * (0.00688588239450581 + (0.14074464279305798*fabs(bR[70])))); + inputSampleR -= (bR[71] * (0.02277307992926315 + (0.07914752191801366*fabs(bR[71])))); + inputSampleR -= (bR[72] * (0.04627166091180877 - (0.00192787268067208*fabs(bR[72])))); + inputSampleR -= (bR[73] * (0.05562045897455786 - (0.05932868727665747*fabs(bR[73])))); + inputSampleR -= (bR[74] * (0.05134243784922165 - (0.08245334798868090*fabs(bR[74])))); + inputSampleR -= (bR[75] * (0.04719409472239919 - (0.07498680629253825*fabs(bR[75])))); + inputSampleR -= (bR[76] * (0.05889738914266415 - (0.06116127018043697*fabs(bR[76])))); + inputSampleR -= (bR[77] * (0.09428363535111127 - (0.06535868867863834*fabs(bR[77])))); + inputSampleR -= (bR[78] * (0.15181756953225126 - (0.08982979655234427*fabs(bR[78])))); + inputSampleR -= (bR[79] * (0.20878969456036670 - (0.10761070891499538*fabs(bR[79])))); + inputSampleR -= (bR[80] * (0.22647885581813790 - (0.08462542510349125*fabs(bR[80])))); + inputSampleR -= (bR[81] * (0.19723482443646323 - (0.02665160920736287*fabs(bR[81])))); + inputSampleR -= (bR[82] * (0.16441643451155163 + (0.02314691954338197*fabs(bR[82])))); + inputSampleR -= (bR[83] * (0.15201914054931515 + (0.04424903493886839*fabs(bR[83])))); + inputSampleR -= (bR[84] * (0.15454370641307855 + (0.04223203797913008*fabs(bR[84])))); + + temp = (inputSampleR + smoothCabBR)/3.0; + smoothCabBR = inputSampleR; + inputSampleR = temp/4.0; + + randy = ((double(fpdR)/UINT32_MAX)*0.057); + drySampleR = ((((inputSampleR*(1.0-randy))+(lastCabSampleR*randy))*wet)+(drySampleR*(1.0-wet)))*outputlevel; + lastCabSampleR = inputSampleR; + inputSampleR = drySampleR; //cab + + if (cycleEnd == 4) { + lastRefL[0] = lastRefL[4]; //start from previous last + lastRefL[2] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[1] = (lastRefL[0] + lastRefL[2])/2; //one quarter + lastRefL[3] = (lastRefL[2] + inputSampleL)/2; //three quarters + lastRefL[4] = inputSampleL; //full + lastRefR[0] = lastRefR[4]; //start from previous last + lastRefR[2] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[1] = (lastRefR[0] + lastRefR[2])/2; //one quarter + lastRefR[3] = (lastRefR[2] + inputSampleR)/2; //three quarters + lastRefR[4] = inputSampleR; //full + } + if (cycleEnd == 3) { + lastRefL[0] = lastRefL[3]; //start from previous last + lastRefL[2] = (lastRefL[0]+lastRefL[0]+inputSampleL)/3; //third + lastRefL[1] = (lastRefL[0]+inputSampleL+inputSampleL)/3; //two thirds + lastRefL[3] = inputSampleL; //full + lastRefR[0] = lastRefR[3]; //start from previous last + lastRefR[2] = (lastRefR[0]+lastRefR[0]+inputSampleR)/3; //third + lastRefR[1] = (lastRefR[0]+inputSampleR+inputSampleR)/3; //two thirds + lastRefR[3] = inputSampleR; //full + } + if (cycleEnd == 2) { + lastRefL[0] = lastRefL[2]; //start from previous last + lastRefL[1] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[2] = inputSampleL; //full + lastRefR[0] = lastRefR[2]; //start from previous last + lastRefR[1] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[2] = inputSampleR; //full + } + if (cycleEnd == 1) { + lastRefL[0] = inputSampleL; + lastRefR[0] = inputSampleR; + } + cycle = 0; //reset + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + } else { + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + //we are going through our references now + } + switch (cycleEnd) //multi-pole average using lastRef[] variables + { + case 4: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[7])*0.5; + lastRefL[7] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[7])*0.5; + lastRefR[7] = lastRefR[8]; //continue, do not break + case 3: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[6])*0.5; + lastRefL[6] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[6])*0.5; + lastRefR[6] = lastRefR[8]; //continue, do not break + case 2: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[5])*0.5; + lastRefL[5] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[5])*0.5; + lastRefR[5] = lastRefR[8]; //continue, do not break + case 1: + break; //no further averaging + } + + //begin 32 bit stereo floating point dither + /* + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + */ + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void FireAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double bassfill = A; + double outputlevel = C; + double wet = D; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + int cycleEnd = floor(overallscale); + if (cycleEnd < 1) cycleEnd = 1; + if (cycleEnd > 4) cycleEnd = 4; + //this is going to be 2 for 88.1 or 96k, 3 for silly people, 4 for 176 or 192k + if (cycle > cycleEnd-1) cycle = cycleEnd-1; //sanity check + + double startlevel = bassfill; + double samplerate = getSampleRate(); + double basstrim = bassfill / 16.0; + double toneEQ = (B / samplerate)*22050.0; + double EQ = (basstrim / samplerate)*22050.0; + double bleed = outputlevel/16.0; + double bassfactor = 1.0-(basstrim*basstrim); + double BEQ = (bleed / samplerate)*22050.0; + int diagonal = (int)(0.000861678*samplerate); + if (diagonal > 127) diagonal = 127; + int side = (int)(diagonal/1.4142135623730951); + int down = (side + diagonal)/2; + //now we've got down, side and diagonal as offsets and we also use three successive samples upfront + + double cutoff = (15000.0+(B*10000.0)) / getSampleRate(); + if (cutoff > 0.49) cutoff = 0.49; //don't crash if run at 44.1k + if (cutoff < 0.001) cutoff = 0.001; //or if cutoff's too low + + fixF[fix_freq] = fixE[fix_freq] = fixD[fix_freq] = fixC[fix_freq] = fixB[fix_freq] = fixA[fix_freq] = cutoff; + + fixA[fix_reso] = 4.46570214; + fixB[fix_reso] = 1.51387132; + fixC[fix_reso] = 0.93979296; + fixD[fix_reso] = 0.70710678; + fixE[fix_reso] = 0.52972649; + fixF[fix_reso] = 0.50316379; + + double K = tan(juce::MathConstants::pi * fixA[fix_freq]); //lowpass + double norm = 1.0 / (1.0 + K / fixA[fix_reso] + K * K); + fixA[fix_a0] = K * K * norm; + fixA[fix_a1] = 2.0 * fixA[fix_a0]; + fixA[fix_a2] = fixA[fix_a0]; + fixA[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixA[fix_b2] = (1.0 - K / fixA[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixB[fix_freq]); + norm = 1.0 / (1.0 + K / fixB[fix_reso] + K * K); + fixB[fix_a0] = K * K * norm; + fixB[fix_a1] = 2.0 * fixB[fix_a0]; + fixB[fix_a2] = fixB[fix_a0]; + fixB[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixB[fix_b2] = (1.0 - K / fixB[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixC[fix_freq]); + norm = 1.0 / (1.0 + K / fixC[fix_reso] + K * K); + fixC[fix_a0] = K * K * norm; + fixC[fix_a1] = 2.0 * fixC[fix_a0]; + fixC[fix_a2] = fixC[fix_a0]; + fixC[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixC[fix_b2] = (1.0 - K / fixC[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixD[fix_freq]); + norm = 1.0 / (1.0 + K / fixD[fix_reso] + K * K); + fixD[fix_a0] = K * K * norm; + fixD[fix_a1] = 2.0 * fixD[fix_a0]; + fixD[fix_a2] = fixD[fix_a0]; + fixD[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixD[fix_b2] = (1.0 - K / fixD[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixE[fix_freq]); + norm = 1.0 / (1.0 + K / fixE[fix_reso] + K * K); + fixE[fix_a0] = K * K * norm; + fixE[fix_a1] = 2.0 * fixE[fix_a0]; + fixE[fix_a2] = fixE[fix_a0]; + fixE[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixE[fix_b2] = (1.0 - K / fixE[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixF[fix_freq]); + norm = 1.0 / (1.0 + K / fixF[fix_reso] + K * K); + fixF[fix_a0] = K * K * norm; + fixF[fix_a1] = 2.0 * fixF[fix_a0]; + fixF[fix_a2] = fixF[fix_a0]; + fixF[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixF[fix_b2] = (1.0 - K / fixF[fix_reso] + K * K) * norm; + + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + //if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + //if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + + double outSample = (inputSampleL * fixA[fix_a0]) + fixA[fix_sL1]; + fixA[fix_sL1] = (inputSampleL * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sL2]; + fixA[fix_sL2] = (inputSampleL * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixA[fix_a0]) + fixA[fix_sR1]; + fixA[fix_sR1] = (inputSampleR * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sR2]; + fixA[fix_sR2] = (inputSampleR * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + if (inputSampleL > 1.0) inputSampleL = 1.0; + if (inputSampleL < -1.0) inputSampleL = -1.0; + double basscutL = 0.98; + //we're going to be shifting this as the stages progress + double inputlevelL = startlevel; + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleAL = (iirSampleAL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleAL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + double bridgerectifier = (smoothAL + inputSampleL); + smoothAL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleBL = (iirSampleBL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleBL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothBL + inputSampleL); + smoothBL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + if (inputSampleR > 1.0) inputSampleR = 1.0; + if (inputSampleR < -1.0) inputSampleR = -1.0; + double basscutR = 0.98; + //we're going to be shifting this as the stages progress + double inputlevelR = startlevel; + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleAR = (iirSampleAR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleAR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654) ); + //overdrive + bridgerectifier = (smoothAR + inputSampleR); + smoothAR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleBR = (iirSampleBR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleBR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654) ); + //overdrive + bridgerectifier = (smoothBR + inputSampleR); + smoothBR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + + outSample = (inputSampleL * fixB[fix_a0]) + fixB[fix_sL1]; + fixB[fix_sL1] = (inputSampleL * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sL2]; + fixB[fix_sL2] = (inputSampleL * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixB[fix_a0]) + fixB[fix_sR1]; + fixB[fix_sR1] = (inputSampleR * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sR2]; + fixB[fix_sR2] = (inputSampleR * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleCL = (iirSampleCL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleCL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothCL + inputSampleL); + smoothCL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleDL = (iirSampleDL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleDL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654) ); + //overdrive + bridgerectifier = (smoothDL + inputSampleL); + smoothDL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleCR = (iirSampleCR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleCR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothCR + inputSampleR); + smoothCR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleDR = (iirSampleDR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleDR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654) ); + //overdrive + bridgerectifier = (smoothDR + inputSampleR); + smoothDR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixC[fix_a0]) + fixC[fix_sL1]; + fixC[fix_sL1] = (inputSampleL * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sL2]; + fixC[fix_sL2] = (inputSampleL * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixC[fix_a0]) + fixC[fix_sR1]; + fixC[fix_sR1] = (inputSampleR * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sR2]; + fixC[fix_sR2] = (inputSampleR * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleEL = (iirSampleEL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleEL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothEL + inputSampleL); + smoothEL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleFL = (iirSampleFL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleFL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothFL + inputSampleL); + smoothFL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleER = (iirSampleER * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleER*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothER + inputSampleR); + smoothER = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleFR = (iirSampleFR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleFR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothFR + inputSampleR); + smoothFR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixD[fix_a0]) + fixD[fix_sL1]; + fixD[fix_sL1] = (inputSampleL * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sL2]; + fixD[fix_sL2] = (inputSampleL * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixD[fix_a0]) + fixD[fix_sR1]; + fixD[fix_sR1] = (inputSampleR * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sR2]; + fixD[fix_sR2] = (inputSampleR * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleGL = (iirSampleGL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleGL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothGL + inputSampleL); + smoothGL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleHL = (iirSampleHL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleHL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothHL + inputSampleL); + smoothHL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleGR = (iirSampleGR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleGR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothGR + inputSampleR); + smoothGR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleHR = (iirSampleHR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleHR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothHR + inputSampleR); + smoothHR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixE[fix_a0]) + fixE[fix_sL1]; + fixE[fix_sL1] = (inputSampleL * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sL2]; + fixE[fix_sL2] = (inputSampleL * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixE[fix_a0]) + fixE[fix_sR1]; + fixE[fix_sR1] = (inputSampleR * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sR2]; + fixE[fix_sR2] = (inputSampleR * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleIL = (iirSampleIL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleIL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothIL + inputSampleL); + smoothIL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleJL = (iirSampleJL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleJL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothJL + inputSampleL); + smoothJL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleIR = (iirSampleIR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleIR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothIR + inputSampleR); + smoothIR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleJR = (iirSampleJR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleJR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothJR + inputSampleR); + smoothJR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + outSample = (inputSampleL * fixF[fix_a0]) + fixF[fix_sL1]; + fixF[fix_sL1] = (inputSampleL * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sL2]; + fixF[fix_sL2] = (inputSampleL * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixF[fix_a0]) + fixF[fix_sR1]; + fixF[fix_sR1] = (inputSampleR * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sR2]; + fixF[fix_sR2] = (inputSampleR * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleKL = (iirSampleKL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleKL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothKL + inputSampleL); + smoothKL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + inputSampleL *= inputlevelL; + inputlevelL = ((inputlevelL * 7.0)+1.0)/8.0; + iirSampleLL = (iirSampleLL * (1.0 - EQ)) + (inputSampleL * EQ); + basscutL *= bassfactor; + inputSampleL = inputSampleL - (iirSampleLL*basscutL); + //highpass + inputSampleL -= (inputSampleL * (fabs(inputSampleL) * 0.654) * (fabs(inputSampleL) * 0.654)); + //overdrive + bridgerectifier = (smoothLL + inputSampleL); + smoothLL = inputSampleL; + inputSampleL = bridgerectifier; + //two-sample averaging lowpass + + + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleKR = (iirSampleKR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleKR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothKR + inputSampleR); + smoothKR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + inputSampleR *= inputlevelR; + inputlevelR = ((inputlevelR * 7.0)+1.0)/8.0; + iirSampleLR = (iirSampleLR * (1.0 - EQ)) + (inputSampleR * EQ); + basscutR *= bassfactor; + inputSampleR = inputSampleR - (iirSampleLR*basscutR); + //highpass + inputSampleR -= (inputSampleR * (fabs(inputSampleR) * 0.654) * (fabs(inputSampleR) * 0.654)); + //overdrive + bridgerectifier = (smoothLR + inputSampleR); + smoothLR = inputSampleR; + inputSampleR = bridgerectifier; + //two-sample averaging lowpass + + iirLowpassL = (iirLowpassL * (1.0 - toneEQ)) + (inputSampleL * toneEQ); + inputSampleL = iirLowpassL; + //lowpass. The only one of this type. + iirLowpassR = (iirLowpassR * (1.0 - toneEQ)) + (inputSampleR * toneEQ); + inputSampleR = iirLowpassR; + //lowpass. The only one of this type. + + iirSpkAL = (iirSpkAL * (1.0 - BEQ)) + (inputSampleL * BEQ); + //extra lowpass for 4*12" speakers + iirSpkAR = (iirSpkAR * (1.0 - BEQ)) + (inputSampleR * BEQ); + //extra lowpass for 4*12" speakers + + if (count < 0 || count > 128) {count = 128;} + double resultBL = 0.0; + double resultBR = 0.0; + if (flip) + { + OddL[count+128] = OddL[count] = iirSpkAL; + resultBL = (OddL[count+down] + OddL[count+side] + OddL[count+diagonal]); + OddR[count+128] = OddR[count] = iirSpkAR; + resultBR = (OddR[count+down] + OddR[count+side] + OddR[count+diagonal]); + } + else + { + EvenL[count+128] = EvenL[count] = iirSpkAL; + resultBL = (EvenL[count+down] + EvenL[count+side] + EvenL[count+diagonal]); + EvenR[count+128] = EvenR[count] = iirSpkAR; + resultBR = (EvenR[count+down] + EvenR[count+side] + EvenR[count+diagonal]); + } + count--; + iirSpkBL = (iirSpkBL * (1.0 - BEQ)) + (resultBL * BEQ); + inputSampleL += (iirSpkBL * bleed); + //extra lowpass for 4*12" speakers + iirSpkBR = (iirSpkBR * (1.0 - BEQ)) + (resultBR * BEQ); + inputSampleR += (iirSpkBR * bleed); + //extra lowpass for 4*12" speakers + + bridgerectifier = fabs(inputSampleL*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleL > 0) inputSampleL = bridgerectifier; + else inputSampleL = -bridgerectifier; + + bridgerectifier = fabs(inputSampleR*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleR > 0) inputSampleR = bridgerectifier; + else inputSampleR = -bridgerectifier; + + iirSubL = (iirSubL * (1.0 - BEQ)) + (inputSampleL * BEQ); + inputSampleL += (iirSubL * bassfill * outputlevel); + + iirSubR = (iirSubR * (1.0 - BEQ)) + (inputSampleR * BEQ); + inputSampleR += (iirSubR * bassfill * outputlevel); + + double randy = ((double(fpdL)/UINT32_MAX)*0.053); + inputSampleL = ((inputSampleL*(1.0-randy))+(storeSampleL*randy))*outputlevel; + storeSampleL = inputSampleL; + + randy = ((double(fpdR)/UINT32_MAX)*0.053); + inputSampleR = ((inputSampleR*(1.0-randy))+(storeSampleR*randy))*outputlevel; + storeSampleR = inputSampleR; + + flip = !flip; + + if (wet !=1.0) { + inputSampleL = (inputSampleL * wet) + (drySampleL * (1.0-wet)); + inputSampleR = (inputSampleR * wet) + (drySampleR * (1.0-wet)); + } + //Dry/Wet control, defaults to the last slider + //amp + + cycle++; + if (cycle == cycleEnd) { + double temp = (inputSampleL + smoothCabAL)/3.0; + smoothCabAL = inputSampleL; + inputSampleL = temp; + + bL[84] = bL[83]; bL[83] = bL[82]; bL[82] = bL[81]; bL[81] = bL[80]; bL[80] = bL[79]; + bL[79] = bL[78]; bL[78] = bL[77]; bL[77] = bL[76]; bL[76] = bL[75]; bL[75] = bL[74]; bL[74] = bL[73]; bL[73] = bL[72]; bL[72] = bL[71]; + bL[71] = bL[70]; bL[70] = bL[69]; bL[69] = bL[68]; bL[68] = bL[67]; bL[67] = bL[66]; bL[66] = bL[65]; bL[65] = bL[64]; bL[64] = bL[63]; + bL[63] = bL[62]; bL[62] = bL[61]; bL[61] = bL[60]; bL[60] = bL[59]; bL[59] = bL[58]; bL[58] = bL[57]; bL[57] = bL[56]; bL[56] = bL[55]; + bL[55] = bL[54]; bL[54] = bL[53]; bL[53] = bL[52]; bL[52] = bL[51]; bL[51] = bL[50]; bL[50] = bL[49]; bL[49] = bL[48]; bL[48] = bL[47]; + bL[47] = bL[46]; bL[46] = bL[45]; bL[45] = bL[44]; bL[44] = bL[43]; bL[43] = bL[42]; bL[42] = bL[41]; bL[41] = bL[40]; bL[40] = bL[39]; + bL[39] = bL[38]; bL[38] = bL[37]; bL[37] = bL[36]; bL[36] = bL[35]; bL[35] = bL[34]; bL[34] = bL[33]; bL[33] = bL[32]; bL[32] = bL[31]; + bL[31] = bL[30]; bL[30] = bL[29]; bL[29] = bL[28]; bL[28] = bL[27]; bL[27] = bL[26]; bL[26] = bL[25]; bL[25] = bL[24]; bL[24] = bL[23]; + bL[23] = bL[22]; bL[22] = bL[21]; bL[21] = bL[20]; bL[20] = bL[19]; bL[19] = bL[18]; bL[18] = bL[17]; bL[17] = bL[16]; bL[16] = bL[15]; + bL[15] = bL[14]; bL[14] = bL[13]; bL[13] = bL[12]; bL[12] = bL[11]; bL[11] = bL[10]; bL[10] = bL[9]; bL[9] = bL[8]; bL[8] = bL[7]; + bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; bL[1] = bL[0]; bL[0] = inputSampleL; + inputSampleL += (bL[1] * (1.31698250313308396 - (0.08140616497621633*fabs(bL[1])))); + inputSampleL += (bL[2] * (1.47229016949915326 - (0.27680278993637253*fabs(bL[2])))); + inputSampleL += (bL[3] * (1.30410109086044956 - (0.35629113432046489*fabs(bL[3])))); + inputSampleL += (bL[4] * (0.81766210474551260 - (0.26808782337659753*fabs(bL[4])))); + inputSampleL += (bL[5] * (0.19868872545506663 - (0.11105517193919669*fabs(bL[5])))); + inputSampleL -= (bL[6] * (0.39115909132567039 - (0.12630622002682679*fabs(bL[6])))); + inputSampleL -= (bL[7] * (0.76881891559343574 - (0.40879849500403143*fabs(bL[7])))); + inputSampleL -= (bL[8] * (0.87146861782680340 - (0.59529560488000599*fabs(bL[8])))); + inputSampleL -= (bL[9] * (0.79504575932563670 - (0.60877047551611796*fabs(bL[9])))); + inputSampleL -= (bL[10] * (0.61653017622406314 - (0.47662851438557335*fabs(bL[10])))); + inputSampleL -= (bL[11] * (0.40718195794382067 - (0.24955839378539713*fabs(bL[11])))); + inputSampleL -= (bL[12] * (0.31794900040616203 - (0.04169792259600613*fabs(bL[12])))); + inputSampleL -= (bL[13] * (0.41075032540217843 + (0.00368483996076280*fabs(bL[13])))); + inputSampleL -= (bL[14] * (0.56901352922170667 - (0.11027360805893105*fabs(bL[14])))); + inputSampleL -= (bL[15] * (0.62443222391889264 - (0.22198075154245228*fabs(bL[15])))); + inputSampleL -= (bL[16] * (0.53462856723129204 - (0.22933544545324852*fabs(bL[16])))); + inputSampleL -= (bL[17] * (0.34441703361995046 - (0.12956809502269492*fabs(bL[17])))); + inputSampleL -= (bL[18] * (0.13947052337867882 + (0.00339775055962799*fabs(bL[18])))); + inputSampleL += (bL[19] * (0.03771252648928484 - (0.10863931549251718*fabs(bL[19])))); + inputSampleL += (bL[20] * (0.18280210770271693 - (0.17413646599296417*fabs(bL[20])))); + inputSampleL += (bL[21] * (0.24621986701761467 - (0.14547053270435095*fabs(bL[21])))); + inputSampleL += (bL[22] * (0.22347075142737360 - (0.02493869490104031*fabs(bL[22])))); + inputSampleL += (bL[23] * (0.14346348482123716 + (0.11284054747963246*fabs(bL[23])))); + inputSampleL += (bL[24] * (0.00834364862916028 + (0.24284684053733926*fabs(bL[24])))); + inputSampleL -= (bL[25] * (0.11559740296078347 - (0.32623054435304538*fabs(bL[25])))); + inputSampleL -= (bL[26] * (0.18067604561283060 - (0.32311481551122478*fabs(bL[26])))); + inputSampleL -= (bL[27] * (0.22927997789035612 - (0.26991539052832925*fabs(bL[27])))); + inputSampleL -= (bL[28] * (0.28487666578669446 - (0.22437227250279349*fabs(bL[28])))); + inputSampleL -= (bL[29] * (0.31992973037153838 - (0.15289876100963865*fabs(bL[29])))); + inputSampleL -= (bL[30] * (0.35174606303520733 - (0.05656293023086628*fabs(bL[30])))); + inputSampleL -= (bL[31] * (0.36894898011375254 + (0.04333925421463558*fabs(bL[31])))); + inputSampleL -= (bL[32] * (0.32567576055307507 + (0.14594589410921388*fabs(bL[32])))); + inputSampleL -= (bL[33] * (0.27440135050585784 + (0.15529667398122521*fabs(bL[33])))); + inputSampleL -= (bL[34] * (0.21998973785078091 + (0.05083553737157104*fabs(bL[34])))); + inputSampleL -= (bL[35] * (0.10323624876862457 - (0.04651829594199963*fabs(bL[35])))); + inputSampleL += (bL[36] * (0.02091603687851074 + (0.12000046818439322*fabs(bL[36])))); + inputSampleL += (bL[37] * (0.11344930914138468 + (0.17697142512225839*fabs(bL[37])))); + inputSampleL += (bL[38] * (0.22766779627643968 + (0.13645102964003858*fabs(bL[38])))); + inputSampleL += (bL[39] * (0.38378309953638229 - (0.01997653307333791*fabs(bL[39])))); + inputSampleL += (bL[40] * (0.52789400804568076 - (0.21409137428422448*fabs(bL[40])))); + inputSampleL += (bL[41] * (0.55444630296938280 - (0.32331980931576626*fabs(bL[41])))); + inputSampleL += (bL[42] * (0.42333237669264601 - (0.26855847463044280*fabs(bL[42])))); + inputSampleL += (bL[43] * (0.21942831522035078 - (0.12051365248820624*fabs(bL[43])))); + inputSampleL -= (bL[44] * (0.00584169427830633 - (0.03706970171280329*fabs(bL[44])))); + inputSampleL -= (bL[45] * (0.24279799124660351 - (0.17296440491477982*fabs(bL[45])))); + inputSampleL -= (bL[46] * (0.40173760787507085 - (0.21717989835163351*fabs(bL[46])))); + inputSampleL -= (bL[47] * (0.43930035724188155 - (0.16425928481378199*fabs(bL[47])))); + inputSampleL -= (bL[48] * (0.41067765934041811 - (0.10390115786636855*fabs(bL[48])))); + inputSampleL -= (bL[49] * (0.34409235547165967 - (0.07268159377411920*fabs(bL[49])))); + inputSampleL -= (bL[50] * (0.26542883122568151 - (0.05483457497365785*fabs(bL[50])))); + inputSampleL -= (bL[51] * (0.22024754776138800 - (0.06484897950087598*fabs(bL[51])))); + inputSampleL -= (bL[52] * (0.20394367993632415 - (0.08746309731952180*fabs(bL[52])))); + inputSampleL -= (bL[53] * (0.17565242431124092 - (0.07611309538078760*fabs(bL[53])))); + inputSampleL -= (bL[54] * (0.10116623231246825 - (0.00642818706295112*fabs(bL[54])))); + inputSampleL -= (bL[55] * (0.00782648272053632 + (0.08004141267685004*fabs(bL[55])))); + inputSampleL += (bL[56] * (0.05059046006747323 - (0.12436676387548490*fabs(bL[56])))); + inputSampleL += (bL[57] * (0.06241531553254467 - (0.11530779547021434*fabs(bL[57])))); + inputSampleL += (bL[58] * (0.04952694587101836 - (0.08340945324333944*fabs(bL[58])))); + inputSampleL += (bL[59] * (0.00843873294401687 - (0.03279659052562903*fabs(bL[59])))); + inputSampleL -= (bL[60] * (0.05161338949440241 - (0.03428181149163798*fabs(bL[60])))); + inputSampleL -= (bL[61] * (0.08165520146902012 - (0.08196746092283110*fabs(bL[61])))); + inputSampleL -= (bL[62] * (0.06639532849935320 - (0.09797462781896329*fabs(bL[62])))); + inputSampleL -= (bL[63] * (0.02953430910661621 - (0.09175612938515763*fabs(bL[63])))); + inputSampleL += (bL[64] * (0.00741058547442938 + (0.05442091048731967*fabs(bL[64])))); + inputSampleL += (bL[65] * (0.01832866125391727 + (0.00306243693643687*fabs(bL[65])))); + inputSampleL += (bL[66] * (0.00526964230373573 - (0.04364102661136410*fabs(bL[66])))); + inputSampleL -= (bL[67] * (0.00300984373848200 + (0.09742737841278880*fabs(bL[67])))); + inputSampleL -= (bL[68] * (0.00413616769576694 + (0.14380661694523073*fabs(bL[68])))); + inputSampleL -= (bL[69] * (0.00588769034931419 + (0.16012843578892538*fabs(bL[69])))); + inputSampleL -= (bL[70] * (0.00688588239450581 + (0.14074464279305798*fabs(bL[70])))); + inputSampleL -= (bL[71] * (0.02277307992926315 + (0.07914752191801366*fabs(bL[71])))); + inputSampleL -= (bL[72] * (0.04627166091180877 - (0.00192787268067208*fabs(bL[72])))); + inputSampleL -= (bL[73] * (0.05562045897455786 - (0.05932868727665747*fabs(bL[73])))); + inputSampleL -= (bL[74] * (0.05134243784922165 - (0.08245334798868090*fabs(bL[74])))); + inputSampleL -= (bL[75] * (0.04719409472239919 - (0.07498680629253825*fabs(bL[75])))); + inputSampleL -= (bL[76] * (0.05889738914266415 - (0.06116127018043697*fabs(bL[76])))); + inputSampleL -= (bL[77] * (0.09428363535111127 - (0.06535868867863834*fabs(bL[77])))); + inputSampleL -= (bL[78] * (0.15181756953225126 - (0.08982979655234427*fabs(bL[78])))); + inputSampleL -= (bL[79] * (0.20878969456036670 - (0.10761070891499538*fabs(bL[79])))); + inputSampleL -= (bL[80] * (0.22647885581813790 - (0.08462542510349125*fabs(bL[80])))); + inputSampleL -= (bL[81] * (0.19723482443646323 - (0.02665160920736287*fabs(bL[81])))); + inputSampleL -= (bL[82] * (0.16441643451155163 + (0.02314691954338197*fabs(bL[82])))); + inputSampleL -= (bL[83] * (0.15201914054931515 + (0.04424903493886839*fabs(bL[83])))); + inputSampleL -= (bL[84] * (0.15454370641307855 + (0.04223203797913008*fabs(bL[84])))); + + temp = (inputSampleL + smoothCabBL)/3.0; + smoothCabBL = inputSampleL; + inputSampleL = temp/4.0; + + randy = ((double(fpdL)/UINT32_MAX)*0.057); + drySampleL = ((((inputSampleL*(1-randy))+(lastCabSampleL*randy))*wet)+(drySampleL*(1.0-wet)))*outputlevel; + lastCabSampleL = inputSampleL; + inputSampleL = drySampleL; //cab L + + temp = (inputSampleR + smoothCabAR)/3.0; + smoothCabAR = inputSampleR; + inputSampleR = temp; + + bR[84] = bR[83]; bR[83] = bR[82]; bR[82] = bR[81]; bR[81] = bR[80]; bR[80] = bR[79]; + bR[79] = bR[78]; bR[78] = bR[77]; bR[77] = bR[76]; bR[76] = bR[75]; bR[75] = bR[74]; bR[74] = bR[73]; bR[73] = bR[72]; bR[72] = bR[71]; + bR[71] = bR[70]; bR[70] = bR[69]; bR[69] = bR[68]; bR[68] = bR[67]; bR[67] = bR[66]; bR[66] = bR[65]; bR[65] = bR[64]; bR[64] = bR[63]; + bR[63] = bR[62]; bR[62] = bR[61]; bR[61] = bR[60]; bR[60] = bR[59]; bR[59] = bR[58]; bR[58] = bR[57]; bR[57] = bR[56]; bR[56] = bR[55]; + bR[55] = bR[54]; bR[54] = bR[53]; bR[53] = bR[52]; bR[52] = bR[51]; bR[51] = bR[50]; bR[50] = bR[49]; bR[49] = bR[48]; bR[48] = bR[47]; + bR[47] = bR[46]; bR[46] = bR[45]; bR[45] = bR[44]; bR[44] = bR[43]; bR[43] = bR[42]; bR[42] = bR[41]; bR[41] = bR[40]; bR[40] = bR[39]; + bR[39] = bR[38]; bR[38] = bR[37]; bR[37] = bR[36]; bR[36] = bR[35]; bR[35] = bR[34]; bR[34] = bR[33]; bR[33] = bR[32]; bR[32] = bR[31]; + bR[31] = bR[30]; bR[30] = bR[29]; bR[29] = bR[28]; bR[28] = bR[27]; bR[27] = bR[26]; bR[26] = bR[25]; bR[25] = bR[24]; bR[24] = bR[23]; + bR[23] = bR[22]; bR[22] = bR[21]; bR[21] = bR[20]; bR[20] = bR[19]; bR[19] = bR[18]; bR[18] = bR[17]; bR[17] = bR[16]; bR[16] = bR[15]; + bR[15] = bR[14]; bR[14] = bR[13]; bR[13] = bR[12]; bR[12] = bR[11]; bR[11] = bR[10]; bR[10] = bR[9]; bR[9] = bR[8]; bR[8] = bR[7]; + bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; bR[1] = bR[0]; bR[0] = inputSampleR; + inputSampleR += (bR[1] * (1.31698250313308396 - (0.08140616497621633*fabs(bR[1])))); + inputSampleR += (bR[2] * (1.47229016949915326 - (0.27680278993637253*fabs(bR[2])))); + inputSampleR += (bR[3] * (1.30410109086044956 - (0.35629113432046489*fabs(bR[3])))); + inputSampleR += (bR[4] * (0.81766210474551260 - (0.26808782337659753*fabs(bR[4])))); + inputSampleR += (bR[5] * (0.19868872545506663 - (0.11105517193919669*fabs(bR[5])))); + inputSampleR -= (bR[6] * (0.39115909132567039 - (0.12630622002682679*fabs(bR[6])))); + inputSampleR -= (bR[7] * (0.76881891559343574 - (0.40879849500403143*fabs(bR[7])))); + inputSampleR -= (bR[8] * (0.87146861782680340 - (0.59529560488000599*fabs(bR[8])))); + inputSampleR -= (bR[9] * (0.79504575932563670 - (0.60877047551611796*fabs(bR[9])))); + inputSampleR -= (bR[10] * (0.61653017622406314 - (0.47662851438557335*fabs(bR[10])))); + inputSampleR -= (bR[11] * (0.40718195794382067 - (0.24955839378539713*fabs(bR[11])))); + inputSampleR -= (bR[12] * (0.31794900040616203 - (0.04169792259600613*fabs(bR[12])))); + inputSampleR -= (bR[13] * (0.41075032540217843 + (0.00368483996076280*fabs(bR[13])))); + inputSampleR -= (bR[14] * (0.56901352922170667 - (0.11027360805893105*fabs(bR[14])))); + inputSampleR -= (bR[15] * (0.62443222391889264 - (0.22198075154245228*fabs(bR[15])))); + inputSampleR -= (bR[16] * (0.53462856723129204 - (0.22933544545324852*fabs(bR[16])))); + inputSampleR -= (bR[17] * (0.34441703361995046 - (0.12956809502269492*fabs(bR[17])))); + inputSampleR -= (bR[18] * (0.13947052337867882 + (0.00339775055962799*fabs(bR[18])))); + inputSampleR += (bR[19] * (0.03771252648928484 - (0.10863931549251718*fabs(bR[19])))); + inputSampleR += (bR[20] * (0.18280210770271693 - (0.17413646599296417*fabs(bR[20])))); + inputSampleR += (bR[21] * (0.24621986701761467 - (0.14547053270435095*fabs(bR[21])))); + inputSampleR += (bR[22] * (0.22347075142737360 - (0.02493869490104031*fabs(bR[22])))); + inputSampleR += (bR[23] * (0.14346348482123716 + (0.11284054747963246*fabs(bR[23])))); + inputSampleR += (bR[24] * (0.00834364862916028 + (0.24284684053733926*fabs(bR[24])))); + inputSampleR -= (bR[25] * (0.11559740296078347 - (0.32623054435304538*fabs(bR[25])))); + inputSampleR -= (bR[26] * (0.18067604561283060 - (0.32311481551122478*fabs(bR[26])))); + inputSampleR -= (bR[27] * (0.22927997789035612 - (0.26991539052832925*fabs(bR[27])))); + inputSampleR -= (bR[28] * (0.28487666578669446 - (0.22437227250279349*fabs(bR[28])))); + inputSampleR -= (bR[29] * (0.31992973037153838 - (0.15289876100963865*fabs(bR[29])))); + inputSampleR -= (bR[30] * (0.35174606303520733 - (0.05656293023086628*fabs(bR[30])))); + inputSampleR -= (bR[31] * (0.36894898011375254 + (0.04333925421463558*fabs(bR[31])))); + inputSampleR -= (bR[32] * (0.32567576055307507 + (0.14594589410921388*fabs(bR[32])))); + inputSampleR -= (bR[33] * (0.27440135050585784 + (0.15529667398122521*fabs(bR[33])))); + inputSampleR -= (bR[34] * (0.21998973785078091 + (0.05083553737157104*fabs(bR[34])))); + inputSampleR -= (bR[35] * (0.10323624876862457 - (0.04651829594199963*fabs(bR[35])))); + inputSampleR += (bR[36] * (0.02091603687851074 + (0.12000046818439322*fabs(bR[36])))); + inputSampleR += (bR[37] * (0.11344930914138468 + (0.17697142512225839*fabs(bR[37])))); + inputSampleR += (bR[38] * (0.22766779627643968 + (0.13645102964003858*fabs(bR[38])))); + inputSampleR += (bR[39] * (0.38378309953638229 - (0.01997653307333791*fabs(bR[39])))); + inputSampleR += (bR[40] * (0.52789400804568076 - (0.21409137428422448*fabs(bR[40])))); + inputSampleR += (bR[41] * (0.55444630296938280 - (0.32331980931576626*fabs(bR[41])))); + inputSampleR += (bR[42] * (0.42333237669264601 - (0.26855847463044280*fabs(bR[42])))); + inputSampleR += (bR[43] * (0.21942831522035078 - (0.12051365248820624*fabs(bR[43])))); + inputSampleR -= (bR[44] * (0.00584169427830633 - (0.03706970171280329*fabs(bR[44])))); + inputSampleR -= (bR[45] * (0.24279799124660351 - (0.17296440491477982*fabs(bR[45])))); + inputSampleR -= (bR[46] * (0.40173760787507085 - (0.21717989835163351*fabs(bR[46])))); + inputSampleR -= (bR[47] * (0.43930035724188155 - (0.16425928481378199*fabs(bR[47])))); + inputSampleR -= (bR[48] * (0.41067765934041811 - (0.10390115786636855*fabs(bR[48])))); + inputSampleR -= (bR[49] * (0.34409235547165967 - (0.07268159377411920*fabs(bR[49])))); + inputSampleR -= (bR[50] * (0.26542883122568151 - (0.05483457497365785*fabs(bR[50])))); + inputSampleR -= (bR[51] * (0.22024754776138800 - (0.06484897950087598*fabs(bR[51])))); + inputSampleR -= (bR[52] * (0.20394367993632415 - (0.08746309731952180*fabs(bR[52])))); + inputSampleR -= (bR[53] * (0.17565242431124092 - (0.07611309538078760*fabs(bR[53])))); + inputSampleR -= (bR[54] * (0.10116623231246825 - (0.00642818706295112*fabs(bR[54])))); + inputSampleR -= (bR[55] * (0.00782648272053632 + (0.08004141267685004*fabs(bR[55])))); + inputSampleR += (bR[56] * (0.05059046006747323 - (0.12436676387548490*fabs(bR[56])))); + inputSampleR += (bR[57] * (0.06241531553254467 - (0.11530779547021434*fabs(bR[57])))); + inputSampleR += (bR[58] * (0.04952694587101836 - (0.08340945324333944*fabs(bR[58])))); + inputSampleR += (bR[59] * (0.00843873294401687 - (0.03279659052562903*fabs(bR[59])))); + inputSampleR -= (bR[60] * (0.05161338949440241 - (0.03428181149163798*fabs(bR[60])))); + inputSampleR -= (bR[61] * (0.08165520146902012 - (0.08196746092283110*fabs(bR[61])))); + inputSampleR -= (bR[62] * (0.06639532849935320 - (0.09797462781896329*fabs(bR[62])))); + inputSampleR -= (bR[63] * (0.02953430910661621 - (0.09175612938515763*fabs(bR[63])))); + inputSampleR += (bR[64] * (0.00741058547442938 + (0.05442091048731967*fabs(bR[64])))); + inputSampleR += (bR[65] * (0.01832866125391727 + (0.00306243693643687*fabs(bR[65])))); + inputSampleR += (bR[66] * (0.00526964230373573 - (0.04364102661136410*fabs(bR[66])))); + inputSampleR -= (bR[67] * (0.00300984373848200 + (0.09742737841278880*fabs(bR[67])))); + inputSampleR -= (bR[68] * (0.00413616769576694 + (0.14380661694523073*fabs(bR[68])))); + inputSampleR -= (bR[69] * (0.00588769034931419 + (0.16012843578892538*fabs(bR[69])))); + inputSampleR -= (bR[70] * (0.00688588239450581 + (0.14074464279305798*fabs(bR[70])))); + inputSampleR -= (bR[71] * (0.02277307992926315 + (0.07914752191801366*fabs(bR[71])))); + inputSampleR -= (bR[72] * (0.04627166091180877 - (0.00192787268067208*fabs(bR[72])))); + inputSampleR -= (bR[73] * (0.05562045897455786 - (0.05932868727665747*fabs(bR[73])))); + inputSampleR -= (bR[74] * (0.05134243784922165 - (0.08245334798868090*fabs(bR[74])))); + inputSampleR -= (bR[75] * (0.04719409472239919 - (0.07498680629253825*fabs(bR[75])))); + inputSampleR -= (bR[76] * (0.05889738914266415 - (0.06116127018043697*fabs(bR[76])))); + inputSampleR -= (bR[77] * (0.09428363535111127 - (0.06535868867863834*fabs(bR[77])))); + inputSampleR -= (bR[78] * (0.15181756953225126 - (0.08982979655234427*fabs(bR[78])))); + inputSampleR -= (bR[79] * (0.20878969456036670 - (0.10761070891499538*fabs(bR[79])))); + inputSampleR -= (bR[80] * (0.22647885581813790 - (0.08462542510349125*fabs(bR[80])))); + inputSampleR -= (bR[81] * (0.19723482443646323 - (0.02665160920736287*fabs(bR[81])))); + inputSampleR -= (bR[82] * (0.16441643451155163 + (0.02314691954338197*fabs(bR[82])))); + inputSampleR -= (bR[83] * (0.15201914054931515 + (0.04424903493886839*fabs(bR[83])))); + inputSampleR -= (bR[84] * (0.15454370641307855 + (0.04223203797913008*fabs(bR[84])))); + + temp = (inputSampleR + smoothCabBR)/3.0; + smoothCabBR = inputSampleR; + inputSampleR = temp/4.0; + + randy = ((double(fpdR)/UINT32_MAX)*0.057); + drySampleR = ((((inputSampleR*(1.0-randy))+(lastCabSampleR*randy))*wet)+(drySampleR*(1.0-wet)))*outputlevel; + lastCabSampleR = inputSampleR; + inputSampleR = drySampleR; //cab + + if (cycleEnd == 4) { + lastRefL[0] = lastRefL[4]; //start from previous last + lastRefL[2] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[1] = (lastRefL[0] + lastRefL[2])/2; //one quarter + lastRefL[3] = (lastRefL[2] + inputSampleL)/2; //three quarters + lastRefL[4] = inputSampleL; //full + lastRefR[0] = lastRefR[4]; //start from previous last + lastRefR[2] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[1] = (lastRefR[0] + lastRefR[2])/2; //one quarter + lastRefR[3] = (lastRefR[2] + inputSampleR)/2; //three quarters + lastRefR[4] = inputSampleR; //full + } + if (cycleEnd == 3) { + lastRefL[0] = lastRefL[3]; //start from previous last + lastRefL[2] = (lastRefL[0]+lastRefL[0]+inputSampleL)/3; //third + lastRefL[1] = (lastRefL[0]+inputSampleL+inputSampleL)/3; //two thirds + lastRefL[3] = inputSampleL; //full + lastRefR[0] = lastRefR[3]; //start from previous last + lastRefR[2] = (lastRefR[0]+lastRefR[0]+inputSampleR)/3; //third + lastRefR[1] = (lastRefR[0]+inputSampleR+inputSampleR)/3; //two thirds + lastRefR[3] = inputSampleR; //full + } + if (cycleEnd == 2) { + lastRefL[0] = lastRefL[2]; //start from previous last + lastRefL[1] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[2] = inputSampleL; //full + lastRefR[0] = lastRefR[2]; //start from previous last + lastRefR[1] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[2] = inputSampleR; //full + } + if (cycleEnd == 1) { + lastRefL[0] = inputSampleL; + lastRefR[0] = inputSampleR; + } + cycle = 0; //reset + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + } else { + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + //we are going through our references now + } + switch (cycleEnd) //multi-pole average using lastRef[] variables + { + case 4: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[7])*0.5; + lastRefL[7] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[7])*0.5; + lastRefR[7] = lastRefR[8]; //continue, do not break + case 3: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[6])*0.5; + lastRefL[6] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[6])*0.5; + lastRefR[6] = lastRefR[8]; //continue, do not break + case 2: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[5])*0.5; + lastRefL[5] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[5])*0.5; + lastRefR[5] = lastRefR[8]; //continue, do not break + case 1: + break; //no further averaging + } + + //begin 64 bit stereo floating point dither + /* + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + */ + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} diff --git a/plugin/Source/FX/GrindAmp.cpp b/plugin/Source/FX/GrindAmp.cpp new file mode 100755 index 0000000..ef506e9 --- /dev/null +++ b/plugin/Source/FX/GrindAmp.cpp @@ -0,0 +1,383 @@ +/* ======================================== + * GrindAmp - GrindAmp.h + * Copyright (c) 2016 airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Gain_H +#include "GrindAmp.h" +#endif + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfloat-conversion", "-Wimplicit-float-conversion", "-Wunused-parameter") + +GrindAmp::GrindAmp(audioMasterCallback audioMaster) : + AudioEffectX(audioMaster, kNumPrograms, kNumParameters) +{ + A = 0.5; + B = 0.5; + C = 0.8; + D = 1.0; + + smoothAL = 0.0; + smoothBL = 0.0; + smoothCL = 0.0; + smoothDL = 0.0; + smoothEL = 0.0; + smoothFL = 0.0; + smoothGL = 0.0; + smoothHL = 0.0; + smoothIL = 0.0; + smoothJL = 0.0; + smoothKL = 0.0; + secondAL = 0.0; + secondBL = 0.0; + secondCL = 0.0; + secondDL = 0.0; + secondEL = 0.0; + secondFL = 0.0; + secondGL = 0.0; + secondHL = 0.0; + secondIL = 0.0; + secondJL = 0.0; + secondKL = 0.0; + thirdAL = 0.0; + thirdBL = 0.0; + thirdCL = 0.0; + thirdDL = 0.0; + thirdEL = 0.0; + thirdFL = 0.0; + thirdGL = 0.0; + thirdHL = 0.0; + thirdIL = 0.0; + thirdJL = 0.0; + thirdKL = 0.0; + iirSampleAL = 0.0; + iirSampleBL = 0.0; + iirSampleCL = 0.0; + iirSampleDL = 0.0; + iirSampleEL = 0.0; + iirSampleFL = 0.0; + iirSampleGL = 0.0; + iirSampleHL = 0.0; + iirSampleIL = 0.0; + iirLowpassL = 0.0; + iirSubL = 0.0; + storeSampleL = 0.0; //amp + + smoothAR = 0.0; + smoothBR = 0.0; + smoothCR = 0.0; + smoothDR = 0.0; + smoothER = 0.0; + smoothFR = 0.0; + smoothGR = 0.0; + smoothHR = 0.0; + smoothIR = 0.0; + smoothJR = 0.0; + smoothKR = 0.0; + secondAR = 0.0; + secondBR = 0.0; + secondCR = 0.0; + secondDR = 0.0; + secondER = 0.0; + secondFR = 0.0; + secondGR = 0.0; + secondHR = 0.0; + secondIR = 0.0; + secondJR = 0.0; + secondKR = 0.0; + thirdAR = 0.0; + thirdBR = 0.0; + thirdCR = 0.0; + thirdDR = 0.0; + thirdER = 0.0; + thirdFR = 0.0; + thirdGR = 0.0; + thirdHR = 0.0; + thirdIR = 0.0; + thirdJR = 0.0; + thirdKR = 0.0; + iirSampleAR = 0.0; + iirSampleBR = 0.0; + iirSampleCR = 0.0; + iirSampleDR = 0.0; + iirSampleER = 0.0; + iirSampleFR = 0.0; + iirSampleGR = 0.0; + iirSampleHR = 0.0; + iirSampleIR = 0.0; + iirLowpassR = 0.0; + iirSubR = 0.0; + storeSampleR = 0.0; //amp + + for(int fcount = 0; fcount < 90; fcount++) { + bL[fcount] = 0; + bR[fcount] = 0; + } + smoothCabAL = 0.0; smoothCabBL = 0.0; lastCabSampleL = 0.0; //cab + smoothCabAR = 0.0; smoothCabBR = 0.0; lastCabSampleR = 0.0; //cab + + for (int fcount = 0; fcount < 9; fcount++) { + lastRefL[fcount] = 0.0; + lastRefR[fcount] = 0.0; + } + cycle = 0; //undersampling + + for (int x = 0; x < fix_total; x++) { + fixA[x] = 0.0; + fixB[x] = 0.0; + fixC[x] = 0.0; + fixD[x] = 0.0; + fixE[x] = 0.0; + fixF[x] = 0.0; + } //filtering + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. + + _canDo.insert("plugAsChannelInsert"); // plug-in can be used as a channel insert effect. + _canDo.insert("plugAsSend"); // plug-in can be used as a send effect. + _canDo.insert("x2in2out"); + setNumInputs(kNumInputs); + setNumOutputs(kNumOutputs); + canProcessReplacing(); // supports output replacing + canDoubleReplacing(); // supports double precision processing + programsAreChunks(true); + vst_strncpy (_programName, "Default", kVstMaxProgNameLen); // default program name +} + +GrindAmp::~GrindAmp() {} +VstInt32 GrindAmp::getVendorVersion () {return 1000;} +void GrindAmp::setProgramName(char *name) {vst_strncpy (_programName, name, kVstMaxProgNameLen);} +void GrindAmp::getProgramName(char *name) {vst_strncpy (name, _programName, kVstMaxProgNameLen);} +//airwindows likes to ignore this stuff. Make your own programs, and make a different plugin rather than +//trying to do versioning and preventing people from using older versions. Maybe they like the old one! + +void GrindAmp::reset() +{ + A = 0.5; + B = 0.5; + C = 0.8; + D = 1.0; + + smoothAL = 0.0; + smoothBL = 0.0; + smoothCL = 0.0; + smoothDL = 0.0; + smoothEL = 0.0; + smoothFL = 0.0; + smoothGL = 0.0; + smoothHL = 0.0; + smoothIL = 0.0; + smoothJL = 0.0; + smoothKL = 0.0; + secondAL = 0.0; + secondBL = 0.0; + secondCL = 0.0; + secondDL = 0.0; + secondEL = 0.0; + secondFL = 0.0; + secondGL = 0.0; + secondHL = 0.0; + secondIL = 0.0; + secondJL = 0.0; + secondKL = 0.0; + thirdAL = 0.0; + thirdBL = 0.0; + thirdCL = 0.0; + thirdDL = 0.0; + thirdEL = 0.0; + thirdFL = 0.0; + thirdGL = 0.0; + thirdHL = 0.0; + thirdIL = 0.0; + thirdJL = 0.0; + thirdKL = 0.0; + iirSampleAL = 0.0; + iirSampleBL = 0.0; + iirSampleCL = 0.0; + iirSampleDL = 0.0; + iirSampleEL = 0.0; + iirSampleFL = 0.0; + iirSampleGL = 0.0; + iirSampleHL = 0.0; + iirSampleIL = 0.0; + iirLowpassL = 0.0; + iirSubL = 0.0; + storeSampleL = 0.0; //amp + + smoothAR = 0.0; + smoothBR = 0.0; + smoothCR = 0.0; + smoothDR = 0.0; + smoothER = 0.0; + smoothFR = 0.0; + smoothGR = 0.0; + smoothHR = 0.0; + smoothIR = 0.0; + smoothJR = 0.0; + smoothKR = 0.0; + secondAR = 0.0; + secondBR = 0.0; + secondCR = 0.0; + secondDR = 0.0; + secondER = 0.0; + secondFR = 0.0; + secondGR = 0.0; + secondHR = 0.0; + secondIR = 0.0; + secondJR = 0.0; + secondKR = 0.0; + thirdAR = 0.0; + thirdBR = 0.0; + thirdCR = 0.0; + thirdDR = 0.0; + thirdER = 0.0; + thirdFR = 0.0; + thirdGR = 0.0; + thirdHR = 0.0; + thirdIR = 0.0; + thirdJR = 0.0; + thirdKR = 0.0; + iirSampleAR = 0.0; + iirSampleBR = 0.0; + iirSampleCR = 0.0; + iirSampleDR = 0.0; + iirSampleER = 0.0; + iirSampleFR = 0.0; + iirSampleGR = 0.0; + iirSampleHR = 0.0; + iirSampleIR = 0.0; + iirLowpassR = 0.0; + iirSubR = 0.0; + storeSampleR = 0.0; //amp + + for(int fcount = 0; fcount < 90; fcount++) { + bL[fcount] = 0; + bR[fcount] = 0; + } + smoothCabAL = 0.0; smoothCabBL = 0.0; lastCabSampleL = 0.0; //cab + smoothCabAR = 0.0; smoothCabBR = 0.0; lastCabSampleR = 0.0; //cab + + for (int fcount = 0; fcount < 9; fcount++) { + lastRefL[fcount] = 0.0; + lastRefR[fcount] = 0.0; + } + cycle = 0; //undersampling + + for (int x = 0; x < fix_total; x++) { + fixA[x] = 0.0; + fixB[x] = 0.0; + fixC[x] = 0.0; + fixD[x] = 0.0; + fixE[x] = 0.0; + fixF[x] = 0.0; + } //filtering + + fpdL = 1.0; while (fpdL < 16386) fpdL = rand()*UINT32_MAX; + fpdR = 1.0; while (fpdR < 16386) fpdR = rand()*UINT32_MAX; + //this is reset: values being initialized only once. Startup values, whatever they are. +} + +static float pinParameter(float data) +{ + if (data < 0.0f) return 0.0f; + if (data > 1.0f) return 1.0f; + return data; +} + +VstInt32 GrindAmp::getChunk (void** data, bool isPreset) +{ + float *chunkData = (float *)calloc(kNumParameters, sizeof(float)); + chunkData[0] = A; + chunkData[1] = B; + chunkData[2] = C; + chunkData[3] = D; + /* Note: The way this is set up, it will break if you manage to save settings on an Intel + machine and load them on a PPC Mac. However, it's fine if you stick to the machine you + started with. */ + + *data = chunkData; + return kNumParameters * sizeof(float); +} + +VstInt32 GrindAmp::setChunk (void* data, VstInt32 byteSize, bool isPreset) +{ + float *chunkData = (float *)data; + A = pinParameter(chunkData[0]); + B = pinParameter(chunkData[1]); + C = pinParameter(chunkData[2]); + D = pinParameter(chunkData[3]); + /* We're ignoring byteSize as we found it to be a filthy liar */ + + /* calculate any other fields you need here - you could copy in + code from setParameter() here. */ + return 0; +} + +void GrindAmp::setParameter(VstInt32 index, float value) { + switch (index) { + case kParamA: A = value; break; + case kParamB: B = value; break; + case kParamC: C = value; break; + case kParamD: D = value; break; + default: throw; // unknown parameter, shouldn't happen! + } +} + +float GrindAmp::getParameter(VstInt32 index) { + switch (index) { + case kParamA: return A; break; + case kParamB: return B; break; + case kParamC: return C; break; + case kParamD: return D; break; + default: break; // unknown parameter, shouldn't happen! + } return 0.0; //we only need to update the relevant name, this is simple to manage +} + +void GrindAmp::getParameterName(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "Gain", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "Tone", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "Output", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "Dry/Wet", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this is our labels for displaying in the VST host +} + +void GrindAmp::getParameterDisplay(VstInt32 index, char *text) { + switch (index) { + case kParamA: float2string (A, text, kVstMaxParamStrLen); break; + case kParamB: float2string (B, text, kVstMaxParamStrLen); break; + case kParamC: float2string (C, text, kVstMaxParamStrLen); break; + case kParamD: float2string (D, text, kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } //this displays the values and handles 'popups' where it's discrete choices +} + +void GrindAmp::getParameterLabel(VstInt32 index, char *text) { + switch (index) { + case kParamA: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamB: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamC: vst_strncpy (text, "", kVstMaxParamStrLen); break; + case kParamD: vst_strncpy (text, "", kVstMaxParamStrLen); break; + default: break; // unknown parameter, shouldn't happen! + } +} + +VstInt32 GrindAmp::canDo(char *text) +{ return (_canDo.find(text) == _canDo.end()) ? -1: 1; } // 1 = yes, -1 = no, 0 = don't know + +bool GrindAmp::getEffectName(char* name) { + vst_strncpy(name, "GrindAmp", kVstMaxProductStrLen); return true; +} + +VstPlugCategory GrindAmp::getPlugCategory() {return kPlugCategEffect;} + +bool GrindAmp::getProductString(char* text) { + vst_strncpy (text, "airwindows GrindAmp", kVstMaxProductStrLen); return true; +} + +bool GrindAmp::getVendorString(char* text) { + vst_strncpy (text, "airwindows", kVstMaxVendorStrLen); return true; +} diff --git a/plugin/Source/FX/GrindAmp.h b/plugin/Source/FX/GrindAmp.h new file mode 100755 index 0000000..0db538d --- /dev/null +++ b/plugin/Source/FX/GrindAmp.h @@ -0,0 +1,189 @@ +/* ======================================== + * GrindAmp - GrindAmp.h + * Created 8/12/11 by SPIAdmin + * Copyright (c) 2011 __MyCompanyName__, Airwindows uses the MIT license + * ======================================== */ + +#pragma once + +#include "FXBase.h" + +#include +#include +#include + +class GrindAmp final : public AudioEffectX +{ +public: + enum { + kParamA = 0, + kParamB = 1, + kParamC = 2, + kParamD = 3, + kNumParameters = 4 + }; // + + static constexpr int kNumPrograms = 0; + static constexpr int kNumInputs = 2; + static constexpr int kNumOutputs = 2; + + GrindAmp(audioMasterCallback audioMaster); + ~GrindAmp(); + void reset(); + bool getEffectName(char* name); // The plug-in name + VstPlugCategory getPlugCategory(); // The general category for the plug-in + bool getProductString(char* text); // This is a unique plug-in string provided by Steinberg + bool getVendorString(char* text); // Vendor info + VstInt32 getVendorVersion(); // Version number + void processReplacing (float** inputs, float** outputs, VstInt32 sampleFrames); + void processDoubleReplacing (double** inputs, double** outputs, VstInt32 sampleFrames); + void getProgramName(char *name); // read the name from the host + void setProgramName(char *name); // changes the name of the preset displayed in the host + VstInt32 getChunk (void** data, bool isPreset); + VstInt32 setChunk (void* data, VstInt32 byteSize, bool isPreset); + float getParameter(VstInt32 index); // get the parameter value at the specified index + void setParameter(VstInt32 index, float value); // set the parameter at index to value + void getParameterLabel(VstInt32 index, char *text); // label for the parameter (eg dB) + void getParameterName(VstInt32 index, char *text); // name of the parameter + void getParameterDisplay(VstInt32 index, char *text); // text description of the current value + VstInt32 canDo(char *text); +private: + char _programName[kVstMaxProgNameLen + 1]; + std::set< std::string > _canDo; + + double smoothAL; + double smoothBL; + double smoothCL; + double smoothDL; + double smoothEL; + double smoothFL; + double smoothGL; + double smoothHL; + double smoothIL; + double smoothJL; + double smoothKL; + double secondAL; + double secondBL; + double secondCL; + double secondDL; + double secondEL; + double secondFL; + double secondGL; + double secondHL; + double secondIL; + double secondJL; + double secondKL; + double thirdAL; + double thirdBL; + double thirdCL; + double thirdDL; + double thirdEL; + double thirdFL; + double thirdGL; + double thirdHL; + double thirdIL; + double thirdJL; + double thirdKL; + double iirSampleAL; + double iirSampleBL; + double iirSampleCL; + double iirSampleDL; + double iirSampleEL; + double iirSampleFL; + double iirSampleGL; + double iirSampleHL; + double iirSampleIL; + double iirLowpassL; + double iirSubL; + double storeSampleL; //amp + + double smoothAR; + double smoothBR; + double smoothCR; + double smoothDR; + double smoothER; + double smoothFR; + double smoothGR; + double smoothHR; + double smoothIR; + double smoothJR; + double smoothKR; + double secondAR; + double secondBR; + double secondCR; + double secondDR; + double secondER; + double secondFR; + double secondGR; + double secondHR; + double secondIR; + double secondJR; + double secondKR; + double thirdAR; + double thirdBR; + double thirdCR; + double thirdDR; + double thirdER; + double thirdFR; + double thirdGR; + double thirdHR; + double thirdIR; + double thirdJR; + double thirdKR; + double iirSampleAR; + double iirSampleBR; + double iirSampleCR; + double iirSampleDR; + double iirSampleER; + double iirSampleFR; + double iirSampleGR; + double iirSampleHR; + double iirSampleIR; + double iirLowpassR; + double iirSubR; + double storeSampleR; //amp + + double bL[90]; + double lastCabSampleL; + double smoothCabAL; + double smoothCabBL; //cab + + double bR[90]; + double lastCabSampleR; + double smoothCabAR; + double smoothCabBR; //cab + + double lastRefL[10]; + double lastRefR[10]; + int cycle; //undersampling + + enum { + fix_freq, + fix_reso, + fix_a0, + fix_a1, + fix_a2, + fix_b1, + fix_b2, + fix_sL1, + fix_sL2, + fix_sR1, + fix_sR2, + fix_total + }; //fixed frequency biquad filter for ultrasonics, stereo + double fixA[fix_total]; + double fixB[fix_total]; + double fixC[fix_total]; + double fixD[fix_total]; + double fixE[fix_total]; + double fixF[fix_total]; //filtering + + uint32_t fpdL; + uint32_t fpdR; + //default stuff + + float A; + float B; + float C; + float D; +}; diff --git a/plugin/Source/FX/GrindAmpProc.cpp b/plugin/Source/FX/GrindAmpProc.cpp new file mode 100755 index 0000000..540070c --- /dev/null +++ b/plugin/Source/FX/GrindAmpProc.cpp @@ -0,0 +1,1656 @@ +/* ======================================== + * GrindAmp - GrindAmp.h + * Copyright (c) 2016 airwindows, Airwindows uses the MIT license + * ======================================== */ + +#ifndef __Gain_H +#include "GrindAmp.h" +#endif + +JUCE_BEGIN_IGNORE_WARNINGS_GCC_LIKE ("-Wfloat-conversion", "-Wimplicit-float-conversion", "-Wunused-parameter") + +void GrindAmp::processReplacing(float **inputs, float **outputs, VstInt32 sampleFrames) +{ + float* in1 = inputs[0]; + float* in2 = inputs[1]; + float* out1 = outputs[0]; + float* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + int cycleEnd = floor(overallscale); + if (cycleEnd < 1) cycleEnd = 1; + if (cycleEnd > 4) cycleEnd = 4; + //this is going to be 2 for 88.1 or 96k, 3 for silly people, 4 for 176 or 192k + if (cycle > cycleEnd-1) cycle = cycleEnd-1; //sanity check + + double inputlevel = pow(A,2); + double samplerate = getSampleRate(); + double trimEQ = 1.1-B; + double toneEQ = trimEQ/1.2; + trimEQ /= 50.0; + trimEQ += 0.165; + double EQ = ((trimEQ-(toneEQ/6.1)) / samplerate)*22050.0; + double BEQ = ((trimEQ+(toneEQ/2.1)) / samplerate)*22050.0; + double outputlevel = C; + double wet = D; + double bassdrive = 1.57079633*(2.5-toneEQ); + + double cutoff = (18000.0+(B*1000.0)) / getSampleRate(); + if (cutoff > 0.49) cutoff = 0.49; //don't crash if run at 44.1k + if (cutoff < 0.001) cutoff = 0.001; //or if cutoff's too low + + fixF[fix_freq] = fixE[fix_freq] = fixD[fix_freq] = fixC[fix_freq] = fixB[fix_freq] = fixA[fix_freq] = cutoff; + + fixA[fix_reso] = 4.46570214; + fixB[fix_reso] = 1.51387132; + fixC[fix_reso] = 0.93979296; + fixD[fix_reso] = 0.70710678; + fixE[fix_reso] = 0.52972649; + fixF[fix_reso] = 0.50316379; + + double K = tan(juce::MathConstants::pi * fixA[fix_freq]); //lowpass + double norm = 1.0 / (1.0 + K / fixA[fix_reso] + K * K); + fixA[fix_a0] = K * K * norm; + fixA[fix_a1] = 2.0 * fixA[fix_a0]; + fixA[fix_a2] = fixA[fix_a0]; + fixA[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixA[fix_b2] = (1.0 - K / fixA[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixB[fix_freq]); + norm = 1.0 / (1.0 + K / fixB[fix_reso] + K * K); + fixB[fix_a0] = K * K * norm; + fixB[fix_a1] = 2.0 * fixB[fix_a0]; + fixB[fix_a2] = fixB[fix_a0]; + fixB[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixB[fix_b2] = (1.0 - K / fixB[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixC[fix_freq]); + norm = 1.0 / (1.0 + K / fixC[fix_reso] + K * K); + fixC[fix_a0] = K * K * norm; + fixC[fix_a1] = 2.0 * fixC[fix_a0]; + fixC[fix_a2] = fixC[fix_a0]; + fixC[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixC[fix_b2] = (1.0 - K / fixC[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixD[fix_freq]); + norm = 1.0 / (1.0 + K / fixD[fix_reso] + K * K); + fixD[fix_a0] = K * K * norm; + fixD[fix_a1] = 2.0 * fixD[fix_a0]; + fixD[fix_a2] = fixD[fix_a0]; + fixD[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixD[fix_b2] = (1.0 - K / fixD[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixE[fix_freq]); + norm = 1.0 / (1.0 + K / fixE[fix_reso] + K * K); + fixE[fix_a0] = K * K * norm; + fixE[fix_a1] = 2.0 * fixE[fix_a0]; + fixE[fix_a2] = fixE[fix_a0]; + fixE[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixE[fix_b2] = (1.0 - K / fixE[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixF[fix_freq]); + norm = 1.0 / (1.0 + K / fixF[fix_reso] + K * K); + fixF[fix_a0] = K * K * norm; + fixF[fix_a1] = 2.0 * fixF[fix_a0]; + fixF[fix_a2] = fixF[fix_a0]; + fixF[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixF[fix_b2] = (1.0 - K / fixF[fix_reso] + K * K) * norm; + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + //if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + //if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + double outSample = (inputSampleL * fixA[fix_a0]) + fixA[fix_sL1]; + fixA[fix_sL1] = (inputSampleL * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sL2]; + fixA[fix_sL2] = (inputSampleL * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixA[fix_a0]) + fixA[fix_sR1]; + fixA[fix_sR1] = (inputSampleR * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sR2]; + fixA[fix_sR2] = (inputSampleR * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevel; + iirSampleAL = (iirSampleAL * (1.0 - EQ)) + (inputSampleL * EQ); + inputSampleL = inputSampleL - (iirSampleAL*0.92); + //highpass + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + double bridgerectifier = fabs(inputSampleL); + double inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothAL + (secondAL*inverse) + (thirdAL*bridgerectifier) + inputSampleL); + thirdAL = secondAL; + secondAL = smoothAL; + smoothAL = inputSampleL; + double basscatchL = inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + inputSampleR *= inputlevel; + iirSampleAR = (iirSampleAR * (1.0 - EQ)) + (inputSampleR * EQ); + inputSampleR = inputSampleR - (iirSampleAR*0.92); + //highpass + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothAR + (secondAR*inverse) + (thirdAR*bridgerectifier) + inputSampleR); + thirdAR = secondAR; + secondAR = smoothAR; + smoothAR = inputSampleR; + double basscatchR = inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixB[fix_a0]) + fixB[fix_sL1]; + fixB[fix_sL1] = (inputSampleL * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sL2]; + fixB[fix_sL2] = (inputSampleL * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixB[fix_a0]) + fixB[fix_sR1]; + fixB[fix_sR1] = (inputSampleR * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sR2]; + fixB[fix_sR2] = (inputSampleR * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevel; + iirSampleBL = (iirSampleBL * (1.0 - EQ)) + (inputSampleL * EQ); + inputSampleL = inputSampleL - (iirSampleBL*0.79); + //highpass + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + bridgerectifier = fabs(inputSampleL); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothBL + (secondBL*inverse) + (thirdBL*bridgerectifier) + inputSampleL); + thirdBL = secondBL; + secondBL = smoothBL; + smoothBL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + inputSampleR *= inputlevel; + iirSampleBR = (iirSampleBR * (1.0 - EQ)) + (inputSampleR * EQ); + inputSampleR = inputSampleR - (iirSampleBR*0.79); + //highpass + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothBR + (secondBR*inverse) + (thirdBR*bridgerectifier) + inputSampleR); + thirdBR = secondBR; + secondBR = smoothBR; + smoothBR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + iirSampleCL = (iirSampleCL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleCL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothCL + (secondCL*inverse) + (thirdCL*bridgerectifier) + inputSampleL); + thirdCL = secondCL; + secondCL = smoothCL; + smoothCL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleCR = (iirSampleCR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleCR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothCR + (secondCR*inverse) + (thirdCR*bridgerectifier) + inputSampleR); + thirdCR = secondCR; + secondCR = smoothCR; + smoothCR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixC[fix_a0]) + fixC[fix_sL1]; + fixC[fix_sL1] = (inputSampleL * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sL2]; + fixC[fix_sL2] = (inputSampleL * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixC[fix_a0]) + fixC[fix_sR1]; + fixC[fix_sR1] = (inputSampleR * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sR2]; + fixC[fix_sR2] = (inputSampleR * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleDL = (iirSampleDL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleDL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothDL + (secondDL*inverse) + (thirdDL*bridgerectifier) + inputSampleL); + thirdDL = secondDL; + secondDL = smoothDL; + smoothDL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleDR = (iirSampleDR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleDR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothDR + (secondDR*inverse) + (thirdDR*bridgerectifier) + inputSampleR); + thirdDR = secondDR; + secondDR = smoothDR; + smoothDR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixD[fix_a0]) + fixD[fix_sL1]; + fixD[fix_sL1] = (inputSampleL * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sL2]; + fixD[fix_sL2] = (inputSampleL * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixD[fix_a0]) + fixD[fix_sR1]; + fixD[fix_sR1] = (inputSampleR * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sR2]; + fixD[fix_sR2] = (inputSampleR * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleEL = (iirSampleEL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleEL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothEL + (secondEL*inverse) + (thirdEL*bridgerectifier) + inputSampleL); + thirdEL = secondEL; + secondEL = smoothEL; + smoothEL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleER = (iirSampleER * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleER*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothER + (secondER*inverse) + (thirdER*bridgerectifier) + inputSampleR); + thirdER = secondER; + secondER = smoothER; + smoothER = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + iirSampleFL = (iirSampleFL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleFL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothFL + (secondFL*inverse) + (thirdFL*bridgerectifier) + inputSampleL); + thirdFL = secondFL; + secondFL = smoothFL; + smoothFL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleFR = (iirSampleFR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleFR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothFR + (secondFR*inverse) + (thirdFR*bridgerectifier) + inputSampleR); + thirdFR = secondFR; + secondFR = smoothFR; + smoothFR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixE[fix_a0]) + fixE[fix_sL1]; + fixE[fix_sL1] = (inputSampleL * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sL2]; + fixE[fix_sL2] = (inputSampleL * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixE[fix_a0]) + fixE[fix_sR1]; + fixE[fix_sR1] = (inputSampleR * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sR2]; + fixE[fix_sR2] = (inputSampleR * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleGL = (iirSampleGL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleGL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothGL + (secondGL*inverse) + (thirdGL*bridgerectifier) + inputSampleL); + thirdGL = secondGL; + secondGL = smoothGL; + smoothGL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleGR = (iirSampleGR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleGR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothGR + (secondGR*inverse) + (thirdGR*bridgerectifier) + inputSampleR); + thirdGR = secondGR; + secondGR = smoothGR; + smoothGR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + iirSampleHL = (iirSampleHL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleHL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothHL + (secondHL*inverse) + (thirdHL*bridgerectifier) + inputSampleL); + thirdHL = secondHL; + secondHL = smoothHL; + smoothHL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleHR = (iirSampleHR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleHR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothHR + (secondHR*inverse) + (thirdHR*bridgerectifier) + inputSampleR); + thirdHR = secondHR; + secondHR = smoothHR; + smoothHR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixF[fix_a0]) + fixF[fix_sL1]; + fixF[fix_sL1] = (inputSampleL * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sL2]; + fixF[fix_sL2] = (inputSampleL * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixF[fix_a0]) + fixF[fix_sR1]; + fixF[fix_sR1] = (inputSampleR * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sR2]; + fixF[fix_sR2] = (inputSampleR * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleIL = (iirSampleIL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleIL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothIL + (secondIL*inverse) + (thirdIL*bridgerectifier) + inputSampleL); + thirdIL = secondIL; + secondIL = smoothIL; + smoothIL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleL); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothJL + (secondJL*inverse) + (thirdJL*bridgerectifier) + inputSampleL); + thirdJL = secondJL; + secondJL = smoothJL; + smoothJL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleL); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothKL + (secondKL*inverse) + (thirdKL*bridgerectifier) + inputSampleL); + thirdKL = secondKL; + secondKL = smoothKL; + smoothKL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleIR = (iirSampleIR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleIR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothIR + (secondIR*inverse) + (thirdIR*bridgerectifier) + inputSampleR); + thirdIR = secondIR; + secondIR = smoothIR; + smoothIR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothJR + (secondJR*inverse) + (thirdJR*bridgerectifier) + inputSampleR); + thirdJR = secondJR; + secondJR = smoothJR; + smoothJR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothKR + (secondKR*inverse) + (thirdKR*bridgerectifier) + inputSampleR); + thirdKR = secondKR; + secondKR = smoothKR; + smoothKR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + basscatchL /= 2.0; + inputSampleL = (inputSampleL*toneEQ)+basscatchL; + //extra lowpass for 4*12" speakers + basscatchR /= 2.0; + inputSampleR = (inputSampleR*toneEQ)+basscatchR; + //extra lowpass for 4*12" speakers + + bridgerectifier = fabs(inputSampleL*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleL > 0.0) inputSampleL = bridgerectifier; + else inputSampleL = -bridgerectifier; + inputSampleL += basscatchL; + //split bass between overdrive and clean + inputSampleL /= (1.0+toneEQ); + + bridgerectifier = fabs(inputSampleR*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleR > 0.0) inputSampleR = bridgerectifier; + else inputSampleR = -bridgerectifier; + inputSampleR += basscatchR; + //split bass between overdrive and clean + inputSampleR /= (1.0+toneEQ); + + double randy = ((double(fpdL)/UINT32_MAX)*0.061); + inputSampleL = ((inputSampleL*(1-randy))+(storeSampleL*randy))*outputlevel; + storeSampleL = inputSampleL; + + randy = ((double(fpdR)/UINT32_MAX)*0.061); + inputSampleR = ((inputSampleR*(1-randy))+(storeSampleR*randy))*outputlevel; + storeSampleR = inputSampleR; + + if (wet !=1.0) { + inputSampleL = (inputSampleL * wet) + (drySampleL * (1.0-wet)); + inputSampleR = (inputSampleR * wet) + (drySampleR * (1.0-wet)); + } + //Dry/Wet control, defaults to the last slider + //amp + + cycle++; + if (cycle == cycleEnd) { + + double temp = (inputSampleL + smoothCabAL)/3.0; + smoothCabAL = inputSampleL; + inputSampleL = temp; + + bL[83] = bL[82]; bL[82] = bL[81]; bL[81] = bL[80]; bL[80] = bL[79]; + bL[79] = bL[78]; bL[78] = bL[77]; bL[77] = bL[76]; bL[76] = bL[75]; bL[75] = bL[74]; bL[74] = bL[73]; bL[73] = bL[72]; bL[72] = bL[71]; + bL[71] = bL[70]; bL[70] = bL[69]; bL[69] = bL[68]; bL[68] = bL[67]; bL[67] = bL[66]; bL[66] = bL[65]; bL[65] = bL[64]; bL[64] = bL[63]; + bL[63] = bL[62]; bL[62] = bL[61]; bL[61] = bL[60]; bL[60] = bL[59]; bL[59] = bL[58]; bL[58] = bL[57]; bL[57] = bL[56]; bL[56] = bL[55]; + bL[55] = bL[54]; bL[54] = bL[53]; bL[53] = bL[52]; bL[52] = bL[51]; bL[51] = bL[50]; bL[50] = bL[49]; bL[49] = bL[48]; bL[48] = bL[47]; + bL[47] = bL[46]; bL[46] = bL[45]; bL[45] = bL[44]; bL[44] = bL[43]; bL[43] = bL[42]; bL[42] = bL[41]; bL[41] = bL[40]; bL[40] = bL[39]; + bL[39] = bL[38]; bL[38] = bL[37]; bL[37] = bL[36]; bL[36] = bL[35]; bL[35] = bL[34]; bL[34] = bL[33]; bL[33] = bL[32]; bL[32] = bL[31]; + bL[31] = bL[30]; bL[30] = bL[29]; bL[29] = bL[28]; bL[28] = bL[27]; bL[27] = bL[26]; bL[26] = bL[25]; bL[25] = bL[24]; bL[24] = bL[23]; + bL[23] = bL[22]; bL[22] = bL[21]; bL[21] = bL[20]; bL[20] = bL[19]; bL[19] = bL[18]; bL[18] = bL[17]; bL[17] = bL[16]; bL[16] = bL[15]; + bL[15] = bL[14]; bL[14] = bL[13]; bL[13] = bL[12]; bL[12] = bL[11]; bL[11] = bL[10]; bL[10] = bL[9]; bL[9] = bL[8]; bL[8] = bL[7]; + bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; bL[1] = bL[0]; bL[0] = inputSampleL; + inputSampleL += (bL[1] * (1.29550481610475132 + (0.19713872057074355*fabs(bL[1])))); + inputSampleL += (bL[2] * (1.42302569895462616 + (0.30599505521284787*fabs(bL[2])))); + inputSampleL += (bL[3] * (1.28728195804197565 + (0.23168333460446133*fabs(bL[3])))); + inputSampleL += (bL[4] * (0.88553784290822690 + (0.14263256172918892*fabs(bL[4])))); + inputSampleL += (bL[5] * (0.37129054918432319 + (0.00150040944205920*fabs(bL[5])))); + inputSampleL -= (bL[6] * (0.12150959412556320 + (0.32776273620569107*fabs(bL[6])))); + inputSampleL -= (bL[7] * (0.44900065463203775 + (0.74101214925298819*fabs(bL[7])))); + inputSampleL -= (bL[8] * (0.54058781908186482 + (1.07821707459008387*fabs(bL[8])))); + inputSampleL -= (bL[9] * (0.49361966401791391 + (1.23540109014850508*fabs(bL[9])))); + inputSampleL -= (bL[10] * (0.39819495093078133 + (1.11247213730917749*fabs(bL[10])))); + inputSampleL -= (bL[11] * (0.31379279985435521 + (0.80330360359638298*fabs(bL[11])))); + inputSampleL -= (bL[12] * (0.30744359242808555 + (0.42132528876858205*fabs(bL[12])))); + inputSampleL -= (bL[13] * (0.33943170284673974 + (0.09183418349389982*fabs(bL[13])))); + inputSampleL -= (bL[14] * (0.33838775119286391 - (0.06453051658561271*fabs(bL[14])))); + inputSampleL -= (bL[15] * (0.30682305697961665 - (0.09549380253249232*fabs(bL[15])))); + inputSampleL -= (bL[16] * (0.23408741339295336 - (0.08083404732361277*fabs(bL[16])))); + inputSampleL -= (bL[17] * (0.10411746814025019 + (0.00253651281245780*fabs(bL[17])))); + inputSampleL += (bL[18] * (0.00133623776084696 - (0.04447267870865820*fabs(bL[18])))); + inputSampleL += (bL[19] * (0.02461903992114161 + (0.07530671732655550*fabs(bL[19])))); + inputSampleL += (bL[20] * (0.02086715842475373 + (0.22795860236804899*fabs(bL[20])))); + inputSampleL += (bL[21] * (0.02761433637100917 + (0.26108320417844094*fabs(bL[21])))); + inputSampleL += (bL[22] * (0.04475285369162533 + (0.19160705011061663*fabs(bL[22])))); + inputSampleL += (bL[23] * (0.09447338372862381 + (0.03681550508743799*fabs(bL[23])))); + inputSampleL += (bL[24] * (0.13445890343722280 - (0.13713036462146147*fabs(bL[24])))); + inputSampleL += (bL[25] * (0.13872868945088121 - (0.22401242373298191*fabs(bL[25])))); + inputSampleL += (bL[26] * (0.14915650097434549 - (0.26718804981526367*fabs(bL[26])))); + inputSampleL += (bL[27] * (0.12766643217091783 - (0.27745664795660430*fabs(bL[27])))); + inputSampleL += (bL[28] * (0.03675849788393101 - (0.18338278173550679*fabs(bL[28])))); + inputSampleL -= (bL[29] * (0.06307306864232835 + (0.06089480869040766*fabs(bL[29])))); + inputSampleL -= (bL[30] * (0.14947389348962944 + (0.04642103054798480*fabs(bL[30])))); + inputSampleL -= (bL[31] * (0.25235266566401526 + (0.08423062596460507*fabs(bL[31])))); + inputSampleL -= (bL[32] * (0.33496344048679683 + (0.09808328256677995*fabs(bL[32])))); + inputSampleL -= (bL[33] * (0.36590030482175445 + (0.10622650888958179*fabs(bL[33])))); + inputSampleL -= (bL[34] * (0.35015197011464372 + (0.08982043516016047*fabs(bL[34])))); + inputSampleL -= (bL[35] * (0.26808437585665090 + (0.00735561860229533*fabs(bL[35])))); + inputSampleL -= (bL[36] * (0.11624318543291220 - (0.07142484314510467*fabs(bL[36])))); + inputSampleL += (bL[37] * (0.05617084165377551 + (0.11785854050350089*fabs(bL[37])))); + inputSampleL += (bL[38] * (0.20540028692589385 + (0.20479174663329586*fabs(bL[38])))); + inputSampleL += (bL[39] * (0.30455415003043818 + (0.29074864580096849*fabs(bL[39])))); + inputSampleL += (bL[40] * (0.33810750937829476 + (0.29182307921316802*fabs(bL[40])))); + inputSampleL += (bL[41] * (0.31936133365277430 + (0.26535537727394987*fabs(bL[41])))); + inputSampleL += (bL[42] * (0.27388548321981876 + (0.19735049990538350*fabs(bL[42])))); + inputSampleL += (bL[43] * (0.21454597517994098 + (0.06415909270247236*fabs(bL[43])))); + inputSampleL += (bL[44] * (0.15001045817707717 - (0.03831118543404573*fabs(bL[44])))); + inputSampleL += (bL[45] * (0.07283437284653138 - (0.09281952429543777*fabs(bL[45])))); + inputSampleL -= (bL[46] * (0.03917872184241358 + (0.14306291461398810*fabs(bL[46])))); + inputSampleL -= (bL[47] * (0.16695932032148642 + (0.19138995946950504*fabs(bL[47])))); + inputSampleL -= (bL[48] * (0.27055854466909462 + (0.22531296466343192*fabs(bL[48])))); + inputSampleL -= (bL[49] * (0.33256357307578271 + (0.23305840475692102*fabs(bL[49])))); + inputSampleL -= (bL[50] * (0.33459770116834442 + (0.24091822618917569*fabs(bL[50])))); + inputSampleL -= (bL[51] * (0.27156687236338090 + (0.24062938573512443*fabs(bL[51])))); + inputSampleL -= (bL[52] * (0.17197093288412094 + (0.19083085091993421*fabs(bL[52])))); + inputSampleL -= (bL[53] * (0.06738628195910543 + (0.10268609751019808*fabs(bL[53])))); + inputSampleL += (bL[54] * (0.00222429218204290 + (0.01439664435720548*fabs(bL[54])))); + inputSampleL += (bL[55] * (0.01346992803494091 + (0.15947137113534526*fabs(bL[55])))); + inputSampleL -= (bL[56] * (0.02038911881377448 - (0.26763170752416160*fabs(bL[56])))); + inputSampleL -= (bL[57] * (0.08233579178189687 - (0.29415931086406055*fabs(bL[57])))); + inputSampleL -= (bL[58] * (0.15447855089824883 - (0.26489186990840807*fabs(bL[58])))); + inputSampleL -= (bL[59] * (0.20518281113362655 - (0.16135382257522859*fabs(bL[59])))); + inputSampleL -= (bL[60] * (0.22244686050232007 + (0.00847180390247432*fabs(bL[60])))); + inputSampleL -= (bL[61] * (0.21849243134998034 + (0.14460595245753741*fabs(bL[61])))); + inputSampleL -= (bL[62] * (0.20256105734574054 + (0.18932793221831667*fabs(bL[62])))); + inputSampleL -= (bL[63] * (0.18604070054295399 + (0.17250665610927965*fabs(bL[63])))); + inputSampleL -= (bL[64] * (0.17222844322058231 + (0.12992472027850357*fabs(bL[64])))); + inputSampleL -= (bL[65] * (0.14447856616566443 + (0.09089219002147308*fabs(bL[65])))); + inputSampleL -= (bL[66] * (0.10385520794251019 + (0.08600465834570559*fabs(bL[66])))); + inputSampleL -= (bL[67] * (0.07124435678265063 + (0.09071532210549428*fabs(bL[67])))); + inputSampleL -= (bL[68] * (0.05216857461197572 + (0.06794061706070262*fabs(bL[68])))); + inputSampleL -= (bL[69] * (0.05235381920184123 + (0.02818101717909346*fabs(bL[69])))); + inputSampleL -= (bL[70] * (0.07569701245553526 - (0.00634228544764946*fabs(bL[70])))); + inputSampleL -= (bL[71] * (0.10320125382718826 - (0.02751486906644141*fabs(bL[71])))); + inputSampleL -= (bL[72] * (0.12122120969079088 - (0.05434007312178933*fabs(bL[72])))); + inputSampleL -= (bL[73] * (0.13438969117200902 - (0.09135218559713874*fabs(bL[73])))); + inputSampleL -= (bL[74] * (0.13534390437529981 - (0.10437672041458675*fabs(bL[74])))); + inputSampleL -= (bL[75] * (0.11424128854188388 - (0.08693450726462598*fabs(bL[75])))); + inputSampleL -= (bL[76] * (0.08166894518596159 - (0.06949989431475120*fabs(bL[76])))); + inputSampleL -= (bL[77] * (0.04293976378555305 - (0.05718625137421843*fabs(bL[77])))); + inputSampleL += (bL[78] * (0.00933076320644409 + (0.01728285211520138*fabs(bL[78])))); + inputSampleL += (bL[79] * (0.06450430362918153 - (0.02492994833691022*fabs(bL[79])))); + inputSampleL += (bL[80] * (0.10187400687649277 - (0.03578455940532403*fabs(bL[80])))); + inputSampleL += (bL[81] * (0.11039763294094571 - (0.03995523517573508*fabs(bL[81])))); + inputSampleL += (bL[82] * (0.08557960776024547 - (0.03482514309492527*fabs(bL[82])))); + inputSampleL += (bL[83] * (0.02730881850805332 - (0.00514750108411127*fabs(bL[83])))); + + temp = (inputSampleL + smoothCabBL)/3.0; + smoothCabBL = inputSampleL; + inputSampleL = temp/4.0; + + randy = ((double(fpdL)/UINT32_MAX)*0.044); + drySampleL = ((((inputSampleL*(1-randy))+(lastCabSampleL*randy))*wet)+(drySampleL*(1.0-wet)))*outputlevel; + lastCabSampleL = inputSampleL; + inputSampleL = drySampleL; //cab L + + temp = (inputSampleR + smoothCabAR)/3.0; + smoothCabAR = inputSampleR; + inputSampleR = temp; + + bR[83] = bR[82]; bR[82] = bR[81]; bR[81] = bR[80]; bR[80] = bR[79]; + bR[79] = bR[78]; bR[78] = bR[77]; bR[77] = bR[76]; bR[76] = bR[75]; bR[75] = bR[74]; bR[74] = bR[73]; bR[73] = bR[72]; bR[72] = bR[71]; + bR[71] = bR[70]; bR[70] = bR[69]; bR[69] = bR[68]; bR[68] = bR[67]; bR[67] = bR[66]; bR[66] = bR[65]; bR[65] = bR[64]; bR[64] = bR[63]; + bR[63] = bR[62]; bR[62] = bR[61]; bR[61] = bR[60]; bR[60] = bR[59]; bR[59] = bR[58]; bR[58] = bR[57]; bR[57] = bR[56]; bR[56] = bR[55]; + bR[55] = bR[54]; bR[54] = bR[53]; bR[53] = bR[52]; bR[52] = bR[51]; bR[51] = bR[50]; bR[50] = bR[49]; bR[49] = bR[48]; bR[48] = bR[47]; + bR[47] = bR[46]; bR[46] = bR[45]; bR[45] = bR[44]; bR[44] = bR[43]; bR[43] = bR[42]; bR[42] = bR[41]; bR[41] = bR[40]; bR[40] = bR[39]; + bR[39] = bR[38]; bR[38] = bR[37]; bR[37] = bR[36]; bR[36] = bR[35]; bR[35] = bR[34]; bR[34] = bR[33]; bR[33] = bR[32]; bR[32] = bR[31]; + bR[31] = bR[30]; bR[30] = bR[29]; bR[29] = bR[28]; bR[28] = bR[27]; bR[27] = bR[26]; bR[26] = bR[25]; bR[25] = bR[24]; bR[24] = bR[23]; + bR[23] = bR[22]; bR[22] = bR[21]; bR[21] = bR[20]; bR[20] = bR[19]; bR[19] = bR[18]; bR[18] = bR[17]; bR[17] = bR[16]; bR[16] = bR[15]; + bR[15] = bR[14]; bR[14] = bR[13]; bR[13] = bR[12]; bR[12] = bR[11]; bR[11] = bR[10]; bR[10] = bR[9]; bR[9] = bR[8]; bR[8] = bR[7]; + bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; bR[1] = bR[0]; bR[0] = inputSampleR; + inputSampleR += (bR[1] * (1.29550481610475132 + (0.19713872057074355*fabs(bR[1])))); + inputSampleR += (bR[2] * (1.42302569895462616 + (0.30599505521284787*fabs(bR[2])))); + inputSampleR += (bR[3] * (1.28728195804197565 + (0.23168333460446133*fabs(bR[3])))); + inputSampleR += (bR[4] * (0.88553784290822690 + (0.14263256172918892*fabs(bR[4])))); + inputSampleR += (bR[5] * (0.37129054918432319 + (0.00150040944205920*fabs(bR[5])))); + inputSampleR -= (bR[6] * (0.12150959412556320 + (0.32776273620569107*fabs(bR[6])))); + inputSampleR -= (bR[7] * (0.44900065463203775 + (0.74101214925298819*fabs(bR[7])))); + inputSampleR -= (bR[8] * (0.54058781908186482 + (1.07821707459008387*fabs(bR[8])))); + inputSampleR -= (bR[9] * (0.49361966401791391 + (1.23540109014850508*fabs(bR[9])))); + inputSampleR -= (bR[10] * (0.39819495093078133 + (1.11247213730917749*fabs(bR[10])))); + inputSampleR -= (bR[11] * (0.31379279985435521 + (0.80330360359638298*fabs(bR[11])))); + inputSampleR -= (bR[12] * (0.30744359242808555 + (0.42132528876858205*fabs(bR[12])))); + inputSampleR -= (bR[13] * (0.33943170284673974 + (0.09183418349389982*fabs(bR[13])))); + inputSampleR -= (bR[14] * (0.33838775119286391 - (0.06453051658561271*fabs(bR[14])))); + inputSampleR -= (bR[15] * (0.30682305697961665 - (0.09549380253249232*fabs(bR[15])))); + inputSampleR -= (bR[16] * (0.23408741339295336 - (0.08083404732361277*fabs(bR[16])))); + inputSampleR -= (bR[17] * (0.10411746814025019 + (0.00253651281245780*fabs(bR[17])))); + inputSampleR += (bR[18] * (0.00133623776084696 - (0.04447267870865820*fabs(bR[18])))); + inputSampleR += (bR[19] * (0.02461903992114161 + (0.07530671732655550*fabs(bR[19])))); + inputSampleR += (bR[20] * (0.02086715842475373 + (0.22795860236804899*fabs(bR[20])))); + inputSampleR += (bR[21] * (0.02761433637100917 + (0.26108320417844094*fabs(bR[21])))); + inputSampleR += (bR[22] * (0.04475285369162533 + (0.19160705011061663*fabs(bR[22])))); + inputSampleR += (bR[23] * (0.09447338372862381 + (0.03681550508743799*fabs(bR[23])))); + inputSampleR += (bR[24] * (0.13445890343722280 - (0.13713036462146147*fabs(bR[24])))); + inputSampleR += (bR[25] * (0.13872868945088121 - (0.22401242373298191*fabs(bR[25])))); + inputSampleR += (bR[26] * (0.14915650097434549 - (0.26718804981526367*fabs(bR[26])))); + inputSampleR += (bR[27] * (0.12766643217091783 - (0.27745664795660430*fabs(bR[27])))); + inputSampleR += (bR[28] * (0.03675849788393101 - (0.18338278173550679*fabs(bR[28])))); + inputSampleR -= (bR[29] * (0.06307306864232835 + (0.06089480869040766*fabs(bR[29])))); + inputSampleR -= (bR[30] * (0.14947389348962944 + (0.04642103054798480*fabs(bR[30])))); + inputSampleR -= (bR[31] * (0.25235266566401526 + (0.08423062596460507*fabs(bR[31])))); + inputSampleR -= (bR[32] * (0.33496344048679683 + (0.09808328256677995*fabs(bR[32])))); + inputSampleR -= (bR[33] * (0.36590030482175445 + (0.10622650888958179*fabs(bR[33])))); + inputSampleR -= (bR[34] * (0.35015197011464372 + (0.08982043516016047*fabs(bR[34])))); + inputSampleR -= (bR[35] * (0.26808437585665090 + (0.00735561860229533*fabs(bR[35])))); + inputSampleR -= (bR[36] * (0.11624318543291220 - (0.07142484314510467*fabs(bR[36])))); + inputSampleR += (bR[37] * (0.05617084165377551 + (0.11785854050350089*fabs(bR[37])))); + inputSampleR += (bR[38] * (0.20540028692589385 + (0.20479174663329586*fabs(bR[38])))); + inputSampleR += (bR[39] * (0.30455415003043818 + (0.29074864580096849*fabs(bR[39])))); + inputSampleR += (bR[40] * (0.33810750937829476 + (0.29182307921316802*fabs(bR[40])))); + inputSampleR += (bR[41] * (0.31936133365277430 + (0.26535537727394987*fabs(bR[41])))); + inputSampleR += (bR[42] * (0.27388548321981876 + (0.19735049990538350*fabs(bR[42])))); + inputSampleR += (bR[43] * (0.21454597517994098 + (0.06415909270247236*fabs(bR[43])))); + inputSampleR += (bR[44] * (0.15001045817707717 - (0.03831118543404573*fabs(bR[44])))); + inputSampleR += (bR[45] * (0.07283437284653138 - (0.09281952429543777*fabs(bR[45])))); + inputSampleR -= (bR[46] * (0.03917872184241358 + (0.14306291461398810*fabs(bR[46])))); + inputSampleR -= (bR[47] * (0.16695932032148642 + (0.19138995946950504*fabs(bR[47])))); + inputSampleR -= (bR[48] * (0.27055854466909462 + (0.22531296466343192*fabs(bR[48])))); + inputSampleR -= (bR[49] * (0.33256357307578271 + (0.23305840475692102*fabs(bR[49])))); + inputSampleR -= (bR[50] * (0.33459770116834442 + (0.24091822618917569*fabs(bR[50])))); + inputSampleR -= (bR[51] * (0.27156687236338090 + (0.24062938573512443*fabs(bR[51])))); + inputSampleR -= (bR[52] * (0.17197093288412094 + (0.19083085091993421*fabs(bR[52])))); + inputSampleR -= (bR[53] * (0.06738628195910543 + (0.10268609751019808*fabs(bR[53])))); + inputSampleR += (bR[54] * (0.00222429218204290 + (0.01439664435720548*fabs(bR[54])))); + inputSampleR += (bR[55] * (0.01346992803494091 + (0.15947137113534526*fabs(bR[55])))); + inputSampleR -= (bR[56] * (0.02038911881377448 - (0.26763170752416160*fabs(bR[56])))); + inputSampleR -= (bR[57] * (0.08233579178189687 - (0.29415931086406055*fabs(bR[57])))); + inputSampleR -= (bR[58] * (0.15447855089824883 - (0.26489186990840807*fabs(bR[58])))); + inputSampleR -= (bR[59] * (0.20518281113362655 - (0.16135382257522859*fabs(bR[59])))); + inputSampleR -= (bR[60] * (0.22244686050232007 + (0.00847180390247432*fabs(bR[60])))); + inputSampleR -= (bR[61] * (0.21849243134998034 + (0.14460595245753741*fabs(bR[61])))); + inputSampleR -= (bR[62] * (0.20256105734574054 + (0.18932793221831667*fabs(bR[62])))); + inputSampleR -= (bR[63] * (0.18604070054295399 + (0.17250665610927965*fabs(bR[63])))); + inputSampleR -= (bR[64] * (0.17222844322058231 + (0.12992472027850357*fabs(bR[64])))); + inputSampleR -= (bR[65] * (0.14447856616566443 + (0.09089219002147308*fabs(bR[65])))); + inputSampleR -= (bR[66] * (0.10385520794251019 + (0.08600465834570559*fabs(bR[66])))); + inputSampleR -= (bR[67] * (0.07124435678265063 + (0.09071532210549428*fabs(bR[67])))); + inputSampleR -= (bR[68] * (0.05216857461197572 + (0.06794061706070262*fabs(bR[68])))); + inputSampleR -= (bR[69] * (0.05235381920184123 + (0.02818101717909346*fabs(bR[69])))); + inputSampleR -= (bR[70] * (0.07569701245553526 - (0.00634228544764946*fabs(bR[70])))); + inputSampleR -= (bR[71] * (0.10320125382718826 - (0.02751486906644141*fabs(bR[71])))); + inputSampleR -= (bR[72] * (0.12122120969079088 - (0.05434007312178933*fabs(bR[72])))); + inputSampleR -= (bR[73] * (0.13438969117200902 - (0.09135218559713874*fabs(bR[73])))); + inputSampleR -= (bR[74] * (0.13534390437529981 - (0.10437672041458675*fabs(bR[74])))); + inputSampleR -= (bR[75] * (0.11424128854188388 - (0.08693450726462598*fabs(bR[75])))); + inputSampleR -= (bR[76] * (0.08166894518596159 - (0.06949989431475120*fabs(bR[76])))); + inputSampleR -= (bR[77] * (0.04293976378555305 - (0.05718625137421843*fabs(bR[77])))); + inputSampleR += (bR[78] * (0.00933076320644409 + (0.01728285211520138*fabs(bR[78])))); + inputSampleR += (bR[79] * (0.06450430362918153 - (0.02492994833691022*fabs(bR[79])))); + inputSampleR += (bR[80] * (0.10187400687649277 - (0.03578455940532403*fabs(bR[80])))); + inputSampleR += (bR[81] * (0.11039763294094571 - (0.03995523517573508*fabs(bR[81])))); + inputSampleR += (bR[82] * (0.08557960776024547 - (0.03482514309492527*fabs(bR[82])))); + inputSampleR += (bR[83] * (0.02730881850805332 - (0.00514750108411127*fabs(bR[83])))); + + temp = (inputSampleR + smoothCabBR)/3.0; + smoothCabBR = inputSampleR; + inputSampleR = temp/4.0; + + randy = ((double(fpdR)/UINT32_MAX)*0.04); + drySampleR = ((((inputSampleR*(1-randy))+(lastCabSampleR*randy))*wet)+(drySampleR*(1.0-wet)))*outputlevel; + lastCabSampleR = inputSampleR; + inputSampleR = drySampleR; //cab + + if (cycleEnd == 4) { + lastRefL[0] = lastRefL[4]; //start from previous last + lastRefL[2] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[1] = (lastRefL[0] + lastRefL[2])/2; //one quarter + lastRefL[3] = (lastRefL[2] + inputSampleL)/2; //three quarters + lastRefL[4] = inputSampleL; //full + lastRefR[0] = lastRefR[4]; //start from previous last + lastRefR[2] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[1] = (lastRefR[0] + lastRefR[2])/2; //one quarter + lastRefR[3] = (lastRefR[2] + inputSampleR)/2; //three quarters + lastRefR[4] = inputSampleR; //full + } + if (cycleEnd == 3) { + lastRefL[0] = lastRefL[3]; //start from previous last + lastRefL[2] = (lastRefL[0]+lastRefL[0]+inputSampleL)/3; //third + lastRefL[1] = (lastRefL[0]+inputSampleL+inputSampleL)/3; //two thirds + lastRefL[3] = inputSampleL; //full + lastRefR[0] = lastRefR[3]; //start from previous last + lastRefR[2] = (lastRefR[0]+lastRefR[0]+inputSampleR)/3; //third + lastRefR[1] = (lastRefR[0]+inputSampleR+inputSampleR)/3; //two thirds + lastRefR[3] = inputSampleR; //full + } + if (cycleEnd == 2) { + lastRefL[0] = lastRefL[2]; //start from previous last + lastRefL[1] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[2] = inputSampleL; //full + lastRefR[0] = lastRefR[2]; //start from previous last + lastRefR[1] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[2] = inputSampleR; //full + } + if (cycleEnd == 1) { + lastRefL[0] = inputSampleL; + lastRefR[0] = inputSampleR; + } + cycle = 0; //reset + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + } else { + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + //we are going through our references now + } + switch (cycleEnd) //multi-pole average using lastRef[] variables + { + case 4: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[7])*0.5; + lastRefL[7] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[7])*0.5; + lastRefR[7] = lastRefR[8]; //continue, do not break + case 3: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[6])*0.5; + lastRefL[6] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[6])*0.5; + lastRefR[6] = lastRefR[8]; //continue, do not break + case 2: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[5])*0.5; + lastRefL[5] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[5])*0.5; + lastRefR[5] = lastRefR[8]; //continue, do not break + case 1: + break; //no further averaging + } + + //begin 32 bit stereo floating point dither + /* + int expon; frexpf((float)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + frexpf((float)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 5.5e-36l * pow(2,expon+62)); + //end 32 bit stereo floating point dither + */ + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} + +void GrindAmp::processDoubleReplacing(double **inputs, double **outputs, VstInt32 sampleFrames) +{ + double* in1 = inputs[0]; + double* in2 = inputs[1]; + double* out1 = outputs[0]; + double* out2 = outputs[1]; + + double overallscale = 1.0; + overallscale /= 44100.0; + overallscale *= getSampleRate(); + int cycleEnd = floor(overallscale); + if (cycleEnd < 1) cycleEnd = 1; + if (cycleEnd > 4) cycleEnd = 4; + //this is going to be 2 for 88.1 or 96k, 3 for silly people, 4 for 176 or 192k + if (cycle > cycleEnd-1) cycle = cycleEnd-1; //sanity check + + double inputlevel = pow(A,2); + double samplerate = getSampleRate(); + double trimEQ = 1.1-B; + double toneEQ = trimEQ/1.2; + trimEQ /= 50.0; + trimEQ += 0.165; + double EQ = ((trimEQ-(toneEQ/6.1)) / samplerate)*22050.0; + double BEQ = ((trimEQ+(toneEQ/2.1)) / samplerate)*22050.0; + double outputlevel = C; + double wet = D; + double bassdrive = 1.57079633*(2.5-toneEQ); + + double cutoff = (18000.0+(B*1000.0)) / getSampleRate(); + if (cutoff > 0.49) cutoff = 0.49; //don't crash if run at 44.1k + if (cutoff < 0.001) cutoff = 0.001; //or if cutoff's too low + + fixF[fix_freq] = fixE[fix_freq] = fixD[fix_freq] = fixC[fix_freq] = fixB[fix_freq] = fixA[fix_freq] = cutoff; + + fixA[fix_reso] = 4.46570214; + fixB[fix_reso] = 1.51387132; + fixC[fix_reso] = 0.93979296; + fixD[fix_reso] = 0.70710678; + fixE[fix_reso] = 0.52972649; + fixF[fix_reso] = 0.50316379; + + double K = tan(juce::MathConstants::pi * fixA[fix_freq]); //lowpass + double norm = 1.0 / (1.0 + K / fixA[fix_reso] + K * K); + fixA[fix_a0] = K * K * norm; + fixA[fix_a1] = 2.0 * fixA[fix_a0]; + fixA[fix_a2] = fixA[fix_a0]; + fixA[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixA[fix_b2] = (1.0 - K / fixA[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixB[fix_freq]); + norm = 1.0 / (1.0 + K / fixB[fix_reso] + K * K); + fixB[fix_a0] = K * K * norm; + fixB[fix_a1] = 2.0 * fixB[fix_a0]; + fixB[fix_a2] = fixB[fix_a0]; + fixB[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixB[fix_b2] = (1.0 - K / fixB[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixC[fix_freq]); + norm = 1.0 / (1.0 + K / fixC[fix_reso] + K * K); + fixC[fix_a0] = K * K * norm; + fixC[fix_a1] = 2.0 * fixC[fix_a0]; + fixC[fix_a2] = fixC[fix_a0]; + fixC[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixC[fix_b2] = (1.0 - K / fixC[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixD[fix_freq]); + norm = 1.0 / (1.0 + K / fixD[fix_reso] + K * K); + fixD[fix_a0] = K * K * norm; + fixD[fix_a1] = 2.0 * fixD[fix_a0]; + fixD[fix_a2] = fixD[fix_a0]; + fixD[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixD[fix_b2] = (1.0 - K / fixD[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixE[fix_freq]); + norm = 1.0 / (1.0 + K / fixE[fix_reso] + K * K); + fixE[fix_a0] = K * K * norm; + fixE[fix_a1] = 2.0 * fixE[fix_a0]; + fixE[fix_a2] = fixE[fix_a0]; + fixE[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixE[fix_b2] = (1.0 - K / fixE[fix_reso] + K * K) * norm; + + K = tan(juce::MathConstants::pi * fixF[fix_freq]); + norm = 1.0 / (1.0 + K / fixF[fix_reso] + K * K); + fixF[fix_a0] = K * K * norm; + fixF[fix_a1] = 2.0 * fixF[fix_a0]; + fixF[fix_a2] = fixF[fix_a0]; + fixF[fix_b1] = 2.0 * (K * K - 1.0) * norm; + fixF[fix_b2] = (1.0 - K / fixF[fix_reso] + K * K) * norm; + + while (--sampleFrames >= 0) + { + double inputSampleL = *in1; + double inputSampleR = *in2; + //if (fabs(inputSampleL)<1.18e-23) inputSampleL = fpdL * 1.18e-17; + //if (fabs(inputSampleR)<1.18e-23) inputSampleR = fpdR * 1.18e-17; + double drySampleL = inputSampleL; + double drySampleR = inputSampleR; + + double outSample = (inputSampleL * fixA[fix_a0]) + fixA[fix_sL1]; + fixA[fix_sL1] = (inputSampleL * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sL2]; + fixA[fix_sL2] = (inputSampleL * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixA[fix_a0]) + fixA[fix_sR1]; + fixA[fix_sR1] = (inputSampleR * fixA[fix_a1]) - (outSample * fixA[fix_b1]) + fixA[fix_sR2]; + fixA[fix_sR2] = (inputSampleR * fixA[fix_a2]) - (outSample * fixA[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevel; + iirSampleAL = (iirSampleAL * (1.0 - EQ)) + (inputSampleL * EQ); + inputSampleL = inputSampleL - (iirSampleAL*0.92); + //highpass + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + double bridgerectifier = fabs(inputSampleL); + double inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothAL + (secondAL*inverse) + (thirdAL*bridgerectifier) + inputSampleL); + thirdAL = secondAL; + secondAL = smoothAL; + smoothAL = inputSampleL; + double basscatchL = inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + inputSampleR *= inputlevel; + iirSampleAR = (iirSampleAR * (1.0 - EQ)) + (inputSampleR * EQ); + inputSampleR = inputSampleR - (iirSampleAR*0.92); + //highpass + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothAR + (secondAR*inverse) + (thirdAR*bridgerectifier) + inputSampleR); + thirdAR = secondAR; + secondAR = smoothAR; + smoothAR = inputSampleR; + double basscatchR = inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixB[fix_a0]) + fixB[fix_sL1]; + fixB[fix_sL1] = (inputSampleL * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sL2]; + fixB[fix_sL2] = (inputSampleL * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixB[fix_a0]) + fixB[fix_sR1]; + fixB[fix_sR1] = (inputSampleR * fixB[fix_a1]) - (outSample * fixB[fix_b1]) + fixB[fix_sR2]; + fixB[fix_sR2] = (inputSampleR * fixB[fix_a2]) - (outSample * fixB[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + inputSampleL *= inputlevel; + iirSampleBL = (iirSampleBL * (1.0 - EQ)) + (inputSampleL * EQ); + inputSampleL = inputSampleL - (iirSampleBL*0.79); + //highpass + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + bridgerectifier = fabs(inputSampleL); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothBL + (secondBL*inverse) + (thirdBL*bridgerectifier) + inputSampleL); + thirdBL = secondBL; + secondBL = smoothBL; + smoothBL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + inputSampleR *= inputlevel; + iirSampleBR = (iirSampleBR * (1.0 - EQ)) + (inputSampleR * EQ); + inputSampleR = inputSampleR - (iirSampleBR*0.79); + //highpass + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothBR + (secondBR*inverse) + (thirdBR*bridgerectifier) + inputSampleR); + thirdBR = secondBR; + secondBR = smoothBR; + smoothBR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + iirSampleCL = (iirSampleCL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleCL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothCL + (secondCL*inverse) + (thirdCL*bridgerectifier) + inputSampleL); + thirdCL = secondCL; + secondCL = smoothCL; + smoothCL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleCR = (iirSampleCR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleCR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothCR + (secondCR*inverse) + (thirdCR*bridgerectifier) + inputSampleR); + thirdCR = secondCR; + secondCR = smoothCR; + smoothCR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixC[fix_a0]) + fixC[fix_sL1]; + fixC[fix_sL1] = (inputSampleL * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sL2]; + fixC[fix_sL2] = (inputSampleL * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixC[fix_a0]) + fixC[fix_sR1]; + fixC[fix_sR1] = (inputSampleR * fixC[fix_a1]) - (outSample * fixC[fix_b1]) + fixC[fix_sR2]; + fixC[fix_sR2] = (inputSampleR * fixC[fix_a2]) - (outSample * fixC[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleDL = (iirSampleDL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleDL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothDL + (secondDL*inverse) + (thirdDL*bridgerectifier) + inputSampleL); + thirdDL = secondDL; + secondDL = smoothDL; + smoothDL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleDR = (iirSampleDR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleDR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothDR + (secondDR*inverse) + (thirdDR*bridgerectifier) + inputSampleR); + thirdDR = secondDR; + secondDR = smoothDR; + smoothDR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixD[fix_a0]) + fixD[fix_sL1]; + fixD[fix_sL1] = (inputSampleL * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sL2]; + fixD[fix_sL2] = (inputSampleL * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixD[fix_a0]) + fixD[fix_sR1]; + fixD[fix_sR1] = (inputSampleR * fixD[fix_a1]) - (outSample * fixD[fix_b1]) + fixD[fix_sR2]; + fixD[fix_sR2] = (inputSampleR * fixD[fix_a2]) - (outSample * fixD[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleEL = (iirSampleEL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleEL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothEL + (secondEL*inverse) + (thirdEL*bridgerectifier) + inputSampleL); + thirdEL = secondEL; + secondEL = smoothEL; + smoothEL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleER = (iirSampleER * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleER*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothER + (secondER*inverse) + (thirdER*bridgerectifier) + inputSampleR); + thirdER = secondER; + secondER = smoothER; + smoothER = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + iirSampleFL = (iirSampleFL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleFL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothFL + (secondFL*inverse) + (thirdFL*bridgerectifier) + inputSampleL); + thirdFL = secondFL; + secondFL = smoothFL; + smoothFL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleFR = (iirSampleFR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleFR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothFR + (secondFR*inverse) + (thirdFR*bridgerectifier) + inputSampleR); + thirdFR = secondFR; + secondFR = smoothFR; + smoothFR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixE[fix_a0]) + fixE[fix_sL1]; + fixE[fix_sL1] = (inputSampleL * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sL2]; + fixE[fix_sL2] = (inputSampleL * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixE[fix_a0]) + fixE[fix_sR1]; + fixE[fix_sR1] = (inputSampleR * fixE[fix_a1]) - (outSample * fixE[fix_b1]) + fixE[fix_sR2]; + fixE[fix_sR2] = (inputSampleR * fixE[fix_a2]) - (outSample * fixE[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleGL = (iirSampleGL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleGL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothGL + (secondGL*inverse) + (thirdGL*bridgerectifier) + inputSampleL); + thirdGL = secondGL; + secondGL = smoothGL; + smoothGL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleGR = (iirSampleGR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleGR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothGR + (secondGR*inverse) + (thirdGR*bridgerectifier) + inputSampleR); + thirdGR = secondGR; + secondGR = smoothGR; + smoothGR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + iirSampleHL = (iirSampleHL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleHL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothHL + (secondHL*inverse) + (thirdHL*bridgerectifier) + inputSampleL); + thirdHL = secondHL; + secondHL = smoothHL; + smoothHL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleHR = (iirSampleHR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleHR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothHR + (secondHR*inverse) + (thirdHR*bridgerectifier) + inputSampleR); + thirdHR = secondHR; + secondHR = smoothHR; + smoothHR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + outSample = (inputSampleL * fixF[fix_a0]) + fixF[fix_sL1]; + fixF[fix_sL1] = (inputSampleL * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sL2]; + fixF[fix_sL2] = (inputSampleL * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleL = outSample; //fixed biquad filtering ultrasonics + outSample = (inputSampleR * fixF[fix_a0]) + fixF[fix_sR1]; + fixF[fix_sR1] = (inputSampleR * fixF[fix_a1]) - (outSample * fixF[fix_b1]) + fixF[fix_sR2]; + fixF[fix_sR2] = (inputSampleR * fixF[fix_a2]) - (outSample * fixF[fix_b2]); + inputSampleR = outSample; //fixed biquad filtering ultrasonics + + iirSampleIL = (iirSampleIL * (1.0 - BEQ)) + (basscatchL * BEQ); + basscatchL = iirSampleIL*bassdrive; + bridgerectifier = fabs(basscatchL); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchL > 0.0) basscatchL = bridgerectifier; + else basscatchL = -bridgerectifier; + if (inputSampleL > 1.0) inputSampleL = 1.0; if (inputSampleL < -1.0) inputSampleL = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothIL + (secondIL*inverse) + (thirdIL*bridgerectifier) + inputSampleL); + thirdIL = secondIL; + secondIL = smoothIL; + smoothIL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleL); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothJL + (secondJL*inverse) + (thirdJL*bridgerectifier) + inputSampleL); + thirdJL = secondJL; + secondJL = smoothJL; + smoothJL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleL); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothKL + (secondKL*inverse) + (thirdKL*bridgerectifier) + inputSampleL); + thirdKL = secondKL; + secondKL = smoothKL; + smoothKL = inputSampleL; + inputSampleL = bridgerectifier; + //three-sample averaging lowpass + + iirSampleIR = (iirSampleIR * (1.0 - BEQ)) + (basscatchR * BEQ); + basscatchR = iirSampleIR*bassdrive; + bridgerectifier = fabs(basscatchR); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (basscatchR > 0.0) basscatchR = bridgerectifier; + else basscatchR = -bridgerectifier; + if (inputSampleR > 1.0) inputSampleR = 1.0; if (inputSampleR < -1.0) inputSampleR = -1.0; + //overdrive + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothIR + (secondIR*inverse) + (thirdIR*bridgerectifier) + inputSampleR); + thirdIR = secondIR; + secondIR = smoothIR; + smoothIR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothJR + (secondJR*inverse) + (thirdJR*bridgerectifier) + inputSampleR); + thirdJR = secondJR; + secondJR = smoothJR; + smoothJR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + bridgerectifier = fabs(inputSampleR); + inverse = (bridgerectifier+1.0)/2.0; + bridgerectifier = (smoothKR + (secondKR*inverse) + (thirdKR*bridgerectifier) + inputSampleR); + thirdKR = secondKR; + secondKR = smoothKR; + smoothKR = inputSampleR; + inputSampleR = bridgerectifier; + //three-sample averaging lowpass + + basscatchL /= 2.0; + inputSampleL = (inputSampleL*toneEQ)+basscatchL; + //extra lowpass for 4*12" speakers + basscatchR /= 2.0; + inputSampleR = (inputSampleR*toneEQ)+basscatchR; + //extra lowpass for 4*12" speakers + + bridgerectifier = fabs(inputSampleL*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleL > 0.0) inputSampleL = bridgerectifier; + else inputSampleL = -bridgerectifier; + inputSampleL += basscatchL; + //split bass between overdrive and clean + inputSampleL /= (1.0+toneEQ); + + bridgerectifier = fabs(inputSampleR*outputlevel); + if (bridgerectifier > 1.57079633) bridgerectifier = 1.57079633; + bridgerectifier = sin(bridgerectifier); + if (inputSampleR > 0.0) inputSampleR = bridgerectifier; + else inputSampleR = -bridgerectifier; + inputSampleR += basscatchR; + //split bass between overdrive and clean + inputSampleR /= (1.0+toneEQ); + + double randy = ((double(fpdL)/UINT32_MAX)*0.061); + inputSampleL = ((inputSampleL*(1-randy))+(storeSampleL*randy))*outputlevel; + storeSampleL = inputSampleL; + + randy = ((double(fpdR)/UINT32_MAX)*0.061); + inputSampleR = ((inputSampleR*(1-randy))+(storeSampleR*randy))*outputlevel; + storeSampleR = inputSampleR; + + if (wet !=1.0) { + inputSampleL = (inputSampleL * wet) + (drySampleL * (1.0-wet)); + inputSampleR = (inputSampleR * wet) + (drySampleR * (1.0-wet)); + } + //Dry/Wet control, defaults to the last slider + //amp + + cycle++; + if (cycle == cycleEnd) { + + double temp = (inputSampleL + smoothCabAL)/3.0; + smoothCabAL = inputSampleL; + inputSampleL = temp; + + bL[83] = bL[82]; bL[82] = bL[81]; bL[81] = bL[80]; bL[80] = bL[79]; + bL[79] = bL[78]; bL[78] = bL[77]; bL[77] = bL[76]; bL[76] = bL[75]; bL[75] = bL[74]; bL[74] = bL[73]; bL[73] = bL[72]; bL[72] = bL[71]; + bL[71] = bL[70]; bL[70] = bL[69]; bL[69] = bL[68]; bL[68] = bL[67]; bL[67] = bL[66]; bL[66] = bL[65]; bL[65] = bL[64]; bL[64] = bL[63]; + bL[63] = bL[62]; bL[62] = bL[61]; bL[61] = bL[60]; bL[60] = bL[59]; bL[59] = bL[58]; bL[58] = bL[57]; bL[57] = bL[56]; bL[56] = bL[55]; + bL[55] = bL[54]; bL[54] = bL[53]; bL[53] = bL[52]; bL[52] = bL[51]; bL[51] = bL[50]; bL[50] = bL[49]; bL[49] = bL[48]; bL[48] = bL[47]; + bL[47] = bL[46]; bL[46] = bL[45]; bL[45] = bL[44]; bL[44] = bL[43]; bL[43] = bL[42]; bL[42] = bL[41]; bL[41] = bL[40]; bL[40] = bL[39]; + bL[39] = bL[38]; bL[38] = bL[37]; bL[37] = bL[36]; bL[36] = bL[35]; bL[35] = bL[34]; bL[34] = bL[33]; bL[33] = bL[32]; bL[32] = bL[31]; + bL[31] = bL[30]; bL[30] = bL[29]; bL[29] = bL[28]; bL[28] = bL[27]; bL[27] = bL[26]; bL[26] = bL[25]; bL[25] = bL[24]; bL[24] = bL[23]; + bL[23] = bL[22]; bL[22] = bL[21]; bL[21] = bL[20]; bL[20] = bL[19]; bL[19] = bL[18]; bL[18] = bL[17]; bL[17] = bL[16]; bL[16] = bL[15]; + bL[15] = bL[14]; bL[14] = bL[13]; bL[13] = bL[12]; bL[12] = bL[11]; bL[11] = bL[10]; bL[10] = bL[9]; bL[9] = bL[8]; bL[8] = bL[7]; + bL[7] = bL[6]; bL[6] = bL[5]; bL[5] = bL[4]; bL[4] = bL[3]; bL[3] = bL[2]; bL[2] = bL[1]; bL[1] = bL[0]; bL[0] = inputSampleL; + inputSampleL += (bL[1] * (1.29550481610475132 + (0.19713872057074355*fabs(bL[1])))); + inputSampleL += (bL[2] * (1.42302569895462616 + (0.30599505521284787*fabs(bL[2])))); + inputSampleL += (bL[3] * (1.28728195804197565 + (0.23168333460446133*fabs(bL[3])))); + inputSampleL += (bL[4] * (0.88553784290822690 + (0.14263256172918892*fabs(bL[4])))); + inputSampleL += (bL[5] * (0.37129054918432319 + (0.00150040944205920*fabs(bL[5])))); + inputSampleL -= (bL[6] * (0.12150959412556320 + (0.32776273620569107*fabs(bL[6])))); + inputSampleL -= (bL[7] * (0.44900065463203775 + (0.74101214925298819*fabs(bL[7])))); + inputSampleL -= (bL[8] * (0.54058781908186482 + (1.07821707459008387*fabs(bL[8])))); + inputSampleL -= (bL[9] * (0.49361966401791391 + (1.23540109014850508*fabs(bL[9])))); + inputSampleL -= (bL[10] * (0.39819495093078133 + (1.11247213730917749*fabs(bL[10])))); + inputSampleL -= (bL[11] * (0.31379279985435521 + (0.80330360359638298*fabs(bL[11])))); + inputSampleL -= (bL[12] * (0.30744359242808555 + (0.42132528876858205*fabs(bL[12])))); + inputSampleL -= (bL[13] * (0.33943170284673974 + (0.09183418349389982*fabs(bL[13])))); + inputSampleL -= (bL[14] * (0.33838775119286391 - (0.06453051658561271*fabs(bL[14])))); + inputSampleL -= (bL[15] * (0.30682305697961665 - (0.09549380253249232*fabs(bL[15])))); + inputSampleL -= (bL[16] * (0.23408741339295336 - (0.08083404732361277*fabs(bL[16])))); + inputSampleL -= (bL[17] * (0.10411746814025019 + (0.00253651281245780*fabs(bL[17])))); + inputSampleL += (bL[18] * (0.00133623776084696 - (0.04447267870865820*fabs(bL[18])))); + inputSampleL += (bL[19] * (0.02461903992114161 + (0.07530671732655550*fabs(bL[19])))); + inputSampleL += (bL[20] * (0.02086715842475373 + (0.22795860236804899*fabs(bL[20])))); + inputSampleL += (bL[21] * (0.02761433637100917 + (0.26108320417844094*fabs(bL[21])))); + inputSampleL += (bL[22] * (0.04475285369162533 + (0.19160705011061663*fabs(bL[22])))); + inputSampleL += (bL[23] * (0.09447338372862381 + (0.03681550508743799*fabs(bL[23])))); + inputSampleL += (bL[24] * (0.13445890343722280 - (0.13713036462146147*fabs(bL[24])))); + inputSampleL += (bL[25] * (0.13872868945088121 - (0.22401242373298191*fabs(bL[25])))); + inputSampleL += (bL[26] * (0.14915650097434549 - (0.26718804981526367*fabs(bL[26])))); + inputSampleL += (bL[27] * (0.12766643217091783 - (0.27745664795660430*fabs(bL[27])))); + inputSampleL += (bL[28] * (0.03675849788393101 - (0.18338278173550679*fabs(bL[28])))); + inputSampleL -= (bL[29] * (0.06307306864232835 + (0.06089480869040766*fabs(bL[29])))); + inputSampleL -= (bL[30] * (0.14947389348962944 + (0.04642103054798480*fabs(bL[30])))); + inputSampleL -= (bL[31] * (0.25235266566401526 + (0.08423062596460507*fabs(bL[31])))); + inputSampleL -= (bL[32] * (0.33496344048679683 + (0.09808328256677995*fabs(bL[32])))); + inputSampleL -= (bL[33] * (0.36590030482175445 + (0.10622650888958179*fabs(bL[33])))); + inputSampleL -= (bL[34] * (0.35015197011464372 + (0.08982043516016047*fabs(bL[34])))); + inputSampleL -= (bL[35] * (0.26808437585665090 + (0.00735561860229533*fabs(bL[35])))); + inputSampleL -= (bL[36] * (0.11624318543291220 - (0.07142484314510467*fabs(bL[36])))); + inputSampleL += (bL[37] * (0.05617084165377551 + (0.11785854050350089*fabs(bL[37])))); + inputSampleL += (bL[38] * (0.20540028692589385 + (0.20479174663329586*fabs(bL[38])))); + inputSampleL += (bL[39] * (0.30455415003043818 + (0.29074864580096849*fabs(bL[39])))); + inputSampleL += (bL[40] * (0.33810750937829476 + (0.29182307921316802*fabs(bL[40])))); + inputSampleL += (bL[41] * (0.31936133365277430 + (0.26535537727394987*fabs(bL[41])))); + inputSampleL += (bL[42] * (0.27388548321981876 + (0.19735049990538350*fabs(bL[42])))); + inputSampleL += (bL[43] * (0.21454597517994098 + (0.06415909270247236*fabs(bL[43])))); + inputSampleL += (bL[44] * (0.15001045817707717 - (0.03831118543404573*fabs(bL[44])))); + inputSampleL += (bL[45] * (0.07283437284653138 - (0.09281952429543777*fabs(bL[45])))); + inputSampleL -= (bL[46] * (0.03917872184241358 + (0.14306291461398810*fabs(bL[46])))); + inputSampleL -= (bL[47] * (0.16695932032148642 + (0.19138995946950504*fabs(bL[47])))); + inputSampleL -= (bL[48] * (0.27055854466909462 + (0.22531296466343192*fabs(bL[48])))); + inputSampleL -= (bL[49] * (0.33256357307578271 + (0.23305840475692102*fabs(bL[49])))); + inputSampleL -= (bL[50] * (0.33459770116834442 + (0.24091822618917569*fabs(bL[50])))); + inputSampleL -= (bL[51] * (0.27156687236338090 + (0.24062938573512443*fabs(bL[51])))); + inputSampleL -= (bL[52] * (0.17197093288412094 + (0.19083085091993421*fabs(bL[52])))); + inputSampleL -= (bL[53] * (0.06738628195910543 + (0.10268609751019808*fabs(bL[53])))); + inputSampleL += (bL[54] * (0.00222429218204290 + (0.01439664435720548*fabs(bL[54])))); + inputSampleL += (bL[55] * (0.01346992803494091 + (0.15947137113534526*fabs(bL[55])))); + inputSampleL -= (bL[56] * (0.02038911881377448 - (0.26763170752416160*fabs(bL[56])))); + inputSampleL -= (bL[57] * (0.08233579178189687 - (0.29415931086406055*fabs(bL[57])))); + inputSampleL -= (bL[58] * (0.15447855089824883 - (0.26489186990840807*fabs(bL[58])))); + inputSampleL -= (bL[59] * (0.20518281113362655 - (0.16135382257522859*fabs(bL[59])))); + inputSampleL -= (bL[60] * (0.22244686050232007 + (0.00847180390247432*fabs(bL[60])))); + inputSampleL -= (bL[61] * (0.21849243134998034 + (0.14460595245753741*fabs(bL[61])))); + inputSampleL -= (bL[62] * (0.20256105734574054 + (0.18932793221831667*fabs(bL[62])))); + inputSampleL -= (bL[63] * (0.18604070054295399 + (0.17250665610927965*fabs(bL[63])))); + inputSampleL -= (bL[64] * (0.17222844322058231 + (0.12992472027850357*fabs(bL[64])))); + inputSampleL -= (bL[65] * (0.14447856616566443 + (0.09089219002147308*fabs(bL[65])))); + inputSampleL -= (bL[66] * (0.10385520794251019 + (0.08600465834570559*fabs(bL[66])))); + inputSampleL -= (bL[67] * (0.07124435678265063 + (0.09071532210549428*fabs(bL[67])))); + inputSampleL -= (bL[68] * (0.05216857461197572 + (0.06794061706070262*fabs(bL[68])))); + inputSampleL -= (bL[69] * (0.05235381920184123 + (0.02818101717909346*fabs(bL[69])))); + inputSampleL -= (bL[70] * (0.07569701245553526 - (0.00634228544764946*fabs(bL[70])))); + inputSampleL -= (bL[71] * (0.10320125382718826 - (0.02751486906644141*fabs(bL[71])))); + inputSampleL -= (bL[72] * (0.12122120969079088 - (0.05434007312178933*fabs(bL[72])))); + inputSampleL -= (bL[73] * (0.13438969117200902 - (0.09135218559713874*fabs(bL[73])))); + inputSampleL -= (bL[74] * (0.13534390437529981 - (0.10437672041458675*fabs(bL[74])))); + inputSampleL -= (bL[75] * (0.11424128854188388 - (0.08693450726462598*fabs(bL[75])))); + inputSampleL -= (bL[76] * (0.08166894518596159 - (0.06949989431475120*fabs(bL[76])))); + inputSampleL -= (bL[77] * (0.04293976378555305 - (0.05718625137421843*fabs(bL[77])))); + inputSampleL += (bL[78] * (0.00933076320644409 + (0.01728285211520138*fabs(bL[78])))); + inputSampleL += (bL[79] * (0.06450430362918153 - (0.02492994833691022*fabs(bL[79])))); + inputSampleL += (bL[80] * (0.10187400687649277 - (0.03578455940532403*fabs(bL[80])))); + inputSampleL += (bL[81] * (0.11039763294094571 - (0.03995523517573508*fabs(bL[81])))); + inputSampleL += (bL[82] * (0.08557960776024547 - (0.03482514309492527*fabs(bL[82])))); + inputSampleL += (bL[83] * (0.02730881850805332 - (0.00514750108411127*fabs(bL[83])))); + + temp = (inputSampleL + smoothCabBL)/3.0; + smoothCabBL = inputSampleL; + inputSampleL = temp/4.0; + + randy = ((double(fpdL)/UINT32_MAX)*0.044); + drySampleL = ((((inputSampleL*(1-randy))+(lastCabSampleL*randy))*wet)+(drySampleL*(1.0-wet)))*outputlevel; + lastCabSampleL = inputSampleL; + inputSampleL = drySampleL; //cab L + + temp = (inputSampleR + smoothCabAR)/3.0; + smoothCabAR = inputSampleR; + inputSampleR = temp; + + bR[83] = bR[82]; bR[82] = bR[81]; bR[81] = bR[80]; bR[80] = bR[79]; + bR[79] = bR[78]; bR[78] = bR[77]; bR[77] = bR[76]; bR[76] = bR[75]; bR[75] = bR[74]; bR[74] = bR[73]; bR[73] = bR[72]; bR[72] = bR[71]; + bR[71] = bR[70]; bR[70] = bR[69]; bR[69] = bR[68]; bR[68] = bR[67]; bR[67] = bR[66]; bR[66] = bR[65]; bR[65] = bR[64]; bR[64] = bR[63]; + bR[63] = bR[62]; bR[62] = bR[61]; bR[61] = bR[60]; bR[60] = bR[59]; bR[59] = bR[58]; bR[58] = bR[57]; bR[57] = bR[56]; bR[56] = bR[55]; + bR[55] = bR[54]; bR[54] = bR[53]; bR[53] = bR[52]; bR[52] = bR[51]; bR[51] = bR[50]; bR[50] = bR[49]; bR[49] = bR[48]; bR[48] = bR[47]; + bR[47] = bR[46]; bR[46] = bR[45]; bR[45] = bR[44]; bR[44] = bR[43]; bR[43] = bR[42]; bR[42] = bR[41]; bR[41] = bR[40]; bR[40] = bR[39]; + bR[39] = bR[38]; bR[38] = bR[37]; bR[37] = bR[36]; bR[36] = bR[35]; bR[35] = bR[34]; bR[34] = bR[33]; bR[33] = bR[32]; bR[32] = bR[31]; + bR[31] = bR[30]; bR[30] = bR[29]; bR[29] = bR[28]; bR[28] = bR[27]; bR[27] = bR[26]; bR[26] = bR[25]; bR[25] = bR[24]; bR[24] = bR[23]; + bR[23] = bR[22]; bR[22] = bR[21]; bR[21] = bR[20]; bR[20] = bR[19]; bR[19] = bR[18]; bR[18] = bR[17]; bR[17] = bR[16]; bR[16] = bR[15]; + bR[15] = bR[14]; bR[14] = bR[13]; bR[13] = bR[12]; bR[12] = bR[11]; bR[11] = bR[10]; bR[10] = bR[9]; bR[9] = bR[8]; bR[8] = bR[7]; + bR[7] = bR[6]; bR[6] = bR[5]; bR[5] = bR[4]; bR[4] = bR[3]; bR[3] = bR[2]; bR[2] = bR[1]; bR[1] = bR[0]; bR[0] = inputSampleR; + inputSampleR += (bR[1] * (1.29550481610475132 + (0.19713872057074355*fabs(bR[1])))); + inputSampleR += (bR[2] * (1.42302569895462616 + (0.30599505521284787*fabs(bR[2])))); + inputSampleR += (bR[3] * (1.28728195804197565 + (0.23168333460446133*fabs(bR[3])))); + inputSampleR += (bR[4] * (0.88553784290822690 + (0.14263256172918892*fabs(bR[4])))); + inputSampleR += (bR[5] * (0.37129054918432319 + (0.00150040944205920*fabs(bR[5])))); + inputSampleR -= (bR[6] * (0.12150959412556320 + (0.32776273620569107*fabs(bR[6])))); + inputSampleR -= (bR[7] * (0.44900065463203775 + (0.74101214925298819*fabs(bR[7])))); + inputSampleR -= (bR[8] * (0.54058781908186482 + (1.07821707459008387*fabs(bR[8])))); + inputSampleR -= (bR[9] * (0.49361966401791391 + (1.23540109014850508*fabs(bR[9])))); + inputSampleR -= (bR[10] * (0.39819495093078133 + (1.11247213730917749*fabs(bR[10])))); + inputSampleR -= (bR[11] * (0.31379279985435521 + (0.80330360359638298*fabs(bR[11])))); + inputSampleR -= (bR[12] * (0.30744359242808555 + (0.42132528876858205*fabs(bR[12])))); + inputSampleR -= (bR[13] * (0.33943170284673974 + (0.09183418349389982*fabs(bR[13])))); + inputSampleR -= (bR[14] * (0.33838775119286391 - (0.06453051658561271*fabs(bR[14])))); + inputSampleR -= (bR[15] * (0.30682305697961665 - (0.09549380253249232*fabs(bR[15])))); + inputSampleR -= (bR[16] * (0.23408741339295336 - (0.08083404732361277*fabs(bR[16])))); + inputSampleR -= (bR[17] * (0.10411746814025019 + (0.00253651281245780*fabs(bR[17])))); + inputSampleR += (bR[18] * (0.00133623776084696 - (0.04447267870865820*fabs(bR[18])))); + inputSampleR += (bR[19] * (0.02461903992114161 + (0.07530671732655550*fabs(bR[19])))); + inputSampleR += (bR[20] * (0.02086715842475373 + (0.22795860236804899*fabs(bR[20])))); + inputSampleR += (bR[21] * (0.02761433637100917 + (0.26108320417844094*fabs(bR[21])))); + inputSampleR += (bR[22] * (0.04475285369162533 + (0.19160705011061663*fabs(bR[22])))); + inputSampleR += (bR[23] * (0.09447338372862381 + (0.03681550508743799*fabs(bR[23])))); + inputSampleR += (bR[24] * (0.13445890343722280 - (0.13713036462146147*fabs(bR[24])))); + inputSampleR += (bR[25] * (0.13872868945088121 - (0.22401242373298191*fabs(bR[25])))); + inputSampleR += (bR[26] * (0.14915650097434549 - (0.26718804981526367*fabs(bR[26])))); + inputSampleR += (bR[27] * (0.12766643217091783 - (0.27745664795660430*fabs(bR[27])))); + inputSampleR += (bR[28] * (0.03675849788393101 - (0.18338278173550679*fabs(bR[28])))); + inputSampleR -= (bR[29] * (0.06307306864232835 + (0.06089480869040766*fabs(bR[29])))); + inputSampleR -= (bR[30] * (0.14947389348962944 + (0.04642103054798480*fabs(bR[30])))); + inputSampleR -= (bR[31] * (0.25235266566401526 + (0.08423062596460507*fabs(bR[31])))); + inputSampleR -= (bR[32] * (0.33496344048679683 + (0.09808328256677995*fabs(bR[32])))); + inputSampleR -= (bR[33] * (0.36590030482175445 + (0.10622650888958179*fabs(bR[33])))); + inputSampleR -= (bR[34] * (0.35015197011464372 + (0.08982043516016047*fabs(bR[34])))); + inputSampleR -= (bR[35] * (0.26808437585665090 + (0.00735561860229533*fabs(bR[35])))); + inputSampleR -= (bR[36] * (0.11624318543291220 - (0.07142484314510467*fabs(bR[36])))); + inputSampleR += (bR[37] * (0.05617084165377551 + (0.11785854050350089*fabs(bR[37])))); + inputSampleR += (bR[38] * (0.20540028692589385 + (0.20479174663329586*fabs(bR[38])))); + inputSampleR += (bR[39] * (0.30455415003043818 + (0.29074864580096849*fabs(bR[39])))); + inputSampleR += (bR[40] * (0.33810750937829476 + (0.29182307921316802*fabs(bR[40])))); + inputSampleR += (bR[41] * (0.31936133365277430 + (0.26535537727394987*fabs(bR[41])))); + inputSampleR += (bR[42] * (0.27388548321981876 + (0.19735049990538350*fabs(bR[42])))); + inputSampleR += (bR[43] * (0.21454597517994098 + (0.06415909270247236*fabs(bR[43])))); + inputSampleR += (bR[44] * (0.15001045817707717 - (0.03831118543404573*fabs(bR[44])))); + inputSampleR += (bR[45] * (0.07283437284653138 - (0.09281952429543777*fabs(bR[45])))); + inputSampleR -= (bR[46] * (0.03917872184241358 + (0.14306291461398810*fabs(bR[46])))); + inputSampleR -= (bR[47] * (0.16695932032148642 + (0.19138995946950504*fabs(bR[47])))); + inputSampleR -= (bR[48] * (0.27055854466909462 + (0.22531296466343192*fabs(bR[48])))); + inputSampleR -= (bR[49] * (0.33256357307578271 + (0.23305840475692102*fabs(bR[49])))); + inputSampleR -= (bR[50] * (0.33459770116834442 + (0.24091822618917569*fabs(bR[50])))); + inputSampleR -= (bR[51] * (0.27156687236338090 + (0.24062938573512443*fabs(bR[51])))); + inputSampleR -= (bR[52] * (0.17197093288412094 + (0.19083085091993421*fabs(bR[52])))); + inputSampleR -= (bR[53] * (0.06738628195910543 + (0.10268609751019808*fabs(bR[53])))); + inputSampleR += (bR[54] * (0.00222429218204290 + (0.01439664435720548*fabs(bR[54])))); + inputSampleR += (bR[55] * (0.01346992803494091 + (0.15947137113534526*fabs(bR[55])))); + inputSampleR -= (bR[56] * (0.02038911881377448 - (0.26763170752416160*fabs(bR[56])))); + inputSampleR -= (bR[57] * (0.08233579178189687 - (0.29415931086406055*fabs(bR[57])))); + inputSampleR -= (bR[58] * (0.15447855089824883 - (0.26489186990840807*fabs(bR[58])))); + inputSampleR -= (bR[59] * (0.20518281113362655 - (0.16135382257522859*fabs(bR[59])))); + inputSampleR -= (bR[60] * (0.22244686050232007 + (0.00847180390247432*fabs(bR[60])))); + inputSampleR -= (bR[61] * (0.21849243134998034 + (0.14460595245753741*fabs(bR[61])))); + inputSampleR -= (bR[62] * (0.20256105734574054 + (0.18932793221831667*fabs(bR[62])))); + inputSampleR -= (bR[63] * (0.18604070054295399 + (0.17250665610927965*fabs(bR[63])))); + inputSampleR -= (bR[64] * (0.17222844322058231 + (0.12992472027850357*fabs(bR[64])))); + inputSampleR -= (bR[65] * (0.14447856616566443 + (0.09089219002147308*fabs(bR[65])))); + inputSampleR -= (bR[66] * (0.10385520794251019 + (0.08600465834570559*fabs(bR[66])))); + inputSampleR -= (bR[67] * (0.07124435678265063 + (0.09071532210549428*fabs(bR[67])))); + inputSampleR -= (bR[68] * (0.05216857461197572 + (0.06794061706070262*fabs(bR[68])))); + inputSampleR -= (bR[69] * (0.05235381920184123 + (0.02818101717909346*fabs(bR[69])))); + inputSampleR -= (bR[70] * (0.07569701245553526 - (0.00634228544764946*fabs(bR[70])))); + inputSampleR -= (bR[71] * (0.10320125382718826 - (0.02751486906644141*fabs(bR[71])))); + inputSampleR -= (bR[72] * (0.12122120969079088 - (0.05434007312178933*fabs(bR[72])))); + inputSampleR -= (bR[73] * (0.13438969117200902 - (0.09135218559713874*fabs(bR[73])))); + inputSampleR -= (bR[74] * (0.13534390437529981 - (0.10437672041458675*fabs(bR[74])))); + inputSampleR -= (bR[75] * (0.11424128854188388 - (0.08693450726462598*fabs(bR[75])))); + inputSampleR -= (bR[76] * (0.08166894518596159 - (0.06949989431475120*fabs(bR[76])))); + inputSampleR -= (bR[77] * (0.04293976378555305 - (0.05718625137421843*fabs(bR[77])))); + inputSampleR += (bR[78] * (0.00933076320644409 + (0.01728285211520138*fabs(bR[78])))); + inputSampleR += (bR[79] * (0.06450430362918153 - (0.02492994833691022*fabs(bR[79])))); + inputSampleR += (bR[80] * (0.10187400687649277 - (0.03578455940532403*fabs(bR[80])))); + inputSampleR += (bR[81] * (0.11039763294094571 - (0.03995523517573508*fabs(bR[81])))); + inputSampleR += (bR[82] * (0.08557960776024547 - (0.03482514309492527*fabs(bR[82])))); + inputSampleR += (bR[83] * (0.02730881850805332 - (0.00514750108411127*fabs(bR[83])))); + + temp = (inputSampleR + smoothCabBR)/3.0; + smoothCabBR = inputSampleR; + inputSampleR = temp/4.0; + + randy = ((double(fpdR)/UINT32_MAX)*0.04); + drySampleR = ((((inputSampleR*(1-randy))+(lastCabSampleR*randy))*wet)+(drySampleR*(1.0-wet)))*outputlevel; + lastCabSampleR = inputSampleR; + inputSampleR = drySampleR; //cab + + if (cycleEnd == 4) { + lastRefL[0] = lastRefL[4]; //start from previous last + lastRefL[2] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[1] = (lastRefL[0] + lastRefL[2])/2; //one quarter + lastRefL[3] = (lastRefL[2] + inputSampleL)/2; //three quarters + lastRefL[4] = inputSampleL; //full + lastRefR[0] = lastRefR[4]; //start from previous last + lastRefR[2] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[1] = (lastRefR[0] + lastRefR[2])/2; //one quarter + lastRefR[3] = (lastRefR[2] + inputSampleR)/2; //three quarters + lastRefR[4] = inputSampleR; //full + } + if (cycleEnd == 3) { + lastRefL[0] = lastRefL[3]; //start from previous last + lastRefL[2] = (lastRefL[0]+lastRefL[0]+inputSampleL)/3; //third + lastRefL[1] = (lastRefL[0]+inputSampleL+inputSampleL)/3; //two thirds + lastRefL[3] = inputSampleL; //full + lastRefR[0] = lastRefR[3]; //start from previous last + lastRefR[2] = (lastRefR[0]+lastRefR[0]+inputSampleR)/3; //third + lastRefR[1] = (lastRefR[0]+inputSampleR+inputSampleR)/3; //two thirds + lastRefR[3] = inputSampleR; //full + } + if (cycleEnd == 2) { + lastRefL[0] = lastRefL[2]; //start from previous last + lastRefL[1] = (lastRefL[0] + inputSampleL)/2; //half + lastRefL[2] = inputSampleL; //full + lastRefR[0] = lastRefR[2]; //start from previous last + lastRefR[1] = (lastRefR[0] + inputSampleR)/2; //half + lastRefR[2] = inputSampleR; //full + } + if (cycleEnd == 1) { + lastRefL[0] = inputSampleL; + lastRefR[0] = inputSampleR; + } + cycle = 0; //reset + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + } else { + inputSampleL = lastRefL[cycle]; + inputSampleR = lastRefR[cycle]; + //we are going through our references now + } + switch (cycleEnd) //multi-pole average using lastRef[] variables + { + case 4: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[7])*0.5; + lastRefL[7] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[7])*0.5; + lastRefR[7] = lastRefR[8]; //continue, do not break + case 3: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[6])*0.5; + lastRefL[6] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[6])*0.5; + lastRefR[6] = lastRefR[8]; //continue, do not break + case 2: + lastRefL[8] = inputSampleL; inputSampleL = (inputSampleL+lastRefL[5])*0.5; + lastRefL[5] = lastRefL[8]; //continue, do not break + lastRefR[8] = inputSampleR; inputSampleR = (inputSampleR+lastRefR[5])*0.5; + lastRefR[5] = lastRefR[8]; //continue, do not break + case 1: + break; //no further averaging + } + + //begin 64 bit stereo floating point dither + /* + //int expon; frexp((double)inputSampleL, &expon); + fpdL ^= fpdL << 13; fpdL ^= fpdL >> 17; fpdL ^= fpdL << 5; + //inputSampleL += ((double(fpdL)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //frexp((double)inputSampleR, &expon); + fpdR ^= fpdR << 13; fpdR ^= fpdR >> 17; fpdR ^= fpdR << 5; + //inputSampleR += ((double(fpdR)-uint32_t(0x7fffffff)) * 1.1e-44l * pow(2,expon+62)); + //end 64 bit stereo floating point dither + */ + + *out1 = inputSampleL; + *out2 = inputSampleR; + + in1++; + in2++; + out1++; + out2++; + } +} diff --git a/plugin/Source/Panels.h b/plugin/Source/Panels.h index 697b8b9..161699e 100644 --- a/plugin/Source/Panels.h +++ b/plugin/Source/Panels.h @@ -43,6 +43,7 @@ public: wt->setName ("wt"); wt->setWavetables (idx == 0 ? &proc.osc1Tables : &proc.osc2Tables); wt->onFileDrop = [this] (const juce::File& f) { loadUserWavetable (f); }; + wt->addMouseListener (this, false); addControl (wt); auto addButton = new gin::SVGButton ("add", gin::Assets::add); @@ -83,14 +84,14 @@ public: else proc.osc2Table.removeListener (this); } - + void loadUserWavetable (const juce::File& f) { auto sz = gin::getWavetableSize (f); if (sz <= 0) { auto w = std::make_shared ("Import Wavetable", "Wav file does not contain Wavetable metadata. What is the wavetable size?", juce::AlertWindow::NoIcon, getParentComponent()); - w->setLookAndFeel (proc.lf.get()); + w->setLookAndFeel (proc.processorOptions.lookAndFeel.get()); w->addComboBox ("size", { "256", "512", "1024", "2048" }, "Samples per table:"); w->getComboBoxComponent ("size")->setSelectedItemIndex (3); @@ -111,27 +112,47 @@ public: proc.loadUserWavetable (idx, f, -1); } } + + void mouseDown (const juce::MouseEvent& e) override + { + if (e.originalComponent != wt) return; + + auto& pos = *proc.oscParams[idx].pos; + pos.beginUserAction(); + + mouseDownValue = pos.getUserValue(); + } + + void mouseDrag (const juce::MouseEvent& e) override + { + if (e.originalComponent != wt) return; + + auto& pos = *proc.oscParams[idx].pos; + + pos.setUserValue (mouseDownValue - e.getDistanceFromDragStartY()); + } void mouseUp (const juce::MouseEvent& e) override { auto& h = getHeader(); - if (e.originalComponent == &h && e.mouseWasClicked() && e.x >= prevButton.getRight() && e.x <= nextButton.getX()) + + if (e.originalComponent == wt) { - juce::StringArray tables; - for (auto i = 0; i < BinaryData::namedResourceListSize; i++) - if (juce::String (BinaryData::originalFilenames[i]).endsWith (".wt2048")) - tables.add (juce::String (BinaryData::originalFilenames[i]).upToLastOccurrenceOf (".wt2048", false, false)); - - tables.sortNatural(); + auto& pos = *proc.oscParams[idx].pos; + pos.endUserAction(); + } + else if (e.originalComponent == &h && e.mouseWasClicked() && e.x >= prevButton.getRight() && e.x <= nextButton.getX()) + { + auto files = proc.getWavetableFiles(); std::map menus; - for (auto t : tables) + for (auto& f : files) { - auto prefix = t.upToFirstOccurrenceOf (" ", false, false); - auto suffix = t.fromFirstOccurrenceOf (" ", false, false); + auto t = f.getFileNameWithoutExtension(); + auto category = f.getParentDirectory().getFileName(); - menus[prefix].addItem (t, [this, t] + menus[category].addItem (t, [this, t] { if (idx == 0) { @@ -150,6 +171,7 @@ public: juce::PopupMenu m; m.setLookAndFeel (&getLookAndFeel()); + for (auto itr : menus) m.addSubMenu (itr.first, itr.second); @@ -186,6 +208,7 @@ public: int idx = 0; gin::ParamComponent::Ptr detune, spread; gin::WavetableComponent* wt; + float mouseDownValue; gin::CoalescedTimer timer; @@ -250,6 +273,16 @@ public: adsr = new gin::ADSRComponent (); adsr->setParams (preset.attack, preset.decay, preset.sustain, preset.release); + adsr->phaseCallback = [this] + { + std::vector> res; + + for (auto v : proc.getActiveVoices()) + if (auto wtv = dynamic_cast (v)) + res.push_back (wtv->adsr.getCurrentPhase()); + + return res; + }; addControl (adsr, 0, 0, 4, 1); addControl (new gin::Knob (preset.attack), 0, 1); @@ -257,11 +290,24 @@ public: addControl (new gin::Knob (preset.sustain), 2, 1); addControl (new gin::Knob (preset.release), 3, 1); addControl (new gin::Knob (preset.velocityTracking), 4, 1); + addControl (retrig = new gin::SVGPluginButton (preset.retrig, gin::Assets::retrigger)); + + watchParam (proc.globalParams.mono); + watchParam (proc.globalParams.glideMode); + } + + void paramChanged() override + { + gin::ParamBox::paramChanged (); + + if (retrig != nullptr) + retrig->setVisible (proc.globalParams.mono->isOn() && proc.globalParams.glideMode->getUserValue() > 0); } WavetableAudioProcessor& proc; - gin::ParamComponent::Ptr a, d, s, r; - gin::ADSRComponent* adsr; + gin::ParamComponent::Ptr a = nullptr, d = nullptr, s = nullptr, r = nullptr; + gin::ADSRComponent* adsr = nullptr; + gin::SVGPluginButton* retrig; }; //============================================================================== @@ -280,16 +326,29 @@ public: addModSource (new gin::ModulationSourceButton (proc.modMatrix, proc.modSrcFilter, true)); auto freq = new gin::Knob (flt.frequency); - addControl (freq, 0, 0); - addControl (new gin::Knob (flt.resonance), 1, 0); - addControl (new gin::Knob (flt.amount, true), 2, 0); + addControl (freq); + addControl (new gin::Knob (flt.resonance)); + addControl (new gin::Knob (flt.amount, true)); - addControl (new gin::Knob (flt.keyTracking), 0, 1); - addControl (new gin::Select (flt.type), 1, 1); - addControl (v = new gin::Knob (flt.velocityTracking), 2, 1); + addControl (new gin::Knob (flt.keyTracking)); + addControl (new gin::Select (flt.type)); + addControl (v = new gin::Knob (flt.velocityTracking)); adsr = new gin::ADSRComponent (); adsr->setParams (flt.attack, flt.decay, flt.sustain, flt.release); + adsr->phaseCallback = [this, &flt] + { + std::vector> res; + + if (flt.amount->getUserValue() != 0.0f) + { + for (auto voice : proc.getActiveVoices()) + if (auto wtv = dynamic_cast (voice)) + res.push_back (wtv->filterADSR.getCurrentPhase()); + } + + return res; + }; addControl (adsr, 3, 0, 4, 1); addControl (a = new gin::Knob (flt.attack), 3, 1); @@ -310,8 +369,11 @@ public: addControl (new gin::SVGPluginButton (flt.wt2, asset2)); addControl (new gin::SVGPluginButton (flt.sub, assetS)); addControl (new gin::SVGPluginButton (flt.noise, assetN)); + addControl (retrig = new gin::SVGPluginButton (flt.retrig, gin::Assets::retrigger)); watchParam (flt.amount); + watchParam (proc.globalParams.mono); + watchParam (proc.globalParams.glideMode); } void paramChanged () override @@ -326,11 +388,16 @@ public: s->setEnabled (flt.amount->getUserValue() != 0.0f); r->setEnabled (flt.amount->getUserValue() != 0.0f); adsr->setEnabled (flt.amount->getUserValue() != 0.0f); + + if (retrig != nullptr) + retrig->setVisible (proc.globalParams.mono->isOn() && proc.globalParams.glideMode->getUserValue() > 0); } + WavetableAudioProcessor& proc; - gin::ParamComponent::Ptr v, a, d, s, r; - gin::ADSRComponent* adsr; + gin::ParamComponent::Ptr v = nullptr, a = nullptr, d = nullptr, s = nullptr, r = nullptr; + gin::ADSRComponent* adsr = nullptr; + gin::SVGPluginButton* retrig = nullptr; juce::String asset1 = "M0 96C0 60.7 28.7 32 64 32H384c35.3 0 64 28.7 64 64V416c0 35.3-28.7 64-64 64H64c-35.3 0-64-28.7-64-64V96zm236 35.2c-7.4-4.3-16.5-4.3-24-.1l-56 32c-11.5 6.6-15.5 21.2-8.9 32.7s21.2 15.5 32.7 8.9L200 193.4V336H160c-13.3 0-24 10.7-24 24s10.7 24 24 24h64 64c13.3 0 24-10.7 24-24s-10.7-24-24-24H248V152c0-8.6-4.6-16.5-12-20.8z"; juce::String asset2 = "M64 32C28.7 32 0 60.7 0 96V416c0 35.3 28.7 64 64 64H384c35.3 0 64-28.7 64-64V96c0-35.3-28.7-64-64-64H64zM190.7 184.7l-24.2 18.4c-10.5 8-25.6 6-33.6-4.5s-6-25.6 4.5-33.6l24.2-18.4c15.8-12 35.2-18.4 55.1-18.1l3.4 .1c46.5 .7 83.8 38.6 83.8 85.1c0 23.5-9.7 46-26.9 62.1L212.7 336H296c13.3 0 24 10.7 24 24s-10.7 24-24 24H152c-9.8 0-18.7-6-22.3-15.2s-1.3-19.6 5.9-26.3L244.3 240.6c7.5-7 11.7-16.8 11.7-27.1c0-20.3-16.3-36.8-36.6-37.1l-3.4-.1c-9.1-.1-18 2.8-25.3 8.3z"; @@ -384,13 +451,11 @@ public: return res; }; l->setParams (lfo.wave, lfo.sync, lfo.rate, lfo.beat, lfo.depth, lfo.offset, lfo.phase, lfo.enable); - addControl (l, 2, 0, 4, 1); + addControl (l); addControl (new gin::SVGPluginButton (lfo.retrig, gin::Assets::retrigger)); watchParam (lfo.sync); - - setSize (112, 163); } void paramChanged () override @@ -435,12 +500,36 @@ public: auto g = new gin::ADSRComponent(); g->setParams (env.attack, env.decay, env.sustain, env.release); - addControl (g, 0, 0, 4, 1); + g->phaseCallback = [this, &env] + { + std::vector> res; - setSize (112, 163); + if (env.enable->isOn()) + { + for (auto v : proc.getActiveVoices()) + if (auto wtv = dynamic_cast (v)) + res.push_back (wtv->modADSRs[idx].getCurrentPhase()); + } + + return res; + }; + addControl (g, 0, 0, 4, 1); + addControl (retrig = new gin::SVGPluginButton (env.retrig, gin::Assets::retrigger)); + + watchParam (proc.globalParams.mono); + watchParam (proc.globalParams.glideMode); + } + + void paramChanged () override + { + gin::ParamBox::paramChanged (); + + if (retrig != nullptr) + retrig->setVisible (proc.globalParams.mono->isOn() && proc.globalParams.glideMode->getUserValue() > 0); } WavetableAudioProcessor& proc; + gin::SVGPluginButton* retrig = nullptr; int idx; }; @@ -483,8 +572,6 @@ public: addControl (g, 0, 0, 4, 1); addControl (new gin::SVGPluginButton (prs.retrig, gin::Assets::retrigger)); - - setSize (112, 163); } WavetableAudioProcessor& proc; @@ -571,19 +658,19 @@ public: : gin::ParamBox ("Gate"), proc (proc_) { setName ("gate"); + getProperties().set ("fxId", fxGate); addEnable (proc.gateParams.enable); + getHeader().setMouseCursor (juce::MouseCursor::LeftRightResizeCursor); - addControl (new gin::Select (proc.gateParams.beat), 0, 0); - addControl (new gin::Knob (proc.gateParams.length), 1, 0); - addControl (new gin::Knob (proc.gateParams.attack), 2, 0); - addControl (new gin::Knob (proc.gateParams.release), 3, 0); + addControl (new gin::Select (proc.gateParams.beat)); + addControl (new gin::Knob (proc.gateParams.length)); + addControl (new gin::Knob (proc.gateParams.attack)); + addControl (new gin::Knob (proc.gateParams.release)); auto g = new gin::GateEffectComponent (Cfg::numGateSteps); g->setParams (proc.gateParams.length, proc.gateParams.l, proc.gateParams.r, proc.gateParams.enable); - addControl (g, 0, 1, 4, 1); - - setSize (112, 163); + addControl (g); } WavetableAudioProcessor& proc; @@ -597,8 +684,10 @@ public: : gin::ParamBox ("Chorus"), proc (proc_) { setName ("chorus"); + getProperties().set ("fxId", fxChorus); addEnable (proc.chorusParams.enable); + getHeader().setMouseCursor (juce::MouseCursor::LeftRightResizeCursor); addControl (new gin::Knob (proc.chorusParams.delay), 0, 0); addControl (new gin::Knob (proc.chorusParams.rate), 1, 0); @@ -606,8 +695,6 @@ public: addControl (new gin::Knob (proc.chorusParams.depth), 0.5f, 1.0f); addControl (new gin::Knob (proc.chorusParams.width), 1.5f, 1.0f); - - setSize (168, 163); } WavetableAudioProcessor& proc; @@ -621,15 +708,113 @@ public: : gin::ParamBox ("Distort"), proc (proc_) { setName ("distort"); + getProperties().set ("fxId", fxDistort); addEnable (proc.distortionParams.enable); + getHeader().setMouseCursor (juce::MouseCursor::LeftRightResizeCursor); - addControl (new gin::Knob (proc.distortionParams.amount), 0, 0); + { + page1 = new juce::Component ("page1"); + page1->setInterceptsMouseClicks (false, true); - setSize (112, 163); + addControl (page1); + + addControl (page1, new gin::Knob (proc.distortionParams.amount)); + } + + { + page2 = new juce::Component ("page2"); + page2->setInterceptsMouseClicks (false, true); + + addControl (page2); + + addControl (page2, new gin::Knob (proc.bitcrusherParams.rate)); + addControl (page2, new gin::Knob (proc.bitcrusherParams.rez)); + addControl (page2, new gin::Knob (proc.bitcrusherParams.hard)); + addControl (page2, new gin::Knob (proc.bitcrusherParams.mix)); + } + + { + page3 = new juce::Component ("page3"); + page3->setInterceptsMouseClicks (false, true); + + addControl (page3); + + addControl (page3, new gin::Knob (proc.fireAmpParams.gain)); + addControl (page3, new gin::Knob (proc.fireAmpParams.tone)); + addControl (page3, new gin::Knob (proc.fireAmpParams.output)); + addControl (page3, new gin::Knob (proc.fireAmpParams.mix)); + } + + { + page4 = new juce::Component ("page4"); + page4->setInterceptsMouseClicks (false, true); + + addControl (page4); + + addControl (page4, new gin::Knob (proc.grindAmpParams.gain)); + addControl (page4, new gin::Knob (proc.grindAmpParams.tone)); + addControl (page4, new gin::Knob (proc.grindAmpParams.output)); + addControl (page4, new gin::Knob (proc.grindAmpParams.mix)); + } + + auto& h = getHeader(); + h.addAndMakeVisible (modeButton); + modeButton.onClick = [this] + { + juce::PopupMenu m; + m.setLookAndFeel (&getLookAndFeel()); + + m.addItem ("Simple", true, proc.fxParams.distMode->getUserValueInt() == 0, [this] + { + proc.fxParams.distMode->setUserValue (0.0f); + }); + m.addItem ("Bitcrusher", true, proc.fxParams.distMode->getUserValueInt() == 1, [this] + { + proc.fxParams.distMode->setUserValue (1.0f); + }); + m.addItem ("Fire Amp", true, proc.fxParams.distMode->getUserValueInt() == 2, [this] + { + proc.fxParams.distMode->setUserValue (2.0f); + }); + m.addItem ("Grind Amp", true, proc.fxParams.distMode->getUserValueInt() == 3, [this] + { + proc.fxParams.distMode->setUserValue (3.0f); + }); + + m.showMenuAsync ({}); + }; + + watchParam (proc.fxParams.distMode); + paramChanged(); } + void paramChanged() override + { + gin::ParamBox::paramChanged(); + + auto mode = proc.fxParams.distMode->getUserValueInt(); + + page1->setVisible (mode == 0); + page2->setVisible (mode == 1); + page3->setVisible (mode == 2); + page4->setVisible (mode == 3); + + auto& h = getHeader(); + if (mode == 0) h.setTitle ("Dist"); + if (mode == 1) h.setTitle ("Crush"); + if (mode == 2) h.setTitle ("Fire"); + if (mode == 3) h.setTitle ("Grind"); + } + + juce::Component* page1; + juce::Component* page2; + juce::Component* page3; + juce::Component* page4; + WavetableAudioProcessor& proc; + + gin::SVGButton modeButton { "mode", gin::Assets::caretDown, 6 }; }; //============================================================================== @@ -640,8 +825,10 @@ public: : gin::ParamBox ("Delay"), proc (proc_) { setName ("delay"); + getProperties().set ("fxId", fxDelay); addEnable (proc.delayParams.enable); + getHeader().setMouseCursor (juce::MouseCursor::LeftRightResizeCursor); addControl (t = new gin::Knob (proc.delayParams.time), 0, 0); addControl (b = new gin::Select (proc.delayParams.beat), 0, 0); @@ -655,8 +842,6 @@ public: b->setName ("Delay2"); watchParam (proc.delayParams.sync); - - setSize (168, 163); } void paramChanged () override @@ -679,8 +864,10 @@ public: : gin::ParamBox ("Reverb"), proc (proc_) { setName ("reverb"); + getProperties().set ("fxId", fxReverb); addEnable (proc.reverbParams.enable); + getHeader().setMouseCursor (juce::MouseCursor::LeftRightResizeCursor); addControl (new gin::Knob (proc.reverbParams.size), 0, 0); addControl (new gin::Knob (proc.reverbParams.decay), 1, 0); @@ -688,8 +875,6 @@ public: addControl (new gin::Knob (proc.reverbParams.damping), 0, 1); addControl (new gin::Knob (proc.reverbParams.predelay), 1, 1); addControl (new gin::Knob (proc.reverbParams.mix), 2, 1); - - setSize (168, 163); } WavetableAudioProcessor& proc; diff --git a/plugin/Source/PluginEditor.cpp b/plugin/Source/PluginEditor.cpp index ffae4b3..aa3f50e 100644 --- a/plugin/Source/PluginEditor.cpp +++ b/plugin/Source/PluginEditor.cpp @@ -22,7 +22,8 @@ WavetableAudioProcessorEditor::WavetableAudioProcessorEditor (WavetableAudioProc addAndMakeVisible (usage); addChildComponent (modOverview); - + addAndMakeVisible (modOverlay); + usage.setBounds (45, 12, 80, 16); modOverview.setBounds (usage.getRight() + 10, 12, 150, 16); scope.setBounds (704, 5, 187, 30); @@ -70,6 +71,7 @@ void WavetableAudioProcessorEditor::resized() editor.setBounds (rc); patchBrowser.setBounds (rc); + modOverlay.setBounds (getLocalBounds()); } void WavetableAudioProcessorEditor::addMenuItems (juce::PopupMenu& m) @@ -78,6 +80,9 @@ void WavetableAudioProcessorEditor::addMenuItems (juce::PopupMenu& m) m.addItem ("MPE", true, wtProc.globalParams.mpe->getUserValueBool(), [this] { wtProc.globalParams.mpe->setUserValue (wtProc.globalParams.mpe->getUserValueBool() ? 0.0f : 1.0f); + + if (auto props = wtProc.getSettings()) + props->setValue ("mpe", wtProc.globalParams.mpe->getUserValueBool()); }); auto setSize = [this] (float scale) @@ -94,4 +99,8 @@ void WavetableAudioProcessorEditor::addMenuItems (juce::PopupMenu& m) um.addItem ("200%", [setSize] { setSize (2.00f); }); m.addSubMenu ("UI Size", um); + + m.addSeparator(); + + m.addItem ("Manual", [] { juce::URL ("https://github.com/FigBug/Wavetable/blob/master/README.md").launchInDefaultBrowser(); }); } diff --git a/plugin/Source/PluginEditor.h b/plugin/Source/PluginEditor.h index 92d9250..ca002be 100644 --- a/plugin/Source/PluginEditor.h +++ b/plugin/Source/PluginEditor.h @@ -26,7 +26,8 @@ private: gin::TriggeredScope scope { wtProc.scopeFifo }; gin::SynthesiserUsage usage { wtProc }; gin::ModulationOverview modOverview { wtProc.modMatrix }; - + gin::ModOverlay modOverlay; + Editor editor { wtProc }; #if JUCE_DEBUG diff --git a/plugin/Source/PluginProcessor.cpp b/plugin/Source/PluginProcessor.cpp index 3eae156..00f6604 100644 --- a/plugin/Source/PluginProcessor.cpp +++ b/plugin/Source/PluginProcessor.cpp @@ -2,6 +2,29 @@ #include "PluginEditor.h" #include "WavetableVoice.h" +#include + +// If the shared CrashReporter is installed, launch it once per process (on the +// first plugin instance) so it can scan and upload any crash from last session. +static void launchCrashReporterOnce() +{ + static std::once_flag flag; + std::call_once (flag, [] + { + #if JUCE_MAC + juce::File app ("/Library/Application Support/Rabien Software/Crash Reporter/CrashReporter.app"); + #elif JUCE_WINDOWS + auto app = juce::File::getSpecialLocation (juce::File::globalApplicationsDirectory) + .getChildFile ("Rabien Software").getChildFile ("Crash Reporter").getChildFile ("CrashReporter.exe"); + #else + juce::File app; + #endif + + if (app.exists()) + juce::Process::openDocument (app.getFullPathName(), {}); + }); +} + static juce::String subTextFunction (const gin::Parameter&, float v) { switch (int (v)) @@ -169,21 +192,22 @@ void WavetableAudioProcessor::FilterParams::setup (WavetableAudioProcessor& p) float maxFreq = float (gin::getMidiNoteFromHertz (20000.0)); - enable = p.addIntParam (id + "enable", nm + "Enable", "", "", { 0.0, 1.0, 1.0, 1.0 }, 1.0f, 0.0f); - type = p.addIntParam (id + "type", nm + "Type", "Type", "", { 0.0, 7.0, 1.0, 1.0 }, 0.0, 0.0f, filterTextFunction); - keyTracking = p.addExtParam (id + "key", nm + "Key", "Key", "%", { 0.0, 100.0, 0.0, 1.0 }, 0.0, 0.0f); - velocityTracking = p.addExtParam (id + "vel", nm + "Vel", "Vel", "%", { 0.0, 100.0, 0.0, 1.0 }, 0.0, 0.0f); - frequency = p.addExtParam (id + "freq", nm + "Freq", "Freq", "Hz", { 0.0, maxFreq, 0.0, 1.0 }, 64.0, 0.0f, freqTextFunction); - resonance = p.addExtParam (id + "res", nm + "Res", "Res", "", { 0.0, 100.0, 0.0, 1.0 }, 0.0, 0.0f); - amount = p.addExtParam (id + "amount", nm + "Amount", "Amnt", "", { -1.0, 1.0, 0.0, 1.0 }, 0.0, 0.0f); - attack = p.addExtParam (id + "attack", nm + "Attack", "A", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); - decay = p.addExtParam (id + "decay", nm + "Decay", "D", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); - sustain = p.addExtParam (id + "sustain", nm + "Sustain", "S", "%", { 0.0, 100.0, 0.0, 1.0 }, 80.0f, 0.0f); - release = p.addExtParam (id + "release", nm + "Release", "R", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); - wt1 = p.addIntParam (id + "wt1", nm + "WT1", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); - wt2 = p.addIntParam (id + "wt2", nm + "WT2", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); - sub = p.addIntParam (id + "sub", nm + "sub", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); - noise = p.addIntParam (id + "noise", nm + "noise", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); + enable = p.addIntParam (id + "enable", nm + "Enable", "", "", { 0.0, 1.0, 1.0, 1.0 }, 1.0f, 0.0f); + retrig = p.addIntParam (id + "retrig", nm + "Retrig", "Retrig", "", { 0.0, 1.0, 1.0, 1.0 }, 1.0, 0.0f, enableTextFunction); + type = p.addIntParam (id + "type", nm + "Type", "Type", "", { 0.0, 7.0, 1.0, 1.0 }, 0.0, 0.0f, filterTextFunction); + keyTracking = p.addExtParam (id + "key", nm + "Key", "Key", "%", { 0.0, 100.0, 0.0, 1.0 }, 0.0, 0.0f); + velocityTracking = p.addExtParam (id + "vel", nm + "Vel", "Vel", "%", { 0.0, 100.0, 0.0, 1.0 }, 0.0, 0.0f); + frequency = p.addExtParam (id + "freq", nm + "Freq", "Freq", "Hz", { 0.0, maxFreq, 0.0, 1.0 }, 64.0, 0.0f, freqTextFunction); + resonance = p.addExtParam (id + "res", nm + "Res", "Res", "", { 0.0, 100.0, 0.0, 1.0 }, 0.0, 0.0f); + amount = p.addExtParam (id + "amount", nm + "Amount", "Amnt", "", { -1.0, 1.0, 0.0, 1.0 }, 0.0, 0.0f); + attack = p.addExtParam (id + "attack", nm + "Attack", "A", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); + decay = p.addExtParam (id + "decay", nm + "Decay", "D", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); + sustain = p.addExtParam (id + "sustain", nm + "Sustain", "S", "%", { 0.0, 100.0, 0.0, 1.0 }, 80.0f, 0.0f); + release = p.addExtParam (id + "release", nm + "Release", "R", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); + wt1 = p.addIntParam (id + "wt1", nm + "WT1", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); + wt2 = p.addIntParam (id + "wt2", nm + "WT2", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); + sub = p.addIntParam (id + "sub", nm + "sub", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); + noise = p.addIntParam (id + "noise", nm + "noise", "", "", { 0.0, 1.0, 1.0, 1.0f }, 1.0f, 0.0f); sustain->conversionFunction = [] (float in) { return in / 100.0f; }; velocityTracking->conversionFunction = [] (float in) { return in / 100.0f; }; @@ -197,6 +221,7 @@ void WavetableAudioProcessor::EnvParams::setup (WavetableAudioProcessor& p, int juce::String nm = "ENV" + juce::String (idx + 1) + " "; enable = p.addIntParam (id + "enable", nm + "Enable", "Enable", "", { 0.0, 1.0, 1.0, 1.0 }, 0.0, 0.0f, enableTextFunction); + retrig = p.addIntParam (id + "retrig", nm + "Retrig", "Retrig", "", { 0.0, 1.0, 1.0, 1.0 }, 1.0, 0.0f, enableTextFunction); attack = p.addExtParam (id + "attack", nm + "Attack", "A", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); decay = p.addExtParam (id + "decay", nm + "Decay", "D", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); sustain = p.addExtParam (id + "sustain", nm + "Sustain", "S", "%", { 0.0, 100.0, 0.0, 1.0 }, 80.0f, 0.0f); @@ -224,6 +249,8 @@ void WavetableAudioProcessor::LFOParams::setup (WavetableAudioProcessor& p, int offset = p.addExtParam (id + "offset", nm + "Offset", "Offset", "", { -1.0, 1.0, 0.0, 1.0 }, 0.0, 0.0f); fade = p.addExtParam (id + "fade", nm + "Fade", "Fade", "s", { -60.0, 60.0, 0.0, 0.2f, true }, 0.0f, 0.0f); delay = p.addExtParam (id + "delay", nm + "Delay", "Delay", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.0f, 0.0f); + xgrid = p.addIntParam (id + "xgrid", nm + "XGrid", "XGrid", "", { 2.0, 32.0, 1.0, 1.0 }, 8.0, 0.0f); + ygrid = p.addIntParam (id + "ygrid", nm + "YGrid", "YGrid", "", { 2.0, 32.0, 1.0, 1.0 }, 2.0, 0.0f); } //============================================================================== @@ -271,7 +298,8 @@ void WavetableAudioProcessor::GateParams::setup (WavetableAudioProcessor& p) //============================================================================== void WavetableAudioProcessor::ADSRParams::setup (WavetableAudioProcessor& p) { - velocityTracking = p.addExtParam ("vel", "Vel", "Vel", "", { 0.0, 100.0, 0.0, 1.0 }, 100.0, 0.0f); + retrig = p.addIntParam ("retrig", "Retrig", "Retrig","", { 0.0, 1.0, 1.0, 1.0 }, 1.0f, 0.0f, enableTextFunction); + velocityTracking = p.addExtParam ("vel", "Vel", "Vel", "", { 0.0, 100.0, 0.0, 1.0 }, 100.0f, 0.0f); attack = p.addExtParam ("attack", "Attack", "A", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); decay = p.addExtParam ("decay", "Decay", "D", "s", { 0.0, 60.0, 0.0, 0.2f }, 0.1f, 0.0f); sustain = p.addExtParam ("sustain", "Sustain", "S", "%", { 0.0, 100.0, 0.0, 1.0 }, 80.0f, 0.0f); @@ -294,6 +322,9 @@ void WavetableAudioProcessor::GlobalParams::setup (WavetableAudioProcessor& p) pitchBend = p.addIntParam ("pitchbend", "Pitch Bend", "PB Range", "", { 0.0, 48.0, 1.0, 1.0 }, 2.0f, 0.0f); level->conversionFunction = [] (float in) { return juce::Decibels::decibelsToGain (in); }; + + if (auto props = p.getSettings()) + mpe->setUserValue (props->getBoolValue ("mpe", false) ? 1.0f : 0.0f); } //============================================================================== @@ -359,6 +390,53 @@ void WavetableAudioProcessor::ReverbParams::setup (WavetableAudioProcessor& p) mix = p.addExtParam ("rvbMix", "Mix", "", "", {0.0f, 1.0f, 0.0f, 1.0f}, 0.0f, 0.0f); } +//============================================================================== +void WavetableAudioProcessor::FXParams::setup (WavetableAudioProcessor& p) +{ + fx1 = p.addIntParam ("fxOrder1", "FX1", "", "", { 0.0, 4.0, 1.0, 1.0 }, fxGate, 0.0f); + fx2 = p.addIntParam ("fxOrder2", "FX2", "", "", { 0.0, 4.0, 1.0, 1.0 }, fxChorus, 0.0f); + fx3 = p.addIntParam ("fxOrder3", "FX3", "", "", { 0.0, 4.0, 1.0, 1.0 }, fxDistort, 0.0f); + fx4 = p.addIntParam ("fxOrder4", "FX4", "", "", { 0.0, 4.0, 1.0, 1.0 }, fxDelay, 0.0f); + fx5 = p.addIntParam ("fxOrder5", "FX5", "", "", { 0.0, 4.0, 1.0, 1.0 }, fxReverb, 0.0f); + distMode = p.addIntParam ("distMode", "Dist Mode", "", "", { 0.0, 3.0, 1.0, 1.0 }, 0, 0.0f); +} + +//============================================================================== +void WavetableAudioProcessor::BitCrusherParams::setup (WavetableAudioProcessor& p) +{ + juce::String id = "crush"; + juce::String nm = "Crush "; + + rate = p.addExtParam (id + "rate", nm + "Rate", "Rate", "", { 0.0, 1.0, 0.0, 1.0f }, 0.5f, 0.0f); + rez = p.addExtParam (id + "rez", nm + "Rez", "Rez", "", { 0.0, 1.0, 0.0, 1.0f }, 0.5f, 0.0f); + hard = p.addExtParam (id + "hard", nm + "Hard", "Hard", "", { 0.0, 1.0, 0.0, 1.0f }, 0.8f, 0.0f); + mix = p.addExtParam (id + "mix", nm + "Mix", "Mix", "", { 0.0, 1.0, 0.0, 1.0f }, 1.0f, 0.0f); +} + +//============================================================================== +void WavetableAudioProcessor::FireAmpParams::setup (WavetableAudioProcessor& p) +{ + juce::String id = "fire"; + juce::String nm = "Fire "; + + gain = p.addExtParam (id + "gain", nm + "Gain", "Gain", "", { 0.0, 1.0, 0.0, 1.0f }, 0.5f, 0.0f); + tone = p.addExtParam (id + "tone", nm + "Tone", "Tone", "", { 0.0, 1.0, 0.0, 1.0f }, 0.5f, 0.0f); + output = p.addExtParam (id + "output", nm + "Output", "Output", "", { 0.0, 1.0, 0.0, 1.0f }, 0.8f, 0.0f); + mix = p.addExtParam (id + "mix", nm + "Mix", "Mix", "", { 0.0, 1.0, 0.0, 1.0f }, 1.0f, 0.0f); +} + +//============================================================================== +void WavetableAudioProcessor::GrindAmpParams::setup (WavetableAudioProcessor& p) +{ + juce::String id = "grind"; + juce::String nm = "Grind "; + + gain = p.addExtParam (id + "gain", nm + "Gain", "Gain", "", { 0.0, 1.0, 0.0, 1.0f }, 0.5f, 0.0f); + tone = p.addExtParam (id + "tone", nm + "Tone", "Tone", "", { 0.0, 1.0, 0.0, 1.0f }, 0.5f, 0.0f); + output = p.addExtParam (id + "output", nm + "Output", "Output", "", { 0.0, 1.0, 0.0, 1.0f }, 0.8f, 0.0f); + mix = p.addExtParam (id + "mix", nm + "Mix", "Mix", "", { 0.0, 1.0, 0.0, 1.0f }, 1.0f, 0.0f); +} + #if 0 void convertWavetables() { @@ -453,17 +531,80 @@ void extractWavetables() #endif //============================================================================== -WavetableAudioProcessor::WavetableAudioProcessor() - : gin::Processor (juce::AudioProcessor::BusesProperties().withOutput ("Output", juce::AudioChannelSet::stereo(), true), false) +namespace { - { - auto sz = 0; - for (auto i = 0; i < BinaryData::namedResourceListSize; i++) - if (juce::String (BinaryData::originalFilenames[i]).endsWith (".xml")) - if (auto data = BinaryData::getNamedResource (BinaryData::namedResourceList[i], sz)) - extractProgram (BinaryData::originalFilenames[i], data, sz); + juce::File userResourceRoot() + { + #if JUCE_MAC + return juce::File::getSpecialLocation (juce::File::userHomeDirectory) + .getChildFile ("Library/Audio/Presets/SocaLabs/Wavetable"); + #elif JUCE_WINDOWS + return juce::File::getSpecialLocation (juce::File::userApplicationDataDirectory) + .getChildFile ("SocaLabs/Wavetable"); + #else + return juce::File::getSpecialLocation (juce::File::userApplicationDataDirectory) + .getChildFile ("SocaLabs/Wavetable"); + #endif } + juce::File systemResourceRoot() + { + #if JUCE_MAC + return juce::File ("/Library/Audio/Presets/SocaLabs/Wavetable"); + #elif JUCE_WINDOWS + return juce::File::getSpecialLocation (juce::File::commonApplicationDataDirectory) + .getChildFile ("SocaLabs/Wavetable"); + #else + return juce::File ("/usr/share/SocaLabs/Wavetable"); + #endif + } + + // Pre-installer location used when factory presets were embedded and gin's + // default getProgramDirectory() chose a "programs" folder under devId. + juce::File legacyUserProgramDirectory() + { + #if JUCE_MAC + return juce::File::getSpecialLocation (juce::File::userApplicationDataDirectory) + .getChildFile ("Application Support/com.socalabs/Wavetable/programs"); + #else + return juce::File::getSpecialLocation (juce::File::userApplicationDataDirectory) + .getChildFile ("com.socalabs/Wavetable/programs"); + #endif + } +} + +//============================================================================== +static gin::ProcessorOptions createProcessorOptions() +{ + return gin::ProcessorOptions() + .withMidiLearn(); +} + +WavetableAudioProcessor::WavetableAudioProcessor() + : gin::Processor (juce::AudioProcessor::BusesProperties().withOutput ("Output", juce::AudioChannelSet::stereo(), true), false, createProcessorOptions()), + bitcrusher (FXBaseCallback ([this] { return gin::Processor::getSampleRate(); })), + fireAmp (FXBaseCallback ([this] { return gin::Processor::getSampleRate(); })), + grindAmp (FXBaseCallback ([this] { return gin::Processor::getSampleRate(); })) +{ + launchCrashReporterOnce(); + + // One-time migration of any user presets from the pre-installer location. + // Factory presets now live in systemResourceRoot()/Presets and are surfaced + // via getFactoryProgramDirectories(). User saves go to userResourceRoot()/Presets. + { + auto oldDir = legacyUserProgramDirectory(); + auto newDir = userResourceRoot().getChildFile ("Presets"); + if (oldDir.isDirectory() + && newDir.findChildFiles (juce::File::findFiles, false, "*.xml").isEmpty()) + { + if (! newDir.isDirectory()) + newDir.createDirectory(); + for (auto f : oldDir.findChildFiles (juce::File::findFiles, false, "*.xml")) + f.copyFileTo (newDir.getChildFile (f.getFileName())); + } + } + + mtsClient = MTS_RegisterClient(); enableLegacyMode(); setVoiceStealingEnabled (true); @@ -495,6 +636,12 @@ WavetableAudioProcessor::WavetableAudioProcessor() distortionParams.setup (*this); delayParams.setup (*this); reverbParams.setup (*this); + fxParams.setup (*this); + + versionHint++; + bitcrusherParams.setup (*this); + fireAmpParams.setup (*this); + grindAmpParams.setup (*this); for (int i = 0; i < 50; i++) { @@ -507,23 +654,28 @@ WavetableAudioProcessor::WavetableAudioProcessor() init(); lastMono = globalParams.mono->isOn(); + + reset(); } WavetableAudioProcessor::~WavetableAudioProcessor() { + MTS_DeregisterClient (mtsClient); + mtsClient = nullptr; } void WavetableAudioProcessor::reloadWavetables() { auto loadMemory = [&] (const juce::String& name) -> juce::MemoryBlock { - for (auto i = 0; i < BinaryData::namedResourceListSize; i++) + auto wtDir = systemResourceRoot().getChildFile ("Wavetables"); + if (wtDir.isDirectory()) { - if ((name + ".wt2048").equalsIgnoreCase (BinaryData::originalFilenames[i])) + for (auto& file : wtDir.findChildFiles (juce::File::findFiles, true, name + ".wt2048")) { - int sz = 0; - if (auto data = BinaryData::getNamedResource (BinaryData::namedResourceList[i], sz)) - return juce::MemoryBlock (data, sz); + juce::MemoryBlock mb; + if (file.loadFileAsData (mb)) + return mb; } } return {}; @@ -576,12 +728,7 @@ void WavetableAudioProcessor::incWavetable (int osc, int delta) else userTable2.reset(); - juce::StringArray tables; - for (auto i = 0; i < BinaryData::namedResourceListSize; i++) - if (juce::String (BinaryData::originalFilenames[i]).endsWith (".wt2048")) - tables.add (juce::String (BinaryData::originalFilenames[i]).upToLastOccurrenceOf (".wt2048", false, false)); - - tables.sortNatural(); + auto tables = getWavetableNames(); auto idx = tables.indexOf (table.toString()); @@ -650,6 +797,57 @@ void WavetableAudioProcessor::updateState() state.setProperty ("wt2Data", userTable2.toBase64Encoding(), nullptr); } +//============================================================================== +juce::File WavetableAudioProcessor::getProgramDirectory() +{ + auto dir = userResourceRoot().getChildFile ("Presets"); + + if (! dir.isDirectory()) + dir.createDirectory(); + + return dir; +} + +juce::Array WavetableAudioProcessor::getFactoryProgramDirectories() +{ + return { systemResourceRoot().getChildFile ("Presets") }; +} + +juce::StringArray WavetableAudioProcessor::getWavetableNames() const +{ + juce::StringArray tables; + for (auto& f : getWavetableFiles()) + tables.add (f.getFileNameWithoutExtension()); + + tables.sortNatural(); + return tables; +} + +juce::Array WavetableAudioProcessor::getWavetableFiles() const +{ + juce::Array files; + auto wtDir = systemResourceRoot().getChildFile ("Wavetables"); + if (wtDir.isDirectory()) + files = wtDir.findChildFiles (juce::File::findFiles, true, "*.wt2048"); + + struct Sorter + { + static int compareElements (const juce::File& a, const juce::File& b) + { + auto categoryCmp = a.getParentDirectory().getFileName() + .compareNatural (b.getParentDirectory().getFileName()); + if (categoryCmp != 0) + return categoryCmp; + return a.getFileNameWithoutExtension() + .compareNatural (b.getFileNameWithoutExtension()); + } + }; + Sorter sorter; + files.sort (sorter); + + return files; +} + //============================================================================== void WavetableAudioProcessor::setupModMatrix() { @@ -720,6 +918,9 @@ void WavetableAudioProcessor::reset() chorus.reset(); stereoDelay.reset(); reverb.reset(); + bitcrusher.reset(); + fireAmp.reset(); + grindAmp.reset(); for (auto& l : modLFOs) l.reset(); @@ -766,14 +967,23 @@ bool WavetableAudioProcessor::isBusesLayoutSupported (const BusesLayout& layout) void WavetableAudioProcessor::processBlock (juce::AudioBuffer& buffer, juce::MidiBuffer& midi) { juce::ScopedNoDenormals noDenormals; + + if (buffer.getNumChannels() != 2) + return; + if (! dspLock.tryEnter()) { blockMissed = true; return; } - - if (buffer.getNumChannels() != 2) - return; + + if (midiLearn) + midiLearn->processBlock (midi, buffer.getNumSamples()); + + if (mtsClient) + for (auto itr : midi) + if (auto m = itr.getMessage(); m.isSysEx()) + MTS_ParseMIDIDataU (mtsClient, itr.data, itr.numBytes); if (blockMissed || presetLoaded || lastMono != globalParams.mono->isOn()) { @@ -825,7 +1035,7 @@ void WavetableAudioProcessor::processBlock (juce::AudioBuffer& buffer, ju scopeFifo.write (buffer); endBlock (buffer.getNumSamples()); - + dspLock.exit(); } @@ -858,25 +1068,41 @@ gin::WTOscillator::Params WavetableAudioProcessor::getLiveWTParams (int osc) return p; } -void WavetableAudioProcessor::applyEffects (juce::AudioSampleBuffer& buffer) +void WavetableAudioProcessor::applyEffect (juce::AudioSampleBuffer& buffer, int fxId) { // Apply gate - if (gateParams.enable->isOn()) + if (fxId == fxGate && gateParams.enable->isOn()) gate.process (buffer, noteOnIndex, noteOffIndex); // Apply Chorus - if (chorusParams.enable->isOn()) + if (fxId == fxChorus && chorusParams.enable->isOn()) chorus.process (buffer); // Apply Distortion - if (distortionParams.enable->isOn()) + if (fxId == fxDistort && distortionParams.enable->isOn()) { - auto clip = 1.0f / (2.0f * distortionVal); - gin::Distortion::processBlock (buffer, distortionVal, -clip, clip); + auto mode = fxParams.distMode->getUserValueInt(); + if (mode == 0) + { + auto clip = 1.0f / (2.0f * distortionVal); + gin::Distortion::processBlock (buffer, distortionVal, -clip, clip); + } + else if (mode == 1) + { + bitcrusher.processReplacing ((float**)buffer.getArrayOfWritePointers(), (float**)buffer.getArrayOfWritePointers(), buffer.getNumSamples()); + } + else if (mode == 2) + { + fireAmp.processReplacing ((float**)buffer.getArrayOfWritePointers(), (float**)buffer.getArrayOfWritePointers(), buffer.getNumSamples()); + } + else if (mode == 3) + { + grindAmp.processReplacing ((float**)buffer.getArrayOfWritePointers(), (float**)buffer.getArrayOfWritePointers(), buffer.getNumSamples()); + } } // Apply Delay - if (delayParams.enable->isOn()) + if (fxId == fxDelay && delayParams.enable->isOn()) { if (delayParams.sync->isOn()) stereoDelay.process (buffer); @@ -885,8 +1111,17 @@ void WavetableAudioProcessor::applyEffects (juce::AudioSampleBuffer& buffer) } // Apply Reverb - if (reverbParams.enable->isOn()) + if (fxId == fxReverb && reverbParams.enable->isOn()) reverb.process (buffer.getWritePointer (0), buffer.getWritePointer (1), buffer.getNumSamples ()); +} + +void WavetableAudioProcessor::applyEffects (juce::AudioSampleBuffer& buffer) +{ + applyEffect (buffer, fxParams.fx1->getUserValueInt()); + applyEffect (buffer, fxParams.fx2->getUserValueInt()); + applyEffect (buffer, fxParams.fx3->getUserValueInt()); + applyEffect (buffer, fxParams.fx4->getUserValueInt()); + applyEffect (buffer, fxParams.fx5->getUserValueInt()); // Output gain outputGain.process (buffer); @@ -976,7 +1211,34 @@ void WavetableAudioProcessor::updateParams (int newBlockSize) // Update Distortion if (distortionParams.enable->isOn()) - distortionVal = modMatrix.getValue (distortionParams.amount); + { + auto mode = fxParams.distMode->getUserValueInt(); + if (mode == 0) + { + distortionVal = modMatrix.getValue (distortionParams.amount); + } + else if (mode == 1) + { + bitcrusher.setParameter (0, modMatrix.getValue (bitcrusherParams.rez)); + bitcrusher.setParameter (1, modMatrix.getValue (bitcrusherParams.rate)); + bitcrusher.setParameter (2, modMatrix.getValue (bitcrusherParams.hard)); + bitcrusher.setParameter (3, modMatrix.getValue (bitcrusherParams.mix)); + } + else if (mode == 2) + { + fireAmp.setParameter (0, modMatrix.getValue (fireAmpParams.gain)); + fireAmp.setParameter (1, modMatrix.getValue (fireAmpParams.tone)); + fireAmp.setParameter (2, modMatrix.getValue (fireAmpParams.output)); + fireAmp.setParameter (3, modMatrix.getValue (fireAmpParams.mix)); + } + else if (mode == 3) + { + grindAmp.setParameter (0, modMatrix.getValue (grindAmpParams.gain)); + grindAmp.setParameter (1, modMatrix.getValue (grindAmpParams.tone)); + grindAmp.setParameter (2, modMatrix.getValue (grindAmpParams.output)); + grindAmp.setParameter (3, modMatrix.getValue (grindAmpParams.mix)); + } + } // Update Delay if (delayParams.enable->isOn()) @@ -1009,14 +1271,13 @@ void WavetableAudioProcessor::updateParams (int newBlockSize) reverb.setDamping (modMatrix.getValue (reverbParams.damping)); reverb.setPredelay (modMatrix.getValue (reverbParams.predelay)); reverb.setMix (modMatrix.getValue (reverbParams.mix)); - } // Output gain outputGain.setGain (modMatrix.getValue (globalParams.level)); } -bool WavetableAudioProcessor::loadWaveTable (juce::OwnedArray& table, double sr, const juce::MemoryBlock& wav, const juce::String& format, int size) +bool WavetableAudioProcessor::loadWaveTable (gin::Wavetable& table, double sr, const juce::MemoryBlock& wav, const juce::String& format, int size) { auto is = new juce::MemoryInputStream (wav, false); @@ -1037,7 +1298,7 @@ bool WavetableAudioProcessor::loadWaveTable (juce::OwnedArrayread (&buf, 0, samplesToUse, 0, true, false); - juce::OwnedArray t; + gin::Wavetable t; loadWavetables (t, sr, buf, reader->sampleRate, size); juce::ScopedLock sl (dspLock); @@ -1054,12 +1315,12 @@ bool WavetableAudioProcessor::loadWaveTable (juce::OwnedArraylengthInSamples)); reader->read (&buf, 0, int (reader->lengthInSamples), 0, true, false); - juce::OwnedArray t; + gin::Wavetable t; loadWavetables (t, sr, buf, reader->sampleRate, 2048); - + juce::ScopedLock sl (dspLock); std::swap (t, table); - + return true; } } @@ -1069,7 +1330,7 @@ bool WavetableAudioProcessor::loadWaveTable (juce::OwnedArray #include "WavetableVoice.h" +#include "FX/DeRez2.h" +#include "FX/FireAmp.h" +#include "FX/GrindAmp.h" + +constexpr auto fxGate = 0; +constexpr auto fxChorus = 1; +constexpr auto fxDistort = 2; +constexpr auto fxDelay = 3; +constexpr auto fxReverb = 4; //============================================================================== class WavetableAudioProcessor : public gin::Processor, @@ -15,6 +24,9 @@ public: bool supportsMPE() const override { return true; } + juce::File getProgramDirectory() override; + juce::Array getFactoryProgramDirectories() override; + void stateUpdated() override; void updateState() override; @@ -43,9 +55,13 @@ public: void reloadWavetables(); void incWavetable (int osc, int delta); bool loadUserWavetable (int osc, const juce::File& f, int sz); + juce::StringArray getWavetableNames() const; + juce::Array getWavetableFiles() const; void applyEffects (juce::AudioSampleBuffer& buffer); - bool loadWaveTable (juce::OwnedArray& table, double sr, const juce::MemoryBlock& wav, const juce::String& format, int size); + void applyEffect (juce::AudioSampleBuffer& buffer, int fxId); + + bool loadWaveTable (gin::Wavetable& table, double sr, const juce::MemoryBlock& wav, const juce::String& format, int size); // Voice Params struct OSCParams @@ -86,7 +102,7 @@ public: FilterParams() = default; gin::Parameter::Ptr enable, type, keyTracking, velocityTracking, - frequency, resonance, amount, + frequency, resonance, amount, retrig, attack, decay, sustain, release, wt1, wt2, sub, noise; void setup (WavetableAudioProcessor& p); @@ -98,7 +114,7 @@ public: { EnvParams() = default; - gin::Parameter::Ptr enable, attack, decay, sustain, release; + gin::Parameter::Ptr enable, attack, decay, sustain, release, retrig; void setup (WavetableAudioProcessor& p, int idx); @@ -109,7 +125,7 @@ public: { LFOParams() = default; - gin::Parameter::Ptr enable, sync, retrig, wave, rate, beat, depth, phase, offset, fade, delay; + gin::Parameter::Ptr enable, sync, retrig, wave, rate, beat, depth, phase, offset, fade, delay, xgrid, ygrid; void setup (WavetableAudioProcessor& p, int idx); @@ -132,7 +148,7 @@ public: { ADSRParams() = default; - gin::Parameter::Ptr attack, decay, sustain, release, velocityTracking; + gin::Parameter::Ptr attack, decay, sustain, release, velocityTracking, retrig; void setup (WavetableAudioProcessor& p); @@ -220,6 +236,50 @@ public: JUCE_DECLARE_NON_COPYABLE (ReverbParams) }; + struct FXParams + { + FXParams() = default; + + gin::Parameter::Ptr fx1, fx2, fx3, fx4, fx5, distMode; + + void setup (WavetableAudioProcessor& p); + + JUCE_DECLARE_NON_COPYABLE (FXParams) + }; + + struct BitCrusherParams + { + BitCrusherParams() = default; + + gin::Parameter::Ptr rate, rez, hard, mix; + + void setup (WavetableAudioProcessor& p); + + JUCE_DECLARE_NON_COPYABLE (BitCrusherParams) + }; + + struct FireAmpParams + { + FireAmpParams() = default; + + gin::Parameter::Ptr gain, tone, output, mix; + + void setup (WavetableAudioProcessor& p); + + JUCE_DECLARE_NON_COPYABLE (FireAmpParams) + }; + + struct GrindAmpParams + { + GrindAmpParams() = default; + + gin::Parameter::Ptr gain, tone, output, mix; + + void setup (WavetableAudioProcessor& p); + + JUCE_DECLARE_NON_COPYABLE (GrindAmpParams) + }; + //============================================================================== gin::ModSrcId modSrcPressure, modSrcTimbre, modSrcPitchbend, modScrPitchBend, modSrcFilter, modSrcNote, modSrcVelocity, modSrcStep, modSrcMonoStep; @@ -235,6 +295,7 @@ public: EnvParams envParams[Cfg::numENVs]; LFOParams lfoParams[Cfg::numLFOs]; StepLFOParams stepLfoParams; + FXParams fxParams; ADSRParams adsrParams; @@ -244,6 +305,9 @@ public: DistortionParams distortionParams; DelayParams delayParams; ReverbParams reverbParams; + BitCrusherParams bitcrusherParams; + FireAmpParams fireAmpParams; + GrindAmpParams grindAmpParams; UIParams uiParams; //============================================================================== @@ -254,9 +318,12 @@ public: gin::GainProcessor outputGain; gin::AudioFifo scopeFifo { 2, 44100 }; float distortionVal = 0.0f; + DeRez2 bitcrusher; + FireAmp fireAmp; + GrindAmp grindAmp; - juce::OwnedArray osc1Tables; - juce::OwnedArray osc2Tables; + gin::Wavetable osc1Tables; + gin::Wavetable osc2Tables; gin::BandLimitedLookupTables analogTables; @@ -286,6 +353,8 @@ public: juce::CriticalSection dspLock; juce::Random rng; + MTSClient* mtsClient = nullptr; + private: bool isParamLocked (gin::Parameter* p) override; float getSmoothingTime (gin::Parameter*); diff --git a/plugin/Source/WavetableVoice.cpp b/plugin/Source/WavetableVoice.cpp index b08a874..8dfe72e 100644 --- a/plugin/Source/WavetableVoice.cpp +++ b/plugin/Source/WavetableVoice.cpp @@ -10,6 +10,10 @@ WavetableVoice::WavetableVoice (WavetableAudioProcessor& p) filter.setNumChannels (2); } +WavetableVoice::~WavetableVoice() +{ +} + void WavetableVoice::noteStarted() { oscillators[0].setWavetable (&proc.osc1Tables); @@ -119,12 +123,15 @@ void WavetableVoice::noteRetriggered() updateParams (0); - filterADSR.noteOn(); + if (proc.filterParams.retrig->getBoolValue()) + filterADSR.noteOn(); - for (auto& a : modADSRs) - a.noteOn(); + for (auto idx = 0; auto& a : modADSRs) + if (proc.envParams[idx++].retrig->getBoolValue()) + a.noteOn(); - adsr.noteOn(); + if (proc.adsrParams.retrig->getBoolValue()) + adsr.noteOn(); } void WavetableVoice::noteStopped (bool allowTailOff) @@ -237,6 +244,10 @@ void WavetableVoice::updateParams (int blockSize) auto note = getCurrentlyPlayingNote(); proc.modMatrix.setPolyValue (*this, proc.modSrcNote, note.initialNote / 127.0f); + + double retuneSemitones = 0.0; + if (proc.mtsClient) + retuneSemitones = MTS_RetuningInSemitones (proc.mtsClient, note.initialNote, -1); for (int i = 0; i < Cfg::numOSCs; i++) { @@ -244,6 +255,7 @@ void WavetableVoice::updateParams (int blockSize) currentMidiNotes[i] = noteSmoother.getCurrentValue() * 127.0f; if (glideInfo.glissando) currentMidiNotes[i] = (float) juce::roundToInt (currentMidiNotes[i]); + currentMidiNotes[i] += float (retuneSemitones); currentMidiNotes[i] += float (note.totalPitchbendInSemitones); currentMidiNotes[i] += getValue (proc.oscParams[i].tune) + getValue (proc.oscParams[i].finetune) / 100.0f; @@ -261,6 +273,7 @@ void WavetableVoice::updateParams (int blockSize) { subNote = noteSmoother.getCurrentValue() * 127.0f; if (glideInfo.glissando) subNote = (float) juce::roundToInt (subNote); + subNote += float (retuneSemitones); subNote += float (note.totalPitchbendInSemitones); subNote += getValue (proc.subParams.tune); @@ -471,3 +484,8 @@ gin::WTOscillator::Params WavetableVoice::getLiveWTParams (int osc) p.bend = getValue (proc.oscParams[osc].bend); return p; } + +float WavetableVoice::getCurrentNote() +{ + return noteSmoother.getCurrentValue() * 127.0f; +} diff --git a/plugin/Source/WavetableVoice.h b/plugin/Source/WavetableVoice.h index 889c0cb..24f54f4 100644 --- a/plugin/Source/WavetableVoice.h +++ b/plugin/Source/WavetableVoice.h @@ -2,6 +2,7 @@ #include #include "Cfg.h" +#include "MTS-ESP/Client/libMTSClient.h" class WavetableAudioProcessor; @@ -12,6 +13,8 @@ class WavetableVoice : public gin::SynthesiserVoice, public: WavetableVoice (WavetableAudioProcessor& p); + ~WavetableVoice() override; + void noteStarted() override; void noteRetriggered() override; void noteStopped (bool allowTailOff) override; @@ -20,7 +23,9 @@ public: void noteTimbreChanged() override; void notePitchbendChanged() override; void noteKeyStateChanged() override {} - + + float getCurrentNote() override; + void setCurrentSampleRate (double newRate) override; void renderNextBlock (juce::AudioBuffer& outputBuffer, int startSample, int numSamples) override; @@ -56,5 +61,5 @@ public: gin::EasedValueSmoother noteSmoother; - float ampKeyTrack = 1.0f; + float ampKeyTrack = 1.0f; }; diff --git a/release.sh b/release.sh index 58cebdc..d86c90c 100755 --- a/release.sh +++ b/release.sh @@ -4,4 +4,63 @@ set -x cd "$(dirname "$0")" ROOT=$(pwd) -gh release create "$GITHUB_REF_NAME" -F ./Changelist.txt ./Binaries/*.zip +TAG="$GITHUB_REF_NAME" +# Tags are pushed with a leading "v" (see tag.sh); strip for the changelog +# lookup and the upload.php version field, but use TAG for gh release create. +VER="${TAG#v}" + +# Extract the changelog section for the current version +# Matches version with optional colon, captures until the next version line or EOF +NOTES=$(awk -v ver="$VER" ' + BEGIN { found=0; printing=0; pattern="^"ver":?$" } + $0 ~ pattern { found=1; printing=1; next } + printing && /^[0-9]+\.[0-9]+\.[0-9]+:?$/ { printing=0 } + printing { print } + END { if (!found) exit 1 } +' ./Changelist.txt) + +if [ $? -ne 0 ] || [ -z "$NOTES" ]; then + echo "Error: Version $VER not found in Changelist.txt or has no content" + exit 1 +fi + +echo "$NOTES" > /tmp/release_notes.txt + +# --- Debug symbols -> crash server ------------------------------------------- +# Uploaded here (not the build job) so a failed upload fails the release. The +# server stores symbols write-once per (plugin, platform, version): a re-tagged +# or rebuilt version whose symbols already exist returns 409 and fails the +# release loudly — delete the stale symbols in the crash site, then re-run. +CRASH_BASE="https://crashreports.rabiensoftware.com" +upload_symbols () { # $1 platform, $2 zip + if [ ! -f "$2" ]; then echo "Error: expected symbols $2 not found"; exit 1; fi + echo "Uploading $1 symbols for $VER" + curl -sS --fail-with-body -H "X-API-Key: $SYMBOL_API_KEY" \ + -F "platform=$1" -F "version=$VER" -F "files[]=@$2" \ + "$CRASH_BASE/symbols/" + echo +} +upload_symbols mac "./Binaries macOS/Symbols_Mac.zip" +upload_symbols win "./Binaries Windows/Symbols_Win.zip" + +ASSETS=( + "./Binaries Linux"/*.deb + "./Binaries Windows"/*.exe + "./Binaries macOS"/*.pkg +) +if [ -f "./Binaries macOS/Symbols_Mac.zip" ]; then + ASSETS+=("./Binaries macOS/Symbols_Mac.zip") +fi + +gh release create "$TAG" --title "$TAG" -F /tmp/release_notes.txt "${ASSETS[@]}" + +PLUGIN=wavetable +for f in "./Binaries Linux"/*.deb \ + "./Binaries Windows"/*.exe \ + "./Binaries macOS"/*.pkg; do + curl -sS --fail-with-body -F "files=@${f}" \ + -F "plugin=${PLUGIN}" \ + -F "version=${VER}" \ + -F "changelog=${NOTES}" \ + "https://socalabs.com/files/upload.php?key=$APIKEY" +done diff --git a/Screenshots/Screenshot1.png b/screenshots/Screenshot1.png similarity index 100% rename from Screenshots/Screenshot1.png rename to screenshots/Screenshot1.png diff --git a/tag.sh b/tag.sh index a1ff622..b903424 100755 --- a/tag.sh +++ b/tag.sh @@ -6,5 +6,12 @@ ROOT=$(pwd) cd $ROOT VER=`cat VERSION` -echo "Tagging [$VER]" -git tag "$VER" && git push origin "$VER" + +# Check that the version exists in the Changelist.txt +if ! grep -q "^${VER}:*$" Changelist.txt; then + echo "Error: Version $VER not found in Changelist.txt" + exit 1 +fi + +echo "Tagging [v$VER]" +git tag "v$VER" && git push origin "v$VER"