From d9f6d5fdd0bcbb0de75c756fc3e821a883eed589 Mon Sep 17 00:00:00 2001 From: v7b1 Date: Thu, 27 Jan 2022 23:10:34 +0100 Subject: [PATCH] clean up sigmund_tilde --- .../projects/sigmund_tilde/sigmund_tilde.cpp | 30 ++++--------------- 1 file changed, 5 insertions(+), 25 deletions(-) diff --git a/source/projects/sigmund_tilde/sigmund_tilde.cpp b/source/projects/sigmund_tilde/sigmund_tilde.cpp index cbc7922..df9f1c5 100644 --- a/source/projects/sigmund_tilde/sigmund_tilde.cpp +++ b/source/projects/sigmund_tilde/sigmund_tilde.cpp @@ -25,28 +25,9 @@ using namespace c74::max; static t_class* sigmund_class = nullptr; - -//#define MSP // compile a 64 bit version for MaxMSP - -// -//#ifdef PD -//#include "m_pd.h" -//#endif -//#ifdef MSP -//#include "ext.h" -//#include "z_dsp.h" -//#include "ext_support.h" -//#include "ext_proto.h" -//#include "ext_obex.h" typedef double t_samplearg; -typedef double t_sample; -#define PI M_PI -#define t_resizebytes(a, b, c) t_resizebytes((char *)(a), (b), (c)) -//#endif -#ifdef _MSC_VER /* this is only needed with Microsoft's compiler */ -__declspec(dllimport) extern -#endif + void mayer_realfft(int npoints, t_sample *buf); /* this routine is passed a buffer of npoints values, and returns the @@ -266,7 +247,7 @@ static void sigmund_remask(int maxbin, int bestindex, t_sample powmask, #define PEAKTHRESHFACTOR 0.6 -#pragma mark GET RAW PEAKS ------------- +// GET RAW PEAKS ------------- static void sigmund_getrawpeaks(int npts, t_sample *insamps, int npeak, t_peak *peakv, int *nfound, t_sample *power, t_sample srate, int loud, @@ -809,7 +790,7 @@ static void notefinder_doit(t_notefinder *x, t_sample freq, t_sample power, /**************** object structure for Pd and Max. *********************/ -#pragma mark MSP+ Pd Object structure --------- + /* From here onward, the code is specific to eithr Pd, Max, or both. If neither "PD 'nor "MSP" is defined, none of this is compiled, so that the whole file can be included in other, non-PD and non-Max projects. */ @@ -997,7 +978,8 @@ static void sigmund_minpower(t_sigmund *x, t_samplearg f) x->x_minpower = f; } -#pragma mark DO THE WORK + OUTPUT ------- +// DO THE WORK + OUTPUT ------- + static void sigmund_doit(t_sigmund *x, int npts, t_sample *arraypoints, int loud, float srate) { @@ -1063,7 +1045,6 @@ static void sigmund_doit(t_sigmund *x, int npts, t_sample *arraypoints, } -#pragma mark DSP SETUP ------- // vb, 64-bit dsp method void sigmund_perform64(t_sigmund *x, t_object *dsp64, double **ins, long numins, @@ -1125,7 +1106,6 @@ static void sigmund_free(t_sigmund *x) /************************ Max/MSP glue **********************************/ -#pragma mark MSP GLUE -------------------- //static void *sigmund_class;