}
double
-MetricSection::minute_at_frame (const framepos_t& frame) const
+MetricSection::minute_at_frame (const framepos_t frame) const
{
return (frame / (double) _sample_rate) / 60.0;
}
, _locked_to_meter (false)
, _clamped (false)
{
- _legacy_bbt = BBT_Time (0, 0, 0);
-
BBT_Time bbt;
std::string start_bbt;
if (node.get_property ("start", start_bbt)) {
* for use with musical units whose granularity is coarser than frames (e.g. ticks)
*/
double
-TempoSection::pulse_at_frame (const framepos_t& f) const
+TempoSection::pulse_at_frame (const framepos_t f) const
{
const bool constant = type() == Constant || _c == 0.0 || (initial() && f < frame());
if (constant) {
}
/* user supplies the exact pulse if pls == MusicTime */
TempoSection*
-TempoMap::add_tempo (const Tempo& tempo, const double& pulse, const framepos_t& frame, PositionLockStyle pls)
+TempoMap::add_tempo (const Tempo& tempo, const double& pulse, const framepos_t frame, PositionLockStyle pls)
{
if (tempo.note_types_per_minute() <= 0.0) {
warning << "Cannot add tempo. note types per minute must be greater than zero." << endmsg;
}
void
-TempoMap::replace_tempo (TempoSection& ts, const Tempo& tempo, const double& pulse, const framepos_t& frame, PositionLockStyle pls)
+TempoMap::replace_tempo (TempoSection& ts, const Tempo& tempo, const double& pulse, const framepos_t frame, PositionLockStyle pls)
{
if (tempo.note_types_per_minute() <= 0.0) {
warning << "Cannot replace tempo. note types per minute must be greater than zero." << endmsg;
* This function uses both tempo and meter.
*/
double
-TempoMap::beat_at_frame (const framecnt_t& frame) const
+TempoMap::beat_at_frame (const framecnt_t frame) const
{
Glib::Threads::RWLock::ReaderLock lm (lock);
*
*/
Tempo
-TempoMap::tempo_at_frame (const framepos_t& frame) const
+TempoMap::tempo_at_frame (const framepos_t frame) const
{
Glib::Threads::RWLock::ReaderLock lm (lock);
}
bool
-TempoMap::set_active_tempi (const Metrics& metrics, const framepos_t& frame)
+TempoMap::set_active_tempi (const Metrics& metrics, const framepos_t frame)
{
for (Metrics::const_iterator i = metrics.begin(); i != metrics.end(); ++i) {
TempoSection* t;
* if sub_num is zero, the musical position will be taken from the supplied frame.
*/
void
-TempoMap::gui_set_tempo_position (TempoSection* ts, const framepos_t& frame, const int& sub_num)
+TempoMap::gui_set_tempo_position (TempoSection* ts, const framepos_t frame, const int& sub_num)
{
Metrics future_map;
* leaving the meter position unchanged.
*/
void
-TempoMap::gui_set_meter_position (MeterSection* ms, const framepos_t& frame)
+TempoMap::gui_set_meter_position (MeterSection* ms, const framepos_t frame)
{
Metrics future_map;
* This function is sensitive to tempo and meter.
*/
double
-TempoMap::exact_beat_at_frame (const framepos_t& frame, const int32_t sub_num) const
+TempoMap::exact_beat_at_frame (const framepos_t frame, const int32_t sub_num) const
{
Glib::Threads::RWLock::ReaderLock lm (lock);
}
double
-TempoMap::exact_beat_at_frame_locked (const Metrics& metrics, const framepos_t& frame, const int32_t divisions) const
+TempoMap::exact_beat_at_frame_locked (const Metrics& metrics, const framepos_t frame, const int32_t divisions) const
{
return beat_at_pulse_locked (_metrics, exact_qn_at_frame_locked (metrics, frame, divisions) / 4.0);
}
* This function is tempo-sensitive.
*/
double
-TempoMap::exact_qn_at_frame (const framepos_t& frame, const int32_t sub_num) const
+TempoMap::exact_qn_at_frame (const framepos_t frame, const int32_t sub_num) const
{
Glib::Threads::RWLock::ReaderLock lm (lock);
}
double
-TempoMap::exact_qn_at_frame_locked (const Metrics& metrics, const framepos_t& frame, const int32_t sub_num) const
+TempoMap::exact_qn_at_frame_locked (const Metrics& metrics, const framepos_t frame, const int32_t sub_num) const
{
double qn = pulse_at_minute_locked (metrics, minute_at_frame (frame)) * 4.0;
do that stuff based on the beat_at_frame and frame_at_beat api
*/
double
-TempoMap::frames_per_quarter_note_at (const framepos_t& frame, const framecnt_t& sr) const
+TempoMap::frames_per_quarter_note_at (const framepos_t frame, const framecnt_t sr) const
{
Glib::Threads::RWLock::ReaderLock lm (lock);
}
if (prev_t) {
- if (prev_t->type() != TempoSection::Constant) {
+ if (prev_t->end_note_types_per_minute() < 0.0) {
prev_t->set_end_note_types_per_minute (t->note_types_per_minute());
}
}
prev_t = t;
}
}
+
+ if (prev_t) {
+ prev_t->set_end_note_types_per_minute (prev_t->note_types_per_minute());
+ }
}
XMLNode&