This fixes several callsites that were passing samplepos_t to get a TempoMetric,
some of them somewhat significant (e.g. VST plugins that want tempo information).
Bad API design on my part, apologies.
This commit combines libs/ and gtk2_ardour because the new private status
of the ::metric_at() call would be a blocking point for git bisect
This is mostly a simple lexical search+replace but the absence of operator< for
std::weak_ptr<T> leads to some complications, particularly with Evoral::Sequence
and ExportPortChannel.
* Fix reset on timeout: Reset needs to be called before
processing any messages.
* use DLL to compute BPM (remove 1st order LPF)
* set BPM before calculating ppqn
* Fix speed at 1.0, change BPM only. MIDI clock must
vari-speed (which changes pitch). MIDI clock is acts as
"Conductor" that specifies when a beat happens at a given
wall-clock time. timecode moves at speed 1.0 only the BPM
changes.
* Honor MCLk stop messages, do not auto-start as soon as
the tempo is locked (after 3 clock ticks).
* Retain MIDI beat position, do not rewind in ::update_midi_clock
Do not directly start when receiving the position message,
transport speed should be zero (regardless of clock speed),
until the "continue" message arrives.
* Mclk start needs to rewind (not reset)
There is still an issue with start, when
_session->transport_sample() is not zero. Ardour ends up
constantly locating, rolling for a short time and re-syncing
by locating again.
* take port latency into account
* fix DLL initialization, and initial speed calculation
* igonre out of bounds BPM
the DLL bandwidth still needs to be tweaked, likewise the
hardcoded 1st order LPF to track BPM (vs speed).
* share port_latency latency query for MTC and MIDIClock slaves
* propagate set_session()
* share session_connections for MasterViaMIDI
This is in preparation to allow MClk slave to access midi-port-latency
Trust that ::reset() works for all transport masters, and call it when engine is stopped. This way
the transport masters are ready to be called again as soon as the engine restarts.
Generated by tools/f2s. Some hand-editing will be required in a few places to fix up comments related to timecode
and video in order to keep the legible
- adds quarter_notes_per_minute(), note_divisions_per_minute (double)
pulses_per_minute() and frames_per_quarter_note()
- this should be a no-op except for the use of tempo by
the vst callback which definitely uses quarter notes per minute.
- the XML node for TempoSection named 'beats-per-minute'
has been renamed.
incoming MIDI data has to be parsed EVERY process cycle, not just when Slave::speed_and_position() is called.
The private MIDI::Parser owned by the MTC and MClck slaves was irrelevant, since the port has its own.
See comments in midi_port.h on the strangled inheritance heirarchy.
* increase filter bandwith to make it sync faster
* use transport_frame instead of audible_frame for calculating the loop error (thanks robin!)
* reduce the deadzone to 0.1% (thanks robin)