Go to the documentation of this file.00001
00002 #ifndef DYNAMICS_H
00003 #define DYNAMICS_H
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018 #include <math.h>
00019
00022
00027
00032 template<class Type> inline Type dBCoefficient( Type x, Type ref = 1.0 ) { Return( pow(10.0, x / 20.0 ) / ref); }
00033
00034
00039 template<class Type> inline Type dBSPL( Type x, Type ref = 1.0 ) { Return 20.0 * log10(x / ref); }
00040
00045 template<class Type> inline Type dBSIL( Type x, Type ref = 1.0 ) { Return 10.0 * log10(x / ref); }
00047
00048
00053
00054 Const Real
00055 Fff = dBCoefficient(-10.0),
00056 Ff = dBCoefficient(-18.0),
00057 Forte = dBCoefficient(-24.0),
00058 Mf = dBCoefficient(-32.0),
00059 Mp = dBCoefficient(-40.0),
00060 P = dBCoefficient(-48.0),
00061 Pp = dBCoefficient(-56.0),
00062 Ppp = dBCoefficient(-64.0)
00063 ;
00065
00066 #endif // DYNAMICS_H