From 463b2d86a80e43cd3599f97813126df0eb8efd35 Mon Sep 17 00:00:00 2001 From: chris chafe Date: Mon, 2 Sep 2024 10:29:03 -0700 Subject: [PATCH] rm some vestigial files --- Square/SquareF.dsp | 15 -- Square/SquareF.dsp-wrapper.cpp | 230 ---------------------- Square/SquareF.dsp.cpp | 341 --------------------------------- freeverbStereo (copy).dsp | 132 ------------- 4 files changed, 718 deletions(-) delete mode 100644 Square/SquareF.dsp delete mode 100644 Square/SquareF.dsp-wrapper.cpp delete mode 100644 Square/SquareF.dsp.cpp delete mode 100644 freeverbStereo (copy).dsp diff --git a/Square/SquareF.dsp b/Square/SquareF.dsp deleted file mode 100644 index f8e81352..00000000 --- a/Square/SquareF.dsp +++ /dev/null @@ -1,15 +0,0 @@ -// WARNING: This a "legacy example based on a deprecated library". Check misceffects.lib -// for more accurate examples of echo functions - -declare name "Square"; -declare version "1.0"; -declare author "Grame"; -declare license "BSD"; -declare copyright "(c)GRAME 2006"; -//----------------------------------------------- -// A Simple Echo -//----------------------------------------------- - -import("stdfaust.lib"); - -process = _*_*3.0; diff --git a/Square/SquareF.dsp-wrapper.cpp b/Square/SquareF.dsp-wrapper.cpp deleted file mode 100644 index 8acc5096..00000000 --- a/Square/SquareF.dsp-wrapper.cpp +++ /dev/null @@ -1,230 +0,0 @@ -#include "chugin.h" -// #include "chuck_dl.h" - -#include -#include -#include - -#include -#include -#include -#include - -//------------------------------------------------------------------- -// Generic min and max using C++ inline -//------------------------------------------------------------------- - -inline int lsr (int x, int n) { return int(((unsigned int)x) >> n); } -inline int int2pow2 (int x) { int r=0; while ((1< -{ - void declare(const char* key, const char* value) - { - (*this)[key] = value; - } -}; - -/* UI class - do-nothing (from FAUST/minimal.cpp) */ - -#ifdef WIN32 -#ifdef interface -#undef interface -#endif // interface -#endif // WIN32 - -#ifndef FAUSTFLOAT -#define FAUSTFLOAT float -#endif - -class Soundfile; - -class UI -{ - public: - virtual ~UI() {} - - // active widgets - virtual void addButton(const char* label, FAUSTFLOAT* zone) = 0; - virtual void addCheckButton(const char* label, FAUSTFLOAT* zone) = 0; - virtual void addVerticalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0; - virtual void addHorizontalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0; - virtual void addNumEntry(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0; - - // passive widgets - virtual void addHorizontalBargraph(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT min, FAUSTFLOAT max) = 0; - virtual void addVerticalBargraph(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT min, FAUSTFLOAT max) = 0; - - // layout widgets - virtual void openTabBox(const char* label) = 0; - virtual void openHorizontalBox(const char* label) = 0; - virtual void openVerticalBox(const char* label) = 0; - virtual void closeBox() = 0; - - // soundfiles - - virtual void addSoundfile(const char* label, const char* filename, Soundfile** sf_zone) = 0; - - virtual void declare(FAUSTFLOAT* zone, const char* key, const char* value) {} -}; - -class dsp -{ - public: - virtual ~dsp() {} - - virtual int getNumInputs() = 0; - virtual int getNumOutputs() = 0; - virtual void buildUserInterface(UI* interface) = 0; - virtual int getSampleRate() = 0; - virtual void init(int samplingRate) = 0; - virtual void instanceInit(int sample_rate) = 0; - virtual void instanceConstants(int sample_rate) = 0; - virtual void instanceResetUserInterface() = 0; - virtual void instanceClear() = 0; - virtual dsp* clone() = 0; - virtual void metadata(Meta* m) = 0; - virtual void compute(int len, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) = 0; - - SAMPLE ** ck_frame_in; - SAMPLE ** ck_frame_out; -}; - -/* - * FAUST intrinsic - */ -<> - -/* - * FAUST defines UI values as private, but provides no getters/setters. - * In our particular case it's way more convenient to access them directly - * than to set up a complicated UI structure. Also get rid of everything - * being "virtual", since it may stop the compiler from inlining properly! - */ -#define private public -#define virtual - -/* Rename the class the name of our DSP. */ -#define mydsp Square - -/* - * FAUST class - */ -<> - -#undef private -#undef virtual -#undef mydsp - -/* - * ChucK glue code - */ -static t_CKUINT Square_offset_data = 0; -static int g_sr = 44100; -static int g_nChans = 1; - -CK_DLL_CTOR(Square_ctor) -{ - // return data to be used later - Square *d = new Square; - OBJ_MEMBER_UINT(SELF, Square_offset_data) = (t_CKUINT)d; - d->init(g_sr); - d->ck_frame_in = new SAMPLE*[g_nChans]; - d->ck_frame_out = new SAMPLE*[g_nChans]; -} - -CK_DLL_DTOR(Square_dtor) -{ - Square *d = (Square*)OBJ_MEMBER_UINT(SELF, Square_offset_data); - - delete[] d->ck_frame_in; - delete[] d->ck_frame_out; - - delete d; - - OBJ_MEMBER_UINT(SELF, Square_offset_data) = 0; -} - -// mono tick -CK_DLL_TICK(Square_tick) -{ - Square *d = (Square*)OBJ_MEMBER_UINT(SELF, Square_offset_data); - - d->ck_frame_in[0] = ∈ - d->ck_frame_out[0] = out; - - d->compute(1, d->ck_frame_in, d->ck_frame_out); - - return TRUE; -} - -// multichannel tick -CK_DLL_TICKF(Square_tickf) -{ - Square *d = (Square*)OBJ_MEMBER_UINT(SELF, Square_offset_data); - - for(int f = 0; f < nframes; f++) - { - // fake-deinterleave - for(int c = 0; c < g_nChans; c++) - { - d->ck_frame_in[c] = &in[f*g_nChans+c]; - d->ck_frame_out[c] = &out[f*g_nChans+c]; - } - - d->compute(1, d->ck_frame_in, d->ck_frame_out); - } - - return TRUE; -} - - - -CK_DLL_QUERY(Square_query) -{ - g_sr = QUERY->srate; - - Square temp; // needed to get IO channel count - - QUERY->setname(QUERY, "Square"); - - QUERY->begin_class(QUERY, "Square", "UGen"); - QUERY->doc_class(QUERY, "Square"); - QUERY->add_ex(QUERY, "Square-test.ck"); - - QUERY->add_ctor(QUERY, Square_ctor); - QUERY->add_dtor(QUERY, Square_dtor); - - g_nChans = std::max(temp.getNumInputs(), temp.getNumOutputs()); - - if(g_nChans == 1) - QUERY->add_ugen_func(QUERY, Square_tick, NULL, g_nChans, g_nChans); - else - QUERY->add_ugen_funcf(QUERY, Square_tickf, NULL, g_nChans, g_nChans); - - // add member variable - Square_offset_data = QUERY->add_mvar( QUERY, "int", "@Square_data", FALSE ); - if( Square_offset_data == CK_INVALID_OFFSET ) goto error; - - - - // end import - QUERY->end_class(QUERY); - - return TRUE; - -error: - // end import - QUERY->end_class(QUERY); - - return FALSE; -} diff --git a/Square/SquareF.dsp.cpp b/Square/SquareF.dsp.cpp deleted file mode 100644 index 5a3114a6..00000000 --- a/Square/SquareF.dsp.cpp +++ /dev/null @@ -1,341 +0,0 @@ -/* ------------------------------------------------------------ -author: "Grame" -copyright: "(c)GRAME 2006" -license: "BSD" -name: "Square" -version: "1.0" -Code generated with Faust 2.74.5. (https://faust.grame.fr) -Compilation options: -a .faust2ck_tmp/SquareF.dsp-wrapper.cpp -lang cpp -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0 ------------------------------------------------------------- */ - -#ifndef __mydsp_H__ -#define __mydsp_H__ - -#include "chugin.h" -// #include "chuck_dl.h" - -#include -#include -#include - -#include -#include -#include -#include - -//------------------------------------------------------------------- -// Generic min and max using C++ inline -//------------------------------------------------------------------- - -inline int lsr (int x, int n) { return int(((unsigned int)x) >> n); } -inline int int2pow2 (int x) { int r=0; while ((1< -{ - void declare(const char* key, const char* value) - { - (*this)[key] = value; - } -}; - -/* UI class - do-nothing (from FAUST/minimal.cpp) */ - -#ifdef WIN32 -#ifdef interface -#undef interface -#endif // interface -#endif // WIN32 - -#ifndef FAUSTFLOAT -#define FAUSTFLOAT float -#endif - -class Soundfile; - -class UI -{ - public: - virtual ~UI() {} - - // active widgets - virtual void addButton(const char* label, FAUSTFLOAT* zone) = 0; - virtual void addCheckButton(const char* label, FAUSTFLOAT* zone) = 0; - virtual void addVerticalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0; - virtual void addHorizontalSlider(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0; - virtual void addNumEntry(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT init, FAUSTFLOAT min, FAUSTFLOAT max, FAUSTFLOAT step) = 0; - - // passive widgets - virtual void addHorizontalBargraph(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT min, FAUSTFLOAT max) = 0; - virtual void addVerticalBargraph(const char* label, FAUSTFLOAT* zone, FAUSTFLOAT min, FAUSTFLOAT max) = 0; - - // layout widgets - virtual void openTabBox(const char* label) = 0; - virtual void openHorizontalBox(const char* label) = 0; - virtual void openVerticalBox(const char* label) = 0; - virtual void closeBox() = 0; - - // soundfiles - - virtual void addSoundfile(const char* label, const char* filename, Soundfile** sf_zone) = 0; - - virtual void declare(FAUSTFLOAT* zone, const char* key, const char* value) {} -}; - -class dsp -{ - public: - virtual ~dsp() {} - - virtual int getNumInputs() = 0; - virtual int getNumOutputs() = 0; - virtual void buildUserInterface(UI* interface) = 0; - virtual int getSampleRate() = 0; - virtual void init(int samplingRate) = 0; - virtual void instanceInit(int sample_rate) = 0; - virtual void instanceConstants(int sample_rate) = 0; - virtual void instanceResetUserInterface() = 0; - virtual void instanceClear() = 0; - virtual dsp* clone() = 0; - virtual void metadata(Meta* m) = 0; - virtual void compute(int len, FAUSTFLOAT** inputs, FAUSTFLOAT** outputs) = 0; - - SAMPLE ** ck_frame_in; - SAMPLE ** ck_frame_out; -}; - -/* - * FAUST intrinsic - */ - -/* - * FAUST defines UI values as private, but provides no getters/setters. - * In our particular case it's way more convenient to access them directly - * than to set up a complicated UI structure. Also get rid of everything - * being "virtual", since it may stop the compiler from inlining properly! - */ -#define private public -#define virtual - -/* Rename the class the name of our DSP. */ -#define mydsp Square - -/* - * FAUST class - */ -#ifndef FAUSTFLOAT -#define FAUSTFLOAT float -#endif - -#include -#include -#include - -#ifndef FAUSTCLASS -#define FAUSTCLASS mydsp -#endif - -#ifdef __APPLE__ -#define exp10f __exp10f -#define exp10 __exp10 -#endif - -#if defined(_WIN32) -#define RESTRICT __restrict -#else -#define RESTRICT __restrict__ -#endif - - -class mydsp : public dsp { - - private: - - int fSampleRate; - - public: - mydsp() { - } - - void metadata(Meta* m) { - m->declare("author", "Grame"); - m->declare("compile_options", "-a .faust2ck_tmp/SquareF.dsp-wrapper.cpp -lang cpp -ct 1 -es 1 -mcd 16 -mdd 1024 -mdy 33 -single -ftz 0"); - m->declare("copyright", "(c)GRAME 2006"); - m->declare("filename", "SquareF.dsp"); - m->declare("license", "BSD"); - m->declare("name", "Square"); - m->declare("version", "1.0"); - } - - virtual int getNumInputs() { - return 2; - } - virtual int getNumOutputs() { - return 1; - } - - static void classInit(int sample_rate) { - } - - virtual void instanceConstants(int sample_rate) { - fSampleRate = sample_rate; - } - - virtual void instanceResetUserInterface() { - } - - virtual void instanceClear() { - } - - virtual void init(int sample_rate) { - classInit(sample_rate); - instanceInit(sample_rate); - } - - virtual void instanceInit(int sample_rate) { - instanceConstants(sample_rate); - instanceResetUserInterface(); - instanceClear(); - } - - virtual mydsp* clone() { - return new mydsp(); - } - - virtual int getSampleRate() { - return fSampleRate; - } - - virtual void buildUserInterface(UI* ui_interface) { - ui_interface->openVerticalBox("Square"); - ui_interface->closeBox(); - } - - virtual void compute(int count, FAUSTFLOAT** RESTRICT inputs, FAUSTFLOAT** RESTRICT outputs) { - FAUSTFLOAT* input0 = inputs[0]; - FAUSTFLOAT* input1 = inputs[1]; - FAUSTFLOAT* output0 = outputs[0]; - for (int i0 = 0; i0 < count; i0 = i0 + 1) { - output0[i0] = FAUSTFLOAT(3.0f * float(input0[i0]) * float(input1[i0])); - } - } - -}; - -#undef private -#undef virtual -#undef mydsp - -/* - * ChucK glue code - */ -static t_CKUINT Square_offset_data = 0; -static int g_sr = 44100; -static int g_nChans = 1; - -CK_DLL_CTOR(Square_ctor) -{ - // return data to be used later - Square *d = new Square; - OBJ_MEMBER_UINT(SELF, Square_offset_data) = (t_CKUINT)d; - d->init(g_sr); - d->ck_frame_in = new SAMPLE*[g_nChans]; - d->ck_frame_out = new SAMPLE*[g_nChans]; -} - -CK_DLL_DTOR(Square_dtor) -{ - Square *d = (Square*)OBJ_MEMBER_UINT(SELF, Square_offset_data); - - delete[] d->ck_frame_in; - delete[] d->ck_frame_out; - - delete d; - - OBJ_MEMBER_UINT(SELF, Square_offset_data) = 0; -} - -// mono tick -CK_DLL_TICK(Square_tick) -{ - Square *d = (Square*)OBJ_MEMBER_UINT(SELF, Square_offset_data); - - d->ck_frame_in[0] = ∈ - d->ck_frame_out[0] = out; - - d->compute(1, d->ck_frame_in, d->ck_frame_out); - - return TRUE; -} - -// multichannel tick -CK_DLL_TICKF(Square_tickf) -{ - Square *d = (Square*)OBJ_MEMBER_UINT(SELF, Square_offset_data); - - for(int f = 0; f < nframes; f++) - { - // fake-deinterleave - for(int c = 0; c < g_nChans; c++) - { - d->ck_frame_in[c] = &in[f*g_nChans+c]; - d->ck_frame_out[c] = &out[f*g_nChans+c]; - } - - d->compute(1, d->ck_frame_in, d->ck_frame_out); - } - - return TRUE; -} - - - -CK_DLL_QUERY(Square_query) -{ - g_sr = QUERY->srate; - - Square temp; // needed to get IO channel count - - QUERY->setname(QUERY, "Square"); - - QUERY->begin_class(QUERY, "Square", "UGen"); - QUERY->doc_class(QUERY, "Square"); - QUERY->add_ex(QUERY, "Square-test.ck"); - - QUERY->add_ctor(QUERY, Square_ctor); - QUERY->add_dtor(QUERY, Square_dtor); - - g_nChans = std::max(temp.getNumInputs(), temp.getNumOutputs()); - - if(g_nChans == 1) - QUERY->add_ugen_func(QUERY, Square_tick, NULL, g_nChans, g_nChans); - else - QUERY->add_ugen_funcf(QUERY, Square_tickf, NULL, g_nChans, g_nChans); - - // add member variable - Square_offset_data = QUERY->add_mvar( QUERY, "int", "@Square_data", FALSE ); - if( Square_offset_data == CK_INVALID_OFFSET ) goto error; - - - - // end import - QUERY->end_class(QUERY); - - return TRUE; - -error: - // end import - QUERY->end_class(QUERY); - - return FALSE; -} - -#endif diff --git a/freeverbStereo (copy).dsp b/freeverbStereo (copy).dsp deleted file mode 100644 index f77498cc..00000000 --- a/freeverbStereo (copy).dsp +++ /dev/null @@ -1,132 +0,0 @@ -declare name "FreeverbStereo"; -declare version "0.0"; -declare author "RM-CC"; -declare description "Original freeverb demo application, modified so it doesn't mix inputs to mono"; - -import("stdfaust.lib"); - -//===============================Freeverb=================================== -// compile with faust2jaqt freeverbStereo.dsp -// or no gui with faust2jackconsole freeverbStereo.dsp -// only change is to remove the following + <: -// stereo_freeverb(fb1, fb2, damp, spread) = + <: mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread); -// so it's now -// stereo_freeverb(fb1, fb2, damp, spread) = mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread); -//========================================================================== - -//----------------------------`(re.)mono_freeverb`------------------------- -// A simple Schroeder reverberator primarily developed by "Jezar at Dreampoint" that -// is extensively used in the free-software world. It uses four Schroeder allpasses in -// series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each -// audio channel, and is said to be especially well tuned. -// -// `mono_freeverb` is a standard Faust function. -// -// #### Usage -// -// ``` -// _ : mono_freeverb(fb1, fb2, damp, spread) : _; -// ``` -// -// Where: -// -// * `fb1`: coefficient of the lowpass comb filters (0-1) -// * `fb2`: coefficient of the allpass comb filters (0-1) -// * `damp`: damping of the lowpass comb filter (0-1) -// * `spread`: spatial spread in number of samples (for stereo) -// -// #### License -// While this version is licensed LGPL (with exception) along with other GRAME -// library functions, the file freeverb.dsp in the examples directory of older -// Faust distributions, such as faust-0.9.85, was released under the BSD license, -// which is less restrictive. -//------------------------------------------------------------ -// TODO: author RM -mono_freeverb(fb1, fb2, damp, spread) = _ <: par(i,8,lbcf(combtuningL(i)+spread,fb1,damp)) - :> seq(i,4,fi.allpass_comb(1024, allpasstuningL(i)+spread, -fb2)) -with { - - // Filters parameters - combtuningL(0) = adaptSR(1116); - combtuningL(1) = adaptSR(1188); - combtuningL(2) = adaptSR(1277); - combtuningL(3) = adaptSR(1356); - combtuningL(4) = adaptSR(1422); - combtuningL(5) = adaptSR(1491); - combtuningL(6) = adaptSR(1557); - combtuningL(7) = adaptSR(1617); - - allpasstuningL(0) = adaptSR(556); - allpasstuningL(1) = adaptSR(441); - allpasstuningL(2) = adaptSR(341); - allpasstuningL(3) = adaptSR(225); - - // Lowpass Feedback Combfilter: - // https://ccrma.stanford.edu/~jos/pasp/Lowpass_Feedback_Comb_Filter.html - lbcf(dt, fb, damp) = (+:@(dt)) ~ (*(1-damp) : (+ ~ *(damp)) : *(fb)); - - origSR = 44100; - adaptSR(val) = val*ma.SR/origSR : int; - -}; - -//----------------------------`(re.)stereo_freeverb`------------------------- -// A simple Schroeder reverberator primarily developed by "Jezar at Dreampoint" that -// is extensively used in the free-software world. It uses four Schroeder allpasses in -// series and eight parallel Schroeder-Moorer filtered-feedback comb-filters for each -// audio channel, and is said to be especially well tuned. -// -// #### Usage -// -// ``` -// _,_ : stereo_freeverb(fb1, fb2, damp, spread) : _,_; -// ``` -// -// Where: -// -// * `fb1`: coefficient of the lowpass comb filters (0-1) -// * `fb2`: coefficient of the allpass comb filters (0-1) -// * `damp`: damping of the lowpass comb filter (0-1) -// * `spread`: spatial spread in number of samples (for stereo) -//------------------------------------------------------------ -// TODO: author RM -stereo_freeverb(fb1, fb2, damp, spread) = mono_freeverb(fb1, fb2, damp, 0), mono_freeverb(fb1, fb2, damp, spread); - -//----------------------------`(dm.)freeverb_demo`------------------------- -// Freeverb demo application. -// -// #### Usage -// -// ``` -// _,_ : freeverb_demo : _,_; -// ``` -//------------------------------------------------------------ -// Author: Romain Michon -// License: LGPL -freeverb_demo = _,_ <: (*(g)*fixedgain,*(g)*fixedgain : - stereo_freeverb(combfeed, allpassfeed, damping, spatSpread)), - *(1-g), *(1-g) :> _,_ -with{ - scaleroom = 0.28; - offsetroom = 0.7; - allpassfeed = 0.5; - scaledamp = 0.4; - fixedgain = 1.0; - origSR = 44100; - - parameters(x) = hgroup("Freeverb",x); - knobGroup(x) = parameters(vgroup("[0]",x)); - damping = knobGroup(vslider("[0] Damp [style: knob] [tooltip: Somehow control the - density of the reverb.]",0.5, 0, 1, 0.025)*scaledamp*origSR/ma.SR); - combfeed = knobGroup(vslider("[1] RoomSize [style: knob] [tooltip: The room size - between 0 and 1 with 1 for the largest room.]", 0.5, 0, 1, 0.025)*scaleroom* - origSR/ma.SR + offsetroom); - spatSpread = knobGroup(vslider("[2] Stereo Spread [style: knob] [tooltip: Spatial - spread between 0 and 1 with 1 for maximum spread.]",0.5,0,1,0.01)*46*ma.SR/origSR - : int); - g = parameters(vslider("[1] Wet [tooltip: The amount of reverb applied to the signal - between 0 and 1 with 1 for the maximum amount of reverb.]", 0.12, 0, 1, 0.025)); -}; - -process = freeverb_demo; -