Mercurial > hg > multitrack-audio-matcher
view src/AccompanimentSynchroniser.h @ 53:5274e3b5479d
Smoothed output, added tempo distribution variation to match the output
author | Andrew N Robertson <andrew.robertson@eecs.qmul.ac.uk> |
---|---|
date | Tue, 14 Aug 2012 21:45:12 +0100 |
parents | f5de07b4d733 |
children |
line wrap: on
line source
/* * AccompanimentSynchroniser.h * MultipleAudioMathcher * * Created by Andrew on 06/02/2012. * Copyright 2012 QMUL. All rights reserved. * */ #ifndef ACCOMPANIMENT_SYNCHRONISER_H #define ACCOMPANIMENT_SYNCHRONISER_H #include "ofxOsc.h" #define HOST "localhost" #define SENDER_PORT 10875 #include "ofMain.h" class AccompanimentSynchroniser{ public: AccompanimentSynchroniser(); void reset(); void setPlayingRatio(const double& ratio, const double& timePlayed); void setRecordedPosition(); void updateRecordedPosition(const double& currentAlignmentPosition, const double& timeSent); void updateOutputSpeed(); int counter ; double fileLengthSamples; double playingPositionRatio; double playingPositionSamples; double playingPositionMillis; double playingPositionTimeSent; double recordedPositionMillis; double recordedPositionTimeSent; double speed, smoothedSpeedOutput; double movingAverageWeighting, difference; private: ofxOscSender sender; void sendSpeed(double const& val); }; #endif