aboutsummaryrefslogtreecommitdiff
path: root/system
diff options
context:
space:
mode:
Diffstat (limited to 'system')
-rw-r--r--system/Makefile8
-rw-r--r--system/envelope_util.c33
-rw-r--r--system/setup.c64
3 files changed, 105 insertions, 0 deletions
diff --git a/system/Makefile b/system/Makefile
new file mode 100644
index 0000000..12666a4
--- /dev/null
+++ b/system/Makefile
@@ -0,0 +1,8 @@
+include ../Makefile.config
+
+all: setup.o envelope_util.o
+
+clean:
+ rm -f *.o
+ rm -f *~
+
diff --git a/system/envelope_util.c b/system/envelope_util.c
new file mode 100644
index 0000000..7117149
--- /dev/null
+++ b/system/envelope_util.c
@@ -0,0 +1,33 @@
+/*
+ * Utility functions for exponential decay
+ * Copyright (c) 2000-2003 by Tom Schouten
+ *
+ * This program 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; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program 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 this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+
+#include "extlib_util.h"
+
+float milliseconds_2_one_minus_realpole(float time)
+{
+ float r;
+
+ if (time < 0.0f) time = 0.0f;
+ r = -expm1(1000.0f * log(ENVELOPE_RANGE) / (sys_getsr() * time));
+ if (!(r < 1.0f)) r = 1.0f;
+
+ //post("%f",r);
+ return r;
+}
diff --git a/system/setup.c b/system/setup.c
new file mode 100644
index 0000000..b425f84
--- /dev/null
+++ b/system/setup.c
@@ -0,0 +1,64 @@
+#include "m_pd.h"
+
+void ead_tilde_setup(void);
+void ear_tilde_setup(void);
+void eadsr_tilde_setup(void);
+void dist_tilde_setup(void);
+void tabreadmix_tilde_setup(void);
+void xfm_tilde_setup(void);
+void biquadseries_tilde_setup(void);
+void filterortho_tilde_setup(void);
+void qmult_tilde_setup(void);
+void qnorm_tilde_setup(void);
+void cheby_tilde_setup(void);
+void abs_tilde_setup(void);
+void ramp_tilde_setup(void);
+void dwt_tilde_setup(void);
+void bfft_tilde_setup(void);
+void dynwav_tilde_setup(void);
+void statwav_tilde_setup(void);
+void bdiag_tilde_setup(void);
+void diag_tilde_setup(void);
+void matrix_tilde_setup(void);
+void permut_tilde_setup(void);
+void lattice_tilde_setup(void);
+void ratio_setup(void);
+void ffpoly_setup(void);
+void fwarp_setup(void);
+
+void creb_setup(void)
+{
+ post("CREB: version " CREB_VERSION);
+
+ /* setup tilde objects */
+ ead_tilde_setup();
+ ear_tilde_setup();
+ eadsr_tilde_setup();
+ dist_tilde_setup();
+ tabreadmix_tilde_setup();
+ xfm_tilde_setup();
+ qmult_tilde_setup();
+ qnorm_tilde_setup();
+ cheby_tilde_setup();
+ abs_tilde_setup();
+ ramp_tilde_setup();
+ dwt_tilde_setup();
+ bfft_tilde_setup();
+ dynwav_tilde_setup();
+ statwav_tilde_setup();
+ bdiag_tilde_setup();
+ diag_tilde_setup();
+ matrix_tilde_setup();
+ permut_tilde_setup();
+ lattice_tilde_setup();
+
+ /* setup other objects */
+ ratio_setup();
+ ffpoly_setup();
+ fwarp_setup();
+
+ /* setup c++ modules */
+ biquadseries_tilde_setup();
+ filterortho_tilde_setup();
+
+}