From 741df6e6ef13ffcac4c9b460f6086ccea1b09d7d Mon Sep 17 00:00:00 2001 From: nick_m Date: Mon, 19 Dec 2016 03:23:33 +1100 Subject: [PATCH] there is no curve for identical note_types_per_minute values. --- libs/ardour/tempo.cc | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/libs/ardour/tempo.cc b/libs/ardour/tempo.cc index 9f724a3dca..f5b75eb5ee 100644 --- a/libs/ardour/tempo.cc +++ b/libs/ardour/tempo.cc @@ -426,6 +426,10 @@ https://www.zhdk.ch/fileadmin/data_subsites/data_icst/Downloads/Timegrid/ICST_Te double TempoSection::compute_c_func_pulse (const double& end_npm, const double& end_pulse) const { + if (note_types_per_minute() == end_npm) { + return 0.0; + } + double const log_tempo_ratio = log (end_npm / note_types_per_minute()); return (note_types_per_minute() * expm1 (log_tempo_ratio)) / ((end_pulse - pulse()) * _note_type); } @@ -438,6 +442,10 @@ TempoSection::compute_c_func_pulse (const double& end_npm, const double& end_pul double TempoSection::compute_c_func_minute (const double& end_npm, const double& end_minute) const { + if (note_types_per_minute() == end_npm) { + return 0.0; + } + return c_func (end_npm, end_minute - minute()); } -- 2.30.2