Compare commits

...

62 Commits
v1.1.0 ... main

Author SHA1 Message Date
65eeade32d update to latest tibia changes 2024-12-13 17:15:41 +01:00
83e101cf8e added extra makefile rules for web-demo 2024-12-13 14:33:29 +01:00
Stefano D'Angelo
c779481486 update to latest tibia again 2024-12-12 12:13:11 +01:00
Stefano D'Angelo
a605293801 hopefully updated to latest tibia 2024-12-12 11:34:17 +01:00
67756cf502 updating to latest tibia (many examples likely broken now) 2024-12-12 08:18:32 +01:00
02e628e5b0 bw_one_pole: fix doc typo 2024-12-08 21:24:15 +01:00
ff459dece1 bw_gain: fix doc typo 2024-12-08 19:01:58 +01:00
defabafb45 bw_gain: fix changelog 2024-12-08 18:06:02 +01:00
578bec397f cosmetics 2024-12-08 15:44:43 +01:00
5c91a48e42 fix doc typo 2024-12-04 12:40:54 +01:00
abc65d292a fix tibia tag link 2024-12-04 11:27:03 +01:00
d2b15d9155 not including tibia in releases anymore 2024-12-04 10:46:29 +01:00
90f03881fd change ios deployment target to 14.0 in examples 2024-12-04 10:26:34 +01:00
Stefano D'Angelo
5015dd6bbd bw_common: remove Brickworks references in doc 2024-11-29 14:18:51 +01:00
724d7c6b8a bw_math doc cosmetic fix 2024-11-19 08:53:55 +01:00
da22954810 bw_buf doc cosmetics 2024-11-18 17:52:29 +01:00
f3a12e8e0a bw_mm{1,2}: clarified implemented transfer function 2024-11-11 08:03:10 +01:00
ff99bda751 bw_{delay,env_gen}: fix BW_DEBUG_DEEP 2024-11-10 10:53:07 +01:00
b214bc896e bw_math: add bw_log2_1p2xf, bw_log_1pexpxf, bw_log10_1p10xf 2024-11-01 12:24:15 +01:00
Stefano D'Angelo
6431749bf8 bw_reverb: add missing BW_RESTRICT and fix doc 2024-10-23 08:21:35 +02:00
3a8e279fde cosmetics 2024-10-14 11:27:47 +02:00
Stefano D'Angelo
2ba329f5ea cosmetics 2024-10-11 15:59:22 +02:00
Stefano D'Angelo
f1e471e9bf fix bug in bw_note_queue_is_valid() 2024-10-11 11:02:59 +02:00
340d527ffa add bw_note_queue_all_notes_off 2024-10-11 07:09:02 +02:00
dd6f6adb2c fix typo in bw_note_queue + cosmetics 2024-10-02 11:30:32 +02:00
c7f930673f add sticky thresh to bw_gain and needed related api to bw_one_pole 2024-09-24 07:28:39 +02:00
98e5ef65c4 bw_reverb: cosmetics 2024-09-21 15:38:05 +02:00
daf0cb3e1c introduce BW_{INCLUDE_WITH_QUOTES,NO_CXX,CXX_NO_EXTERN_C} 2024-09-21 12:45:00 +02:00
324aa911fd bw_voice_alloc: added static inline 2024-09-18 17:03:31 +02:00
Stefano D'Angelo
f530db5c45 bw_buf cosmetics 2024-08-30 14:27:58 +02:00
Stefano D'Angelo
eaaeebb8ff bw_buf: add bw_buf_copy() and bw_buf_copy_multi() 2024-08-30 12:11:28 +02:00
adbd1ab61c bw_env_gen: reintroduce BW_ENV_GEN_V_MAX 2024-08-29 18:16:59 +02:00
750c807db3 oops, removed generated files 2024-08-26 17:31:07 +02:00
f6b4e1b7ec adjusted to latest tibia updated 2024-08-26 17:30:25 +02:00
b517c83cb5 bw_env_gen added process output bound debugging check 2024-08-24 17:31:25 +02:00
9cb3bb00fa bw_math int64 routines 2024-08-24 17:20:46 +02:00
099fb7507b bw_env_gen fix reset w/ skip sustain and strengthened implementation 2024-08-23 17:28:09 +02:00
Paolo Marrone
091b677663 better instructions for android example 2024-07-09 11:45:24 +02:00
862e56840f bw_phase_gen: fix doc 2024-07-07 18:11:28 +02:00
Stefano D'Angelo
6f856ec04c bw_src_int cosmetics 2024-07-05 11:51:56 +02:00
Stefano D'Angelo
07387edcc6 fixed fx(pp)_bitcrush on daisy seed and adapted to latest tibia 2024-07-02 19:12:01 +02:00
Stefano D'Angelo
eef7f35dc5 enforcing combined parameter limits also in *reset_state 2024-07-02 12:08:55 +02:00
Stefano D'Angelo
7b53b045a9 fix missing #endif in bw_bd_reduce 2024-07-02 11:37:08 +02:00
Stefano D'Angelo
99b6ec2996 this should be it 2024-07-02 11:28:45 +02:00
Stefano D'Angelo
e5cc92c72f more of the same 2024-07-02 10:27:05 +02:00
f04fcac4ea more of the same 2024-07-02 07:17:12 +02:00
c2c1979cc3 more of the same + fix new checks in bw_osc_{pulse,tri}_coeffs_is_valid 2024-07-02 06:46:45 +02:00
1e34773da8 adding extra debug checks to process_multi functions (wip) 2024-07-02 06:15:27 +02:00
f623002c27 bw_phase_gen: bw_phase_get_set_phase_inc_{min,max} doc 2024-07-01 19:30:42 +02:00
Stefano D'Angelo
2860ddc141 bw_phase_gen: add phase_inc_{min,max} comparison checks 2024-07-01 17:45:56 +02:00
Stefano D'Angelo
06fc92a2e0 bw_phase_gen: add phase_inc_{min,max} parameters 2024-07-01 17:33:45 +02:00
Stefano D'Angelo
af6ce9ba5e bw_osc_tri cosmetics 2024-06-27 17:12:16 +02:00
93ddf112bb bw_osc_{saw,pulse,tri}: extra validation checks and cosmetics 2024-06-22 18:49:12 +02:00
Stefano D'Angelo
5d3fbdbb0a more freq-related fixes in bw_phase_gen 2024-06-20 09:52:13 +02:00
Stefano D'Angelo
861cdc427e fix rounding bug and extra debug checks for bw_phase_gen 2024-06-18 15:22:13 +02:00
Stefano D'Angelo
5bd685ed7b updated to latest tibia 2024-06-17 10:48:09 +02:00
10a2d1ff45 revised process_multi buffer assumptions 2024-06-15 13:16:08 +02:00
Stefano D'Angelo
1d731eaafb accomodate msvc reporting wrong C++ standard support 2024-04-15 12:15:54 +02:00
Stefano D'Angelo
4dfbded165 fix process() invokation in fxpp_pan 2024-03-19 13:54:26 +01:00
Stefano D'Angelo
5f2a413b4d add gate param to bw_bd_reduce and examples + fix fxpp_bitcrush 2024-03-13 12:28:35 +01:00
Stefano D'Angelo
a4a8ba96ca add bw_dry_wet_get_wet(_cur)() 2024-03-07 18:45:52 +01:00
Stefano D'Angelo
93f571af18 avoid bw_minf() to compute samples in synth* 2024-03-07 16:57:50 +01:00
371 changed files with 5709 additions and 2735 deletions

