feat: update faustlpf sources with faustdoctor
Signed-off-by: Christopher Arndt <chris@chrisarndt.de>
This commit is contained in:
parent
9474b4481e
commit
29c20cb8fc
|
@ -1,7 +1,6 @@
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// This file was generated using the Faust compiler (https://faust.grame.fr),
|
// This file was generated using the Faust compiler (https://faust.grame.fr),
|
||||||
// and the Faust post-processor (https://github.com/SpotlightKid/faustpp).
|
// and the Faust post-processor (https://github.com/SpotlightKid/faustdoctor).
|
||||||
//
|
//
|
||||||
// Source: faustlpf.dsp
|
// Source: faustlpf.dsp
|
||||||
// Name: FaustLPF
|
// Name: FaustLPF
|
||||||
|
@ -9,22 +8,15 @@
|
||||||
// Copyright: Christopher Arndt, 2024
|
// Copyright: Christopher Arndt, 2024
|
||||||
// License: MIT
|
// License: MIT
|
||||||
// Version: 0.1.0
|
// Version: 0.1.0
|
||||||
// FAUST version: 2.75.10
|
// FAUST version: 2.76.0
|
||||||
// FAUST compilation options: -a /home/chris/tmp/tmpebxwoqng.c -lang c -rui -ct 1 -fm def -cn faustlpf -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0 -vec -lv 0 -vs 32
|
// FAUST compilation options: -a /home/chris/tmp/tmpnf8hapuk.c -lang c -rui -ct 1 -fm def -cn faustlpf -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0 -vec -lv 0 -vs 32
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
#include "faustlpf.h"
|
#include "faustlpf.h"
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// Begin the Faust code section
|
// Begin the Faust code section
|
||||||
|
|
||||||
|
|
||||||
#if defined(__GNUC__)
|
#if defined(__GNUC__)
|
||||||
# pragma GCC diagnostic push
|
# pragma GCC diagnostic push
|
||||||
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
# pragma GCC diagnostic ignored "-Wunused-parameter"
|
||||||
|
@ -79,7 +71,7 @@ void deletefaustlpf(faustlpf* dsp) {
|
||||||
|
|
||||||
void metadatafaustlpf(MetaGlue* m) {
|
void metadatafaustlpf(MetaGlue* m) {
|
||||||
m->declare(m->metaInterface, "author", "Christopher Arndt");
|
m->declare(m->metaInterface, "author", "Christopher Arndt");
|
||||||
m->declare(m->metaInterface, "compile_options", "-a /home/chris/tmp/tmpebxwoqng.c -lang c -rui -ct 1 -fm def -cn faustlpf -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0 -vec -lv 0 -vs 32");
|
m->declare(m->metaInterface, "compile_options", "-a /home/chris/tmp/tmpnf8hapuk.c -lang c -rui -ct 1 -fm def -cn faustlpf -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0 -vec -lv 0 -vs 32");
|
||||||
m->declare(m->metaInterface, "copyright", "Christopher Arndt, 2024");
|
m->declare(m->metaInterface, "copyright", "Christopher Arndt, 2024");
|
||||||
m->declare(m->metaInterface, "filename", "faustlpf.dsp");
|
m->declare(m->metaInterface, "filename", "faustlpf.dsp");
|
||||||
m->declare(m->metaInterface, "filters.lib/fir:author", "Julius O. Smith III");
|
m->declare(m->metaInterface, "filters.lib/fir:author", "Julius O. Smith III");
|
||||||
|
@ -389,8 +381,6 @@ void computefaustlpf(faustlpf* dsp, int count, FAUSTFLOAT** RESTRICT inputs, FAU
|
||||||
# pragma GCC diagnostic pop
|
# pragma GCC diagnostic pop
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
|
||||||
//------------------------------------------------------------------------------
|
//------------------------------------------------------------------------------
|
||||||
// End the Faust code section
|
// End the Faust code section
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -1,3 +1,17 @@
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
// This file was generated using the Faust compiler (https://faust.grame.fr),
|
||||||
|
// and the Faust post-processor (https://github.com/SpotlightKid/faustdoctor).
|
||||||
|
//
|
||||||
|
// Source: faustlpf.dsp
|
||||||
|
// Name: FaustLPF
|
||||||
|
// Author: Christopher Arndt
|
||||||
|
// Copyright: Christopher Arndt, 2024
|
||||||
|
// License: MIT
|
||||||
|
// Version: 0.1.0
|
||||||
|
// FAUST version: 2.76.0
|
||||||
|
// FAUST compilation options: -a /home/chris/tmp/tmpkjrmmie8.c -lang c -rui -ct 1 -fm def -cn faustlpf -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0 -vec -lv 0 -vs 32
|
||||||
|
//------------------------------------------------------------------------------
|
||||||
|
|
||||||
#ifndef __faustlpf_H__
|
#ifndef __faustlpf_H__
|
||||||
#define __faustlpf_H__
|
#define __faustlpf_H__
|
||||||
|
|
||||||
|
@ -19,7 +33,6 @@
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include "faust/gui/CInterface.h"
|
#include "faust/gui/CInterface.h"
|
||||||
|
|
||||||
|
|
||||||
typedef struct {
|
typedef struct {
|
||||||
int fSampleRate;
|
int fSampleRate;
|
||||||
float fConst0;
|
float fConst0;
|
||||||
|
@ -31,7 +44,6 @@ typedef struct {
|
||||||
float fRec0_perm[4];
|
float fRec0_perm[4];
|
||||||
} faustlpf;
|
} faustlpf;
|
||||||
|
|
||||||
|
|
||||||
faustlpf* newfaustlpf();
|
faustlpf* newfaustlpf();
|
||||||
void deletefaustlpf(faustlpf* dsp);
|
void deletefaustlpf(faustlpf* dsp);
|
||||||
void metadatafaustlpf(MetaGlue* m);
|
void metadatafaustlpf(MetaGlue* m);
|
||||||
|
@ -55,10 +67,6 @@ typedef struct {
|
||||||
|
|
||||||
int parameter_group(unsigned index) {
|
int parameter_group(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
|
||||||
return 0;
|
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return -1;
|
return -1;
|
||||||
}
|
}
|
||||||
|
@ -66,10 +74,8 @@ int parameter_group(unsigned index) {
|
||||||
|
|
||||||
const char *parameter_label(unsigned index) {
|
const char *parameter_label(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
return "Cutoff";
|
return "Cutoff";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -77,10 +83,8 @@ const char *parameter_label(unsigned index) {
|
||||||
|
|
||||||
const char *parameter_short_label(unsigned index) {
|
const char *parameter_short_label(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
return "Cutoff";
|
return "Cutoff";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -88,11 +92,9 @@ const char *parameter_short_label(unsigned index) {
|
||||||
|
|
||||||
const char *parameter_style(unsigned index) {
|
const char *parameter_style(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0: {
|
case 0: {
|
||||||
return "knob";
|
return "knob";
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -100,10 +102,8 @@ const char *parameter_style(unsigned index) {
|
||||||
|
|
||||||
const char *parameter_symbol(unsigned index) {
|
const char *parameter_symbol(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
return "cutoff";
|
return "cutoff";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
@ -111,10 +111,8 @@ const char *parameter_symbol(unsigned index) {
|
||||||
|
|
||||||
const char *parameter_unit(unsigned index) {
|
const char *parameter_unit(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
return "Hz";
|
return "Hz";
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -122,12 +120,10 @@ const char *parameter_unit(unsigned index) {
|
||||||
|
|
||||||
const ParameterRange *parameter_range(unsigned index) {
|
const ParameterRange *parameter_range(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0: {
|
case 0: {
|
||||||
static const ParameterRange range = { 15000.0, 16.0, 15000.0 };
|
static const ParameterRange range = { 15000.0, 16.0, 15000.0 };
|
||||||
return ⦥
|
return ⦥
|
||||||
}
|
}
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return 0;
|
return 0;
|
||||||
}
|
}
|
||||||
|
@ -135,7 +131,6 @@ const ParameterRange *parameter_range(unsigned index) {
|
||||||
|
|
||||||
bool parameter_is_trigger(unsigned index) {
|
bool parameter_is_trigger(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -143,7 +138,6 @@ bool parameter_is_trigger(unsigned index) {
|
||||||
|
|
||||||
bool parameter_is_boolean(unsigned index) {
|
bool parameter_is_boolean(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -151,7 +145,6 @@ bool parameter_is_boolean(unsigned index) {
|
||||||
|
|
||||||
bool parameter_is_enum(unsigned index) {
|
bool parameter_is_enum(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -159,7 +152,6 @@ bool parameter_is_enum(unsigned index) {
|
||||||
|
|
||||||
bool parameter_is_integer(unsigned index) {
|
bool parameter_is_integer(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -167,10 +159,8 @@ bool parameter_is_integer(unsigned index) {
|
||||||
|
|
||||||
bool parameter_is_logarithmic(unsigned index) {
|
bool parameter_is_logarithmic(unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
return true;
|
return true;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
@ -178,10 +168,8 @@ bool parameter_is_logarithmic(unsigned index) {
|
||||||
|
|
||||||
FAUSTFLOAT get_parameter(faustlpf* dsp, unsigned index) {
|
FAUSTFLOAT get_parameter(faustlpf* dsp, unsigned index) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
return dsp->fHslider0;
|
return dsp->fHslider0;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
(void)dsp;
|
(void)dsp;
|
||||||
return 0.0;
|
return 0.0;
|
||||||
|
@ -190,11 +178,9 @@ FAUSTFLOAT get_parameter(faustlpf* dsp, unsigned index) {
|
||||||
|
|
||||||
void set_parameter(faustlpf* dsp, unsigned index, FAUSTFLOAT value) {
|
void set_parameter(faustlpf* dsp, unsigned index, FAUSTFLOAT value) {
|
||||||
switch (index) {
|
switch (index) {
|
||||||
|
|
||||||
case 0:
|
case 0:
|
||||||
dsp->fHslider0 = value;
|
dsp->fHslider0 = value;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
default:
|
default:
|
||||||
(void)dsp;
|
(void)dsp;
|
||||||
(void)value;
|
(void)value;
|
||||||
|
@ -202,12 +188,10 @@ void set_parameter(faustlpf* dsp, unsigned index, FAUSTFLOAT value) {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
FAUSTFLOAT get_cutoff(faustlpf* dsp) {
|
FAUSTFLOAT get_cutoff(faustlpf* dsp) {
|
||||||
return dsp->fHslider0;
|
return dsp->fHslider0;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void set_cutoff(faustlpf* dsp, FAUSTFLOAT value) {
|
void set_cutoff(faustlpf* dsp, FAUSTFLOAT value) {
|
||||||
dsp->fHslider0 = value;
|
dsp->fHslider0 = value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -2,8 +2,10 @@
|
||||||
|
|
||||||
type
|
type
|
||||||
faustlpf* = object
|
faustlpf* = object
|
||||||
|
|
||||||
ParameterRange* = object
|
ParameterRange* = object
|
||||||
init*, min*, max*: cfloat
|
init*, min*, max*: cfloat
|
||||||
|
|
||||||
SampleBuffer* = UncheckedArray[cfloat]
|
SampleBuffer* = UncheckedArray[cfloat]
|
||||||
|
|
||||||
|
|
||||||
|
@ -29,8 +31,5 @@ proc parameter_unit*(index: cuint): cstring {.importc}
|
||||||
proc get_parameter*(dsp: ptr faustlpf, index: cuint): cfloat {.importc}
|
proc get_parameter*(dsp: ptr faustlpf, index: cuint): cfloat {.importc}
|
||||||
proc set_parameter*(dsp: ptr faustlpf, index: cuint, value: cfloat) {.importc}
|
proc set_parameter*(dsp: ptr faustlpf, index: cuint, value: cfloat) {.importc}
|
||||||
|
|
||||||
|
|
||||||
proc get_cutoff*(dsp: ptr faustlpf): cfloat {.importc}
|
proc get_cutoff*(dsp: ptr faustlpf): cfloat {.importc}
|
||||||
|
|
||||||
|
|
||||||
proc set_cutoff*(dsp: ptr faustlpf, value: cfloat) {.importc}
|
proc set_cutoff*(dsp: ptr faustlpf, value: cfloat) {.importc}
|
||||||
|
|
Loading…
Reference in New Issue