diff --git a/examples/fxpp_phaser/src/android.json b/examples/fxpp_phaser/src/android.json new file mode 100644 index 0000000..d6feae8 --- /dev/null +++ b/examples/fxpp_phaser/src/android.json @@ -0,0 +1,5 @@ +{ + "android": { + "javaPackageName": "com.orastron.bw_example_fxpp_phaser" + } +} diff --git a/examples/fxpp_phaser/src/cmd.json b/examples/fxpp_phaser/src/cmd.json new file mode 100644 index 0000000..02566c1 --- /dev/null +++ b/examples/fxpp_phaser/src/cmd.json @@ -0,0 +1,6 @@ +{ + "cmd": { + "busIds": [ "input", "output" ], + "parameterIds": [ "rate", "amount", "center" ] + } +} diff --git a/examples/fxpp_phaser/src/daisy-seed.json b/examples/fxpp_phaser/src/daisy-seed.json new file mode 100644 index 0000000..fd02e95 --- /dev/null +++ b/examples/fxpp_phaser/src/daisy-seed.json @@ -0,0 +1,5 @@ +{ + "daisy_seed": { + "parameterPins": [ 15, 16, 17 ] + } +} diff --git a/examples/fxpp_phaser/src/impl.cpp b/examples/fxpp_phaser/src/impl.cpp new file mode 100644 index 0000000..4efba83 --- /dev/null +++ b/examples/fxpp_phaser/src/impl.cpp @@ -0,0 +1,56 @@ +#include "impl.h" + +#include "common.h" +#include + +using namespace Brickworks; + +extern "C" { + +impl impl_new(void) { + Phaser<1> *instance = new Phaser<1>(); + return reinterpret_cast(instance); +} + +void impl_free(impl handle) { + Phaser<1> *instance = reinterpret_cast *>(handle); + delete instance; +} + +void impl_set_sample_rate(impl handle, float sample_rate) { + Phaser<1> *instance = reinterpret_cast *>(handle); + instance->setSampleRate(sample_rate); +} + +void impl_reset(impl handle) { + Phaser<1> *instance = reinterpret_cast *>(handle); + instance->reset(); +} + +void impl_set_parameter(impl handle, size_t index, float value) { + Phaser<1> *instance = reinterpret_cast *>(handle); + switch (index) { + case 0: + instance->setRate(value); + break; + case 1: + instance->setAmount(value); + break; + case 2: + instance->setCenter(value); + break; + } +} + +float impl_get_parameter(impl handle, size_t index) { + (void)handle; + (void)index; + return 0.f; +} + +void impl_process(impl handle, const float **inputs, float **outputs, size_t n_samples) { + Phaser<1> *instance = reinterpret_cast *>(handle); + instance->process(inputs, outputs, n_samples); +} + +} diff --git a/examples/fxpp_phaser/src/ios.json b/examples/fxpp_phaser/src/ios.json new file mode 100644 index 0000000..7f6f504 --- /dev/null +++ b/examples/fxpp_phaser/src/ios.json @@ -0,0 +1,5 @@ +{ + "ios": { + "productBundleIdentifier": "com.orastron.bw_example_fxpp_phaser" + } +} diff --git a/examples/fxpp_phaser/src/lv2.json b/examples/fxpp_phaser/src/lv2.json new file mode 100644 index 0000000..48f1bfd --- /dev/null +++ b/examples/fxpp_phaser/src/lv2.json @@ -0,0 +1,12 @@ +{ + "lv2": { + "prefixes": { + "bw_examples": "https://www.orastron.com/brickworks/examples/" + }, + "uri": "@bw_examples:fxpp_phaser", + "types": [ "@lv2:PhaserPlugin" ], + "version": "1.0", + "busSymbols": [ "input", "output" ], + "parameterSymbols": [ "rate", "amount", "center" ] + } +} diff --git a/examples/fxpp_phaser/src/product.json b/examples/fxpp_phaser/src/product.json new file mode 100644 index 0000000..cd9abd3 --- /dev/null +++ b/examples/fxpp_phaser/src/product.json @@ -0,0 +1,56 @@ +{ + "product": { + "name": "Brickwork phaser example (C++)", + "version": "1.1.0", + "buildVersion": "1", + "bundleName": "bw_example_fxpp_phaser", + "buses": [ + { + "type": "audio", + "direction": "input", + "channels": "mono", + "name": "Input", + "shortName": "Input" + }, + { + "type": "audio", + "direction": "output", + "channels": "mono", + "name": "Output", + "shortName": "Output" + } + ], + "parameters": [ + { + "name": "Modulation rate", + "shortName": "Mod rate", + "direction": "input", + "defaultValue": 1.0, + "minimum": 0.1, + "maximum": 5.0, + "unit": "hz", + "map": "logarithmic" + }, + { + "name": "Modulation amount", + "shortName": "Mod amount", + "direction": "input", + "defaultValue": 2.0, + "minimum": 0.0, + "maximum": 4.0, + "unit": "oct", + "map": "linear" + }, + { + "name": "Center frequency", + "shortName": "Center freq", + "direction": "input", + "defaultValue": 1000.0, + "minimum": 100.0, + "maximum": 10000.0, + "unit": "hz", + "map": "logarithmic" + } + ] + } +} diff --git a/examples/fxpp_phaser/src/vst3.json b/examples/fxpp_phaser/src/vst3.json new file mode 100644 index 0000000..3b75b4d --- /dev/null +++ b/examples/fxpp_phaser/src/vst3.json @@ -0,0 +1,11 @@ +{ + "vst3": { + "plugin": { + "cid": "801d1cc19cb64004b7edff5c0f297831" + }, + "controller": { + "cid": "ebe32e3c3cb3469b9879d3711c695fdb" + }, + "subCategory": "Fx|Modulation" + } +}