ardour
|
#include <slave.h>
Public Member Functions | |
MIDIClock_Slave (Session &, MidiPort &, int ppqn=24) | |
MIDIClock_Slave (ISlaveSessionProxy *session_proxy=0, int ppqn=24) | |
Constructor for unit tests. More... | |
~MIDIClock_Slave () | |
void | rebind (MidiPort &) |
bool | speed_and_position (double &, framepos_t &) |
bool | locked () const |
bool | ok () const |
bool | starting () const |
framecnt_t | resolution () const |
bool | requires_seekahead () const |
bool | give_slave_full_control_over_transport_speed () const |
void | set_bandwidth (double a_bandwith) |
std::string | approximate_current_delta () const |
Public Member Functions inherited from ARDOUR::Slave | |
Slave () | |
virtual | ~Slave () |
virtual framecnt_t | seekahead_distance () const |
virtual bool | is_always_synced () const |
Protected Member Functions | |
void | reset () |
void | start (MIDI::Parser &parser, framepos_t timestamp) |
void | contineu (MIDI::Parser &parser, framepos_t timestamp) |
void | stop (MIDI::Parser &parser, framepos_t timestamp) |
void | position (MIDI::Parser &parser, MIDI::byte *message, size_t size) |
void | calculate_one_ppqn_in_frames_at (framepos_t time) |
framepos_t | calculate_song_position (uint16_t song_position_in_sixteenth_notes) |
void | calculate_filter_coefficients () |
void | update_midi_clock (MIDI::Parser &parser, framepos_t timestamp) |
void | read_current (SafeTime *) const |
bool | stop_if_no_more_clock_events (framepos_t &pos, framepos_t now) |
Protected Attributes | |
ISlaveSessionProxy * | session |
PBD::ScopedConnectionList | port_connections |
int | ppqn |
pulses per quarter note for one MIDI clock frame (default 24) More... | |
double | one_ppqn_in_frames |
the duration of one ppqn in frame time More... | |
framepos_t | first_timestamp |
the timestamp of the first MIDI clock message More... | |
framepos_t | last_timestamp |
the time stamp and should-be transport position of the last inbound MIDI clock message More... | |
double | should_be_position |
long | midi_clock_count |
double | t0 |
time at the beginning of the MIDI clock frame More... | |
double | t1 |
calculated end of the MIDI clock frame More... | |
double | e |
loop error = real value - expected value More... | |
double | e2 |
second order loop error More... | |
double | bandwidth |
DLL filter bandwidth. More... | |
double | b |
DLL filter coefficients. More... | |
double | c |
double | omega |
frameoffset_t | current_delta |
bool | _started |
whether transport should be rolling More... | |
bool | _starting |
Definition at line 45 of file midi_clock_slave.cc.
MIDIClock_Slave::MIDIClock_Slave | ( | ISlaveSessionProxy * | session_proxy = 0 , |
int | ppqn = 24 |
||
) |
Constructor for unit tests.
Definition at line 54 of file midi_clock_slave.cc.
MIDIClock_Slave::~MIDIClock_Slave | ( | ) |
Definition at line 62 of file midi_clock_slave.cc.
|
virtual |
Reimplemented from ARDOUR::Slave.
Definition at line 368 of file midi_clock_slave.cc.
|
protected |
Definition at line 109 of file midi_clock_slave.cc.
|
protected |
Definition at line 83 of file midi_clock_slave.cc.
|
protected |
Definition at line 96 of file midi_clock_slave.cc.
|
protected |
Definition at line 221 of file midi_clock_slave.cc.
|
inlinevirtual |
Reimplemented from ARDOUR::Slave.
|
virtual |
reports to ARDOUR whether the Slave is currently synced to its external time source.
Implements ARDOUR::Slave.
Definition at line 288 of file midi_clock_slave.cc.
|
virtual |
reports to ARDOUR whether the slave is in a sane state
Implements ARDOUR::Slave.
Definition at line 294 of file midi_clock_slave.cc.
|
protected |
Definition at line 263 of file midi_clock_slave.cc.
|
protected |
void MIDIClock_Slave::rebind | ( | MidiPort & | port | ) |
Definition at line 68 of file midi_clock_slave.cc.
|
inlinevirtual |
Implements ARDOUR::Slave.
|
protected |
Definition at line 206 of file midi_clock_slave.cc.
|
virtual |
Implements ARDOUR::Slave.
Definition at line 361 of file midi_clock_slave.cc.
|
inline |
|
virtual |
This is the most important function to implement: Each process cycle, Session::follow_slave will call this method. and after the method call they should
Session::follow_slave will then try to follow the given position using a delay locked loop (DLL), starting with the first given transport speed. If the values of speed and position contradict each other, ARDOUR will always follow the position and disregard the speed. Although, a correct speed is important so that ARDOUR can sync to the master time source quickly.
For background information on delay locked loops, see http://www.kokkinizita.net/papers/usingdll.pdf
The method has the following precondition:
After the method call the following postconditions should be met:
Implements ARDOUR::Slave.
Definition at line 323 of file midi_clock_slave.cc.
|
protected |
Definition at line 191 of file midi_clock_slave.cc.
|
virtual |
reports to ARDOUR whether the slave is in the process of starting to roll
Reimplemented from ARDOUR::Slave.
Definition at line 300 of file midi_clock_slave.cc.
|
protected |
Definition at line 233 of file midi_clock_slave.cc.
|
protected |
Definition at line 306 of file midi_clock_slave.cc.
|
protected |
Definition at line 118 of file midi_clock_slave.cc.
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |
|
protected |