diff --git a/libs/ardour/ardour/triggerbox.h b/libs/ardour/ardour/triggerbox.h index 6e0e529e10..5da0b1af14 100644 --- a/libs/ardour/ardour/triggerbox.h +++ b/libs/ardour/ardour/triggerbox.h @@ -293,6 +293,8 @@ class LIBARDOUR_API AudioTrigger : public Trigger { SegmentDescriptor get_segment_descriptor () const; + static PBD::Signal1 CannotDetermineTempo; + protected: void retrigger (); void set_usable_length (); diff --git a/libs/ardour/triggerbox.cc b/libs/ardour/triggerbox.cc index 8a4e7096c0..49f9f9b99d 100644 --- a/libs/ardour/triggerbox.cc +++ b/libs/ardour/triggerbox.cc @@ -524,6 +524,8 @@ Trigger::maybe_compute_next_transition (samplepos_t start_sample, Temporal::Beat /*--------------------*/ +PBD::Signal1 AudioTrigger::CannotDetermineTempo; + AudioTrigger::AudioTrigger (uint64_t n, TriggerBox& b) : Trigger (n, b) , data (0) @@ -735,6 +737,8 @@ AudioTrigger::determine_tempo () string::size_type ni; double text_tempo = -1.; + std::cerr << "Determine tempo for " << name() << std::endl; + if (((bi = str.find ("bpm")) != string::npos) || ((bi = str.find ("BPM")) != string::npos)) { @@ -786,6 +790,8 @@ AudioTrigger::determine_tempo () if (_apparent_tempo == 0.0) { /* no apparent tempo, just return since we'll use it as-is */ + std::cerr << "Could not determine tempo for " << name() << std::endl; + CannotDetermineTempo (_region->source (0)->name()); return; } @@ -800,6 +806,7 @@ AudioTrigger::determine_tempo () const samplecnt_t one_bar = tm->bbt_duration_at (timepos_t (AudioTime), BBT_Offset (1, 0, 0)).samples(); + cerr << "tempo: " << _apparent_tempo << endl; cerr << "one bar in samples: " << one_bar << endl; cerr << "barcnt = " << round (_barcnt) << endl; }