libmoldeo (Moldeo 1.0 Core)  1.0
libmoldeo is the group of objects and functions that executes the basic operations of Moldeo 1.0 Platform.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
moTempo.h
Go to the documentation of this file.
1 /*******************************************************************************
2 
3  moTempo.h
4 
5  ****************************************************************************
6  * *
7  * This source is free software; you can redistribute it and/or modify *
8  * it under the terms of the GNU General Public License as published by *
9  * the Free Software Foundation; either version 2 of the License, or *
10  * (at your option) any later version. *
11  * *
12  * This code is distributed in the hope that it will be useful, but *
13  * WITHOUT ANY WARRANTY; without even the implied warranty of *
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU *
15  * General Public License for more details. *
16  * *
17  * A copy of the GNU General Public License is available on the World *
18  * Wide Web at <http://www.gnu.org/copyleft/gpl.html>. You can also *
19  * obtain it by writing to the Free Software Foundation, *
20  * Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. *
21  * *
22  ****************************************************************************
23 
24  Copyright(C) 2006 Fabricio Costa
25 
26  Authors:
27  Fabricio Costa
28  Andres Colubri
29 
30 *******************************************************************************/
31 
32 #include "moTimer.h"
33 
34 #ifndef __MO_TEMPO_H
35 #define __MO_TEMPO_H
36 
38 
44 class LIBMOLDEO_API moTempo : public moTimer {
45 
46 public:
47  moTempo();
48  moTempo( const moTempo &src);
49 
50  virtual ~moTempo();
51  moTempo &operator = (const moTempo &src);
52 
53  virtual long Duration();
54 
55 private:
56  moTempo* m_pFromTempo;
57 
58 public:
60  MOulong ticks; //getticks() milisegundos del clock
61 
63  MOulong ticks_0; //primer beat
64 
66  MOulong ticks_1; //segundo beat
67 
71 
74 
77 
80 
81  MOdouble ang; //angulo en radianes entre 0 y 2*pi
82 
84  MOulong beat_0,beat_1, beatpulsecount;
85 
86  MOboolean Init();
87 
88  MOboolean Init(MOdouble sync);
89 
90  MOdouble getPrincipalAngle();
91 
92 
98  MOdouble getTempo();
99 
100  void BeatPulse(MOulong tik);
101 
102  moTempo* getFromTempo();
103 
104  void SetFromTempo( moTempo *pfromtempo );
105 
106  void getInterpolatedTempo( MOfloat inter_value );
107 };
108 
109 #endif
110 
#define MOulong
Definition: moTypes.h:392
Tempo, beat, ritmo.
Definition: moTempo.h:44
virtual long Duration()
Devuelve el valor del reloj del temporizador.
Definition: moTimer.cpp:211
#define MOboolean
Definition: moTypes.h:385
MOdouble deltaprevious
Definition: moTempo.h:70
MOdouble syncro
Syncronización o factor fraccionario, 1.0 predeterminado, sino KX donde K puede ser fraccional (un núme...
Definition: moTempo.h:79
#define LIBMOLDEO_API
Definition: moTypes.h:180
#define MOfloat
Definition: moTypes.h:403
MOdouble delta
variacion de frecuencia entre 0X y 2X, delta es real
Definition: moTempo.h:69
MOulong ticks_0
Primer tick del beat.
Definition: moTempo.h:63
MOulong ticks_1
Segundo tick del beat.
Definition: moTempo.h:66
MOdouble factor
Multiplicador a partir de 2X hasta KX, donde K en principio es entero.
Definition: moTempo.h:76
moTimer & operator=(const moTimer &src)
Definition: moTimer.cpp:188
MOulong ticks
tiempo en milisegundos (obsoleto) se usa moTimer ahora.
Definition: moTempo.h:60
#define MOdouble
Definition: moTypes.h:404
Clase para el control de un temporizador (relativo) con identificación
Definition: moTimer.h:321
MOdouble dt
incremento diferencial de tiempo
Definition: moTempo.h:73
MOulong beatpulsecount
Definition: moTempo.h:84
MOdouble ang
Definition: moTempo.h:81