summaryrefslogtreecommitdiff
path: root/libs/ardour/ardour/slave.h
AgeCommit message (Collapse)Author
2012-10-10MTC-slave: print error if framerate mismatchRobin Gareus
git-svn-id: svn://localhost/ardour2/branches/3.0@13231 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-10-10fix and improve MTC-slaveRobin Gareus
- MTC-speed average (MIDI thread) * base timing on quarter-frames * replace hann-window average with a DLL - MTC/engine alignment * replace 1st order PI-controller with 2nd order DLL The 2nd DLL is needed because the jack-process callback effectively quantizes the transport-speed to integer audio-frames (speed * nframes). This leaves a delta on every cycle because the remainder from previous cycles is not compensated for. Theoretically it is possible to merge the two DLLs into one. However, with callbacks coming from by two independent threads it is cleaner to track the MTC and JACK engine-alignment speeds independently. git-svn-id: svn://localhost/ardour2/branches/3.0@13226 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-07-25convert from Glib:: to Glib::Threads for all thread-related APIPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@13084 d708f5d6-7413-0410-9779-e7cbd77b26cf
2012-04-14Fix a few framecnt / framepos type confusions.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@11975 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-10-19Trim the include tree.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@10227 d708f5d6-7413-0410-9779-e7cbd77b26cf
2011-06-01Fix broken whitespace. I'd apologize for the compile times if it was my ↵David Robillard
fault :D git-svn-id: svn://localhost/ardour2/branches/3.0@9654 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-12-03Remove all use of nframes_t.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@8166 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus patch #2 for today: remove nframes64_t and sframes_t from sourcePaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@7792 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-09-17megaopus commit: (1) add __STD_(LIMIT|FORMAT)_MACROS to command line flags ↵Paul Davis
for cc and c++ builds, remove them from source (2) add new Property::midi_data used by MidiRegion to signal that its (MIDI) contents have changed (3) massive switch from nframes_t to framepos_t/framecnt_t including removal of ARDOUR::max_frames (replaced by ARDOUR::max_frame{pos,cnt} (lots more to do but this set was driven by changes to the Diskstream API to use framepos_t git-svn-id: svn://localhost/ardour2/branches/3.0@7791 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-04-01No-op: rename a few variables and add/fix some comments.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@6818 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-02-11some fixes/tweaks for MTC slaving, some untestedPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6676 d708f5d6-7413-0410-9779-e7cbd77b26cf
2010-01-29MIDIClock_SlaveTest: refactor as subclass of MIDIClock_Slave for testabilityHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@6587 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-19use new syntax for connecting to backend signals that enforces explicit ↵Paul Davis
connection scope, plus a few other related matters git-svn-id: svn://localhost/ardour2/branches/3.0@6376 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-17switch to using boost::signals2 instead of sigc++, at least for libardour. ↵Paul Davis
not finished yet, but compiles, loads sessions, records and can close a session without a crash git-svn-id: svn://localhost/ardour2/branches/3.0@6372 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-10drastic, deep and wide changes to make RouteGroup use ↵Paul Davis
boost::shared_ptr<Route> and boost::shared_ptr<RouteList> to better fit into emerging framework for "RT operations" ; torben's changes to MTC slaving code (sorry for bundling) git-svn-id: svn://localhost/ardour2/branches/3.0@6334 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-06Merged revisions 6293,6296-6306,6308 via svnmerge from Taybin Rutkin
svn+ssh://ardoursvn@subversion.ardour.org/ardour2/branches/build_fixes ........ r6293 | trutkin | 2009-12-05 08:49:37 -0500 (Sat, 05 Dec 2009) | 2 lines fix if-statement in build script ........ r6296 | trutkin | 2009-12-05 09:30:19 -0500 (Sat, 05 Dec 2009) | 5 lines rearrange GTKOSX and darwin dependencies - moved some GTKOSX include paths to generic darwin - made GTKOSX dependent on being on darwin anyways ........ r6297 | trutkin | 2009-12-05 09:35:09 -0500 (Sat, 05 Dec 2009) | 2 lines move coreaudio and audiounit handling to darwin section ........ r6298 | trutkin | 2009-12-05 09:53:40 -0500 (Sat, 05 Dec 2009) | 3 lines use True/False instead of 1/0 fix another if-statement where it should be an elif-statement ........ r6299 | trutkin | 2009-12-05 14:11:09 -0500 (Sat, 05 Dec 2009) | 10 lines fixes to get libardour building - can't cast away volatile, so copy _transport_frame before emitting it. - const_reverse_iterator::operator!=() isn't defined in this version of gcc. - removed annoying HERE WE ARE CAAudioFile.h #warning. - removed unnecessary include of sndfile.h in session.h. - we don't want to set -march=i686 on the mac, so indent this if-statement so it's only run on linux. - DEBUG_STR() fails in the NDEBUG case, so wrap its use in an #ifndef NDEBUG ........ r6300 | trutkin | 2009-12-05 15:48:29 -0500 (Sat, 05 Dec 2009) | 2 lines remove old scons-style CXXFLAGS_FOO in favor of just CXXFLAGS ........ r6301 | trutkin | 2009-12-05 16:01:10 -0500 (Sat, 05 Dec 2009) | 8 lines clean up configure flags - removed useless --aubio and --syslibs flags. The syslibs value is ignored as we don't bring our own libraries with us anymoreand we use aubio automatically if it's available - added ways to turn off fpu_optimization and NLS - fixed compiling on the mac without fpu_optimization ........ r6302 | trutkin | 2009-12-05 18:12:46 -0500 (Sat, 05 Dec 2009) | 5 lines go back to prior uselib method for COREAUDIO, AUDIOUNIT, and GTKOSX - fixed compile of CoreAudioSource - re-did inclusion of coremidi_midiport.cc to depend on COREAUDIO presence ........ r6303 | trutkin | 2009-12-05 18:59:02 -0500 (Sat, 05 Dec 2009) | 5 lines fixed compiler warnings about classes with virtual member functions, but no virtual destructor. - Changed Metering to not use foo() = 0; to indicate it shouldn't be instantiated, but private: Metering(), which is more idiomatic. ........ r6304 | trutkin | 2009-12-05 19:25:41 -0500 (Sat, 05 Dec 2009) | 2 lines TOP_MENUBAR isn't used when building ardour.menus. Removed. ........ r6305 | trutkin | 2009-12-05 19:46:11 -0500 (Sat, 05 Dec 2009) | 5 lines fix some AudioUnit compile errors - update AudioUnit to use ChanCount - fix some namespacing issues in audio_unit.h ........ r6306 | trutkin | 2009-12-05 20:08:48 -0500 (Sat, 05 Dec 2009) | 2 lines make --extra-warn useful ........ r6308 | trutkin | 2009-12-05 22:59:42 -0500 (Sat, 05 Dec 2009) | 10 lines fix compiling/linking with --coreaudio - rearrange ardour_ui.h header in editor.cc to avoid conflict - midi++ depends on OSX as well as COREAUDIO - fixed including frameworks - tweaked --extra-warn again. it's kinda redundent with --strict - improved indentation in wscript - use #ifdef HAVE_COREMIDI, not #if HAVE_COREMIDI. #if isn't interchangable with #ifdef and won't work if HAVE_COREMIDI is defined with no value. ........ git-svn-id: svn://localhost/ardour2/branches/3.0@6310 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-03more tweaks to MTC slave code (still not functional), including removing ↵Paul Davis
race conditions when resetting slave state; make Session catch on its own saved preferences, which has not been happening; make switching sync sources avoid race conditions git-svn-id: svn://localhost/ardour2/branches/3.0@6269 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-02more MTC stuff, including toggleable use of torben's PI controllerPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6265 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-01adjust to use timestamped MTC messagesPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6255 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-01more changes to try to improve MTC handling even in slightly pathological casesPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6245 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-01continue with MTC debuggingPaul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@6235 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-12-01rework MTC slave so that speed is computed in the MIDI I/O context, not ↵Paul Davis
process() context git-svn-id: svn://localhost/ardour2/branches/3.0@6233 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-11-08monster commit: transport mgmt changes from 2.X (omnibus edition); make ↵Paul Davis
slave use nframes64_t ; avoid crashes in Drags when commiting reversible transactions that do not exist git-svn-id: svn://localhost/ardour2/branches/3.0@6034 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-30Trim session.h include dependency tree.David Robillard
git-svn-id: svn://localhost/ardour2/branches/3.0@5979 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-10-14Strip trailing whitespace and fix other whitespace errors (e.g. space/tab ↵David Robillard
mixing). Whitespace changes only. Vimmers, try let c_space_errors = 1 in your .vimrc to highlight this kind of stuff in red. I don't know the emacs equivalent... git-svn-id: svn://localhost/ardour2/branches/3.0@5773 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-07-21Fix some unused parameter warnings.Carl Hetherington
git-svn-id: svn://localhost/ardour2/branches/3.0@5403 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-06-20midi clock slave: refactor for testabilityHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@5219 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-25*** NEW CODING POLICY ***David Robillard
All #include statements that include a header that is a part of a library bundled with ardour MUST use quotes, not angle brackets. Do this: #include "ardour/types.h" NOT this: #include <ardour/types.h> Rationale: This is best practice in general, to ensure we include the local version and not the system version. That quotes mean "local" (in some sense) and angle brackets mean "system" (in some sense) is a ubiquitous convention and IIRC right in the C spec somewhere. More pragmatically, this is required by (my) waf (stuff) for dependencies to work correctly. That is: !!! FAILURE TO DO THIS CAN RESULT IN BROKEN BUILDS !!! Failure to comply is punishable by death by torture. :) P.S. It's not that dramatic in all cases, but this (in combination with some GCC flags specific to the include type) is the best way I have found to be absolutely 100% positive the local ones are being used (and we definitely want to be absolutely 100% positive on that one). git-svn-id: svn://localhost/ardour2/branches/3.0@4655 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-14* fix concerning a comment on issue 2541: Go back to the last MIDI beat on stopHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@4548 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-13* MIDIClock_Slave: fixed bugs:Hans Baier
- not synced to session.audible_frame() but to session.transport_frame() - failed asserts in song position git-svn-id: svn://localhost/ardour2/branches/3.0@4543 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-02-12* MIDI clock slave: issues 2541 and 2542 ready for testing (cant test myself ↵Hans Baier
due to lack of hardware) * tempo.cc/tempo.h: formatting / whitespace git-svn-id: svn://localhost/ardour2/branches/3.0@4538 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-09* changed transport speed in session and slaves from float to doubleHans Baier
* added some comments git-svn-id: svn://localhost/ardour2/branches/3.0@4394 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-05* MIDI clock slave implementation with delay locked loop (DLL) seems to work ↵Hans Baier
well * added option to class Slave / Session::process that a slave can have total control over transport speed git-svn-id: svn://localhost/ardour2/branches/3.0@4385 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-01* refactor Session::follow_slave to be easier to read and understandHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@4370 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-01* radically cleaned up / refactored midi_clock_slave.ccHans Baier
* debug statements in session_process.cc and midi_clock_slave.cc as conditional compilation instead of comments git-svn-id: svn://localhost/ardour2/branches/3.0@4366 d708f5d6-7413-0410-9779-e7cbd77b26cf
2009-01-01* made MidiClock_Slave conform more to to the Spec by starting transportHans Baier
on the first MidiClock Message after the start Message * removed debugging output from session_process.c * fixed bug: calculate a more sensible speed value on transport start * fixed typos in Slave docs * refactored MidiClock_Slave for better readability * made MidiClock_Slave react to continue messages git-svn-id: svn://localhost/ardour2/branches/3.0@4365 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-12-12most of the 2.X->3.0 commit (up to rev 4299) except for ↵Paul Davis
gtk2_ardour/editor_canvas.cc; builds and runs and does a few specific things but expect it to be buggy for a while yet git-svn-id: svn://localhost/ardour2/branches/3.0@4313 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-11-07* removed unnecessary method calls (preparse/postparse) in JACK_MidiPortHans Baier
* Changed calculation of current speed and transport position to double to avoid accumulating rounding errors git-svn-id: svn://localhost/ardour2/branches/3.0@4106 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-29* fixed bug in Session::follow_slave: average_slave_delta wrapped around to ↵Hans Baier
huge positive values when slave lags behind master (ie deltas become negative) * enabled some debugging output in Session::follow_slave (session_process.cc), beware! git-svn-id: svn://localhost/ardour2/branches/3.0@4027 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-29* added documentaion to libs/ardour/slave.hHans Baier
* first roughly working midi clock slave git-svn-id: svn://localhost/ardour2/branches/3.0@4025 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-27got MIDI Clock slave closer to functioning properly: Hans Baier
- Cleaned up the class - calculating (kind-of) sensible speed and position values - fixed resolution (quick-fix) - fixed requires_seekahead (set to false) - fixed locked (set to true) git-svn-id: svn://localhost/ardour2/branches/3.0@4018 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-25* fixed jitter problems for midi clock and removed superfluous UI elementsHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@4008 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-10-14* this implementation of midi_clock_slave is still sort of a proof of ↵Hans Baier
concept, but it reveals interesting issues and is better than the code before git-svn-id: svn://localhost/ardour2/branches/3.0@3969 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-08-07* enabled moving averages again... plays much nicer in a realtime setupHans Baier
* disabled excessive tracing git-svn-id: svn://localhost/ardour2/branches/3.0@3668 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-08-06* I dont know whether this works, but I'll commit it anywayHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3665 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-08-06* removed rolling speed average from MIDIClockSlave, ardour seems to keep ↵Hans Baier
time now git-svn-id: svn://localhost/ardour2/branches/3.0@3663 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-08-06* fixed JACK_MidiPort to get the events into the slaveHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3662 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-08-04* first implementation of MIDI Clock Slave supportHans Baier
git-svn-id: svn://localhost/ardour2/branches/3.0@3652 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02rollback to 3428, before the mysterious removal of libs/* at 3431/3432Paul Davis
git-svn-id: svn://localhost/ardour2/branches/3.0@3435 d708f5d6-7413-0410-9779-e7cbd77b26cf
2008-06-02remove empty sigc++2 directoryDoug McLain
git-svn-id: svn://localhost/ardour2/branches/3.0@3432 d708f5d6-7413-0410-9779-e7cbd77b26cf