From cdf8ded57019d5c905f16422d40be7b1a18ab3bc Mon Sep 17 00:00:00 2001 From: Tom Schouten Date: Tue, 21 Jan 2003 10:18:19 +0000 Subject: This commit was generated by cvs2svn to compensate for changes in r350, which included commits to RCS files with non-trunk default branches. svn path=/trunk/externals/creb/; revision=351 --- system/Makefile | 8 +++++++ system/envelope_util.c | 33 ++++++++++++++++++++++++++ system/setup.c | 64 ++++++++++++++++++++++++++++++++++++++++++++++++++ 3 files changed, 105 insertions(+) create mode 100644 system/Makefile create mode 100644 system/envelope_util.c create mode 100644 system/setup.c (limited to 'system') 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(); + +} -- cgit v1.2.1