Skip to content

Commit

Permalink
Add Dry/Wet knob (#96)
Browse files Browse the repository at this point in the history
* Fixed UI assertion warnings
* Add dry/wet documentation
* Adjust UI and update screenshot
  • Loading branch information
vvvar authored Jul 9, 2023
1 parent a23518b commit 5967c1f
Show file tree
Hide file tree
Showing 48 changed files with 620 additions and 629 deletions.
17 changes: 16 additions & 1 deletion .vscode/c_cpp_properties.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"configurations": [
{
"name": "Mac",
"name": "Mac-Release",
"includePath": [
"${workspaceFolder}/**"
],
Expand All @@ -14,6 +14,21 @@
"cppStandard": "c++20",
"intelliSenseMode": "macos-clang-arm64",
"compileCommands": "${workspaceFolder}/build/Release/compile_commands.json"
},
{
"name": "Mac-Debug",
"includePath": [
"${workspaceFolder}/**"
],
"defines": [],
"macFrameworkPath": [
"/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks"
],
"compilerPath": "/usr/bin/clang",
"cStandard": "c17",
"cppStandard": "c++20",
"intelliSenseMode": "macos-clang-arm64",
"compileCommands": "${workspaceFolder}/build/Debug/compile_commands.json"
}
],
"version": 4
Expand Down
1 change: 1 addition & 0 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
"recommendations": [
"ms-vscode.cpptools",
"ms-python.python",
"samuelcolvin.jinjahtml",
"josetr.cmake-language-support-vscode",
"github.vscode-github-actions",
"shd101wyy.markdown-preview-enhanced",
Expand Down
14 changes: 12 additions & 2 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
{
// Languages settings
"editor.formatOnSave": true,
"[jinja]": {
"editor.formatOnSave": false
},
"files.associations": {
"*.profile": "ini",
"__bit_reference": "cpp",
Expand Down Expand Up @@ -81,7 +84,13 @@
"__verbose_abort": "cpp",
"bit": "cpp",
"shared_mutex": "cpp",
"thread": "cpp"
"thread": "cpp",
"*.jinja": "jinja",
"cinttypes": "cpp",
"forward_list": "cpp",
"regex": "cpp",
"valarray": "cpp",
"random": "cpp"
},
"[python]": {
"editor.defaultFormatter": "ms-python.black-formatter"
Expand Down Expand Up @@ -158,11 +167,12 @@
"zfile",
"zipresp"
],
"sonarlint.pathToCompileCommands": "${workspaceFolder}/build/Release/compile_commands.json",
"sonarlint.pathToCompileCommands": "${workspaceFolder}/build/Debug/compile_commands.json",
// Bandaid because occasinally git is not added to the Path which breaks just
// Keep untill this resolved - https://github.com/casey/just/issues/1517
// VS Code-only since it is installation issue which works fine on a CI
"terminal.integrated.env.windows": {
"Path": "${env:Path};C:\\Program Files\\Git\\bin"
},
"terminal.integrated.scrollback": 999999999999
}
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ Table of Contents
- [Configurable Scaling](#configurable-scaling)
- [6 Clipping Types](#6-clipping-types)
- [Oversampling](#oversampling)
- [Dry/Wet](#dry-wet)
- [Bypass Mode](#bypass-mode)
- [Resizing](#resizing)
- [VST3, AU, LV2 and CLAP Support](#vst3-au-lv2-and-clap-support)
Expand Down Expand Up @@ -124,6 +125,12 @@ Choose between 2x, 4x, 8x, 16x and 32x oversampling to avoid signal aliasing. Yo
You can read more about oversampling [here](https://www.nickwritesablog.com/introduction-to-oversampling-for-alias-reduction/).

### <a id="dry-wet"></a> Dry/Wet

<img src="assets/screenshots/dry-wet.gif" alt="drywet" height="200"/>

Control mix between original and clipped signal. Useful when the clipper is used as an exciter.

### Bypass mode

<img src="assets/screenshots/screenshot-bypass.png" alt="bypass" height="100"/>
Expand Down
Binary file added assets/screenshots/dry-wet.gif
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified assets/screenshots/screenshot-mac.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion conanfile.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

class PeakEater(ConanFile):
name = "peakeater"
version = "0.7.2"
version = "0.8.0"
user = "vvvar"
channel = "testing"
company = "T-Audio"
Expand Down
5 changes: 5 additions & 0 deletions config/conan/linux.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
include(default)
include(shared/ninja.jinja)
include(shared/cppstd.jinja)
include(shared/sanitizers.jinja)
include(shared/build_type.jinja)
7 changes: 7 additions & 0 deletions config/conan/macos.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include(default)
include(shared/ninja.jinja)
include(shared/cppstd.jinja)
include(shared/build_type.jinja)

[conf]
tools.build:cxxflags+=["-arch x86_64", "-arch arm64", "-mmacosx-version-min=10.10"]
8 changes: 0 additions & 8 deletions config/conan/profiles/linux

This file was deleted.

8 changes: 0 additions & 8 deletions config/conan/profiles/linux-arm

This file was deleted.

11 changes: 0 additions & 11 deletions config/conan/profiles/macos

This file was deleted.

11 changes: 0 additions & 11 deletions config/conan/profiles/windows

This file was deleted.

2 changes: 2 additions & 0 deletions config/conan/shared/build_type.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
build_type = {{ "Debug" if os.getenv("DEBUG") else "Release" }}
2 changes: 2 additions & 0 deletions config/conan/shared/cppstd.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
[settings]
compiler.cppstd=20
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
[conf]
tools.cmake.cmaketoolchain:generator=Ninja
5 changes: 5 additions & 0 deletions config/conan/shared/sanitizers.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
[conf]
# Turn on sanitizers
# WARN: You MUST rebuild everything for this to work
# https://clang.llvm.org/docs/AddressSanitizer.html
tools.build:cxxflags+={{ ["-fsanitize=address", "-g"] if os.getenv("SANITIZE") else [] }}
7 changes: 7 additions & 0 deletions config/conan/windows.jinja
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
include(default)
include(shared/ninja.jinja)
include(shared/cppstd.jinja)
include(shared/build_type.jinja)

[conf]
tools.env.virtualenv:powershell=True
83 changes: 56 additions & 27 deletions justfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,38 +3,50 @@ set dotenv-load

# Choose conan profile based on platform
conan_profile := if os() == "macos" {
"macos"
"config/conan/macos.jinja"
} else if os() == "windows" {
"windows"
"config/conan/windows.jinja"
} else if os() == "linux" {
if arch() == "aarch64" {
"linux-arm"
} else {
"linux"
}
"config/conan/linux.jinja"
} else {
"default"
}

build_type := if env_var_or_default("DEBUG", "False") == "False" { "Release" } else { "Debug" }

# Just uses "sh" on Windows by default.
# Force use powershell since Conan fails to lift virtualenv with sh
set windows-shell := ["powershell.exe", "-NoLogo", "-Command"]

# Cleanup build, temp and all generated files
# Cleanup tmp and gen files in the repository
[unix]
cleanup:
[private]
clean-repo:
rm -rf build
rm -f CMakeUserPresets.json
rm -rf test/build
rm -f test/CMakeUserPresets.json
rm -rf Testing
rm -f config/system/requirements.macos.brew.rb.lock.json

# Cleanup build, temp and all generated files
# Cleanup tmp and gen files in the repository
[windows]
cleanup:
[private]
clean-repo:
echo "Cleaning is not supported on Windows yet"

# Clean Conan cache(e.g. ~/conan/data)
[unix]
[private]
clean-conan-cache:
rm -rf ~/conan/data
rm -rf ~/conan2/data

[private]
clean-all:
just clean-repo
just clean-conan-cache

[macos]
[private]
setup-system:
Expand All @@ -44,7 +56,7 @@ setup-system:
[windows]
[private]
setup-system:
# Whtout it PowerShell will ask any .ps1 script to be digitally signed
# Without it PowerShell will ask any .ps1 script to be digitally signed
Set-ExecutionPolicy -ExecutionPolicy unrestricted
choco install config/system/requirements.windows.choco.config --ignore-package-exit-codes

Expand All @@ -62,18 +74,17 @@ setup-git:
setup-conan:
pip3 install -r config/system/requirements.dev.pip.txt
conan profile detect --force
conan config install config/conan
conan create modules/juce-conan -pr:h {{conan_profile}} -pr:b {{conan_profile}}
conan create modules/pluginval-conan -pr:h {{conan_profile}} -pr:b {{conan_profile}}

# Auth in macOS notarytool. Needed to notarize dmg
[private]
[macos]
[private]
setup-notarytool:
xcrun notarytool store-credentials "APPLE_SIGN_PROFILE" --apple-id $MACOS_APPLE_ID --password $MACOS_APPLE_PASSWORD --team-id $MACOS_APPLE_TEAM_ID

# Setup the project
setup: cleanup
setup:
just setup-system # Install system dependencies
just setup-git # Initialize git dependencies
just setup-conan # Setup conan & install project dependencies
Expand All @@ -85,48 +96,66 @@ build:

# Run Static Code Analysis
sca:
cppcheck --project=build/Release/compile_commands.json --enable=all --report-progress --check-config --suppress=missingIncludeSystem
cppcheck --project=build/{{build_type}}/compile_commands.json --enable=all --report-progress --check-config --suppress=missingIncludeSystem

# Runs plugin as a standalone app
[macos]
run:
open build/Release/peakeater_artefacts/Release/Standalone/peakeater.app
build/{{build_type}}/peakeater_artefacts/{{build_type}}/Standalone/peakeater.app/Contents/MacOS/peakeater

# Runs plugin as a standalone app
[windows]
run:
build/Release/peakeater_artefacts/Release/Standalone/peakeater.exe
build/{{build_type}}/peakeater_artefacts/{{build_type}}/Standalone/peakeater.exe

# Run a test suite
# macOS requires a special tratment because how Mac works with AU.
# macOS requires a special treatment because how Mac works with AU.
# macOS requires AU plugins to be registered in order to be discoverable.
# Registration means it is placed either in system or in user's AU folder and
# special utility is called.
# Discussion - https://github.com/Tracktion/pluginval/issues/39
[macos]
test:
[private]
test-au:
# In case there's no AU user dir
mkdir -p ~/Library/Audio/Plug-Ins/Components
# Cleanup leftovers from previous test
rm -rf ~/Library/Audio/Plug-Ins/Components/peakeater.component
# Copy AU to the user AU plugins folder(~/Library/Audio/Plug-Ins/Components) because macOS makes a scan there
cp -R build/Release/peakeater_artefacts/Release/AU/peakeater.component ~/Library/Audio/Plug-Ins/Components
cp -R build/{{build_type}}/peakeater_artefacts/{{build_type}}/AU/peakeater.component ~/Library/Audio/Plug-Ins/Components
# Trigger AudioComponentRegistrar and auval, this will force macOS to scan & register new AU plugin
killall -9 AudioComponentRegistrar
auval -a
# Finally, we can test. Source conanbuild.sh because path to pluginval is set there
source build/Release/generators/conanbuild.sh && ctest --progress --verbose --test-dir build/Release
# Cleanup at the end
# Source conanbuild.sh because path to pluginval is set there
source build/{{build_type}}/generators/conanbuild.sh && ctest --progress --verbose --test-dir build/{{build_type}} -R Pluginval_AU
# Cleanup global Components dir since we've polluted it with our AU under test
rm -rf ~/Library/Audio/Plug-Ins/Components/peakeater.component

[macos]
[private]
test-vst3:
source build/{{build_type}}/generators/conanbuild.sh && ctest --progress --verbose --test-dir build/{{build_type}} -R Pluginval_VST3

[macos]
[private]
test-compile-options:
source build/{{build_type}}/generators/conanbuild.sh && ctest --progress --verbose --test-dir build/{{build_type}} -R CompileOptions

# Run a test suite
# On a mac, we want to have an ability to exec every test individually because AU test is not possible with sanitized exec
[macos]
test:
just test-compile-options
just test-vst3
just test-au

# Run a test suite
[linux]
test:
# Source conanbuild.sh because path to pluginval is set there
. build/Release/generators/conanbuild.sh && ctest --progress --verbose --test-dir build/Release
. build/{{build_type}}/generators/conanbuild.sh && ctest --progress --verbose --test-dir build/{{build_type}}

# Run a test suite
[windows]
test:
# Run conanbuild.ps1 because path to pluginval is set there
./build/Release/generators/conanbuild.ps1; ctest --progress --verbose --test-dir build/Release
./build/{{build_type}}/generators/conanbuild.ps1; ctest --progress --verbose --test-dir build/{{build_type}}
2 changes: 1 addition & 1 deletion modules/pluginval-conan
Submodule pluginval-conan updated 1 files
+16 −16 conanfile.py
Loading

0 comments on commit 5967c1f

Please sign in to comment.