diff options
author | Miller Puckette <millerpuckette@users.sourceforge.net> | 2007-12-28 03:43:06 +0000 |
---|---|---|
committer | Miller Puckette <millerpuckette@users.sourceforge.net> | 2007-12-28 03:43:06 +0000 |
commit | 019c0e56579fe7f94982434d8efcd7b00d8df0aa (patch) | |
tree | b221f8e00973d9a501ed7085e9f2b95fabb0009a /pd/src/x_acoustics.c | |
parent | 44e68e4348f7ca86f4209f3f86ac7b6cb49acd52 (diff) |
... and again trying to check in 0.41-0 test 10
svn path=/trunk/; revision=9108
Diffstat (limited to 'pd/src/x_acoustics.c')
-rw-r--r-- | pd/src/x_acoustics.c | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/pd/src/x_acoustics.c b/pd/src/x_acoustics.c index eca2d32b..e07a4231 100644 --- a/pd/src/x_acoustics.c +++ b/pd/src/x_acoustics.c @@ -9,39 +9,39 @@ #include <math.h> #define LOGTEN 2.302585092994 -float mtof(float f) +t_float mtof(t_float f) { if (f <= -1500) return(0); else if (f > 1499) return(mtof(1499)); else return (8.17579891564 * exp(.0577622650 * f)); } -float ftom(float f) +t_float ftom(t_float f) { return (f > 0 ? 17.3123405046 * log(.12231220585 * f) : -1500); } -float powtodb(float f) +t_float powtodb(t_float f) { if (f <= 0) return (0); else { - float val = 100 + 10./LOGTEN * log(f); + t_float val = 100 + 10./LOGTEN * log(f); return (val < 0 ? 0 : val); } } -float rmstodb(float f) +t_float rmstodb(t_float f) { if (f <= 0) return (0); else { - float val = 100 + 20./LOGTEN * log(f); + t_float val = 100 + 20./LOGTEN * log(f); return (val < 0 ? 0 : val); } } -float dbtopow(float f) +t_float dbtopow(t_float f) { if (f <= 0) return(0); @@ -53,7 +53,7 @@ float dbtopow(float f) } } -float dbtorms(float f) +t_float dbtorms(t_float f) { if (f <= 0) return(0); |