adjusted to latest tibia updated
This commit is contained in:
parent
b517c83cb5
commit
f6b4e1b7ec
@ -20,6 +20,8 @@
|
||||
|
||||
#include <stddef.h>
|
||||
|
||||
#include "plugin_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -21,6 +21,8 @@
|
||||
#include <stddef.h>
|
||||
#include <stdint.h>
|
||||
|
||||
#include "plugin_api.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"make": {
|
||||
"cxxSrcs": "../src/impl.cpp",
|
||||
"cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx",
|
||||
"cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx -std=c++11",
|
||||
"cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx -I../common/src",
|
||||
"cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-fx -I../common/src -std=c++11",
|
||||
"pluginDir": "../../common/src/cxx-fx"
|
||||
}
|
||||
}
|
||||
|
@ -1,8 +1,8 @@
|
||||
{
|
||||
"make": {
|
||||
"cxxSrcs": "../src/impl.cpp",
|
||||
"cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth",
|
||||
"cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth -std=c++11",
|
||||
"cflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth -I../common/src",
|
||||
"cxxflags": "-I../../../include -I../../common/src -I../../common/src/cxx-synth -I../common/src -std=c++11",
|
||||
"pluginDir": "../../common/src/cxx-synth"
|
||||
}
|
||||
}
|
||||
|
@ -1,6 +1,6 @@
|
||||
{
|
||||
"make": {
|
||||
"cflags": "-I../../../include -I../../common/src",
|
||||
"cflags": "-I../../../include -I../../common/src -I../common/src",
|
||||
"pluginDir": "../src"
|
||||
}
|
||||
}
|
||||
|
49
examples/fx_ap1/common/src/plugin_api.h
Normal file
49
examples/fx_ap1/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
51
examples/fx_ap2/common/src/plugin_api.h
Normal file
51
examples/fx_ap2/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_q,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,10 +56,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_ap2_set_cutoff(&instance->ap2_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_q:
|
||||
bw_ap2_set_Q(&instance->ap2_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_balance/common/src/plugin_api.h
Normal file
53
examples/fx_balance/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_balance,
|
||||
|
||||
plugin_parameter_l_level,
|
||||
|
||||
plugin_parameter_r_level,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -69,10 +69,10 @@ static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
static float plugin_get_parameter(plugin *instance, size_t index) {
|
||||
float v = 0.f;
|
||||
switch (index) {
|
||||
case 1:
|
||||
case plugin_parameter_l_level:
|
||||
v = bw_ppm_get_y_z1(&instance->ppm_l_state);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_r_level:
|
||||
v = bw_ppm_get_y_z1(&instance->ppm_r_state);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_bitcrush/common/src/plugin_api.h
Normal file
53
examples/fx_bitcrush/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_sr_ratio,
|
||||
|
||||
plugin_parameter_bit_depth,
|
||||
|
||||
plugin_parameter_gate,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -62,13 +62,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_sr_ratio:
|
||||
bw_sr_reduce_set_ratio(&instance->sr_reduce_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bit_depth:
|
||||
bw_bd_reduce_set_bit_depth(&instance->bd_reduce_coeffs, (char)value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_gate:
|
||||
bw_bd_reduce_set_gate_lin(&instance->bd_reduce_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_cab/common/src/plugin_api.h
Normal file
53
examples/fx_cab/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff_low,
|
||||
|
||||
plugin_parameter_cutoff_high,
|
||||
|
||||
plugin_parameter_tone,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,13 +56,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff_low:
|
||||
bw_cab_set_cutoff_low(&instance->cab_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_cutoff_high:
|
||||
bw_cab_set_cutoff_high(&instance->cab_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_tone:
|
||||
bw_cab_set_tone(&instance->cab_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_chorus/common/src/plugin_api.h
Normal file
53
examples/fx_chorus/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_rate,
|
||||
|
||||
plugin_parameter_depth,
|
||||
|
||||
plugin_parameter_type,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -55,13 +55,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
bw_chorus_set_rate(&instance->chorus_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_depth:
|
||||
bw_chorus_set_amount(&instance->chorus_coeffs, (0.01f * 0.004f) * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_type:
|
||||
// values taken from Dattorro's paper
|
||||
if (value < 1.5f) { // "Industry standard chorus"
|
||||
bw_chorus_set_coeff_x(&instance->chorus_coeffs, 1.f);
|
||||
|
51
examples/fx_clip/common/src/plugin_api.h
Normal file
51
examples/fx_clip/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
plugin_parameter_bias,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -70,10 +70,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_gain:
|
||||
bw_clip_set_gain(&instance->clip_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bias:
|
||||
bw_clip_set_bias(&instance->clip_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
57
examples/fx_comb/common/src/plugin_api.h
Normal file
57
examples/fx_comb/common/src/plugin_api.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_ff_delay,
|
||||
|
||||
plugin_parameter_fb_delay,
|
||||
|
||||
plugin_parameter_blend,
|
||||
|
||||
plugin_parameter_ff,
|
||||
|
||||
plugin_parameter_fb,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -54,19 +54,19 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_ff_delay:
|
||||
bw_comb_set_delay_ff(&instance->comb_coeffs, 0.001f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_fb_delay:
|
||||
bw_comb_set_delay_fb(&instance->comb_coeffs, 0.001f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_blend:
|
||||
bw_comb_set_coeff_blend(&instance->comb_coeffs, value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_ff:
|
||||
bw_comb_set_coeff_ff(&instance->comb_coeffs, value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_fb:
|
||||
bw_comb_set_coeff_fb(&instance->comb_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
59
examples/fx_comp/common/src/plugin_api.h
Normal file
59
examples/fx_comp/common/src/plugin_api.h
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_threshold,
|
||||
|
||||
plugin_parameter_ratio,
|
||||
|
||||
plugin_parameter_attack,
|
||||
|
||||
plugin_parameter_release,
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
plugin_parameter_ext_sidechain,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -57,24 +57,24 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_threshold:
|
||||
bw_comp_set_thresh_dBFS(&instance->comp_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_ratio:
|
||||
bw_comp_set_ratio(&instance->comp_coeffs, bw_rcpf(value));
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_attack:
|
||||
// using rise time 10% -> 90%: tau = rise time / log(9)
|
||||
bw_comp_set_attack_tau(&instance->comp_coeffs, (0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_release:
|
||||
// as before
|
||||
bw_comp_set_release_tau(&instance->comp_coeffs, (0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_gain:
|
||||
bw_comp_set_gain_dB(&instance->comp_coeffs, value);
|
||||
break;
|
||||
case 5:
|
||||
case plugin_parameter_ext_sidechain:
|
||||
instance->ext_sidechain = (char)value;
|
||||
break;
|
||||
}
|
||||
|
49
examples/fx_delay/common/src/plugin_api.h
Normal file
49
examples/fx_delay/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_delay,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
53
examples/fx_dist/common/src/plugin_api.h
Normal file
53
examples/fx_dist/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_distortion,
|
||||
|
||||
plugin_parameter_tone,
|
||||
|
||||
plugin_parameter_volume,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -69,13 +69,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_distortion:
|
||||
bw_dist_set_distortion(&instance->dist_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_tone:
|
||||
bw_dist_set_tone(&instance->dist_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_volume:
|
||||
bw_dist_set_volume(&instance->dist_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_drive/common/src/plugin_api.h
Normal file
53
examples/fx_drive/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_drive,
|
||||
|
||||
plugin_parameter_tone,
|
||||
|
||||
plugin_parameter_volume,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -69,13 +69,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_drive:
|
||||
bw_drive_set_drive(&instance->drive_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_tone:
|
||||
bw_drive_set_tone(&instance->drive_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_volume:
|
||||
bw_drive_set_volume(&instance->drive_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
65
examples/fx_eq_3band/common/src/plugin_api.h
Normal file
65
examples/fx_eq_3band/common/src/plugin_api.h
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_ls_cutoff,
|
||||
|
||||
plugin_parameter_ls_gain,
|
||||
|
||||
plugin_parameter_ls_q,
|
||||
|
||||
plugin_parameter_peak_cutoff,
|
||||
|
||||
plugin_parameter_peak_gain,
|
||||
|
||||
plugin_parameter_peak_bw,
|
||||
|
||||
plugin_parameter_hs_cutoff,
|
||||
|
||||
plugin_parameter_hs_gain,
|
||||
|
||||
plugin_parameter_hs_q,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -70,31 +70,31 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_ls_cutoff:
|
||||
bw_ls2_set_cutoff(&instance->ls2_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_ls_gain:
|
||||
bw_ls2_set_dc_gain_dB(&instance->ls2_coeffs, value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_ls_q:
|
||||
bw_ls2_set_Q(&instance->ls2_coeffs, value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_peak_cutoff:
|
||||
bw_peak_set_cutoff(&instance->peak_coeffs, value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_peak_gain:
|
||||
bw_peak_set_peak_gain_dB(&instance->peak_coeffs, value);
|
||||
break;
|
||||
case 5:
|
||||
case plugin_parameter_peak_bw:
|
||||
bw_peak_set_bandwidth(&instance->peak_coeffs, value);
|
||||
break;
|
||||
case 6:
|
||||
case plugin_parameter_hs_cutoff:
|
||||
bw_hs2_set_cutoff(&instance->hs2_coeffs, value);
|
||||
break;
|
||||
case 7:
|
||||
case plugin_parameter_hs_gain:
|
||||
bw_hs2_set_high_gain_dB(&instance->hs2_coeffs, value);
|
||||
break;
|
||||
case 8:
|
||||
case plugin_parameter_hs_q:
|
||||
bw_hs2_set_Q(&instance->hs2_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_flanger/common/src/plugin_api.h
Normal file
53
examples/fx_flanger/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_rate,
|
||||
|
||||
plugin_parameter_amount,
|
||||
|
||||
plugin_parameter_feedback,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -58,13 +58,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
bw_chorus_set_rate(&instance->chorus_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_amount:
|
||||
bw_chorus_set_amount(&instance->chorus_coeffs, (0.01f * 0.001f) * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_feedback:
|
||||
bw_chorus_set_coeff_fb(&instance->chorus_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
51
examples/fx_fuzz/common/src/plugin_api.h
Normal file
51
examples/fx_fuzz/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_fuzz,
|
||||
|
||||
plugin_parameter_volume,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -69,10 +69,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_fuzz:
|
||||
bw_fuzz_set_fuzz(&instance->fuzz_coeffs, 0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_volume:
|
||||
bw_fuzz_set_volume(&instance->fuzz_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
49
examples/fx_hp1/common/src/plugin_api.h
Normal file
49
examples/fx_hp1/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
51
examples/fx_hs1/common/src/plugin_api.h
Normal file
51
examples/fx_hs1/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,10 +56,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_hs1_set_cutoff(&instance->hs1_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_gain:
|
||||
bw_hs1_set_high_gain_dB(&instance->hs1_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
49
examples/fx_lp1/common/src/plugin_api.h
Normal file
49
examples/fx_lp1/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
51
examples/fx_ls1/common/src/plugin_api.h
Normal file
51
examples/fx_ls1/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,10 +56,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_ls1_set_cutoff(&instance->ls1_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_gain:
|
||||
bw_ls1_set_dc_gain_dB(&instance->ls1_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_mm1/common/src/plugin_api.h
Normal file
53
examples/fx_mm1/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_in,
|
||||
|
||||
plugin_parameter_lp,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,13 +56,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_mm1_set_cutoff(&instance->mm1_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_in:
|
||||
bw_mm1_set_coeff_x(&instance->mm1_coeffs, value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_lp:
|
||||
bw_mm1_set_coeff_lp(&instance->mm1_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
59
examples/fx_mm2/common/src/plugin_api.h
Normal file
59
examples/fx_mm2/common/src/plugin_api.h
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_q,
|
||||
|
||||
plugin_parameter_in,
|
||||
|
||||
plugin_parameter_lp,
|
||||
|
||||
plugin_parameter_bp,
|
||||
|
||||
plugin_parameter_hp,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,22 +56,22 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_mm2_set_cutoff(&instance->mm2_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_q:
|
||||
bw_mm2_set_Q(&instance->mm2_coeffs, value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_in:
|
||||
bw_mm2_set_coeff_x(&instance->mm2_coeffs, value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_lp:
|
||||
bw_mm2_set_coeff_lp(&instance->mm2_coeffs, value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_bp:
|
||||
bw_mm2_set_coeff_bp(&instance->mm2_coeffs, value);
|
||||
break;
|
||||
case 5:
|
||||
case plugin_parameter_hp:
|
||||
bw_mm2_set_coeff_hp(&instance->mm2_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
57
examples/fx_noise_gate/common/src/plugin_api.h
Normal file
57
examples/fx_noise_gate/common/src/plugin_api.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_threshold,
|
||||
|
||||
plugin_parameter_ratio,
|
||||
|
||||
plugin_parameter_attack,
|
||||
|
||||
plugin_parameter_release,
|
||||
|
||||
plugin_parameter_ext_sidechain,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -57,21 +57,21 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_threshold:
|
||||
bw_noise_gate_set_thresh_dBFS(&instance->noise_gate_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_ratio:
|
||||
bw_noise_gate_set_ratio(&instance->noise_gate_coeffs, value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_attack:
|
||||
// using rise time 10% -> 90%: tau = rise time / log(9)
|
||||
bw_noise_gate_set_attack_tau(&instance->noise_gate_coeffs, (0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_release:
|
||||
// as before
|
||||
bw_noise_gate_set_release_tau(&instance->noise_gate_coeffs, (0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_ext_sidechain:
|
||||
instance->ext_sidechain = (char)value;
|
||||
break;
|
||||
}
|
||||
|
51
examples/fx_notch/common/src/plugin_api.h
Normal file
51
examples/fx_notch/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_q,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,10 +56,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_notch_set_cutoff(&instance->notch_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_q:
|
||||
bw_notch_set_Q(&instance->notch_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
49
examples/fx_one_pole/common/src/plugin_api.h
Normal file
49
examples/fx_one_pole/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
53
examples/fx_pan/common/src/plugin_api.h
Normal file
53
examples/fx_pan/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_pan,
|
||||
|
||||
plugin_parameter_l_level,
|
||||
|
||||
plugin_parameter_r_level,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -69,10 +69,10 @@ static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
static float plugin_get_parameter(plugin *instance, size_t index) {
|
||||
float v = 0.f;
|
||||
switch (index) {
|
||||
case 1:
|
||||
case plugin_parameter_l_level:
|
||||
v = bw_ppm_get_y_z1(&instance->ppm_l_state);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_r_level:
|
||||
v = bw_ppm_get_y_z1(&instance->ppm_r_state);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fx_phaser/common/src/plugin_api.h
Normal file
53
examples/fx_phaser/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_rate,
|
||||
|
||||
plugin_parameter_amount,
|
||||
|
||||
plugin_parameter_center,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,13 +56,13 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
bw_phaser_set_rate(&instance->phaser_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_amount:
|
||||
bw_phaser_set_amount(&instance->phaser_coeffs, value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_center:
|
||||
bw_phaser_set_center(&instance->phaser_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
57
examples/fx_reverb/common/src/plugin_api.h
Normal file
57
examples/fx_reverb/common/src/plugin_api.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_predelay,
|
||||
|
||||
plugin_parameter_bandwidth,
|
||||
|
||||
plugin_parameter_damping,
|
||||
|
||||
plugin_parameter_decay,
|
||||
|
||||
plugin_parameter_wet,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -55,19 +55,19 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_predelay:
|
||||
bw_reverb_set_predelay(&instance->reverb_coeffs, 0.001f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bandwidth:
|
||||
bw_reverb_set_bandwidth(&instance->reverb_coeffs, value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_damping:
|
||||
bw_reverb_set_damping(&instance->reverb_coeffs, value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_decay:
|
||||
bw_reverb_set_decay(&instance->reverb_coeffs, 0.01f * bw_minf(value, 99.9f));
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_wet:
|
||||
bw_reverb_set_wet(&instance->reverb_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
51
examples/fx_ring_mod/common/src/plugin_api.h
Normal file
51
examples/fx_ring_mod/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_frequency,
|
||||
|
||||
plugin_parameter_amount,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -63,10 +63,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_frequency:
|
||||
bw_phase_gen_set_frequency(&instance->phase_gen_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_amount:
|
||||
bw_ring_mod_set_amount(&instance->ring_mod_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
51
examples/fx_satur/common/src/plugin_api.h
Normal file
51
examples/fx_satur/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
plugin_parameter_bias,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -70,10 +70,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_gain:
|
||||
bw_satur_set_gain(&instance->satur_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bias:
|
||||
bw_satur_set_bias(&instance->satur_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
49
examples/fx_slew_lim/common/src/plugin_api.h
Normal file
49
examples/fx_slew_lim/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_max_rate,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
51
examples/fx_svf/common/src/plugin_api.h
Normal file
51
examples/fx_svf/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_q,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -57,10 +57,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
bw_svf_set_cutoff(&instance->svf_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_q:
|
||||
bw_svf_set_Q(&instance->svf_coeffs, value);
|
||||
break;
|
||||
}
|
||||
|
51
examples/fx_trem/common/src/plugin_api.h
Normal file
51
examples/fx_trem/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_rate,
|
||||
|
||||
plugin_parameter_amount,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,10 +56,10 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
bw_trem_set_rate(&instance->trem_coeffs, value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_amount:
|
||||
bw_trem_set_amount(&instance->trem_coeffs, 0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
51
examples/fx_vibrato/common/src/plugin_api.h
Normal file
51
examples/fx_vibrato/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_rate,
|
||||
|
||||
plugin_parameter_amount,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -62,11 +62,11 @@ static void plugin_reset(plugin *instance) {
|
||||
|
||||
static void plugin_set_parameter(plugin *instance, size_t index, float value) {
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
bw_chorus_set_rate(&instance->chorus_coeffs, value);
|
||||
instance->rate_k = (1.f / 6.283185307179586f) * bw_rcpf(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_amount:
|
||||
instance->amount_k = bw_pow2f((1.f / 12.f) * value) - 1.f;
|
||||
break;
|
||||
}
|
||||
|
49
examples/fx_wah/common/src/plugin_api.h
Normal file
49
examples/fx_wah/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_wah,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
49
examples/fxpp_ap1/common/src/plugin_api.h
Normal file
49
examples/fxpp_ap1/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
51
examples/fxpp_ap2/common/src/plugin_api.h
Normal file
51
examples/fxpp_ap2/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_q,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -50,10 +50,10 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
AP2<1> *instance = reinterpret_cast<AP2<1> *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
instance->setCutoff(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_q:
|
||||
instance->setQ(value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fxpp_balance/common/src/plugin_api.h
Normal file
53
examples/fxpp_balance/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_balance,
|
||||
|
||||
plugin_parameter_l_level,
|
||||
|
||||
plugin_parameter_r_level,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
53
examples/fxpp_bitcrush/common/src/plugin_api.h
Normal file
53
examples/fxpp_bitcrush/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_sr_ratio,
|
||||
|
||||
plugin_parameter_bit_depth,
|
||||
|
||||
plugin_parameter_gate,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -60,13 +60,13 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Engine *instance = reinterpret_cast<Engine *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_sr_ratio:
|
||||
instance->sr.setRatio(0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bit_depth:
|
||||
instance->bd.setBitDepth((char)value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_gate:
|
||||
instance->bd.setGateLin(value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fxpp_cab/common/src/plugin_api.h
Normal file
53
examples/fxpp_cab/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff_low,
|
||||
|
||||
plugin_parameter_cutoff_high,
|
||||
|
||||
plugin_parameter_tone,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -50,13 +50,13 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Cab<1> *instance = reinterpret_cast<Cab<1> *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff_low:
|
||||
instance->setCutoffLow(0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_cutoff_high:
|
||||
instance->setCutoffHigh(0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_tone:
|
||||
instance->setTone(0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fxpp_chorus/common/src/plugin_api.h
Normal file
53
examples/fxpp_chorus/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_rate,
|
||||
|
||||
plugin_parameter_depth,
|
||||
|
||||
plugin_parameter_type,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -51,13 +51,13 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Chorus<1> *instance = reinterpret_cast<Chorus<1> *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
instance->setRate(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_depth:
|
||||
instance->setAmount((0.01f * 0.004f) * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_type:
|
||||
// values taken from Dattorro's paper
|
||||
if (value < 1.5f) { // "Industry standard chorus"
|
||||
instance->setCoeffX(1.f);
|
||||
|
51
examples/fxpp_clip/common/src/plugin_api.h
Normal file
51
examples/fxpp_clip/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
plugin_parameter_bias,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -67,10 +67,10 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Engine *instance = reinterpret_cast<Engine *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_gain:
|
||||
instance->clip.setGain(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_bias:
|
||||
instance->clip.setBias(value);
|
||||
break;
|
||||
}
|
||||
|
57
examples/fxpp_comb/common/src/plugin_api.h
Normal file
57
examples/fxpp_comb/common/src/plugin_api.h
Normal file
@ -0,0 +1,57 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_ff_delay,
|
||||
|
||||
plugin_parameter_fb_delay,
|
||||
|
||||
plugin_parameter_blend,
|
||||
|
||||
plugin_parameter_ff,
|
||||
|
||||
plugin_parameter_fb,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -50,19 +50,19 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Comb<1> *instance = reinterpret_cast<Comb<1> *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_ff_delay:
|
||||
instance->setDelayFF(0.001f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_fb_delay:
|
||||
instance->setDelayFB(0.001f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_blend:
|
||||
instance->setCoeffBlend(value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_ff:
|
||||
instance->setCoeffFF(value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_fb:
|
||||
instance->setCoeffFB(value);
|
||||
break;
|
||||
}
|
||||
|
59
examples/fxpp_comp/common/src/plugin_api.h
Normal file
59
examples/fxpp_comp/common/src/plugin_api.h
Normal file
@ -0,0 +1,59 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_threshold,
|
||||
|
||||
plugin_parameter_ratio,
|
||||
|
||||
plugin_parameter_attack,
|
||||
|
||||
plugin_parameter_release,
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
plugin_parameter_ext_sidechain,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -56,24 +56,24 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Engine *instance = reinterpret_cast<Engine *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_threshold:
|
||||
instance->comp.setThreshDBFS(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_ratio:
|
||||
instance->comp.setRatio(bw_rcpf(value));
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_attack:
|
||||
// using rise time 10% -> 90%: tau = rise time / log(9)
|
||||
instance->comp.setAttackTau((0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_release:
|
||||
// as before
|
||||
instance->comp.setReleaseTau((0.001f * 0.4551196133134186f) * value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_gain:
|
||||
instance->comp.setGainDB(value);
|
||||
break;
|
||||
case 5:
|
||||
case plugin_parameter_ext_sidechain:
|
||||
instance->extSidechain = value >= 0.5f;
|
||||
break;
|
||||
}
|
||||
|
49
examples/fxpp_delay/common/src/plugin_api.h
Normal file
49
examples/fxpp_delay/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_delay,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
53
examples/fxpp_dist/common/src/plugin_api.h
Normal file
53
examples/fxpp_dist/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_distortion,
|
||||
|
||||
plugin_parameter_tone,
|
||||
|
||||
plugin_parameter_volume,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -66,13 +66,13 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Engine *instance = reinterpret_cast<Engine *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_distortion:
|
||||
instance->dist.setDistortion(0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_tone:
|
||||
instance->dist.setTone(0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_volume:
|
||||
instance->dist.setVolume(0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fxpp_drive/common/src/plugin_api.h
Normal file
53
examples/fxpp_drive/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_drive,
|
||||
|
||||
plugin_parameter_tone,
|
||||
|
||||
plugin_parameter_volume,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -66,13 +66,13 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Engine *instance = reinterpret_cast<Engine *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_drive:
|
||||
instance->drive.setDrive(0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_tone:
|
||||
instance->drive.setTone(0.01f * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_volume:
|
||||
instance->drive.setVolume(0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
65
examples/fxpp_eq_3band/common/src/plugin_api.h
Normal file
65
examples/fxpp_eq_3band/common/src/plugin_api.h
Normal file
@ -0,0 +1,65 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_ls_cutoff,
|
||||
|
||||
plugin_parameter_ls_gain,
|
||||
|
||||
plugin_parameter_ls_q,
|
||||
|
||||
plugin_parameter_peak_cutoff,
|
||||
|
||||
plugin_parameter_peak_gain,
|
||||
|
||||
plugin_parameter_peak_bw,
|
||||
|
||||
plugin_parameter_hs_cutoff,
|
||||
|
||||
plugin_parameter_hs_gain,
|
||||
|
||||
plugin_parameter_hs_q,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -63,31 +63,31 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Engine *instance = reinterpret_cast<Engine *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_ls_cutoff:
|
||||
instance->ls2.setCutoff(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_ls_gain:
|
||||
instance->ls2.setDcGainDB(value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_ls_q:
|
||||
instance->ls2.setQ(value);
|
||||
break;
|
||||
case 3:
|
||||
case plugin_parameter_peak_cutoff:
|
||||
instance->peak.setCutoff(value);
|
||||
break;
|
||||
case 4:
|
||||
case plugin_parameter_peak_gain:
|
||||
instance->peak.setPeakGainDB(value);
|
||||
break;
|
||||
case 5:
|
||||
case plugin_parameter_peak_bw:
|
||||
instance->peak.setBandwidth(value);
|
||||
break;
|
||||
case 6:
|
||||
case plugin_parameter_hs_cutoff:
|
||||
instance->hs2.setCutoff(value);
|
||||
break;
|
||||
case 7:
|
||||
case plugin_parameter_hs_gain:
|
||||
instance->hs2.setHighGainDB(value);
|
||||
break;
|
||||
case 8:
|
||||
case plugin_parameter_hs_q:
|
||||
instance->hs2.setQ(value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fxpp_flanger/common/src/plugin_api.h
Normal file
53
examples/fxpp_flanger/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_rate,
|
||||
|
||||
plugin_parameter_amount,
|
||||
|
||||
plugin_parameter_feedback,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -53,13 +53,13 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Chorus<1> *instance = reinterpret_cast<Chorus<1> *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_rate:
|
||||
instance->setRate(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_amount:
|
||||
instance->setAmount((0.01f * 0.001f) * value);
|
||||
break;
|
||||
case 2:
|
||||
case plugin_parameter_feedback:
|
||||
instance->setCoeffFB(0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
51
examples/fxpp_fuzz/common/src/plugin_api.h
Normal file
51
examples/fxpp_fuzz/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_fuzz,
|
||||
|
||||
plugin_parameter_volume,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -66,10 +66,10 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
Engine *instance = reinterpret_cast<Engine *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_fuzz:
|
||||
instance->fuzz.setFuzz(0.01f * value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_volume:
|
||||
instance->fuzz.setVolume(0.01f * value);
|
||||
break;
|
||||
}
|
||||
|
49
examples/fxpp_hp1/common/src/plugin_api.h
Normal file
49
examples/fxpp_hp1/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
51
examples/fxpp_hs1/common/src/plugin_api.h
Normal file
51
examples/fxpp_hs1/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -50,10 +50,10 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
HS1<1> *instance = reinterpret_cast<HS1<1> *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
instance->setCutoff(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_gain:
|
||||
instance->setHighGainDB(value);
|
||||
break;
|
||||
}
|
||||
|
49
examples/fxpp_lp1/common/src/plugin_api.h
Normal file
49
examples/fxpp_lp1/common/src/plugin_api.h
Normal file
@ -0,0 +1,49 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
51
examples/fxpp_ls1/common/src/plugin_api.h
Normal file
51
examples/fxpp_ls1/common/src/plugin_api.h
Normal file
@ -0,0 +1,51 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_gain,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
@ -50,10 +50,10 @@ void impl_reset(impl handle) {
|
||||
void impl_set_parameter(impl handle, size_t index, float value) {
|
||||
LS1<1> *instance = reinterpret_cast<LS1<1> *>(handle);
|
||||
switch (index) {
|
||||
case 0:
|
||||
case plugin_parameter_cutoff:
|
||||
instance->setCutoff(value);
|
||||
break;
|
||||
case 1:
|
||||
case plugin_parameter_gain:
|
||||
instance->setDcGainDB(value);
|
||||
break;
|
||||
}
|
||||
|
53
examples/fxpp_mm1/common/src/plugin_api.h
Normal file
53
examples/fxpp_mm1/common/src/plugin_api.h
Normal file
@ -0,0 +1,53 @@
|
||||
/*
|
||||
* Tibia
|
||||
*
|
||||
* Copyright (C) 2024 Orastron Srl unipersonale
|
||||
*
|
||||
* Tibia 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.
|
||||
*
|
||||
* Tibia 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 Tibia. If not, see <http://www.gnu.org/licenses/>.
|
||||
*
|
||||
* File author: Stefano D'Angelo
|
||||
*/
|
||||
|
||||
#ifndef PLUGIN_API_H
|
||||
#define PLUGIN_API_H
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
} plugin_callbacks;
|
||||
|
||||
typedef struct {
|
||||
void * handle;
|
||||
const char * format;
|
||||
const char * (*get_bindir)(void *handle);
|
||||
const char * (*get_datadir)(void *handle);
|
||||
void (*set_parameter_begin)(void *handle, size_t index);
|
||||
void (*set_parameter)(void *handle, size_t index, float value);
|
||||
void (*set_parameter_end)(void *handle, size_t index);
|
||||
} plugin_ui_callbacks;
|
||||
|
||||
|
||||
enum {
|
||||
|
||||
plugin_parameter_cutoff,
|
||||
|
||||
plugin_parameter_in,
|
||||
|
||||
plugin_parameter_lp,
|
||||
|
||||
};
|
||||
|
||||
|
||||
#endif
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue
Block a user