added missing examples + fixed bw_{ap2,hs1,ls1} + cosmetic changes
This commit is contained in:
parent
f2f04264d3
commit
fffab40cd2
7
examples/fx_ap1/daisy-seed/Makefile
Normal file
7
examples/fx_ap1/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fx_ap1
|
||||
|
||||
C_SOURCES += ${ROOT_DIR}/../src/bw_example_fx_ap1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
35
examples/fx_ap1/daisy-seed/config_daisy_seed.h
Normal file
35
examples/fx_ap1/daisy-seed/config_daisy_seed.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_DAISY_SEED_H
|
||||
#define _CONFIG_DAISY_SEED_H
|
||||
|
||||
struct config_pin {
|
||||
int param_index;
|
||||
int pin;
|
||||
};
|
||||
|
||||
#define NUM_PINS 1
|
||||
|
||||
static struct config_pin config_pins[NUM_PINS] = {
|
||||
{ 0, 15 }
|
||||
};
|
||||
|
||||
#endif
|
47
examples/fx_ap1/src/bw_example_fx_ap1.c
Normal file
47
examples/fx_ap1/src/bw_example_fx_ap1.c
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 "bw_example_fx_ap1.h"
|
||||
|
||||
void bw_example_fx_ap1_init(bw_example_fx_ap1 *instance) {
|
||||
bw_ap1_init(&instance->ap1_coeffs);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap1_set_sample_rate(bw_example_fx_ap1 *instance, float sample_rate) {
|
||||
bw_ap1_set_sample_rate(&instance->ap1_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap1_reset(bw_example_fx_ap1 *instance) {
|
||||
bw_ap1_reset_coeffs(&instance->ap1_coeffs);
|
||||
bw_ap1_reset_state(&instance->ap1_coeffs, &instance->ap1_state);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap1_process(bw_example_fx_ap1 *instance, const float** x, float** y, int n_samples) {
|
||||
bw_ap1_process(&instance->ap1_coeffs, &instance->ap1_state, x[0], y[0], n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap1_set_parameter(bw_example_fx_ap1 *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
bw_ap1_set_cutoff(&instance->ap1_coeffs, 20.f + (20e3f - 20.f) * value * value * value);
|
||||
}
|
||||
|
||||
float bw_example_fx_ap1_get_parameter(bw_example_fx_ap1 *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
56
examples/fx_ap1/src/bw_example_fx_ap1.h
Normal file
56
examples/fx_ap1/src/bw_example_fx_ap1.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
#ifndef _BW_EXAMPLE_FX_AP1_H
|
||||
#define _BW_EXAMPLE_FX_AP1_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bw_ap1.h>
|
||||
|
||||
enum {
|
||||
p_ap1,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fx_ap1 {
|
||||
// Sub-components
|
||||
bw_ap1_coeffs ap1_coeffs;
|
||||
bw_ap1_state ap1_state;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fx_ap1 bw_example_fx_ap1;
|
||||
|
||||
void bw_example_fx_ap1_init(bw_example_fx_ap1 *instance);
|
||||
void bw_example_fx_ap1_set_sample_rate(bw_example_fx_ap1 *instance, float sample_rate);
|
||||
void bw_example_fx_ap1_reset(bw_example_fx_ap1 *instance);
|
||||
void bw_example_fx_ap1_process(bw_example_fx_ap1 *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fx_ap1_set_parameter(bw_example_fx_ap1 *instance, int index, float value);
|
||||
float bw_example_fx_ap1_get_parameter(bw_example_fx_ap1 *instance, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
87
examples/fx_ap1/src/config.h
Normal file
87
examples/fx_ap1/src/config.h
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
// Definitions
|
||||
|
||||
#define IO_MONO 1
|
||||
#define IO_STEREO (1<<1)
|
||||
|
||||
struct config_io_bus {
|
||||
const char *name;
|
||||
char out;
|
||||
char aux;
|
||||
char cv;
|
||||
char configs;
|
||||
};
|
||||
|
||||
struct config_parameter {
|
||||
const char *name;
|
||||
const char *shortName;
|
||||
const char *units;
|
||||
char out;
|
||||
char bypass;
|
||||
int steps;
|
||||
float defaultValueUnmapped;
|
||||
};
|
||||
|
||||
// Data
|
||||
|
||||
#define COMPANY_NAME "Orastron"
|
||||
#define COMPANY_WEBSITE "https://www.orastron.com/"
|
||||
#define COMPANY_MAILTO "mailto:info@orastron.com"
|
||||
|
||||
#define PLUGIN_NAME "bw_example_fx_ap1"
|
||||
#define PLUGIN_VERSION "0.3.0"
|
||||
|
||||
#define NUM_BUSES_IN 1
|
||||
#define NUM_BUSES_OUT 1
|
||||
#define NUM_CHANNELS_IN 1
|
||||
#define NUM_CHANNELS_OUT 1
|
||||
|
||||
static struct config_io_bus config_buses_in[NUM_BUSES_IN] = {
|
||||
{ "Audio in", 0, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
{ "Audio out", 1, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
#define NUM_PARAMETERS 1
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
};
|
||||
|
||||
// Internal API
|
||||
|
||||
#include "bw_example_fx_ap1.h"
|
||||
|
||||
#define P_TYPE bw_example_fx_ap1
|
||||
#define P_INIT bw_example_fx_ap1_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fx_ap1_set_sample_rate
|
||||
#define P_RESET bw_example_fx_ap1_reset
|
||||
#define P_PROCESS bw_example_fx_ap1_process
|
||||
#define P_SET_PARAMETER bw_example_fx_ap1_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fx_ap1_get_parameter
|
||||
|
||||
#endif
|
6
examples/fx_ap1/vst3/Makefile
Normal file
6
examples/fx_ap1/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fx_ap1
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_ap1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fx_ap1/vst3/config_vst3.h
Normal file
36
examples/fx_ap1/vst3/config_vst3.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo, Paolo Marrone
|
||||
*/
|
||||
|
||||
#ifndef _VST3_CONFIG_H
|
||||
#define _VST3_CONFIG_H
|
||||
|
||||
#define PLUGIN_SUBCATEGORY "Fx|Filter"
|
||||
|
||||
#define PLUGIN_GUID_1 0x6b8ec305
|
||||
#define PLUGIN_GUID_2 0x32bf4d7b
|
||||
#define PLUGIN_GUID_3 0x9cbbcbe4
|
||||
#define PLUGIN_GUID_4 0x7d145d6b
|
||||
|
||||
#define CTRL_GUID_1 0xe4f45e61
|
||||
#define CTRL_GUID_2 0x236e4427
|
||||
#define CTRL_GUID_3 0xab8393bf
|
||||
#define CTRL_GUID_4 0xa6b57e62
|
||||
|
||||
#endif
|
4
examples/fx_ap1/web/Makefile
Normal file
4
examples/fx_ap1/web/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_ap1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/web/web.mk
|
38
examples/fx_ap1/web/config.js
Normal file
38
examples/fx_ap1/web/config.js
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
var buses = [
|
||||
{
|
||||
stereo: false,
|
||||
output: false
|
||||
},
|
||||
{
|
||||
stereo: false,
|
||||
output: true
|
||||
}
|
||||
];
|
||||
|
||||
var parameters = [
|
||||
{
|
||||
name: "Cutoff",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
}
|
||||
];
|
7
examples/fx_ap2/daisy-seed/Makefile
Normal file
7
examples/fx_ap2/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fx_ap2
|
||||
|
||||
C_SOURCES += ${ROOT_DIR}/../src/bw_example_fx_ap2.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
36
examples/fx_ap2/daisy-seed/config_daisy_seed.h
Normal file
36
examples/fx_ap2/daisy-seed/config_daisy_seed.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_DAISY_SEED_H
|
||||
#define _CONFIG_DAISY_SEED_H
|
||||
|
||||
struct config_pin {
|
||||
int param_index;
|
||||
int pin;
|
||||
};
|
||||
|
||||
#define NUM_PINS 2
|
||||
|
||||
static struct config_pin config_pins[NUM_PINS] = {
|
||||
{ 0, 15 },
|
||||
{ 1, 16 }
|
||||
};
|
||||
|
||||
#endif
|
50
examples/fx_ap2/src/bw_example_fx_ap2.c
Normal file
50
examples/fx_ap2/src/bw_example_fx_ap2.c
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 "bw_example_fx_ap2.h"
|
||||
|
||||
void bw_example_fx_ap2_init(bw_example_fx_ap2 *instance) {
|
||||
bw_ap2_init(&instance->ap2_coeffs);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap2_set_sample_rate(bw_example_fx_ap2 *instance, float sample_rate) {
|
||||
bw_ap2_set_sample_rate(&instance->ap2_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap2_reset(bw_example_fx_ap2 *instance) {
|
||||
bw_ap2_reset_coeffs(&instance->ap2_coeffs);
|
||||
bw_ap2_reset_state(&instance->ap2_coeffs, &instance->ap2_state);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap2_process(bw_example_fx_ap2 *instance, const float** x, float** y, int n_samples) {
|
||||
bw_ap2_process(&instance->ap2_coeffs, &instance->ap2_state, x[0], y[0], n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fx_ap2_set_parameter(bw_example_fx_ap2 *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
if (index == 0)
|
||||
bw_ap2_set_cutoff(&instance->ap2_coeffs, 20.f + (20e3f - 20.f) * value * value * value);
|
||||
else
|
||||
bw_ap2_set_Q(&instance->ap2_coeffs, 0.5f + 9.5f * value);
|
||||
}
|
||||
|
||||
float bw_example_fx_ap2_get_parameter(bw_example_fx_ap2 *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
56
examples/fx_ap2/src/bw_example_fx_ap2.h
Normal file
56
examples/fx_ap2/src/bw_example_fx_ap2.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
#ifndef _BW_EXAMPLE_FX_AP2_H
|
||||
#define _BW_EXAMPLE_FX_AP2_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bw_ap2.h>
|
||||
|
||||
enum {
|
||||
p_ap2,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fx_ap2 {
|
||||
// Sub-components
|
||||
bw_ap2_coeffs ap2_coeffs;
|
||||
bw_ap2_state ap2_state;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fx_ap2 bw_example_fx_ap2;
|
||||
|
||||
void bw_example_fx_ap2_init(bw_example_fx_ap2 *instance);
|
||||
void bw_example_fx_ap2_set_sample_rate(bw_example_fx_ap2 *instance, float sample_rate);
|
||||
void bw_example_fx_ap2_reset(bw_example_fx_ap2 *instance);
|
||||
void bw_example_fx_ap2_process(bw_example_fx_ap2 *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fx_ap2_set_parameter(bw_example_fx_ap2 *instance, int index, float value);
|
||||
float bw_example_fx_ap2_get_parameter(bw_example_fx_ap2 *instance, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
88
examples/fx_ap2/src/config.h
Normal file
88
examples/fx_ap2/src/config.h
Normal file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
// Definitions
|
||||
|
||||
#define IO_MONO 1
|
||||
#define IO_STEREO (1<<1)
|
||||
|
||||
struct config_io_bus {
|
||||
const char *name;
|
||||
char out;
|
||||
char aux;
|
||||
char cv;
|
||||
char configs;
|
||||
};
|
||||
|
||||
struct config_parameter {
|
||||
const char *name;
|
||||
const char *shortName;
|
||||
const char *units;
|
||||
char out;
|
||||
char bypass;
|
||||
int steps;
|
||||
float defaultValueUnmapped;
|
||||
};
|
||||
|
||||
// Data
|
||||
|
||||
#define COMPANY_NAME "Orastron"
|
||||
#define COMPANY_WEBSITE "https://www.orastron.com/"
|
||||
#define COMPANY_MAILTO "mailto:info@orastron.com"
|
||||
|
||||
#define PLUGIN_NAME "bw_example_fx_ap2"
|
||||
#define PLUGIN_VERSION "0.3.0"
|
||||
|
||||
#define NUM_BUSES_IN 1
|
||||
#define NUM_BUSES_OUT 1
|
||||
#define NUM_CHANNELS_IN 1
|
||||
#define NUM_CHANNELS_OUT 1
|
||||
|
||||
static struct config_io_bus config_buses_in[NUM_BUSES_IN] = {
|
||||
{ "Audio in", 0, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
{ "Audio out", 1, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
#define NUM_PARAMETERS 2
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
{ "Q", "Q", "", 0, 0, 0, 0.f },
|
||||
};
|
||||
|
||||
// Internal API
|
||||
|
||||
#include "bw_example_fx_ap2.h"
|
||||
|
||||
#define P_TYPE bw_example_fx_ap2
|
||||
#define P_INIT bw_example_fx_ap2_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fx_ap2_set_sample_rate
|
||||
#define P_RESET bw_example_fx_ap2_reset
|
||||
#define P_PROCESS bw_example_fx_ap2_process
|
||||
#define P_SET_PARAMETER bw_example_fx_ap2_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fx_ap2_get_parameter
|
||||
|
||||
#endif
|
6
examples/fx_ap2/vst3/Makefile
Normal file
6
examples/fx_ap2/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fx_ap2
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_ap2.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fx_ap2/vst3/config_vst3.h
Normal file
36
examples/fx_ap2/vst3/config_vst3.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo, Paolo Marrone
|
||||
*/
|
||||
|
||||
#ifndef _VST3_CONFIG_H
|
||||
#define _VST3_CONFIG_H
|
||||
|
||||
#define PLUGIN_SUBCATEGORY "Fx|Filter"
|
||||
|
||||
#define PLUGIN_GUID_1 0x0f66cf3b
|
||||
#define PLUGIN_GUID_2 0x7f054ae8
|
||||
#define PLUGIN_GUID_3 0xb39fa788
|
||||
#define PLUGIN_GUID_4 0x625425ad
|
||||
|
||||
#define CTRL_GUID_1 0x0362e060
|
||||
#define CTRL_GUID_2 0xa322413f
|
||||
#define CTRL_GUID_3 0xa523e18e
|
||||
#define CTRL_GUID_4 0xc74ced9f
|
||||
|
||||
#endif
|
4
examples/fx_ap2/web/Makefile
Normal file
4
examples/fx_ap2/web/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_ap2.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/web/web.mk
|
43
examples/fx_ap2/web/config.js
Normal file
43
examples/fx_ap2/web/config.js
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
var buses = [
|
||||
{
|
||||
stereo: false,
|
||||
output: false
|
||||
},
|
||||
{
|
||||
stereo: false,
|
||||
output: true
|
||||
}
|
||||
];
|
||||
|
||||
var parameters = [
|
||||
{
|
||||
name: "Cutoff",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
},
|
||||
{
|
||||
name: "Q",
|
||||
output: false,
|
||||
defaultValue: 0.0
|
||||
}
|
||||
];
|
7
examples/fx_hp1/daisy-seed/Makefile
Normal file
7
examples/fx_hp1/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fx_hp1
|
||||
|
||||
C_SOURCES += ${ROOT_DIR}/../src/bw_example_fx_hp1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
35
examples/fx_hp1/daisy-seed/config_daisy_seed.h
Normal file
35
examples/fx_hp1/daisy-seed/config_daisy_seed.h
Normal file
@ -0,0 +1,35 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_DAISY_SEED_H
|
||||
#define _CONFIG_DAISY_SEED_H
|
||||
|
||||
struct config_pin {
|
||||
int param_index;
|
||||
int pin;
|
||||
};
|
||||
|
||||
#define NUM_PINS 1
|
||||
|
||||
static struct config_pin config_pins[NUM_PINS] = {
|
||||
{ 0, 15 }
|
||||
};
|
||||
|
||||
#endif
|
47
examples/fx_hp1/src/bw_example_fx_hp1.c
Normal file
47
examples/fx_hp1/src/bw_example_fx_hp1.c
Normal file
@ -0,0 +1,47 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 "bw_example_fx_hp1.h"
|
||||
|
||||
void bw_example_fx_hp1_init(bw_example_fx_hp1 *instance) {
|
||||
bw_hp1_init(&instance->hp1_coeffs);
|
||||
}
|
||||
|
||||
void bw_example_fx_hp1_set_sample_rate(bw_example_fx_hp1 *instance, float sample_rate) {
|
||||
bw_hp1_set_sample_rate(&instance->hp1_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fx_hp1_reset(bw_example_fx_hp1 *instance) {
|
||||
bw_hp1_reset_coeffs(&instance->hp1_coeffs);
|
||||
bw_hp1_reset_state(&instance->hp1_coeffs, &instance->hp1_state);
|
||||
}
|
||||
|
||||
void bw_example_fx_hp1_process(bw_example_fx_hp1 *instance, const float** x, float** y, int n_samples) {
|
||||
bw_hp1_process(&instance->hp1_coeffs, &instance->hp1_state, x[0], y[0], n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fx_hp1_set_parameter(bw_example_fx_hp1 *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
bw_hp1_set_cutoff(&instance->hp1_coeffs, 20.f + (20e3f - 20.f) * value * value * value);
|
||||
}
|
||||
|
||||
float bw_example_fx_hp1_get_parameter(bw_example_fx_hp1 *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
56
examples/fx_hp1/src/bw_example_fx_hp1.h
Normal file
56
examples/fx_hp1/src/bw_example_fx_hp1.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
#ifndef _BW_EXAMPLE_FX_HP1_H
|
||||
#define _BW_EXAMPLE_FX_HP1_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bw_hp1.h>
|
||||
|
||||
enum {
|
||||
p_hp1,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fx_hp1 {
|
||||
// Sub-components
|
||||
bw_hp1_coeffs hp1_coeffs;
|
||||
bw_hp1_state hp1_state;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fx_hp1 bw_example_fx_hp1;
|
||||
|
||||
void bw_example_fx_hp1_init(bw_example_fx_hp1 *instance);
|
||||
void bw_example_fx_hp1_set_sample_rate(bw_example_fx_hp1 *instance, float sample_rate);
|
||||
void bw_example_fx_hp1_reset(bw_example_fx_hp1 *instance);
|
||||
void bw_example_fx_hp1_process(bw_example_fx_hp1 *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fx_hp1_set_parameter(bw_example_fx_hp1 *instance, int index, float value);
|
||||
float bw_example_fx_hp1_get_parameter(bw_example_fx_hp1 *instance, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
87
examples/fx_hp1/src/config.h
Normal file
87
examples/fx_hp1/src/config.h
Normal file
@ -0,0 +1,87 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
// Definitions
|
||||
|
||||
#define IO_MONO 1
|
||||
#define IO_STEREO (1<<1)
|
||||
|
||||
struct config_io_bus {
|
||||
const char *name;
|
||||
char out;
|
||||
char aux;
|
||||
char cv;
|
||||
char configs;
|
||||
};
|
||||
|
||||
struct config_parameter {
|
||||
const char *name;
|
||||
const char *shortName;
|
||||
const char *units;
|
||||
char out;
|
||||
char bypass;
|
||||
int steps;
|
||||
float defaultValueUnmapped;
|
||||
};
|
||||
|
||||
// Data
|
||||
|
||||
#define COMPANY_NAME "Orastron"
|
||||
#define COMPANY_WEBSITE "https://www.orastron.com/"
|
||||
#define COMPANY_MAILTO "mailto:info@orastron.com"
|
||||
|
||||
#define PLUGIN_NAME "bw_example_fx_hp1"
|
||||
#define PLUGIN_VERSION "0.3.0"
|
||||
|
||||
#define NUM_BUSES_IN 1
|
||||
#define NUM_BUSES_OUT 1
|
||||
#define NUM_CHANNELS_IN 1
|
||||
#define NUM_CHANNELS_OUT 1
|
||||
|
||||
static struct config_io_bus config_buses_in[NUM_BUSES_IN] = {
|
||||
{ "Audio in", 0, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
{ "Audio out", 1, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
#define NUM_PARAMETERS 1
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
};
|
||||
|
||||
// Internal API
|
||||
|
||||
#include "bw_example_fx_hp1.h"
|
||||
|
||||
#define P_TYPE bw_example_fx_hp1
|
||||
#define P_INIT bw_example_fx_hp1_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fx_hp1_set_sample_rate
|
||||
#define P_RESET bw_example_fx_hp1_reset
|
||||
#define P_PROCESS bw_example_fx_hp1_process
|
||||
#define P_SET_PARAMETER bw_example_fx_hp1_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fx_hp1_get_parameter
|
||||
|
||||
#endif
|
6
examples/fx_hp1/vst3/Makefile
Normal file
6
examples/fx_hp1/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fx_hp1
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_hp1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fx_hp1/vst3/config_vst3.h
Normal file
36
examples/fx_hp1/vst3/config_vst3.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo, Paolo Marrone
|
||||
*/
|
||||
|
||||
#ifndef _VST3_CONFIG_H
|
||||
#define _VST3_CONFIG_H
|
||||
|
||||
#define PLUGIN_SUBCATEGORY "Fx|Filter"
|
||||
|
||||
#define PLUGIN_GUID_1 0x4457c77e
|
||||
#define PLUGIN_GUID_2 0x68634509
|
||||
#define PLUGIN_GUID_3 0xb182be49
|
||||
#define PLUGIN_GUID_4 0xf5bfa92b
|
||||
|
||||
#define CTRL_GUID_1 0xf5738314
|
||||
#define CTRL_GUID_2 0x025a4368
|
||||
#define CTRL_GUID_3 0xbccd6ec0
|
||||
#define CTRL_GUID_4 0x6b12df02
|
||||
|
||||
#endif
|
4
examples/fx_hp1/web/Makefile
Normal file
4
examples/fx_hp1/web/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_hp1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/web/web.mk
|
38
examples/fx_hp1/web/config.js
Normal file
38
examples/fx_hp1/web/config.js
Normal file
@ -0,0 +1,38 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
var buses = [
|
||||
{
|
||||
stereo: false,
|
||||
output: false
|
||||
},
|
||||
{
|
||||
stereo: false,
|
||||
output: true
|
||||
}
|
||||
];
|
||||
|
||||
var parameters = [
|
||||
{
|
||||
name: "Cutoff",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
}
|
||||
];
|
7
examples/fx_hs1/daisy-seed/Makefile
Normal file
7
examples/fx_hs1/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fx_hs1
|
||||
|
||||
C_SOURCES += ${ROOT_DIR}/../src/bw_example_fx_hs1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
36
examples/fx_hs1/daisy-seed/config_daisy_seed.h
Normal file
36
examples/fx_hs1/daisy-seed/config_daisy_seed.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_DAISY_SEED_H
|
||||
#define _CONFIG_DAISY_SEED_H
|
||||
|
||||
struct config_pin {
|
||||
int param_index;
|
||||
int pin;
|
||||
};
|
||||
|
||||
#define NUM_PINS 2
|
||||
|
||||
static struct config_pin config_pins[NUM_PINS] = {
|
||||
{ 0, 15 },
|
||||
{ 1, 16 }
|
||||
};
|
||||
|
||||
#endif
|
50
examples/fx_hs1/src/bw_example_fx_hs1.c
Normal file
50
examples/fx_hs1/src/bw_example_fx_hs1.c
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 "bw_example_fx_hs1.h"
|
||||
|
||||
void bw_example_fx_hs1_init(bw_example_fx_hs1 *instance) {
|
||||
bw_hs1_init(&instance->hs1_coeffs);
|
||||
}
|
||||
|
||||
void bw_example_fx_hs1_set_sample_rate(bw_example_fx_hs1 *instance, float sample_rate) {
|
||||
bw_hs1_set_sample_rate(&instance->hs1_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fx_hs1_reset(bw_example_fx_hs1 *instance) {
|
||||
bw_hs1_reset_coeffs(&instance->hs1_coeffs);
|
||||
bw_hs1_reset_state(&instance->hs1_coeffs, &instance->hs1_state);
|
||||
}
|
||||
|
||||
void bw_example_fx_hs1_process(bw_example_fx_hs1 *instance, const float** x, float** y, int n_samples) {
|
||||
bw_hs1_process(&instance->hs1_coeffs, &instance->hs1_state, x[0], y[0], n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fx_hs1_set_parameter(bw_example_fx_hs1 *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
if (index == 0)
|
||||
bw_hs1_set_cutoff(&instance->hs1_coeffs, 20.f + (20e3f - 20.f) * value * value * value);
|
||||
else
|
||||
bw_hs1_set_high_gain_dB(&instance->hs1_coeffs, -20.f + 40.f * value);
|
||||
}
|
||||
|
||||
float bw_example_fx_hs1_get_parameter(bw_example_fx_hs1 *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
56
examples/fx_hs1/src/bw_example_fx_hs1.h
Normal file
56
examples/fx_hs1/src/bw_example_fx_hs1.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
#ifndef _BW_EXAMPLE_FX_HS1_H
|
||||
#define _BW_EXAMPLE_FX_HS1_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bw_hs1.h>
|
||||
|
||||
enum {
|
||||
p_hs1,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fx_hs1 {
|
||||
// Sub-components
|
||||
bw_hs1_coeffs hs1_coeffs;
|
||||
bw_hs1_state hs1_state;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fx_hs1 bw_example_fx_hs1;
|
||||
|
||||
void bw_example_fx_hs1_init(bw_example_fx_hs1 *instance);
|
||||
void bw_example_fx_hs1_set_sample_rate(bw_example_fx_hs1 *instance, float sample_rate);
|
||||
void bw_example_fx_hs1_reset(bw_example_fx_hs1 *instance);
|
||||
void bw_example_fx_hs1_process(bw_example_fx_hs1 *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fx_hs1_set_parameter(bw_example_fx_hs1 *instance, int index, float value);
|
||||
float bw_example_fx_hs1_get_parameter(bw_example_fx_hs1 *instance, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
88
examples/fx_hs1/src/config.h
Normal file
88
examples/fx_hs1/src/config.h
Normal file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
// Definitions
|
||||
|
||||
#define IO_MONO 1
|
||||
#define IO_STEREO (1<<1)
|
||||
|
||||
struct config_io_bus {
|
||||
const char *name;
|
||||
char out;
|
||||
char aux;
|
||||
char cv;
|
||||
char configs;
|
||||
};
|
||||
|
||||
struct config_parameter {
|
||||
const char *name;
|
||||
const char *shortName;
|
||||
const char *units;
|
||||
char out;
|
||||
char bypass;
|
||||
int steps;
|
||||
float defaultValueUnmapped;
|
||||
};
|
||||
|
||||
// Data
|
||||
|
||||
#define COMPANY_NAME "Orastron"
|
||||
#define COMPANY_WEBSITE "https://www.orastron.com/"
|
||||
#define COMPANY_MAILTO "mailto:info@orastron.com"
|
||||
|
||||
#define PLUGIN_NAME "bw_example_fx_hs1"
|
||||
#define PLUGIN_VERSION "0.3.0"
|
||||
|
||||
#define NUM_BUSES_IN 1
|
||||
#define NUM_BUSES_OUT 1
|
||||
#define NUM_CHANNELS_IN 1
|
||||
#define NUM_CHANNELS_OUT 1
|
||||
|
||||
static struct config_io_bus config_buses_in[NUM_BUSES_IN] = {
|
||||
{ "Audio in", 0, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
{ "Audio out", 1, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
#define NUM_PARAMETERS 2
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
{ "Gain", "Gain", "dB", 0, 0, 0, 0.5f },
|
||||
};
|
||||
|
||||
// Internal API
|
||||
|
||||
#include "bw_example_fx_hs1.h"
|
||||
|
||||
#define P_TYPE bw_example_fx_hs1
|
||||
#define P_INIT bw_example_fx_hs1_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fx_hs1_set_sample_rate
|
||||
#define P_RESET bw_example_fx_hs1_reset
|
||||
#define P_PROCESS bw_example_fx_hs1_process
|
||||
#define P_SET_PARAMETER bw_example_fx_hs1_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fx_hs1_get_parameter
|
||||
|
||||
#endif
|
6
examples/fx_hs1/vst3/Makefile
Normal file
6
examples/fx_hs1/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fx_hs1
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_hs1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fx_hs1/vst3/config_vst3.h
Normal file
36
examples/fx_hs1/vst3/config_vst3.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo, Paolo Marrone
|
||||
*/
|
||||
|
||||
#ifndef _VST3_CONFIG_H
|
||||
#define _VST3_CONFIG_H
|
||||
|
||||
#define PLUGIN_SUBCATEGORY "Fx|Filter"
|
||||
|
||||
#define PLUGIN_GUID_1 0x8b009cab
|
||||
#define PLUGIN_GUID_2 0xc7be4869
|
||||
#define PLUGIN_GUID_3 0x8f9c47eb
|
||||
#define PLUGIN_GUID_4 0xe5b6a58d
|
||||
|
||||
#define CTRL_GUID_1 0xb5463860
|
||||
#define CTRL_GUID_2 0x002d4c93
|
||||
#define CTRL_GUID_3 0xaa02c6b3
|
||||
#define CTRL_GUID_4 0xe8474fe6
|
||||
|
||||
#endif
|
4
examples/fx_hs1/web/Makefile
Normal file
4
examples/fx_hs1/web/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_hs1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/web/web.mk
|
43
examples/fx_hs1/web/config.js
Normal file
43
examples/fx_hs1/web/config.js
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
var buses = [
|
||||
{
|
||||
stereo: false,
|
||||
output: false
|
||||
},
|
||||
{
|
||||
stereo: false,
|
||||
output: true
|
||||
}
|
||||
];
|
||||
|
||||
var parameters = [
|
||||
{
|
||||
name: "Cutoff",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
},
|
||||
{
|
||||
name: "Gain",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
}
|
||||
];
|
7
examples/fx_ls1/daisy-seed/Makefile
Normal file
7
examples/fx_ls1/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fx_ls1
|
||||
|
||||
C_SOURCES += ${ROOT_DIR}/../src/bw_example_fx_ls1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
36
examples/fx_ls1/daisy-seed/config_daisy_seed.h
Normal file
36
examples/fx_ls1/daisy-seed/config_daisy_seed.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_DAISY_SEED_H
|
||||
#define _CONFIG_DAISY_SEED_H
|
||||
|
||||
struct config_pin {
|
||||
int param_index;
|
||||
int pin;
|
||||
};
|
||||
|
||||
#define NUM_PINS 2
|
||||
|
||||
static struct config_pin config_pins[NUM_PINS] = {
|
||||
{ 0, 15 },
|
||||
{ 1, 16 }
|
||||
};
|
||||
|
||||
#endif
|
50
examples/fx_ls1/src/bw_example_fx_ls1.c
Normal file
50
examples/fx_ls1/src/bw_example_fx_ls1.c
Normal file
@ -0,0 +1,50 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 "bw_example_fx_ls1.h"
|
||||
|
||||
void bw_example_fx_ls1_init(bw_example_fx_ls1 *instance) {
|
||||
bw_ls1_init(&instance->ls1_coeffs);
|
||||
}
|
||||
|
||||
void bw_example_fx_ls1_set_sample_rate(bw_example_fx_ls1 *instance, float sample_rate) {
|
||||
bw_ls1_set_sample_rate(&instance->ls1_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fx_ls1_reset(bw_example_fx_ls1 *instance) {
|
||||
bw_ls1_reset_coeffs(&instance->ls1_coeffs);
|
||||
bw_ls1_reset_state(&instance->ls1_coeffs, &instance->ls1_state);
|
||||
}
|
||||
|
||||
void bw_example_fx_ls1_process(bw_example_fx_ls1 *instance, const float** x, float** y, int n_samples) {
|
||||
bw_ls1_process(&instance->ls1_coeffs, &instance->ls1_state, x[0], y[0], n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fx_ls1_set_parameter(bw_example_fx_ls1 *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
if (index == 0)
|
||||
bw_ls1_set_cutoff(&instance->ls1_coeffs, 20.f + (20e3f - 20.f) * value * value * value);
|
||||
else
|
||||
bw_ls1_set_dc_gain_dB(&instance->ls1_coeffs, -20.f + 40.f * value);
|
||||
}
|
||||
|
||||
float bw_example_fx_ls1_get_parameter(bw_example_fx_ls1 *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
56
examples/fx_ls1/src/bw_example_fx_ls1.h
Normal file
56
examples/fx_ls1/src/bw_example_fx_ls1.h
Normal file
@ -0,0 +1,56 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
#ifndef _BW_EXAMPLE_FX_LS1_H
|
||||
#define _BW_EXAMPLE_FX_LS1_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bw_ls1.h>
|
||||
|
||||
enum {
|
||||
p_ls1,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fx_ls1 {
|
||||
// Sub-components
|
||||
bw_ls1_coeffs ls1_coeffs;
|
||||
bw_ls1_state ls1_state;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fx_ls1 bw_example_fx_ls1;
|
||||
|
||||
void bw_example_fx_ls1_init(bw_example_fx_ls1 *instance);
|
||||
void bw_example_fx_ls1_set_sample_rate(bw_example_fx_ls1 *instance, float sample_rate);
|
||||
void bw_example_fx_ls1_reset(bw_example_fx_ls1 *instance);
|
||||
void bw_example_fx_ls1_process(bw_example_fx_ls1 *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fx_ls1_set_parameter(bw_example_fx_ls1 *instance, int index, float value);
|
||||
float bw_example_fx_ls1_get_parameter(bw_example_fx_ls1 *instance, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
88
examples/fx_ls1/src/config.h
Normal file
88
examples/fx_ls1/src/config.h
Normal file
@ -0,0 +1,88 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef _CONFIG_H
|
||||
#define _CONFIG_H
|
||||
|
||||
// Definitions
|
||||
|
||||
#define IO_MONO 1
|
||||
#define IO_STEREO (1<<1)
|
||||
|
||||
struct config_io_bus {
|
||||
const char *name;
|
||||
char out;
|
||||
char aux;
|
||||
char cv;
|
||||
char configs;
|
||||
};
|
||||
|
||||
struct config_parameter {
|
||||
const char *name;
|
||||
const char *shortName;
|
||||
const char *units;
|
||||
char out;
|
||||
char bypass;
|
||||
int steps;
|
||||
float defaultValueUnmapped;
|
||||
};
|
||||
|
||||
// Data
|
||||
|
||||
#define COMPANY_NAME "Orastron"
|
||||
#define COMPANY_WEBSITE "https://www.orastron.com/"
|
||||
#define COMPANY_MAILTO "mailto:info@orastron.com"
|
||||
|
||||
#define PLUGIN_NAME "bw_example_fx_ls1"
|
||||
#define PLUGIN_VERSION "0.3.0"
|
||||
|
||||
#define NUM_BUSES_IN 1
|
||||
#define NUM_BUSES_OUT 1
|
||||
#define NUM_CHANNELS_IN 1
|
||||
#define NUM_CHANNELS_OUT 1
|
||||
|
||||
static struct config_io_bus config_buses_in[NUM_BUSES_IN] = {
|
||||
{ "Audio in", 0, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
{ "Audio out", 1, 0, 0, IO_MONO }
|
||||
};
|
||||
|
||||
#define NUM_PARAMETERS 2
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
{ "Gain", "Gain", "dB", 0, 0, 0, 0.5f },
|
||||
};
|
||||
|
||||
// Internal API
|
||||
|
||||
#include "bw_example_fx_ls1.h"
|
||||
|
||||
#define P_TYPE bw_example_fx_ls1
|
||||
#define P_INIT bw_example_fx_ls1_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fx_ls1_set_sample_rate
|
||||
#define P_RESET bw_example_fx_ls1_reset
|
||||
#define P_PROCESS bw_example_fx_ls1_process
|
||||
#define P_SET_PARAMETER bw_example_fx_ls1_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fx_ls1_get_parameter
|
||||
|
||||
#endif
|
6
examples/fx_ls1/vst3/Makefile
Normal file
6
examples/fx_ls1/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fx_ls1
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_ls1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fx_ls1/vst3/config_vst3.h
Normal file
36
examples/fx_ls1/vst3/config_vst3.h
Normal file
@ -0,0 +1,36 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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 authors: Stefano D'Angelo, Paolo Marrone
|
||||
*/
|
||||
|
||||
#ifndef _VST3_CONFIG_H
|
||||
#define _VST3_CONFIG_H
|
||||
|
||||
#define PLUGIN_SUBCATEGORY "Fx|Filter"
|
||||
|
||||
#define PLUGIN_GUID_1 0xbb74cecf
|
||||
#define PLUGIN_GUID_2 0x01ce4903
|
||||
#define PLUGIN_GUID_3 0xb37f02ed
|
||||
#define PLUGIN_GUID_4 0x9510a859
|
||||
|
||||
#define CTRL_GUID_1 0xb51fa6e2
|
||||
#define CTRL_GUID_2 0xf6be4880
|
||||
#define CTRL_GUID_3 0x91564918
|
||||
#define CTRL_GUID_4 0x97a7cf24
|
||||
|
||||
#endif
|
4
examples/fx_ls1/web/Makefile
Normal file
4
examples/fx_ls1/web/Makefile
Normal file
@ -0,0 +1,4 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_ls1.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/web/web.mk
|
43
examples/fx_ls1/web/config.js
Normal file
43
examples/fx_ls1/web/config.js
Normal file
@ -0,0 +1,43 @@
|
||||
/*
|
||||
* Brickworks
|
||||
*
|
||||
* Copyright (C) 2023 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
|
||||
*/
|
||||
|
||||
var buses = [
|
||||
{
|
||||
stereo: false,
|
||||
output: false
|
||||
},
|
||||
{
|
||||
stereo: false,
|
||||
output: true
|
||||
}
|
||||
];
|
||||
|
||||
var parameters = [
|
||||
{
|
||||
name: "Cutoff",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
},
|
||||
{
|
||||
name: "Gain",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
}
|
||||
];
|
@ -69,7 +69,7 @@ static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
#define NUM_PARAMETERS 3
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "", 0, 0, 0, 0.5f },
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
{ "Input coefficient", "In coeff", "", 0, 0, 0, 1.f },
|
||||
{ "Lowpass coefficient", "LP coeff", "", 0, 0, 0, 0.5f }
|
||||
};
|
||||
|
@ -69,7 +69,7 @@ static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
#define NUM_PARAMETERS 6
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "", 0, 0, 0, 0.5f },
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
{ "Q", "Q", "", 0, 0, 0, 0.f },
|
||||
{ "Input coefficient", "In coeff", "", 0, 0, 0, 1.f },
|
||||
{ "Lowpass coefficient", "LP coeff", "", 0, 0, 0, 0.5f },
|
||||
|
@ -69,7 +69,7 @@ static struct config_io_bus config_buses_out[NUM_BUSES_OUT] = {
|
||||
#define NUM_PARAMETERS 2
|
||||
|
||||
static struct config_parameter config_parameters[NUM_PARAMETERS] = {
|
||||
{ "Cutoff", "Cutoff", "", 0, 0, 0, 0.5f },
|
||||
{ "Cutoff", "Cutoff", "Hz", 0, 0, 0, 0.5f },
|
||||
{ "Q", "Q", "", 0, 0, 0, 0.f }
|
||||
};
|
||||
|
||||
|
@ -120,7 +120,7 @@ static inline void bw_ap2_set_cutoff(bw_ap2_coeffs *BW_RESTRICT coeffs, float va
|
||||
*
|
||||
* #### bw_ap2_set_Q()
|
||||
* ```>>> */
|
||||
static inline void bw_ap2_set_Q(bw_svf_coeffs *BW_RESTRICT coeffs, float value);
|
||||
static inline void bw_ap2_set_Q(bw_ap2_coeffs *BW_RESTRICT coeffs, float value);
|
||||
/*! <<<```
|
||||
* Sets the quality factor to the given `value` in `coeffs`.
|
||||
*
|
||||
@ -188,7 +188,7 @@ static inline void bw_ap2_set_cutoff(bw_ap2_coeffs *BW_RESTRICT coeffs, float va
|
||||
bw_svf_set_cutoff(&coeffs->svf_coeffs, value);
|
||||
}
|
||||
|
||||
static inline void bw_ap2_set_Q(bw_svf_coeffs *BW_RESTRICT coeffs, float value) {
|
||||
static inline void bw_ap2_set_Q(bw_ap2_coeffs *BW_RESTRICT coeffs, float value) {
|
||||
bw_svf_set_Q(&coeffs->svf_coeffs, value);
|
||||
}
|
||||
|
||||
|
@ -164,21 +164,21 @@ struct _bw_hs1_state {
|
||||
static inline void bw_hs1_init(bw_hs1_coeffs *BW_RESTRICT coeffs) {
|
||||
bw_mm1_init(&coeffs->mm1_coeffs);
|
||||
bw_mm1_set_prewarp_at_cutoff(&coeffs->mm1_coeffs, 0);
|
||||
bw_mm1_set_coeffs_x(&coeffs->mm1_coeffs, 0.f);
|
||||
bw_mm1_set_coeffs_lp(&coeffs->mm1_coeffs, 1.f);
|
||||
bw_mm1_set_coeff_x(&coeffs->mm1_coeffs, 0.f);
|
||||
bw_mm1_set_coeff_lp(&coeffs->mm1_coeffs, 1.f);
|
||||
coeffs->cutoff = 1e3f;
|
||||
coeffs->dc_gain = 1.f;
|
||||
coeffs->high_gain = 1.f;
|
||||
}
|
||||
|
||||
static inline void bw_hs1_set_sample_rate(bw_hs1_coeffs *BW_RESTRICT coeffs, float sample_rate) {
|
||||
bw_mm1_set_sample_rate(&coeffs->mm1_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
static inline void _bw_hs1_update_mm1_params(bw_ls1_coeffs *BW_RESTRICT coeffs) {
|
||||
static inline void _bw_hs1_update_mm1_params(bw_hs1_coeffs *BW_RESTRICT coeffs) {
|
||||
if (coeffs->update) {
|
||||
bw_mm1_set_cutoff(&coeffs->mm1_coeffs, coeffs->cutoff * bw_sqrtf_2(coeffs->dc_gain));
|
||||
bw_mm1_set_coeff_x(&coeffs->mm1_coeffs, coeffs->dc_gain);
|
||||
bw_mm1_set_coeff_lp(&coeffs->mm1_coeffs, 1.f - coeffs->dc_gain);
|
||||
bw_mm1_set_cutoff(&coeffs->mm1_coeffs, coeffs->cutoff * bw_sqrtf_2(coeffs->high_gain));
|
||||
bw_mm1_set_coeff_x(&coeffs->mm1_coeffs, coeffs->high_gain);
|
||||
bw_mm1_set_coeff_lp(&coeffs->mm1_coeffs, 1.f - coeffs->high_gain);
|
||||
bw_mm1_set_prewarp_freq(&coeffs->mm1_coeffs, coeffs->cutoff);
|
||||
coeffs->update = 0;
|
||||
}
|
||||
|
@ -162,8 +162,8 @@ struct _bw_ls1_state {
|
||||
static inline void bw_ls1_init(bw_ls1_coeffs *BW_RESTRICT coeffs) {
|
||||
bw_mm1_init(&coeffs->mm1_coeffs);
|
||||
bw_mm1_set_prewarp_at_cutoff(&coeffs->mm1_coeffs, 0);
|
||||
bw_mm1_set_coeffs_x(&coeffs->mm1_coeffs, 1.f);
|
||||
bw_mm1_set_coeffs_lp(&coeffs->mm1_coeffs, 0.f);
|
||||
bw_mm1_set_coeff_x(&coeffs->mm1_coeffs, 1.f);
|
||||
bw_mm1_set_coeff_lp(&coeffs->mm1_coeffs, 0.f);
|
||||
coeffs->cutoff = 1e3f;
|
||||
coeffs->dc_gain = 1.f;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user