Jamoma API  0.6.0.a19
TTDataspaceLib.h
Go to the documentation of this file.
1 /** @file
2  *
3  * @ingroup foundationDataspaceLib
4  *
5  * @brief This library provides convertions between different measurement units for values relating to time, color, distance, gain. and more.
6  *
7  * @details The DataspaceLib enables other parts of the Jamoma project to address the values of parameters and attributes in different, interchangeable measurement units. For each type of data (e.g. trigonometrical angels), a _neutral_ unit is defined. Methods are then provided for converting between each alternative unit and the neutral unit. Wherever relevant the neutral unit is chosen in accordance with the international system of units of measurement.
8  *
9  * @authors Tim Place, Trond Lossius, Nils Peters, Pascal Baltazar, Alexander Refsum Jensenious, Theo de la Hogue, ...
10  *
11  * @copyright Copyright © 2007 by the Jamoma developers @n
12  * This code is licensed under the terms of the "New BSD License" @n
13  * http://creativecommons.org/licenses/BSD/
14  */
15 
16 
17 #ifndef __DATASPACELIB_H__
18 #define __DATASPACELIB_H__
19 
20 //#ifdef WIN_VERSION
21 // #pragma warning(disable:4083) //warning C4083: expected 'newline'; found identifier 's'
22 //#endif // WIN_VERSION
23 
24 #include "TTFoundationAPI.h"
25 
26 // Macros used to export classes and methods so that we can use linking in performance-critical code
27 #if defined( TT_PLATFORM_MAC ) || defined ( TT_PLATFORM_LINUX )
28  #define TT_DATASPACE_EXPORT TTFOUNDATION_EXPORT
29 #else
30  #ifdef TT_DATASPACE_LIB
31  #define TT_DATASPACE_EXPORT __declspec(dllexport)
32  #else
33  #define TT_DATASPACE_EXPORT __declspec(dllimport)
34  #endif
35 #endif
36 
37 
38 /*
39 // these constants are now in TTBase.h
40 // Constants used for trigonometric convertions:
41 static const double kRadiansToDegrees = 180.0 / kTTPi;
42 static const double kDegreesToRadians = kTTPi / 180.0;
43 
44 // This coeff is used in GainDataspace mapping MIDI to and from linear gain
45 // so that MIDI=100 equals 0 dB and MIDI = 127 equals +10 dB
46 static const double kGainMidiPower = log(pow(10.,10./20.))/log(127./100.);
47 static const double kGainMidiPowerInv = 1./kGainMidiPower;
48 
49 // This coeff is used for some of the color convertions:
50 static const double inv255 = 1./255.;
51 */
52 
53 #endif // __DATASPACELIB_H__