View File

@ -2,10 +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 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://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 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.0.4](https://git.orastron.com/orastron/tibia/releases/tag/v0.0.4), 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.
## VST3
### Prerequisites
@ -42,7 +55,7 @@ If all went fine, you can install for the current user (i.e., into the user VST3
### 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
@ -82,7 +95,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)
@ -148,17 +161,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.

View File

@ -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"
}
}

View File

@ -1,7 +0,0 @@
{
"cmd_make": {
"commonDir": "../../common/cmd",
"tinywavDir": "../../../../tinywav",
"midiParserDir": "../../../../midi-parser"
}
}

View File

@ -20,6 +20,8 @@
#include <stddef.h>
#include "plugin_api.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -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();
}

View File

@ -21,6 +21,8 @@
#include <stddef.h>
#include <stdint.h>
#include "plugin_api.h"
#ifdef __cplusplus
extern "C" {
#endif

View File

@ -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();
}

View File

@ -1,6 +0,0 @@
{
"daisy_seed_make": {
"commonDir": "../../common/daisy-seed",
"libdaisyDir": "../../../../libDaisy"
}
}

View File

@ -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"
}
}

View File

@ -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"
}
}

View File

@ -5,8 +5,6 @@
"../../../../common/src",
"../../../../../include"
],
"deploymentTarget": 16.6,
"commonDir": "../../common/ios",
"pluginDir": "../src"
"deploymentTarget": 14.0
}
}

View File

@ -1,5 +0,0 @@
{
"lv2_make": {
"commonDir": "../../common/lv2"
}
}

View File

@ -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"
}
}

View File

@ -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"
}
}

View File

@ -1,6 +1,6 @@
{
"make": {
"cflags": "-I../../../include -I../../common/src",
"pluginDir": "../src"
"mkincDir": "../../common/src",
"extra": "EXAMPLE_TYPE := c"
}
}

View File

@ -0,0 +1,3 @@
ifeq ($(TEMPLATE), web)
include $(COMMON_DIR)/../web/rules-extra-web-demo.mk
endif

