From f53baec2e4ad1e40f76a5efc1d90cbc6dcef0326 Mon Sep 17 00:00:00 2001 From: David Robillard Date: Fri, 16 May 2008 02:50:19 +0000 Subject: [PATCH] Tidy up MIDI debugging output. git-svn-id: svn://localhost/ardour2/branches/3.0@3358 d708f5d6-7413-0410-9779-e7cbd77b26cf --- gtk2_ardour/midi_region_view.cc | 2 +- libs/ardour/midi_model.cc | 5 +++-- libs/ardour/midi_source.cc | 5 +++-- 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/gtk2_ardour/midi_region_view.cc b/gtk2_ardour/midi_region_view.cc index d020a13d88..2d7716ac63 100644 --- a/gtk2_ardour/midi_region_view.cc +++ b/gtk2_ardour/midi_region_view.cc @@ -764,7 +764,7 @@ MidiRegionView::add_note(const boost::shared_ptr note) ev_rect->property_y2() = y1 + floor(midi_stream_view()->note_height()); if (note->duration() == 0) { - cerr << "MidiModel: WARNING: Discovered note with duration 0 and pitch" + cerr << "MidiModel: WARNING: Discovered note with duration 0 and pitch " << (int)note->note() << " at time " << note->time() << endl; if (_active_notes) { assert(note->note() < 128); diff --git a/libs/ardour/midi_model.cc b/libs/ardour/midi_model.cc index 8819423694..48bb743734 100644 --- a/libs/ardour/midi_model.cc +++ b/libs/ardour/midi_model.cc @@ -103,8 +103,9 @@ MidiModel::const_iterator::const_iterator(const MidiModel& model, double t) assert(x >= 0); if (y >= i->first.min() || y <= i->first.max()) { - cerr << "ERROR: Event value '" << y << "' out of range [" - << i->first.min() << "," << i->first.max() << "], ignored" << endl; + cerr << "ERROR: Controller (" << i->first.to_string() << ") value '" << y + << "' out of range [" << i->first.min() << "," << i->first.max() + << "], event ignored" << endl; continue; } diff --git a/libs/ardour/midi_source.cc b/libs/ardour/midi_source.cc index aa93729d37..4e83413c13 100644 --- a/libs/ardour/midi_source.cc +++ b/libs/ardour/midi_source.cc @@ -105,8 +105,9 @@ MidiSource::midi_read (MidiRingBuffer& dst, nframes_t start, nframes_t cnt, nfra { Glib::Mutex::Lock lm (_lock); if (_model) { - const size_t n_events = _model->read(dst, start, cnt, stamp_offset, negative_stamp_offset); - cout << "Read " << n_events << " events from model." << endl; + //const size_t n_events = + _model->read(dst, start, cnt, stamp_offset, negative_stamp_offset); + //cout << "Read " << n_events << " events from model." << endl; return cnt; } else { return read_unlocked (dst, start, cnt, stamp_offset, negative_stamp_offset);