[PD-cvs] externals/creb/modules eadsr~.c, 1.4, 1.5 ead~.c, 1.4, 1.5 ear~.c, 1.4, 1.5
Hans-Christoph Steiner
eighthave at users.sourceforge.net
Tue Aug 22 02:58:27 CEST 2006
Update of /cvsroot/pure-data/externals/creb/modules
In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14746
Modified Files:
eadsr~.c ead~.c ear~.c
Log Message:
appended creb/system/envelope_util.c as a temporary fix to get things compiling, like I did before
Index: eadsr~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/creb/modules/eadsr~.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** eadsr~.c 15 Aug 2006 15:11:52 -0000 1.4
--- eadsr~.c 22 Aug 2006 00:58:25 -0000 1.5
***************
*** 179,180 ****
--- 179,213 ----
}
+ /*
+ * 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;
+ }
Index: ear~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/creb/modules/ear~.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ear~.c 15 Aug 2006 15:11:52 -0000 1.4
--- ear~.c 22 Aug 2006 00:58:25 -0000 1.5
***************
*** 141,142 ****
--- 141,175 ----
}
+ /*
+ * 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;
+ }
Index: ead~.c
===================================================================
RCS file: /cvsroot/pure-data/externals/creb/modules/ead~.c,v
retrieving revision 1.4
retrieving revision 1.5
diff -C2 -d -r1.4 -r1.5
*** ead~.c 15 Aug 2006 15:11:52 -0000 1.4
--- ead~.c 22 Aug 2006 00:58:25 -0000 1.5
***************
*** 158,159 ****
--- 158,192 ----
}
+ /*
+ * 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;
+ }
More information about the Pd-cvs
mailing list