View File

@ -0,0 +1,3 @@
ifeq ($(TEMPLATE), web)
include $(COMMON_DIR)/../web/vars-extra-web-demo.mk
endif

View 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 := 27.2.12479018
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.0
KOTLIN_STDLIB_VERSION := 2.1.0
KOTLINX_COROUTINES_CORE_VERSION := 1.9.0
KOTLINX_COROUTINES_CORE_JVM_VERSION := 1.9.0
endif

View File

@ -1,6 +0,0 @@
{
"vst3_make": {
"cflags": "-I../../../../vst3_c_api",
"commonDir": "../../common/vst3"
}
}

View File

@ -1,7 +0,0 @@
{
"web_make": {
"cflags": "-DWASM",
"cxxflags": "-DWASM -std=c++11",
"commonDir": "../../common/web"
}
}

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "cutoff" ]
}
}

View File

@ -5,8 +5,6 @@
},
"uri": "@bw_examples:fx_ap1",
"types": [ "@lv2:AllpassPlugin" ],
"version": "0.0",
"busSymbols": [ "input", "output" ],
"parameterSymbols": [ "cutoff" ]
"version": "0.0"
}
}

View File

@ -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);
}

View File

@ -10,20 +10,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,

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "cutoff", "q" ]
}
}

View File

@ -5,8 +5,6 @@
},
"uri": "@bw_examples:fx_ap2",
"types": [ "@lv2:AllpassPlugin" ],
"version": "0.0",
"busSymbols": [ "input", "output" ],
"parameterSymbols": [ "cutoff", "q" ]
"version": "0.0"
}
}

View File

@ -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;
}

View File

@ -10,20 +10,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 +37,7 @@
{
"name": "Q",
"shortName": "Q",
"id": "q",
"direction": "input",
"defaultValue": 0.5,
"minimum": 0.5,

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "balance", "l_level", "r_level" ]
}
}

View File

@ -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"
}
}

View File

@ -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;
}

View File

@ -10,20 +10,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 +37,7 @@
{
"name": "Left level",
"shortName": "L level",
"id": "l_level",
"direction": "output",
"defaultValue": -60.0,
"minimum": -60.0,
@ -44,6 +48,7 @@
{
"name": "Right level",
"shortName": "R level",
"id": "r_level",
"direction": "output",
"defaultValue": -60.0,
"minimum": -60.0,

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "sr_ratio", "bit_depth" ]
}
}

View File

@ -1,5 +1,5 @@
{
"daisy_seed": {
"parameterPins": [ 15, 16 ]
"parameterPins": [ 15, 16, 22 ]
}
}

View File

@ -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"
}
}

View File

@ -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;
}
}

View File

@ -10,20 +10,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 +37,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"
}
]
}

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "cutoff_low", "cutoff_high", "tone" ]
}
}

View File

@ -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"
}
}

View File

@ -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;
}

View File

@ -10,20 +10,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 +37,7 @@
{
"name": "Cutoff high",
"shortName": "Cutoff high",
"id": "cutoff_high",
"direction": "input",
"defaultValue": 50.0,
"minimum": 0.0,
@ -44,6 +48,7 @@
{
"name": "Tone",
"shortName": "Tone",
"id": "tone",
"direction": "input",
"defaultValue": 50.0,
"minimum": 0.0,

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "rate", "depth", "type" ]
}
}

View File

@ -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"
}
}

View File

@ -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);

View File

@ -10,20 +10,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 +37,7 @@
{
"name": "Depth",
"shortName": "Depth",
"id": "depth",
"direction": "input",
"defaultValue": 50.0,
"minimum": 0.0,
@ -44,6 +48,7 @@
{
"name": "Type",
"shortName": "Type",
"id": "type",
"direction": "input",
"defaultValue": 1,
"minimum": 1,

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "gain", "bias" ]
}
}

View File

@ -5,8 +5,6 @@
},
"uri": "@bw_examples:fx_clip",
"types": [ "@lv2:WaveshaperPlugin" ],
"version": "0.0",
"busSymbols": [ "input", "output" ],
"parameterSymbols": [ "gain", "bias" ]
"version": "0.0"
}
}

View File

@ -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;
}

View File

@ -10,20 +10,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 +36,7 @@
{
"name": "Bias",
"shortName": "Bias",
"id": "bias",
"direction": "input",
"defaultValue": 0.0,
"minimum": -2.5,

View File

@ -1,6 +0,0 @@
{
"cmd": {
"busIds": [ "input", "output" ],
"parameterIds": [ "ff_delay", "fb_delay", "blend", "ff", "fb" ]
}
}

View File

@ -5,8 +5,6 @@
},
"uri": "@bw_examples:fx_comb",
"types": [ "@lv2:CombPlugin" ],
"version": "0.0",