fix bwpp_slew_lim. unused param warn in bw_slew_lim + fx(pp)_{one_pole,slew_lim}
This commit is contained in:
parent
1092dc14af
commit
13223ea427
7
examples/fx_one_pole/daisy-seed/Makefile
Normal file
7
examples/fx_one_pole/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fx_one_pole
|
||||
|
||||
C_SOURCES += ${ROOT_DIR}/../src/bw_example_fx_one_pole.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
35
examples/fx_one_pole/daisy-seed/config_daisy_seed.h
Normal file
35
examples/fx_one_pole/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_one_pole/src/bw_example_fx_one_pole.c
Normal file
47
examples/fx_one_pole/src/bw_example_fx_one_pole.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_one_pole.h"
|
||||
|
||||
void bw_example_fx_one_pole_init(bw_example_fx_one_pole *instance) {
|
||||
bw_one_pole_init(&instance->one_pole_coeffs);
|
||||
}
|
||||
|
||||
void bw_example_fx_one_pole_set_sample_rate(bw_example_fx_one_pole *instance, float sample_rate) {
|
||||
bw_one_pole_set_sample_rate(&instance->one_pole_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fx_one_pole_reset(bw_example_fx_one_pole *instance) {
|
||||
bw_one_pole_reset_coeffs(&instance->one_pole_coeffs);
|
||||
bw_one_pole_reset_state(&instance->one_pole_coeffs, &instance->one_pole_state, 0.f);
|
||||
}
|
||||
|
||||
void bw_example_fx_one_pole_process(bw_example_fx_one_pole *instance, const float** x, float** y, int n_samples) {
|
||||
bw_one_pole_process(&instance->one_pole_coeffs, &instance->one_pole_state, x[0], y[0], n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fx_one_pole_set_parameter(bw_example_fx_one_pole *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
bw_one_pole_set_cutoff(&instance->one_pole_coeffs, 20.f + (20e3f - 20.f) * value * value * value);
|
||||
}
|
||||
|
||||
float bw_example_fx_one_pole_get_parameter(bw_example_fx_one_pole *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
56
examples/fx_one_pole/src/bw_example_fx_one_pole.h
Normal file
56
examples/fx_one_pole/src/bw_example_fx_one_pole.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_ONE_POLE_H
|
||||
#define _BW_EXAMPLE_FX_ONE_POLE_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bw_one_pole.h>
|
||||
|
||||
enum {
|
||||
p_cutoff,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fx_one_pole {
|
||||
// Sub-components
|
||||
bw_one_pole_coeffs one_pole_coeffs;
|
||||
bw_one_pole_state one_pole_state;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fx_one_pole bw_example_fx_one_pole;
|
||||
|
||||
void bw_example_fx_one_pole_init(bw_example_fx_one_pole *instance);
|
||||
void bw_example_fx_one_pole_set_sample_rate(bw_example_fx_one_pole *instance, float sample_rate);
|
||||
void bw_example_fx_one_pole_reset(bw_example_fx_one_pole *instance);
|
||||
void bw_example_fx_one_pole_process(bw_example_fx_one_pole *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fx_one_pole_set_parameter(bw_example_fx_one_pole *instance, int index, float value);
|
||||
float bw_example_fx_one_pole_get_parameter(bw_example_fx_one_pole *instance, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
87
examples/fx_one_pole/src/config.h
Normal file
87
examples/fx_one_pole/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_one_pole"
|
||||
#define PLUGIN_VERSION "0.5.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_one_pole.h"
|
||||
|
||||
#define P_TYPE bw_example_fx_one_pole
|
||||
#define P_INIT bw_example_fx_one_pole_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fx_one_pole_set_sample_rate
|
||||
#define P_RESET bw_example_fx_one_pole_reset
|
||||
#define P_PROCESS bw_example_fx_one_pole_process
|
||||
#define P_SET_PARAMETER bw_example_fx_one_pole_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fx_one_pole_get_parameter
|
||||
|
||||
#endif
|
6
examples/fx_one_pole/vst3/Makefile
Normal file
6
examples/fx_one_pole/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fx_one_pole
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_one_pole.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fx_one_pole/vst3/config_vst3.h
Normal file
36
examples/fx_one_pole/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 0xdcc049b6
|
||||
#define PLUGIN_GUID_2 0xb2d24da5
|
||||
#define PLUGIN_GUID_3 0x95a304c2
|
||||
#define PLUGIN_GUID_4 0x7c4069e6
|
||||
|
||||
#define CTRL_GUID_1 0xb015c12b
|
||||
#define CTRL_GUID_2 0x3c0141a4
|
||||
#define CTRL_GUID_3 0xa1791cc0
|
||||
#define CTRL_GUID_4 0x6f9c7419
|
||||
|
||||
#endif
|
4
examples/fx_one_pole/web/Makefile
Normal file
4
examples/fx_one_pole/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_one_pole.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/web/web.mk
|
38
examples/fx_one_pole/web/config.js
Normal file
38
examples/fx_one_pole/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_slew_lim/daisy-seed/Makefile
Normal file
7
examples/fx_slew_lim/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fx_slew_lim
|
||||
|
||||
C_SOURCES += ${ROOT_DIR}/../src/bw_example_fx_slew_lim.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
35
examples/fx_slew_lim/daisy-seed/config_daisy_seed.h
Normal file
35
examples/fx_slew_lim/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_slew_lim/src/bw_example_fx_slew_lim.c
Normal file
47
examples/fx_slew_lim/src/bw_example_fx_slew_lim.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_slew_lim.h"
|
||||
|
||||
void bw_example_fx_slew_lim_init(bw_example_fx_slew_lim *instance) {
|
||||
bw_slew_lim_init(&instance->slew_lim_coeffs);
|
||||
}
|
||||
|
||||
void bw_example_fx_slew_lim_set_sample_rate(bw_example_fx_slew_lim *instance, float sample_rate) {
|
||||
bw_slew_lim_set_sample_rate(&instance->slew_lim_coeffs, sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fx_slew_lim_reset(bw_example_fx_slew_lim *instance) {
|
||||
bw_slew_lim_reset_coeffs(&instance->slew_lim_coeffs);
|
||||
bw_slew_lim_reset_state(&instance->slew_lim_coeffs, &instance->slew_lim_state, 0.f);
|
||||
}
|
||||
|
||||
void bw_example_fx_slew_lim_process(bw_example_fx_slew_lim *instance, const float** x, float** y, int n_samples) {
|
||||
bw_slew_lim_process(&instance->slew_lim_coeffs, &instance->slew_lim_state, x[0], y[0], n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fx_slew_lim_set_parameter(bw_example_fx_slew_lim *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
bw_slew_lim_set_max_rate(&instance->slew_lim_coeffs, 20.f + (20e3f - 20.f) * value * value * value);
|
||||
}
|
||||
|
||||
float bw_example_fx_slew_lim_get_parameter(bw_example_fx_slew_lim *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
56
examples/fx_slew_lim/src/bw_example_fx_slew_lim.h
Normal file
56
examples/fx_slew_lim/src/bw_example_fx_slew_lim.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_SLEW_LIM_H
|
||||
#define _BW_EXAMPLE_FX_SLEW_LIM_H
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
#include <bw_slew_lim.h>
|
||||
|
||||
enum {
|
||||
p_max_rate,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fx_slew_lim {
|
||||
// Sub-components
|
||||
bw_slew_lim_coeffs slew_lim_coeffs;
|
||||
bw_slew_lim_state slew_lim_state;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fx_slew_lim bw_example_fx_slew_lim;
|
||||
|
||||
void bw_example_fx_slew_lim_init(bw_example_fx_slew_lim *instance);
|
||||
void bw_example_fx_slew_lim_set_sample_rate(bw_example_fx_slew_lim *instance, float sample_rate);
|
||||
void bw_example_fx_slew_lim_reset(bw_example_fx_slew_lim *instance);
|
||||
void bw_example_fx_slew_lim_process(bw_example_fx_slew_lim *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fx_slew_lim_set_parameter(bw_example_fx_slew_lim *instance, int index, float value);
|
||||
float bw_example_fx_slew_lim_get_parameter(bw_example_fx_slew_lim *instance, int index);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif
|
87
examples/fx_slew_lim/src/config.h
Normal file
87
examples/fx_slew_lim/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_slew_lim"
|
||||
#define PLUGIN_VERSION "0.5.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] = {
|
||||
{ "Max rate", "Max rate", "", 0, 0, 0, 0.5f },
|
||||
};
|
||||
|
||||
// Internal API
|
||||
|
||||
#include "bw_example_fx_slew_lim.h"
|
||||
|
||||
#define P_TYPE bw_example_fx_slew_lim
|
||||
#define P_INIT bw_example_fx_slew_lim_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fx_slew_lim_set_sample_rate
|
||||
#define P_RESET bw_example_fx_slew_lim_reset
|
||||
#define P_PROCESS bw_example_fx_slew_lim_process
|
||||
#define P_SET_PARAMETER bw_example_fx_slew_lim_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fx_slew_lim_get_parameter
|
||||
|
||||
#endif
|
6
examples/fx_slew_lim/vst3/Makefile
Normal file
6
examples/fx_slew_lim/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fx_slew_lim
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fx_slew_lim.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fx_slew_lim/vst3/config_vst3.h
Normal file
36
examples/fx_slew_lim/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"
|
||||
|
||||
#define PLUGIN_GUID_1 0x8f653d21
|
||||
#define PLUGIN_GUID_2 0x881041dc
|
||||
#define PLUGIN_GUID_3 0xb2edff74
|
||||
#define PLUGIN_GUID_4 0x568491f9
|
||||
|
||||
#define CTRL_GUID_1 0x9e9e0511
|
||||
#define CTRL_GUID_2 0x4df3407b
|
||||
#define CTRL_GUID_3 0xb0b8f7ee
|
||||
#define CTRL_GUID_4 0xe20eca9a
|
||||
|
||||
#endif
|
4
examples/fx_slew_lim/web/Makefile
Normal file
4
examples/fx_slew_lim/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_slew_lim.c
|
||||
|
||||
include ${ROOT_DIR}/../../common/web/web.mk
|
38
examples/fx_slew_lim/web/config.js
Normal file
38
examples/fx_slew_lim/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: "Max rate",
|
||||
output: false,
|
||||
defaultValue: 0.5
|
||||
}
|
||||
];
|
7
examples/fxpp_one_pole/daisy-seed/Makefile
Normal file
7
examples/fxpp_one_pole/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fxpp_one_pole
|
||||
|
||||
CPP_SOURCES_EXTRA = ${ROOT_DIR}/../src/bw_example_fxpp_one_pole.cpp
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
35
examples/fxpp_one_pole/daisy-seed/config_daisy_seed.h
Normal file
35
examples/fxpp_one_pole/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
|
50
examples/fxpp_one_pole/src/bw_example_fxpp_one_pole.cpp
Normal file
50
examples/fxpp_one_pole/src/bw_example_fxpp_one_pole.cpp
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_fxpp_one_pole.h"
|
||||
|
||||
void bw_example_fxpp_one_pole_init(bw_example_fxpp_one_pole *instance) {
|
||||
(void)instance;
|
||||
}
|
||||
|
||||
void bw_example_fxpp_one_pole_set_sample_rate(bw_example_fxpp_one_pole *instance, float sample_rate) {
|
||||
instance->one_pole.setSampleRate(sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fxpp_one_pole_reset(bw_example_fxpp_one_pole *instance) {
|
||||
instance->one_pole.reset();
|
||||
}
|
||||
|
||||
void bw_example_fxpp_one_pole_process(bw_example_fxpp_one_pole *instance, const float** x, float** y, int n_samples) {
|
||||
instance->one_pole.process({x[0]}, {y[0]}, n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fxpp_one_pole_set_parameter(bw_example_fxpp_one_pole *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
switch (index) {
|
||||
case p_cutoff:
|
||||
instance->one_pole.setCutoff((20e3f - 20.f) * value * value * value + 20.f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
float bw_example_fxpp_one_pole_get_parameter(bw_example_fxpp_one_pole *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
53
examples/fxpp_one_pole/src/bw_example_fxpp_one_pole.h
Normal file
53
examples/fxpp_one_pole/src/bw_example_fxpp_one_pole.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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_FXPP_ONE_POLE_H
|
||||
#define _BW_EXAMPLE_FXPP_ONE_POLE_H
|
||||
|
||||
#include <bwpp_one_pole.h>
|
||||
|
||||
using namespace Brickworks;
|
||||
|
||||
extern "C" {
|
||||
|
||||
enum {
|
||||
p_cutoff,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fxpp_one_pole {
|
||||
// Sub-components
|
||||
OnePole<1> one_pole;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fxpp_one_pole bw_example_fxpp_one_pole;
|
||||
|
||||
void bw_example_fxpp_one_pole_init(bw_example_fxpp_one_pole *instance);
|
||||
void bw_example_fxpp_one_pole_set_sample_rate(bw_example_fxpp_one_pole *instance, float sample_rate);
|
||||
void bw_example_fxpp_one_pole_reset(bw_example_fxpp_one_pole *instance);
|
||||
void bw_example_fxpp_one_pole_process(bw_example_fxpp_one_pole *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fxpp_one_pole_set_parameter(bw_example_fxpp_one_pole *instance, int index, float value);
|
||||
float bw_example_fxpp_one_pole_get_parameter(bw_example_fxpp_one_pole *instance, int index);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
87
examples/fxpp_one_pole/src/config.h
Normal file
87
examples/fxpp_one_pole/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_fxpp_one_pole"
|
||||
#define PLUGIN_VERSION "0.5.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_fxpp_one_pole.h"
|
||||
|
||||
#define P_TYPE bw_example_fxpp_one_pole
|
||||
#define P_INIT bw_example_fxpp_one_pole_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fxpp_one_pole_set_sample_rate
|
||||
#define P_RESET bw_example_fxpp_one_pole_reset
|
||||
#define P_PROCESS bw_example_fxpp_one_pole_process
|
||||
#define P_SET_PARAMETER bw_example_fxpp_one_pole_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fxpp_one_pole_get_parameter
|
||||
|
||||
#endif
|
6
examples/fxpp_one_pole/vst3/Makefile
Normal file
6
examples/fxpp_one_pole/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fxpp_one_pole
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fxpp_one_pole.cpp
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fxpp_one_pole/vst3/config_vst3.h
Normal file
36
examples/fxpp_one_pole/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 0xa81c3d7c
|
||||
#define PLUGIN_GUID_2 0x6744485a
|
||||
#define PLUGIN_GUID_3 0xada4450c
|
||||
#define PLUGIN_GUID_4 0xb946ecdd
|
||||
|
||||
#define CTRL_GUID_1 0x7bcf2712
|
||||
#define CTRL_GUID_2 0x295a4684
|
||||
#define CTRL_GUID_3 0xa5a975ee
|
||||
#define CTRL_GUID_4 0xbb941354
|
||||
|
||||
#endif
|
7
examples/fxpp_slew_lim/daisy-seed/Makefile
Normal file
7
examples/fxpp_slew_lim/daisy-seed/Makefile
Normal file
@ -0,0 +1,7 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
TARGET = bw_example_fxpp_slew_lim
|
||||
|
||||
CPP_SOURCES_EXTRA = ${ROOT_DIR}/../src/bw_example_fxpp_slew_lim.cpp
|
||||
|
||||
include ${ROOT_DIR}/../../common/daisy-seed/daisy-seed.mk
|
35
examples/fxpp_slew_lim/daisy-seed/config_daisy_seed.h
Normal file
35
examples/fxpp_slew_lim/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
|
50
examples/fxpp_slew_lim/src/bw_example_fxpp_slew_lim.cpp
Normal file
50
examples/fxpp_slew_lim/src/bw_example_fxpp_slew_lim.cpp
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_fxpp_slew_lim.h"
|
||||
|
||||
void bw_example_fxpp_slew_lim_init(bw_example_fxpp_slew_lim *instance) {
|
||||
(void)instance;
|
||||
}
|
||||
|
||||
void bw_example_fxpp_slew_lim_set_sample_rate(bw_example_fxpp_slew_lim *instance, float sample_rate) {
|
||||
instance->slew_lim.setSampleRate(sample_rate);
|
||||
}
|
||||
|
||||
void bw_example_fxpp_slew_lim_reset(bw_example_fxpp_slew_lim *instance) {
|
||||
instance->slew_lim.reset();
|
||||
}
|
||||
|
||||
void bw_example_fxpp_slew_lim_process(bw_example_fxpp_slew_lim *instance, const float** x, float** y, int n_samples) {
|
||||
instance->slew_lim.process({x[0]}, {y[0]}, n_samples);
|
||||
}
|
||||
|
||||
void bw_example_fxpp_slew_lim_set_parameter(bw_example_fxpp_slew_lim *instance, int index, float value) {
|
||||
instance->params[index] = value;
|
||||
switch (index) {
|
||||
case p_max_rate:
|
||||
instance->slew_lim.setMaxRate((20e3f - 20.f) * value * value * value + 20.f);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
float bw_example_fxpp_slew_lim_get_parameter(bw_example_fxpp_slew_lim *instance, int index) {
|
||||
return instance->params[index];
|
||||
}
|
53
examples/fxpp_slew_lim/src/bw_example_fxpp_slew_lim.h
Normal file
53
examples/fxpp_slew_lim/src/bw_example_fxpp_slew_lim.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* 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_FXPP_SLEW_LIM_H
|
||||
#define _BW_EXAMPLE_FXPP_SLEW_LIM_H
|
||||
|
||||
#include <bwpp_slew_lim.h>
|
||||
|
||||
using namespace Brickworks;
|
||||
|
||||
extern "C" {
|
||||
|
||||
enum {
|
||||
p_max_rate,
|
||||
p_n
|
||||
};
|
||||
|
||||
struct _bw_example_fxpp_slew_lim {
|
||||
// Sub-components
|
||||
SlewLim<1> slew_lim;
|
||||
|
||||
// Parameters
|
||||
float params[p_n];
|
||||
};
|
||||
typedef struct _bw_example_fxpp_slew_lim bw_example_fxpp_slew_lim;
|
||||
|
||||
void bw_example_fxpp_slew_lim_init(bw_example_fxpp_slew_lim *instance);
|
||||
void bw_example_fxpp_slew_lim_set_sample_rate(bw_example_fxpp_slew_lim *instance, float sample_rate);
|
||||
void bw_example_fxpp_slew_lim_reset(bw_example_fxpp_slew_lim *instance);
|
||||
void bw_example_fxpp_slew_lim_process(bw_example_fxpp_slew_lim *instance, const float** x, float** y, int n_samples);
|
||||
void bw_example_fxpp_slew_lim_set_parameter(bw_example_fxpp_slew_lim *instance, int index, float value);
|
||||
float bw_example_fxpp_slew_lim_get_parameter(bw_example_fxpp_slew_lim *instance, int index);
|
||||
|
||||
}
|
||||
|
||||
#endif
|
87
examples/fxpp_slew_lim/src/config.h
Normal file
87
examples/fxpp_slew_lim/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_fxpp_slew_lim"
|
||||
#define PLUGIN_VERSION "0.5.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] = {
|
||||
{ "Max rate", "Max rate", "", 0, 0, 0, 0.5f }
|
||||
};
|
||||
|
||||
// Internal API
|
||||
|
||||
#include "bw_example_fxpp_slew_lim.h"
|
||||
|
||||
#define P_TYPE bw_example_fxpp_slew_lim
|
||||
#define P_INIT bw_example_fxpp_slew_lim_init
|
||||
#define P_SET_SAMPLE_RATE bw_example_fxpp_slew_lim_set_sample_rate
|
||||
#define P_RESET bw_example_fxpp_slew_lim_reset
|
||||
#define P_PROCESS bw_example_fxpp_slew_lim_process
|
||||
#define P_SET_PARAMETER bw_example_fxpp_slew_lim_set_parameter
|
||||
#define P_GET_PARAMETER bw_example_fxpp_slew_lim_get_parameter
|
||||
|
||||
#endif
|
6
examples/fxpp_slew_lim/vst3/Makefile
Normal file
6
examples/fxpp_slew_lim/vst3/Makefile
Normal file
@ -0,0 +1,6 @@
|
||||
ROOT_DIR := $(shell dirname $(realpath $(firstword $(MAKEFILE_LIST))))
|
||||
|
||||
NAME := bw_example_fxpp_slew_lim
|
||||
SOURCES = ${SOURCES_COMMON} ${ROOT_DIR}/../src/bw_example_fxpp_slew_lim.cpp
|
||||
|
||||
include ${ROOT_DIR}/../../common/vst3/vst3.mk
|
36
examples/fxpp_slew_lim/vst3/config_vst3.h
Normal file
36
examples/fxpp_slew_lim/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"
|
||||
|
||||
#define PLUGIN_GUID_1 0x10830d73
|
||||
#define PLUGIN_GUID_2 0xae904193
|
||||
#define PLUGIN_GUID_3 0xb599c5fa
|
||||
#define PLUGIN_GUID_4 0x3c31e924
|
||||
|
||||
#define CTRL_GUID_1 0xdc9c98a2
|
||||
#define CTRL_GUID_2 0x9f56431d
|
||||
#define CTRL_GUID_3 0x90546e19
|
||||
#define CTRL_GUID_4 0x7cdd90a2
|
||||
|
||||
#endif
|
@ -31,6 +31,7 @@
|
||||
* <ul>
|
||||
* <li>Added <code>bw_slew_lim_process_multi()</code>.</li>
|
||||
* <li>Fixed documentation of <code>bw_slew_lim_process()</code>.</li>
|
||||
* <li>Fixed unused parameter warnings.</li>
|
||||
* </ul>
|
||||
* </li>
|
||||
* <li>Version <strong>0.2.0</strong>:
|
||||
@ -229,6 +230,7 @@ static inline void bw_slew_lim_reset_coeffs(bw_slew_lim_coeffs *BW_RESTRICT coef
|
||||
}
|
||||
|
||||
static inline void bw_slew_lim_reset_state(const bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT state, float y_z1) {
|
||||
(void)coeffs;
|
||||
state->y_z1 = y_z1;
|
||||
}
|
||||
|
||||
@ -239,6 +241,7 @@ static inline void bw_slew_lim_update_coeffs_ctrl(bw_slew_lim_coeffs *BW_RESTRIC
|
||||
}
|
||||
|
||||
static inline void bw_slew_lim_update_coeffs_audio(bw_slew_lim_coeffs *BW_RESTRICT coeffs) {
|
||||
(void)coeffs;
|
||||
}
|
||||
|
||||
static inline float bw_slew_lim_process1(const bw_slew_lim_coeffs *BW_RESTRICT coeffs, bw_slew_lim_state *BW_RESTRICT state, float x) {
|
||||
@ -321,10 +324,10 @@ static inline void bw_slew_lim_process_multi(bw_slew_lim_coeffs *BW_RESTRICT coe
|
||||
for (int j = 0; j < n_channels; j++)
|
||||
if (y[j] != NULL)
|
||||
for (int i = 0; i < n_samples; i++)
|
||||
y[i] = bw_slew_lim_process1_down(coeffs, state, x[i]);
|
||||
y[j][i] = bw_slew_lim_process1_down(coeffs, state[j], x[j][i]);
|
||||
else
|
||||
for (int i = 0; i < n_samples; i++)
|
||||
bw_slew_lim_process1_down(coeffs, state, x[i]);
|
||||
bw_slew_lim_process1_down(coeffs, state[j], x[j][i]);
|
||||
else
|
||||
for (int j = 0; j < n_channels; j++) {
|
||||
if (y[j] != NULL)
|
||||
|
@ -40,7 +40,6 @@ namespace Brickworks {
|
||||
void setMaxRate(float value);
|
||||
void setMaxRateUp(float value);
|
||||
void setMaxRateDown(float value);
|
||||
void setStickyMode(bw_slew_lim_sticky_mode value);
|
||||
|
||||
float getYZ1(BW_SIZE_T channel);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user