Compare commits
82 Commits
Author | SHA1 | Date | |
---|---|---|---|
181285f4ff | |||
ca4c4fa006 | |||
512546f108 | |||
2a6f149612 | |||
aaeba97a37 | |||
d49fc15db2 | |||
b93eb5d836 | |||
5661ebc0e7 | |||
7d521e51e0 | |||
61afaca400 | |||
fbd0890017 | |||
4220bed501 | |||
ee327ebe80 | |||
a6d52765a6 | |||
029ec29f6d | |||
20bb3a8193 | |||
fb3ab23599 | |||
f58353bc20 | |||
1be6e06699 | |||
4487ef2176 | |||
65eeade32d | |||
83e101cf8e | |||
|
c779481486 | ||
|
a605293801 | ||
67756cf502 | |||
02e628e5b0 | |||
ff459dece1 | |||
defabafb45 | |||
578bec397f | |||
5c91a48e42 | |||
abc65d292a | |||
d2b15d9155 | |||
90f03881fd | |||
|
5015dd6bbd | ||
724d7c6b8a | |||
da22954810 | |||
f3a12e8e0a | |||
ff99bda751 | |||
b214bc896e | |||
|
6431749bf8 | ||
3a8e279fde | |||
|
2ba329f5ea | ||
|
f1e471e9bf | ||
340d527ffa | |||
dd6f6adb2c | |||
c7f930673f | |||
98e5ef65c4 | |||
daf0cb3e1c | |||
324aa911fd | |||
|
f530db5c45 | ||
|
eaaeebb8ff | ||
adbd1ab61c | |||
750c807db3 | |||
f6b4e1b7ec | |||
b517c83cb5 | |||
9cb3bb00fa | |||
099fb7507b | |||
|
091b677663 | ||
862e56840f | |||
|
6f856ec04c | ||
|
07387edcc6 | ||
|
eef7f35dc5 | ||
|
7b53b045a9 | ||
|
99b6ec2996 | ||
|
e5cc92c72f | ||
f04fcac4ea | |||
c2c1979cc3 | |||
1e34773da8 | |||
f623002c27 | |||
|
2860ddc141 | ||
|
06fc92a2e0 | ||
|
af6ce9ba5e | ||
93ddf112bb | |||
|
5d3fbdbb0a | ||
|
861cdc427e | ||
|
5bd685ed7b | ||
10a2d1ff45 | |||
|
1d731eaafb | ||
|
4dfbded165 | ||
|
5f2a413b4d | ||
|
a4a8ba96ca | ||
|
93f571af18 |
@ -11,7 +11,7 @@ You can find information and documentation [on the official web page](https://ww
|
||||
|
||||
## Legal
|
||||
|
||||
Copyright (C) 2021-2024 Orastron Srl unipersonale.
|
||||
Copyright (C) 2021-2025 Orastron Srl unipersonale.
|
||||
|
||||
Authors: Stefano D'Angelo, Paolo Marrone.
|
||||
|
||||
|
@ -2,9 +2,23 @@
|
||||
|
||||
## Premise
|
||||
|
||||
Each of these examples consists of a common part of code, shared by all examples, which contains all necessary boilerplate code and is not Brickworks-related, and a specific part which actually implements the audio engine. The common code is copied/generated by an external tool called [Tibia](https://github.com/sdangelo/tibia). If you downloaded an official Brickworks release you don't need to care about any of this - all needed files will already be present -, otherwise you first need to [run Tibia as outlined below](#tibia). You might also want to do that if you need to edit the location of third-party dependencies (this is better explained in the following platform-specific instructions).
|
||||
Each of these examples consists of common and boilerplate code, which is not Brickworks-related, and a specific part which actually implements the audio engine. The common code is copied/generated by an external tool called [Tibia](https://git.orastron.com/orastron/tibia), which you first need to [run as outlined below](#tibia).
|
||||
|
||||
Each subfolder contains an example, except the `common` folder, which contains a good deal of common code and common Tibia metadata. In order to build an example just `cd` to <code>*example*/*platform*</code> and use the following platform-specific instructions. Building for any platform requires a recent enough version of [GNU Make](https://www.gnu.org/software/make/) installed.
|
||||
Each subfolder contains an example, except the `common` folder, which contains a good deal of common code and common Tibia-related metadata. In order to build an example, once Tibia has generated common and boilerplate code, you can just `cd` to <code>*example*/*platform*</code> and use the following platform-specific instructions. Building for any platform requires a recent enough version of [GNU Make](https://www.gnu.org/software/make/) installed.
|
||||
|
||||
## Tibia
|
||||
|
||||
### Prerequisites
|
||||
|
||||
You need [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com/) to be installed.
|
||||
|
||||
### Usage
|
||||
|
||||
Get [Tibia 0.1.0](https://git.orastron.com/orastron/tibia/releases/tag/v0.1.0), extract the `tibia` folder and place it in the same parent directory as the Brickworks folder. Then either `cd` to the `tibia` folder and `npm install dot`, or install the [dot npm package](https://www.npmjs.com/package/dot) globally and make sure that the `NODE_PATH` environment variable is corretly set to find it.
|
||||
|
||||
Now you can `cd` to the `examples` folder and run `./tibia_gen.sh` to copy/generate files for all examples, or otherwise run `./tibia_gen.sh common` to only copy/generate files in `examples/common` or <code>./tibia\_gen.sh *example*</code> to do the same for files in <code>examples/*example*</code>.
|
||||
|
||||
If you want to remove all files copied/generated by Tibia, and thus restore the `examples` directory as it would appear in the official repository, run `./tibia_clean.sh` from the `examples` directory.
|
||||
|
||||
## VST3
|
||||
|
||||
@ -12,7 +26,7 @@ Each subfolder contains an example, except the `common` folder, which contains a
|
||||
|
||||
Windows (via [MSYS2/Mingw-w64](https://www.msys2.org/)), macOS, and Linux OSes are supported. Building tested with [GCC](https://gcc.gnu.org/), probably also works with [Clang](https://clang.llvm.org/).
|
||||
|
||||
You also need to download or clone the [VST3 C API](https://github.com/steinbergmedia/vst3_c_api) and place it in the same folder as the Brickworks folder, or otherwise edit `common/src/vst3-make.json` and change `cflags` to point to the correct directory then finally [run Tibia](#tibia), or invoke `make` with appropriate `CFLAGS` straight from the command line.
|
||||
You also need to download or clone the [VST3 C API](https://github.com/steinbergmedia/vst3_c_api) and place it in the same parent folder as the Brickworks folder, or otherwise edit `common/src/vars-pre.mk` and change `CFLAGS_EXTRA` to point to the correct directory, or invoke `make` with appropriate `CFLAGS` straight from the command line.
|
||||
|
||||
### Build
|
||||
|
||||
@ -28,7 +42,7 @@ If all went fine, you can install for the current user (i.e., into the user VST3
|
||||
|
||||
Windows (via [MSYS2/Mingw-w64](https://www.msys2.org/)), macOS, and Linux OSes are supported. Building tested with [GCC](https://gcc.gnu.org/), probably also works with [Clang](https://clang.llvm.org/).
|
||||
|
||||
You also need to download/install [LV2](https://lv2plug.in/), so that either header files are found by the compiler in its default include path, or otherwise you could add an appropriate `cflags` value to `common/src/lv2-make.json` and [run Tibia](#tibia), or invoke `make` with appropriate `CFLAGS` straight from the command line.
|
||||
You also need to download/install [LV2](https://lv2plug.in/), so that either header files are found by the compiler in its default include path, or otherwise you could add an appropriate `CFLAGS_EXTRA` value to `common/src/vars-pre.mk`, or invoke `make` with appropriate `CFLAGS` straight from the command line.
|
||||
|
||||
### Build
|
||||
|
||||
@ -36,13 +50,13 @@ In order to build just type `make`. You'll find the resulting LV2 bundle in <cod
|
||||
|
||||
### Installation
|
||||
|
||||
If all went fine, you can install for the current user (i.e., into the user VST3 folder) by invoking `make install-user` or for all users (i.e., into the system VST3 folder) by `make install`.
|
||||
If all went fine, you can install for the current user (i.e., into the user LV2 folder) by invoking `make install-user` or for all users (i.e., into the system LV2 folder) by `make install`.
|
||||
|
||||
## Web
|
||||
|
||||
### Prerequisites
|
||||
|
||||
You need Clang with WebAssembly target support and [OpenSSL](https://www.openssl.org/) installed.
|
||||
You need [Clang](https://clang.llvm.org/) with WebAssembly target support and [OpenSSL](https://www.openssl.org/) installed.
|
||||
|
||||
### Build
|
||||
|
||||
@ -58,7 +72,7 @@ The output files need to be served over HTTPS. A self-signed certificate is gene
|
||||
|
||||
Building and firmware upload was only tested on Linux. You need [arm-none-eabi-gcc](https://developer.arm.com/Tools%20and%20Software/GNU%20Toolchain) (for building) and [dfu-util](https://dfu-util.sourceforge.net/) (for firmware upload) installed.
|
||||
|
||||
You also need to clone/download [libDaisy](https://github.com/electro-smith/libDaisy) (beware that since version 7.0.0 you also need to clone submodules, see the [release notes](https://github.com/electro-smith/libDaisy/releases/tag/v7.0.0)), `cd` to it, and run `make`. You should either place it in the same folder as the Brickworks folder, or otherwise edit `common/src/daisy-seed-make.json` and change `libdaisyDir` to point to the correct directory then finally [run Tibia](#tibia).
|
||||
You also need to clone/download [libDaisy](https://github.com/electro-smith/libDaisy) (beware that since version 7.0.0 you also need to clone submodules, see the [release notes](https://github.com/electro-smith/libDaisy/releases/tag/v7.0.0)), `cd` to it, and run `make`. You should either place it in the same folder as the Brickworks folder, or otherwise edit `common/src/vars-pre.mk` and change `LIBDAISY_DIR` to point to the correct directory.
|
||||
|
||||
### Build
|
||||
|
||||
@ -82,7 +96,7 @@ Android examples are built without the help of Android Studio or Gradle. You'll
|
||||
|
||||
- Android SDK (https://developer.android.com/studio/index.html) \*;
|
||||
- Android NDK (https://developer.android.com/ndk/downloads) \*;
|
||||
- `.jar`s and `.aar`s (and you'll also need to manually extract the inner `.jar` from each `.aar`, which are just ZIP files) for:
|
||||
- `.jar`s and `.aar`s (and you'll also need to manually extract the inner `classes.jar` from each `xxx.aar`, which are just ZIP files, and rename `classes.jar` to `xxx.jar`) for:
|
||||
- AndroidX Core (https://mvnrepository.com/artifact/androidx.core/core);
|
||||
- AndroidX Lifecycle Common (https://mvnrepository.com/artifact/androidx.lifecycle/lifecycle-common)
|
||||
- AndroidX VersionedParcelable (https://mvnrepository.com/artifact/androidx.versionedparcelable/versionedparcelable)
|
||||
@ -91,7 +105,7 @@ Android examples are built without the help of Android Studio or Gradle. You'll
|
||||
- Koltin Coroutines Core JVM (https://mvnrepository.com/artifact/org.jetbrains.kotlinx/kotlinx-coroutines-core-jvm);
|
||||
- `miniaudio.h` library (http://miniaud.io/).
|
||||
|
||||
Then you'll probably also need to adjust paths and values in `common/src/android-make.json` and [run Tibia](#tibia).
|
||||
Then you'll probably also need to adjust paths and values in `common/src/vars-pre.mk`.
|
||||
|
||||
\* You can install both the needed parts of the Android SDK and the NDK by downloading the so-called "command line tools" (https://developer.android.com/studio#command-line-tools-only) and using the included `sdkmanager` program. In such case you need to install the following packages: "platforms;android-*latest*", "build-tools;*latest*", "platform-tools", and "ndk;*latest*".
|
||||
|
||||
@ -103,7 +117,7 @@ In order to build just type `make`. You'll find the resulting `.apk` file in `bu
|
||||
|
||||
If all went fine, you can branch your device and install using `make install` or otherwise install manually.
|
||||
|
||||
### Usage and known issues
|
||||
### Usage
|
||||
|
||||
Effect examples process audio input signals, therefore they will require permission to use the capture device.
|
||||
|
||||
@ -117,7 +131,7 @@ iOS examples are not directly built by the supplied Makefiles. These rather gene
|
||||
|
||||
For this to work you need to have the latest [Xcode](https://developer.apple.com/xcode/) and [XcodeGen](https://github.com/yonaskolb/XcodeGen) installed, as well as a copy of the latest [`miniaudio.h`](http://miniaud.io/).
|
||||
|
||||
Finally, you might need to adjust header search path for miniaudio in `common/src/ios-make.json`, `common/src/ios-make-cxx-fx.json`, and `common/src/io-make-cxx-synth.json`, and [run Tibia](#tibia).
|
||||
Finally, you might need to adjust header search path for miniaudio in `common/src/ios-make.json` and [run Tibia](#tibia).
|
||||
|
||||
### Build
|
||||
|
||||
@ -139,7 +153,7 @@ Synth examples use input MIDI and support hotplugging.
|
||||
|
||||
Windows (via [MSYS2/Mingw-w64](https://www.msys2.org/)), macOS, and Linux OSes are supported. Building tested with [GCC](https://gcc.gnu.org/), probably also works with [Clang](https://clang.llvm.org/).
|
||||
|
||||
Depending on the specific example, you might need to download or clone [tinywav](https://github.com/mhroth/tinywav) and/or [midi-parser](https://github.com/abique/midi-parser) and place them in the same folder as the Brickworks folder, or otherwise edit `common/src/cmd-make.json`
|
||||
Depending on the specific example, you might need to download or clone [tinywav](https://github.com/mhroth/tinywav) and/or [midi-parser](https://github.com/abique/midi-parser) and place them in the same folder as the Brickworks folder, or otherwise edit `common/src/vars-pre.mk`
|
||||
|
||||
### Build
|
||||
|
||||
@ -148,17 +162,3 @@ In order to build just type `make`. You'll find the resulting executable file in
|
||||
### Usage
|
||||
|
||||
Just run the executable without arguments to get usage instructions.
|
||||
|
||||
## Tibia
|
||||
|
||||
### Prerequisites
|
||||
|
||||
You need [Node.js](https://nodejs.org/en) and [npm](https://www.npmjs.com/) to be installed.
|
||||
|
||||
### Usage
|
||||
|
||||
Get [Tibia 0.0.1](https://github.com/sdangelo/tibia/releases/tag/v0.0.1), place it in the same directory as the Brickworks folder, and rename it as `tibia`. Then either `cd` to the Tibia folder and `npm install dot`, or install the [dot npm package](https://www.npmjs.com/package/dot) globally and make sure that the `NODE_PATH` environment variable is corretly set to find it.
|
||||
|
||||
Now you can `cd` to the `examples` folder and run `./tibia_gen.sh` to copy/generate files for all examples, or otherwise run `./tibia_gen.sh common` to only copy/generate files in `examples/common` or <code>./tibia\_gen.sh *example*</code> to do the same for files in <code>examples/*example*</code>.
|
||||
|
||||
If you want to remove all files copied/generated by Tibia, and thus restore the `examples` directory as it would appear in the official repository, run `./tibia_clean.sh` from the `examples` directory.
|
||||
|
@ -1,22 +0,0 @@
|
||||
{
|
||||
"android_make": {
|
||||
"cxxflags": "-I../../../include -I../../common/src -I../../../../miniaudio",
|
||||
"commonDir": "../../common/android",
|
||||
"keyStore": "../../common/src/keystore.jks",
|
||||
"keyAlias": "androidkey",
|
||||
"storePass": "android",
|
||||
"keyPass": "android",
|
||||
"sdkDir": "${HOME}/Android/Sdk",
|
||||
"ndkVersion": "25.2.9519653",
|
||||
"buildToolsVersion": "34.0.0",
|
||||
"androidxDir": "${HOME}/Android/androidx",
|
||||
"kotlinDir": "${HOME}/Android/kotlin",
|
||||
"androidVersion": "34",
|
||||
"androidxCoreVersion": "1.10.1",
|
||||
"androidxLifecycleCommonVersion": "2.6.1",
|
||||
"androidxVersionedparcelableVersion": "1.1.1",
|
||||
"kotlinStdlibVersion": "1.9.0",
|
||||
"kotlinxCoroutinesCoreVersion": "1.7.3",
|
||||
"kotlinxCoroutinesCoreJVMVersion": "1.7.3"
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"cmd_make": {
|
||||
"commonDir": "../../common/cmd",
|
||||
"tinywavDir": "../../../../tinywav",
|
||||
"midiParserDir": "../../../../midi-parser"
|
||||
}
|
||||
}
|
@ -20,6 +20,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "plugin_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -25,7 +25,8 @@ typedef struct plugin {
|
||||
impl handle;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
instance->handle = impl_new();
|
||||
}
|
||||
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "plugin_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -25,7 +25,8 @@ typedef struct plugin {
|
||||
impl handle;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
instance->handle = impl_new();
|
||||
}
|
||||
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"daisy_seed_make": {
|
||||
"commonDir": "../../common/daisy-seed",
|
||||
"libdaisyDir": "../../../../libDaisy"
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"ios_make": {
|
||||
"headerSearchPaths": [
|
||||
"../../../../../../miniaudio",
|
||||
"../../../../common/src",
|
||||
"../../../../../include"
|
||||
],
|
||||
"deploymentTarget": 16.6,
|
||||
"commonDir": "../../common/ios",
|
||||
"pluginDir": "../../common/src/cxx-fx",
|
||||
"cSrcs": "../../common/src/cxx-fx/impl.h",
|
||||
"cxxSrcs": "../src/impl.cpp"
|
||||
}
|
||||
}
|
@ -1,14 +0,0 @@
|
||||
{
|
||||
"ios_make": {
|
||||
"headerSearchPaths": [
|
||||
"../../../../../../miniaudio",
|
||||
"../../../../common/src",
|
||||
"../../../../../include"
|
||||
],
|
||||
"deploymentTarget": 16.6,
|
||||
"commonDir": "../../common/ios",
|
||||
"pluginDir": "../../common/src/cxx-synth",
|
||||
"cSrcs": "../../common/src/cxx-synth/impl.h",
|
||||
"cxxSrcs": "../src/impl.cpp"
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
"../../../../common/src",
|
||||
"../../../../../include"
|
||||
],
|
||||
"deploymentTarget": 16.6,
|
||||
"commonDir": "../../common/ios",
|
||||
"pluginDir": "../src"
|
||||
"deploymentTarget": 14.0
|
||||
}
|
||||
}
|
||||
|
@ -1,5 +0,0 @@
|
||||
{
|
||||
"lv2_make": {
|
||||
"commonDir": "../../common/lv2"
|
||||
}
|
||||
}
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"make": {
|
||||
"cxxSrcs": "../src/impl.cpp",
|
||||
"cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx",
|
||||
"cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx -std=c++11",
|
||||
"pluginDir": "../../common/src/cxx-fx"
|
||||
"mkincDir": "../../common/src",
|
||||
"extra": "EXAMPLE_TYPE := cxx-fx"
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"make": {
|
||||
"cxxSrcs": "../src/impl.cpp",
|
||||
"cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth",
|
||||
"cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth -std=c++11",
|
||||
"pluginDir": "../../common/src/cxx-synth"
|
||||
"mkincDir": "../../common/src",
|
||||
"extra": "EXAMPLE_TYPE := cxx-synth"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"make": {
|
||||
"cflags": "-I../../../include -I../../common/src",
|
||||
"pluginDir": "../src"
|
||||
"mkincDir": "../../common/src",
|
||||
"extra": "EXAMPLE_TYPE := c"
|
||||
}
|
||||
}
|
||||
|
3
examples/common/src/rules-extra.mk
Normal file
3
examples/common/src/rules-extra.mk
Normal file
@ -0,0 +1,3 @@
|
||||
ifeq ($(TEMPLATE), web)
|
||||
include $(COMMON_DIR)/../web/rules-extra-web-demo.mk
|
||||
endif
|
3
examples/common/src/vars-extra.mk
Normal file
3
examples/common/src/vars-extra.mk
Normal file
@ -0,0 +1,3 @@
|
||||
ifeq ($(TEMPLATE), web)
|
||||
include $(COMMON_DIR)/../web/vars-extra-web-demo.mk
|
||||
endif
|
77
examples/common/src/vars-pre.mk
Normal file
77
examples/common/src/vars-pre.mk
Normal file
@ -0,0 +1,77 @@
|
||||
API_DIR := ../api
|
||||
|
||||
ifeq ($(EXAMPLE_TYPE), c)
|
||||
PLUGIN_DIR := ../src
|
||||
CFLAGS_EXTRA := -I../../../include -I../../common/src
|
||||
endif
|
||||
|
||||
ifeq ($(EXAMPLE_TYPE), cxx-fx)
|
||||
PLUGIN_DIR := ../../common/src/cxx-fx
|
||||
CXX_SRCS_EXTRA := ../src/impl.cpp
|
||||
CFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-fx
|
||||
CXXFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-fx -std=c++11
|
||||
endif
|
||||
|
||||
ifeq ($(EXAMPLE_TYPE), cxx-synth)
|
||||
PLUGIN_DIR := ../../common/src/cxx-synth
|
||||
CXX_SRCS_EXTRA := ../src/impl.cpp
|
||||
CFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-synth
|
||||
CXXFLAGS_EXTRA := -I../../../include -I../../common/src -I../../common/src/cxx-synth -std=c++11
|
||||
endif
|
||||
|
||||
ifeq ($(TEMPLATE), cmd)
|
||||
COMMON_DIR := ../../common/cmd
|
||||
TINYWAV_DIR := ../../../../tinywav
|
||||
MIDI_PARSER_DIR := ../../../../midi-parser
|
||||
endif
|
||||
|
||||
ifeq ($(TEMPLATE), lv2)
|
||||
COMMON_DIR := ../../common/lv2
|
||||
endif
|
||||
|
||||
ifeq ($(TEMPLATE), vst3)
|
||||
COMMON_DIR := ../../common/vst3
|
||||
CFLAGS_EXTRA := $(CFLAGS_EXTRA) -I../../../../vst3_c_api
|
||||
endif
|
||||
|
||||
ifeq ($(TEMPLATE), web)
|
||||
COMMON_DIR := ../../common/web
|
||||
CFLAGS_EXTRA := $(CFLAGS_EXTRA) -DWASM
|
||||
CXXFLAGS_EXTRA := $(CXXFLAGS_EXTRA) -DWASM -std=c++11
|
||||
endif
|
||||
|
||||
ifeq ($(TEMPLATE), daisy-seed)
|
||||
COMMON_DIR := ../../common/daisy-seed
|
||||
LIBDAISY_DIR := ../../../../libDaisy
|
||||
endif
|
||||
|
||||
ifeq ($(TEMPLATE), ios)
|
||||
COMMON_DIR := ../../common/ios
|
||||
ifeq ($(EXAMPLE_TYPE), cxx-fx)
|
||||
C_SRCS_EXTRA := ../../common/src/cxx-fx/impl.h
|
||||
endif
|
||||
ifeq ($(EXAMPLE_TYPE), cxx-synth)
|
||||
C_SRCS_EXTRA := ../../common/src/cxx-synth/impl.h
|
||||
endif
|
||||
endif
|
||||
|
||||
ifeq ($(TEMPLATE), android)
|
||||
COMMON_DIR := ../../common/android
|
||||
CXXFLAGS_EXTRA := -I../../../include -I../../common/src -I../../../../miniaudio
|
||||
KEY_STORE := ../../common/src/keystore.jks
|
||||
KEY_ALIAS := androidkey
|
||||
STORE_PASS := android
|
||||
KEY_PASS := android
|
||||
SDK_DIR := $(HOME)/Android/Sdk
|
||||
ANDROIDX_DIR := $(HOME)/Android/androidx
|
||||
KOTLIN_DIR := $(HOME)/Android/kotlin
|
||||
NDK_VERSION := 28.0.12674087
|
||||
BUILD_TOOLS_VERSION := 35.0.0
|
||||
ANDROID_VERSION := 35
|
||||
ANDROIDX_CORE_VERSION := 1.15.0
|
||||
ANDROIDX_LIFECYCLE_COMMON_VERSION := 2.8.7
|
||||
ANDROIDX_VERSIONEDPARCELABLE_VERSION := 1.2.1
|
||||
KOTLIN_STDLIB_VERSION := 2.1.10
|
||||
KOTLINX_COROUTINES_CORE_VERSION := 1.10.1
|
||||
KOTLINX_COROUTINES_CORE_JVM_VERSION := 1.10.1
|
||||
endif
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"vst3_make": {
|
||||
"cflags": "-I../../../../vst3_c_api",
|
||||
"commonDir": "../../common/vst3"
|
||||
}
|
||||
}
|
@ -1,7 +0,0 @@
|
||||
{
|
||||
"web_make": {
|
||||
"cflags": "-DWASM",
|
||||
"cxxflags": "-DWASM -std=c++11",
|
||||
"commonDir": "../../common/web"
|
||||
}
|
||||
}
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "cutoff" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_ap1",
|
||||
"types": [ "@lv2:AllpassPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "cutoff" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_ap1_state ap1_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_ap1_init(&instance->ap1_coeffs);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks 1st-order allpass example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_ap1",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Cutoff",
|
||||
"shortName": "Cutoff",
|
||||
"id" : "cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 1000.0,
|
||||
"minimum": 20.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "cutoff", "q" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_ap2",
|
||||
"types": [ "@lv2:AllpassPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "cutoff", "q" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_ap2_state ap2_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_ap2_init(&instance->ap2_coeffs);
|
||||
}
|
||||
|
||||
@ -55,10 +56,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_ap2_set_cutoff(&instance->ap2_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_q:
|
||||
bw_ap2_set_Q(&instance->ap2_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks 2nd-order allpass example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_ap2",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Cutoff",
|
||||
"shortName": "Cutoff",
|
||||
"id": "cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 1000.0,
|
||||
"minimum": 20.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Q",
|
||||
"shortName": "Q",
|
||||
"id": "q",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.5,
|
||||
"minimum": 0.5,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "balance", "l_level", "r_level" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_balance",
|
||||
"types": [ "@lv2:SpatialPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "balance", "l_level", "r_level" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -29,7 +29,8 @@ typedef struct plugin {
|
||||
bw_ppm_state ppm_r_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_balance_init(&instance->balance_coeffs);
|
||||
bw_ppm_init(&instance->ppm_coeffs);
|
||||
}
|
||||
@ -68,10 +69,10 @@ static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
static float plugin_get_parameter(plugin *instance, size_t index) {
|
||||
float v = 0.f;
|
||||
switch (index) {
|
||||
case 1:
|
||||
case plugin_parameter_l_level:
|
||||
v = bw_ppm_get_y_z1(&instance->ppm_l_state);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_r_level:
|
||||
v = bw_ppm_get_y_z1(&instance->ppm_r_state);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks stereo balance example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_balance",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "stereo",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "stereo",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Balance",
|
||||
"shortName": "Balance",
|
||||
"id": "balance",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -100.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Left level",
|
||||
"shortName": "L level",
|
||||
"id": "l_level",
|
||||
"direction": "output",
|
||||
"defaultValue": -60.0,
|
||||
"minimum": -60.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Right level",
|
||||
"shortName": "R level",
|
||||
"id": "r_level",
|
||||
"direction": "output",
|
||||
"defaultValue": -60.0,
|
||||
"minimum": -60.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "sr_ratio", "bit_depth" ]
|
||||
}
|
||||
}
|
@ -1,5 +1,5 @@
|
||||
{
|
||||
"daisy_seed": {
|
||||
"parameterPins": [ 15, 16 ]
|
||||
"parameterPins": [ 15, 16, 22 ]
|
||||
}
|
||||
}
|
||||
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_bitcrush",
|
||||
"types": [ "@lv2:DistortionPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "sr_ratio", "bit_depth" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -28,7 +28,8 @@ typedef struct plugin {
|
||||
bw_bd_reduce_coeffs bd_reduce_coeffs;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_sr_reduce_init(&instance->sr_reduce_coeffs);
|
||||
bw_bd_reduce_init(&instance->bd_reduce_coeffs);
|
||||
bw_bd_reduce_set_silence_dc(&instance->bd_reduce_coeffs, 0);
|
||||
@ -61,12 +62,15 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_sr_ratio:
|
||||
bw_sr_reduce_set_ratio(&instance->sr_reduce_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bit_depth:
|
||||
bw_bd_reduce_set_bit_depth(&instance->bd_reduce_coeffs, (char)value);
|
||||
break;
|
||||
case plugin_parameter_gate:
|
||||
bw_bd_reduce_set_gate_lin(&instance->bd_reduce_coeffs, value);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks bitcrusher example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_bitcrush",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Sample rate ratio",
|
||||
"shortName": "SR ratio",
|
||||
"id": "sr_ratio",
|
||||
"direction": "input",
|
||||
"defaultValue": 100.0,
|
||||
"minimum": 1.0,
|
||||
@ -34,12 +35,24 @@
|
||||
{
|
||||
"name": "Bit depth",
|
||||
"shortName": "Bit depth",
|
||||
"id": "bit_depth",
|
||||
"direction": "input",
|
||||
"defaultValue": 16.0,
|
||||
"minimum": 1.0,
|
||||
"maximum": 16.0,
|
||||
"integer": true,
|
||||
"map": "linear"
|
||||
},
|
||||
{
|
||||
"name": "Gate",
|
||||
"shortName": "Gate",
|
||||
"id": "gate",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
"maximum": 1.0,
|
||||
"optional": true,
|
||||
"map": "linear"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "cutoff_low", "cutoff_high", "tone" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_cab",
|
||||
"types": [ "@lv2:SimulatorPlugin", "@lv2:FilterPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "cutoff_low", "cutoff_high", "tone" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_cab_state cab_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_cab_init(&instance->cab_coeffs);
|
||||
}
|
||||
|
||||
@ -55,13 +56,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff_low:
|
||||
bw_cab_set_cutoff_low(&instance->cab_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_cutoff_high:
|
||||
bw_cab_set_cutoff_high(&instance->cab_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_tone:
|
||||
bw_cab_set_tone(&instance->cab_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks cab simulator example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_cab",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Cutoff low",
|
||||
"shortName": "Cutoff low",
|
||||
"id": "cutoff_low",
|
||||
"direction": "input",
|
||||
"defaultValue": 50.0,
|
||||
"minimum": 0.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Cutoff high",
|
||||
"shortName": "Cutoff high",
|
||||
"id": "cutoff_high",
|
||||
"direction": "input",
|
||||
"defaultValue": 50.0,
|
||||
"minimum": 0.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Tone",
|
||||
"shortName": "Tone",
|
||||
"id": "tone",
|
||||
"direction": "input",
|
||||
"defaultValue": 50.0,
|
||||
"minimum": 0.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "rate", "depth", "type" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_chorus",
|
||||
"types": [ "@lv2:ChorusPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "rate", "depth", "type" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_chorus_state chorus_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin*instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_chorus_init(&instance->chorus_coeffs, 0.01f);
|
||||
bw_chorus_set_delay(&instance->chorus_coeffs, 0.005f);
|
||||
}
|
||||
@ -54,13 +55,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
bw_chorus_set_rate(&instance->chorus_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_depth:
|
||||
bw_chorus_set_amount(&instance->chorus_coeffs, (0.01f * 0.004f) * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_type:
|
||||
// values taken from Dattorro's paper
|
||||
if (value < 1.5f) { // "Industry standard chorus"
|
||||
bw_chorus_set_coeff_x(&instance->chorus_coeffs, 1.f);
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks chorus example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_chorus",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Rate",
|
||||
"shortName": "Rate",
|
||||
"id": "rate",
|
||||
"direction": "input",
|
||||
"defaultValue": 1.0,
|
||||
"minimum": 0.01,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Depth",
|
||||
"shortName": "Depth",
|
||||
"id": "depth",
|
||||
"direction": "input",
|
||||
"defaultValue": 50.0,
|
||||
"minimum": 0.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Type",
|
||||
"shortName": "Type",
|
||||
"id": "type",
|
||||
"direction": "input",
|
||||
"defaultValue": 1,
|
||||
"minimum": 1,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "gain", "bias" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_clip",
|
||||
"types": [ "@lv2:WaveshaperPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "gain", "bias" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,8 @@ typedef struct plugin {
|
||||
float buf[BUF_SIZE];
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_clip_init(&instance->clip_coeffs);
|
||||
bw_src_int_init(&instance->src_up_coeffs, 2);
|
||||
bw_src_int_init(&instance->src_down_coeffs, -2);
|
||||
@ -69,10 +70,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_gain:
|
||||
bw_clip_set_gain(&instance->clip_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bias:
|
||||
bw_clip_set_bias(&instance->clip_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks hard clipper example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_clip",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Gain",
|
||||
"shortName": "Gain",
|
||||
"id": "gain",
|
||||
"direction": "input",
|
||||
"defaultValue": 1.0,
|
||||
"minimum": 0.1,
|
||||
@ -33,6 +34,7 @@
|
||||
{
|
||||
"name": "Bias",
|
||||
"shortName": "Bias",
|
||||
"id": "bias",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -2.5,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "ff_delay", "fb_delay", "blend", "ff", "fb" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_comb",
|
||||
"types": [ "@lv2:CombPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "ff_delay", "fb_delay", "blend", "ff", "fb" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_comb_state comb_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin*instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_comb_init(&instance->comb_coeffs, 1.f);
|
||||
}
|
||||
|
||||
@ -53,19 +54,19 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_ff_delay:
|
||||
bw_comb_set_delay_ff(&instance->comb_coeffs, 0.001f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_fb_delay:
|
||||
bw_comb_set_delay_fb(&instance->comb_coeffs, 0.001f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_blend:
|
||||
bw_comb_set_coeff_blend(&instance->comb_coeffs, value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_ff:
|
||||
bw_comb_set_coeff_ff(&instance->comb_coeffs, value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_fb:
|
||||
bw_comb_set_coeff_fb(&instance->comb_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks comb filter example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_comb",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Feedforward delay",
|
||||
"shortName": "FF delay",
|
||||
"id": "ff_delay",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Feedback delay",
|
||||
"shortName": "FB delay",
|
||||
"id": "fb_delay",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Blend coefficient",
|
||||
"shortName": "Blend coeff",
|
||||
"id": "blend",
|
||||
"direction": "input",
|
||||
"defaultValue": 1.0,
|
||||
"minimum": 0.0,
|
||||
@ -53,6 +56,7 @@
|
||||
{
|
||||
"name": "Feedforward coefficient",
|
||||
"shortName": "FF coeff",
|
||||
"id": "ff",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -1.0,
|
||||
@ -62,6 +66,7 @@
|
||||
{
|
||||
"name": "Feedback coefficient",
|
||||
"shortName": "FB coeff",
|
||||
"id": "fb",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -0.999,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output", "sidechain_in" ],
|
||||
"parameterIds": [ "threshold", "ratio", "attack", "release", "gain", "ext_sidechain" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_comp",
|
||||
"types": [ "@lv2:CompressorPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output", "sidechain_in" ],
|
||||
"parameterSymbols": [ "threshold", "ratio", "attack", "release", "gain", "ext_sidechain" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -27,7 +27,8 @@ typedef struct plugin {
|
||||
char ext_sidechain;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_comp_init(&instance->comp_coeffs);
|
||||
}
|
||||
|
||||
@ -56,24 +57,24 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_threshold:
|
||||
bw_comp_set_thresh_dBFS(&instance->comp_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_ratio:
|
||||
bw_comp_set_ratio(&instance->comp_coeffs, bw_rcpf(value));
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_attack:
|
||||
// using rise time 10% -> 90%: tau = rise time / log(9)
|
||||
bw_comp_set_attack_tau(&instance->comp_coeffs, (0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_release:
|
||||
// as before
|
||||
bw_comp_set_release_tau(&instance->comp_coeffs, (0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_gain:
|
||||
bw_comp_set_gain_dB(&instance->comp_coeffs, value);
|
||||
break;
|
||||
case 5:
|
||||
case plugin_parameter_ext_sidechain:
|
||||
instance->ext_sidechain = (char)value;
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks compressor example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_comp",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,14 +8,16 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
@ -25,6 +25,7 @@
|
||||
"channels": "mono",
|
||||
"name": "Sidechain input",
|
||||
"shortName": "Sidechain in",
|
||||
"id": "sidechain_in",
|
||||
"sidechain": true,
|
||||
"cv": false,
|
||||
"optional": true
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Threshold",
|
||||
"shortName": "Threshold",
|
||||
"id": "threshold",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -60.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Ratio",
|
||||
"shortName": "Ratio",
|
||||
"id": "ratio",
|
||||
"direction": "input",
|
||||
"defaultValue": 1.0,
|
||||
"minimum": 1.0,
|
||||
@ -53,6 +56,7 @@
|
||||
{
|
||||
"name": "Attack",
|
||||
"shortName": "Attack",
|
||||
"id": "attack",
|
||||
"direction": "input",
|
||||
"defaultValue": 20.0,
|
||||
"minimum": 1.0,
|
||||
@ -63,6 +67,7 @@
|
||||
{
|
||||
"name": "Release",
|
||||
"shortName": "Release",
|
||||
"id": "release",
|
||||
"direction": "input",
|
||||
"defaultValue": 250.0,
|
||||
"minimum": 1.0,
|
||||
@ -73,6 +78,7 @@
|
||||
{
|
||||
"name": "Makeup gain",
|
||||
"shortName": "Gain",
|
||||
"id": "gain",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
@ -83,6 +89,7 @@
|
||||
{
|
||||
"name": "External sidechain",
|
||||
"shortName": "Ext sidechain",
|
||||
"id": "ext_sidechain",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "delay" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_delay",
|
||||
"types": [ "@lv2:DelayPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "delay" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_delay_state delay_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_delay_init(&instance->delay_coeffs, 1.f);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks non-smoothed delay line example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_delay",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Delay",
|
||||
"shortName": "Delay",
|
||||
"id": "delay",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "distortion", "tone", "volume" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_dist",
|
||||
"types": [ "@lv2:DistortionPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "distortion", "tone", "volume" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,8 @@ typedef struct plugin {
|
||||
float buf[BUF_SIZE];
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_dist_init(&instance->dist_coeffs);
|
||||
bw_src_int_init(&instance->src_up_coeffs, 2);
|
||||
bw_src_int_init(&instance->src_down_coeffs, -2);
|
||||
@ -68,13 +69,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_distortion:
|
||||
bw_dist_set_distortion(&instance->dist_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_tone:
|
||||
bw_dist_set_tone(&instance->dist_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_volume:
|
||||
bw_dist_set_volume(&instance->dist_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks distortion example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_dist",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Distortion",
|
||||
"shortName": "Distortion",
|
||||
"id": "distortion",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Tone",
|
||||
"shortName": "Tone",
|
||||
"id": "tone",
|
||||
"direction": "input",
|
||||
"defaultValue": 50.0,
|
||||
"minimum": 0.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Volume",
|
||||
"shortName": "Volume",
|
||||
"id": "volume",
|
||||
"direction": "input",
|
||||
"defaultValue": 100.0,
|
||||
"minimum": 0.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "drive", "tone", "volume" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_drive",
|
||||
"types": [ "@lv2:DistortionPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "drive", "tone", "volume" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,8 @@ typedef struct plugin {
|
||||
float buf[BUF_SIZE];
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_drive_init(&instance->drive_coeffs);
|
||||
bw_src_int_init(&instance->src_up_coeffs, 2);
|
||||
bw_src_int_init(&instance->src_down_coeffs, -2);
|
||||
@ -68,13 +69,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_drive:
|
||||
bw_drive_set_drive(&instance->drive_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_tone:
|
||||
bw_drive_set_tone(&instance->drive_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_volume:
|
||||
bw_drive_set_volume(&instance->drive_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks overdrive example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_drive",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Drive",
|
||||
"shortName": "Drive",
|
||||
"id": "drive",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Tone",
|
||||
"shortName": "Tone",
|
||||
"id": "tone",
|
||||
"direction": "input",
|
||||
"defaultValue": 50.0,
|
||||
"minimum": 0.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Volume",
|
||||
"shortName": "Volume",
|
||||
"id": "volume",
|
||||
"direction": "input",
|
||||
"defaultValue": 100.0,
|
||||
"minimum": 0.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "ls_cutoff", "ls_gain", "ls_q", "peak_cutoff", "peak_gain", "peak_bw", "hs_cutoff", "hs_gain", "hs_q" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_eq_3band",
|
||||
"types": [ "@lv2:ParaEQPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "ls_cutoff", "ls_gain", "ls_q", "peak_cutoff", "peak_gain", "peak_bw", "hs_cutoff", "hs_gain", "hs_q" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -32,7 +32,8 @@ typedef struct plugin {
|
||||
bw_hs2_state hs2_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_ls2_init(&instance->ls2_coeffs);
|
||||
bw_peak_init(&instance->peak_coeffs);
|
||||
bw_hs2_init(&instance->hs2_coeffs);
|
||||
@ -69,31 +70,31 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_ls_cutoff:
|
||||
bw_ls2_set_cutoff(&instance->ls2_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_ls_gain:
|
||||
bw_ls2_set_dc_gain_dB(&instance->ls2_coeffs, value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_ls_q:
|
||||
bw_ls2_set_Q(&instance->ls2_coeffs, value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_peak_cutoff:
|
||||
bw_peak_set_cutoff(&instance->peak_coeffs, value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_peak_gain:
|
||||
bw_peak_set_peak_gain_dB(&instance->peak_coeffs, value);
|
||||
break;
|
||||
case 5:
|
||||
case plugin_parameter_peak_bw:
|
||||
bw_peak_set_bandwidth(&instance->peak_coeffs, value);
|
||||
break;
|
||||
case 6:
|
||||
case plugin_parameter_hs_cutoff:
|
||||
bw_hs2_set_cutoff(&instance->hs2_coeffs, value);
|
||||
break;
|
||||
case 7:
|
||||
case plugin_parameter_hs_gain:
|
||||
bw_hs2_set_high_gain_dB(&instance->hs2_coeffs, value);
|
||||
break;
|
||||
case 8:
|
||||
case plugin_parameter_hs_q:
|
||||
bw_hs2_set_Q(&instance->hs2_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks 3-band parametric equalizer example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_eq_3band",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Low shelf cutoff",
|
||||
"shortName": "LS cutoff",
|
||||
"id": "ls_cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 112.4682650380698,
|
||||
"minimum": 20.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Low shelf gain",
|
||||
"shortName": "LS gain",
|
||||
"id": "ls_gain",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -20.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Low shelf Q",
|
||||
"shortName": "LS Q",
|
||||
"id": "ls_q",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.5,
|
||||
"minimum": 0.5,
|
||||
@ -53,6 +56,7 @@
|
||||
{
|
||||
"name": "Peak cutoff",
|
||||
"shortName": "Peak cutoff",
|
||||
"id": "peak_cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 632.4555320336758,
|
||||
"minimum": 20.0,
|
||||
@ -63,6 +67,7 @@
|
||||
{
|
||||
"name": "Peak gain",
|
||||
"shortName": "Peak gain",
|
||||
"id": "peak_gain",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -20.0,
|
||||
@ -73,6 +78,7 @@
|
||||
{
|
||||
"name": "Peak bandwidth",
|
||||
"shortName": "Peak bw",
|
||||
"id": "peak_bw",
|
||||
"direction": "input",
|
||||
"defaultValue": 1.0,
|
||||
"minimum": 0.01,
|
||||
@ -83,6 +89,7 @@
|
||||
{
|
||||
"name": "High shelf cutoff",
|
||||
"shortName": "HS cutoff",
|
||||
"id": "hs_cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 3556.558820077844,
|
||||
"minimum": 20.0,
|
||||
@ -93,6 +100,7 @@
|
||||
{
|
||||
"name": "High shelf gain",
|
||||
"shortName": "HS gain",
|
||||
"id": "hs_gain",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -20.0,
|
||||
@ -103,6 +111,7 @@
|
||||
{
|
||||
"name": "High shelf Q",
|
||||
"shortName": "HS Q",
|
||||
"id": "hs_q",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.5,
|
||||
"minimum": 0.5,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "rate", "depth", "feedback" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_flanger",
|
||||
"types": [ "@lv2:FlangerPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "rate", "depth", "feedback" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_chorus_state chorus_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin*instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_chorus_init(&instance->chorus_coeffs, 0.002f);
|
||||
bw_chorus_set_delay(&instance->chorus_coeffs, 0.001f);
|
||||
// values taken from Dattorro's paper
|
||||
@ -57,13 +58,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
bw_chorus_set_rate(&instance->chorus_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_amount:
|
||||
bw_chorus_set_amount(&instance->chorus_coeffs, (0.01f * 0.001f) * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_feedback:
|
||||
bw_chorus_set_coeff_fb(&instance->chorus_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks flanger example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_flanger",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Rate",
|
||||
"shortName": "Rate",
|
||||
"id": "rate",
|
||||
"direction": "input",
|
||||
"defaultValue": 1.0,
|
||||
"minimum": 0.01,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Amount",
|
||||
"shortName": "Amount",
|
||||
"id": "amount",
|
||||
"direction": "input",
|
||||
"defaultValue": 50.0,
|
||||
"minimum": 0.0,
|
||||
@ -44,6 +46,7 @@
|
||||
{
|
||||
"name": "Feedback",
|
||||
"shortName": "Feedback",
|
||||
"id": "feedback",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -99.9,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "fuzz", "volume" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_fuzz",
|
||||
"types": [ "@lv2:DistortionPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "fuzz", "volume" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -35,7 +35,8 @@ typedef struct plugin {
|
||||
float buf[BUF_SIZE];
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_fuzz_init(&instance->fuzz_coeffs);
|
||||
bw_src_int_init(&instance->src_up_coeffs, 2);
|
||||
bw_src_int_init(&instance->src_down_coeffs, -2);
|
||||
@ -68,10 +69,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_fuzz:
|
||||
bw_fuzz_set_fuzz(&instance->fuzz_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_volume:
|
||||
bw_fuzz_set_volume(&instance->fuzz_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks fuzz example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_fuzz",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Fuzz",
|
||||
"shortName": "Fuzz",
|
||||
"id": "fuzz",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": 0.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Volume",
|
||||
"shortName": "Volume",
|
||||
"id": "volume",
|
||||
"direction": "input",
|
||||
"defaultValue": 100.0,
|
||||
"minimum": 0.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "cutoff" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_hp1",
|
||||
"types": [ "@lv2:HighpassPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "cutoff" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_hp1_state hp1_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_hp1_init(&instance->hp1_coeffs);
|
||||
}
|
||||
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks 1st-order highpass example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_hp1",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Cutoff",
|
||||
"shortName": "Cutoff",
|
||||
"id": "cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 1000.0,
|
||||
"minimum": 20.0,
|
||||
|
@ -1,6 +0,0 @@
|
||||
{
|
||||
"cmd": {
|
||||
"busIds": [ "input", "output" ],
|
||||
"parameterIds": [ "cutoff", "gain" ]
|
||||
}
|
||||
}
|
@ -5,8 +5,6 @@
|
||||
},
|
||||
"uri": "@bw_examples:fx_hs1",
|
||||
"types": [ "@lv2:FilterPlugin" ],
|
||||
"version": "0.0",
|
||||
"busSymbols": [ "input", "output" ],
|
||||
"parameterSymbols": [ "cutoff", "gain" ]
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
||||
|
@ -26,7 +26,8 @@ typedef struct plugin {
|
||||
bw_hs1_state hs1_state;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance) {
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)cbs;
|
||||
bw_hs1_init(&instance->hs1_coeffs);
|
||||
}
|
||||
|
||||
@ -55,10 +56,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_hs1_set_cutoff(&instance->hs1_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_gain:
|
||||
bw_hs1_set_high_gain_dB(&instance->hs1_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
@ -1,8 +1,6 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks 1st-order high shelf example",
|
||||
"version": "1.1.0",
|
||||
"buildVersion": "1",
|
||||
"bundleName": "bw_example_fx_hs1",
|
||||
"buses": [
|
||||
{
|
||||
@ -10,20 +8,23 @@
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input"
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output"
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Cutoff",
|
||||
"shortName": "Cutoff",
|
||||
"id": "cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 1000.0,
|
||||
"minimum": 20.0,
|
||||
@ -34,6 +35,7 @@
|
||||
{
|
||||
"name": "Gain",
|
||||
"shortName": "Gain",
|
||||
"id": "gain",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -20.0,
|
||||
|
5
examples/fx_iir1/src/android.json
Normal file
5
examples/fx_iir1/src/android.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"android": {
|
||||
"javaPackageName": "com.orastron.bw_example_fx_iir1"
|
||||
}
|
||||
}
|
5
examples/fx_iir1/src/daisy-seed.json
Normal file
5
examples/fx_iir1/src/daisy-seed.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"daisy_seed": {
|
||||
"parameterPins": [ 15, 16, 17 ]
|
||||
}
|
||||
}
|
5
examples/fx_iir1/src/ios.json
Normal file
5
examples/fx_iir1/src/ios.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"ios": {
|
||||
"productBundleIdentifier": "com.orastron.bw_example_fx_iir1"
|
||||
}
|
||||
}
|
10
examples/fx_iir1/src/lv2.json
Normal file
10
examples/fx_iir1/src/lv2.json
Normal file
@ -0,0 +1,10 @@
|
||||
{
|
||||
"lv2": {
|
||||
"prefixes": {
|
||||
"bw_examples": "https://www.orastron.com/brickworks/examples/"
|
||||
},
|
||||
"uri": "@bw_examples:fx_iir1",
|
||||
"types": [ "@lv2:FilterPlugin" ],
|
||||
"version": "0.0"
|
||||
}
|
||||
}
|
93
examples/fx_iir1/src/plugin.h
Normal file
93
examples/fx_iir1/src/plugin.h
Normal file
@ -0,0 +1,93 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2025 Orastron Srl unipersonale
|
||||
*
|
||||
* Brickworks is free software: you can redistribute it and/or modify
|
||||
* it under the terms of the GNU General Public License as published by
|
||||
* the Free Software Foundation, version 3 of the License.
|
||||
*
|
||||
* Brickworks 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 General Public License for more details.
|
||||
*
|
||||
* You should have received a copy of the GNU General Public License
|
||||
* along with Brickworks. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#include "common.h"
|
||||
#include <bw_iir1.h>
|
||||
|
||||
typedef struct plugin {
|
||||
float sample_rate;
|
||||
float cutoff;
|
||||
float coeff_x;
|
||||
float coeff_lp;
|
||||
float s;
|
||||
float b0;
|
||||
float b1;
|
||||
float a1;
|
||||
char to_reset;
|
||||
} plugin;
|
||||
|
||||
static void plugin_init(plugin *instance, plugin_callbacks *cbs) {
|
||||
(void)instance;
|
||||
(void)cbs;
|
||||
}
|
||||
|
||||
static void plugin_fini(plugin *instance) {
|
||||
(void)instance;
|
||||
}
|
||||
|
||||
static void plugin_set_sample_rate(plugin *instance, float sample_rate) {
|
||||
instance->sample_rate = sample_rate;
|
||||
}
|
||||
|
||||
static size_t plugin_mem_req(plugin *instance) {
|
||||
(void)instance;
|
||||
return 0;
|
||||
}
|
||||
|
||||
static void plugin_mem_set(plugin *instance, void *mem) {
|
||||
(void)instance;
|
||||
(void)mem;
|
||||
}
|
||||
|
||||
static void plugin_reset(plugin *instance) {
|
||||
bw_iir1_coeffs_mm1(instance->sample_rate, instance->cutoff, 1, instance->cutoff, instance->coeff_x, instance->coeff_lp, &instance->b0, &instance->b1, &instance->a1);
|
||||
float y;
|
||||
bw_iir1_reset(0.f, &y, &instance->s, instance->b0, instance->b1, instance->a1);
|
||||
instance->to_reset = 0;
|
||||
}
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case plugin_parameter_cutoff:
|
||||
instance->cutoff = value;
|
||||
instance->to_reset = 1;
|
||||
break;
|
||||
case plugin_parameter_in:
|
||||
instance->coeff_x = value;
|
||||
instance->to_reset = 1;
|
||||
break;
|
||||
case plugin_parameter_lp:
|
||||
instance->coeff_lp = value;
|
||||
instance->to_reset = 1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
static float plugin_get_parameter(plugin *instance, size_t index) {
|
||||
(void)instance;
|
||||
(void)index;
|
||||
return 0.f;
|
||||
}
|
||||
|
||||
static void plugin_process(plugin *instance, const float **inputs, float **outputs, size_t n_samples) {
|
||||
if (instance->to_reset)
|
||||
plugin_reset(instance);
|
||||
bw_iir1_process(inputs[0], outputs[0], &instance->s, instance->b0, instance->b1, instance->a1, n_samples);
|
||||
}
|
57
examples/fx_iir1/src/product.json
Normal file
57
examples/fx_iir1/src/product.json
Normal file
@ -0,0 +1,57 @@
|
||||
{
|
||||
"product": {
|
||||
"name": "Brickworks 1st-order IIR filter example",
|
||||
"bundleName": "bw_example_fx_iir1",
|
||||
"buses": [
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "input",
|
||||
"channels": "mono",
|
||||
"name": "Input",
|
||||
"shortName": "Input",
|
||||
"id": "input"
|
||||
},
|
||||
{
|
||||
"type": "audio",
|
||||
"direction": "output",
|
||||
"channels": "mono",
|
||||
"name": "Output",
|
||||
"shortName": "Output",
|
||||
"id": "output"
|
||||
}
|
||||
],
|
||||
"parameters": [
|
||||
{
|
||||
"name": "Cutoff",
|
||||
"shortName": "Cutoff",
|
||||
"id": "cutoff",
|
||||
"direction": "input",
|
||||
"defaultValue": 1000.0,
|
||||
"minimum": 20.0,
|
||||
"maximum": 20000.0,
|
||||
"unit": "hz",
|
||||
"map": "logarithmic"
|
||||
},
|
||||
{
|
||||
"name": "Input coefficient",
|
||||
"shortName": "In coeff",
|
||||
"id": "in",
|
||||
"direction": "input",
|
||||
"defaultValue": 1.0,
|
||||
"minimum": -1.0,
|
||||
"maximum": 1.0,
|
||||
"map": "linear"
|
||||
},
|
||||
{
|
||||
"name": "Lowpass coefficient",
|
||||
"shortName": "LP coeff",
|
||||
"id": "lp",
|
||||
"direction": "input",
|
||||
"defaultValue": 0.0,
|
||||
"minimum": -1.0,
|
||||
"maximum": 1.0,
|
||||
"map": "linear"
|
||||
}
|
||||
]
|
||||
}
|
||||
}
|
11
examples/fx_iir1/src/vst3.json
Normal file
11
examples/fx_iir1/src/vst3.json
Normal file
@ -0,0 +1,11 @@
|
||||
{
|
||||
"vst3": {
|
||||
"plugin": {
|
||||
"cid": "0c511d73a6de41dabd8b3658c0b10ad9"
|
||||
},
|
||||
"controller": {
|
||||
"cid": "dfc802ba451349e48c2166fbb624113a"
|
||||
},
|
||||
"subCategory": "Fx|Filter"
|
||||
}
|
||||
}
|
5
examples/fx_iir2/src/android.json
Normal file
5
examples/fx_iir2/src/android.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"android": {
|
||||
"javaPackageName": "com.orastron.bw_example_fx_iir2"
|
||||
}
|
||||
}
|
5
examples/fx_iir2/src/daisy-seed.json
Normal file
5
examples/fx_iir2/src/daisy-seed.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"daisy_seed": {
|
||||
"parameterPins": [ 15, 16, 17, 18, 19, 20 ]
|
||||
}
|
||||
}
|
5
examples/fx_iir2/src/ios.json
Normal file
5
examples/fx_iir2/src/ios.json
Normal file
@ -0,0 +1,5 @@
|
||||
{
|
||||
"ios": {
|
||||
"productBundleIdentifier": "com.orastron.bw_example_fx_iir2"
|
||||
}
|
||||
}
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user