From b9bcb8fb736f841296d948c3b9c5e9c0b434ba14 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sun, 13 Jan 2013 17:10:58 +0000 Subject: [PATCH] add Audio_note::to_string to aid debugging --- lily/audio-item.cc | 19 +++++++++++++++++++ lily/include/audio-item.hh | 1 + 2 files changed, 20 insertions(+) diff --git a/lily/audio-item.cc b/lily/audio-item.cc index 201e8fd98e..65ca70004d 100644 --- a/lily/audio-item.cc +++ b/lily/audio-item.cc @@ -67,6 +67,25 @@ Audio_note::tie_to (Audio_note *t, Moment skip) length_mom_ = 0; } +string +Audio_note::to_string () const +{ + string s = "#to_string(); + } + if (tie_event_) + { + s += " tie_event"; + } + s += ">"; + return s; +} + Audio_key::Audio_key (int acc, bool major) { accidentals_ = acc; diff --git a/lily/include/audio-item.hh b/lily/include/audio-item.hh index 45dcc7b799..1b858cd8c4 100644 --- a/lily/include/audio-item.hh +++ b/lily/include/audio-item.hh @@ -86,6 +86,7 @@ public: // with tieWaitForNote, there might be a skip between the tied notes! void tie_to (Audio_note *, Moment skip = 0); + virtual string to_string () const; Pitch pitch_; Moment length_mom_; -- 2.39.2