comparison src/AccompanimentSynchroniser.h @ 16:680ba08e9925

Auto synchroniser added using the elastique~ object in max
author Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk>
date Mon, 06 Feb 2012 12:18:40 +0000
parents
children c96b18dd0f48
comparison
equal deleted inserted replaced
15:780def3a1f36 16:680ba08e9925
1 /*
2 * AccompanimentSynchroniser.h
3 * MultipleAudioMathcher
4 *
5 * Created by Andrew on 06/02/2012.
6 * Copyright 2012 QMUL. All rights reserved.
7 *
8 */
9
10
11 #ifndef ACCOMPANIMENT_SYNCHRONISER_H
12 #define ACCOMPANIMENT_SYNCHRONISER_H
13
14 #include "ofxOsc.h"
15 #define HOST "localhost"
16 #define SENDER_PORT 10875
17
18 #include "ofMain.h"
19
20
21 class AccompanimentSynchroniser{
22
23 public:
24 AccompanimentSynchroniser();
25
26 void setPlayingRatio(const double& ratio, const double& timePlayed);
27 void setRecordedPosition();
28 void updateRecordedPosition(const double& currentAlignmentPosition);
29
30 void updateOutputSpeed();
31
32 double fileLengthSamples;
33
34
35
36 double playingPositionRatio;
37 double playingPositionSamples;
38 double playingPositionMillis;
39 double playingPositionTimeSent;
40
41 private:
42
43 double recordedPositionMillis;
44
45 double speed;
46
47 ofxOscSender sender;
48 void sendSpeed(double const& val);
49
50 };
51 #endif