# HG changeset patch # User Chris Cannam # Date 1250593317 0 # Node ID 1dd2cddc32ebef6cc0b867f64fb8bcbe82c04f14 # Parent b73f486fc2e408e68bca7204ce98dbf6e0d8d006 * Show MIDI pitch number as well as note name and frequency diff -r b73f486fc2e4 -r 1dd2cddc32eb layer/NoteLayer.cpp --- a/layer/NoteLayer.cpp Wed Aug 05 16:36:07 2009 +0000 +++ b/layer/NoteLayer.cpp Tue Aug 18 11:01:57 2009 +0000 @@ -454,14 +454,17 @@ int mnote = lrintf(note.value); int cents = lrintf((note.value - mnote) * 100); float freq = Pitch::getFrequencyForPitch(mnote, cents); - pitchText = tr("%1 (%2 Hz)") - .arg(Pitch::getPitchLabel(mnote, cents)).arg(freq); + pitchText = tr("%1 (%2, %3 Hz)") + .arg(Pitch::getPitchLabel(mnote, cents)) + .arg(mnote) + .arg(freq); } else if (m_model->getScaleUnits() == "Hz") { - pitchText = tr("%1 Hz (%2)") + pitchText = tr("%1 Hz (%2, %3)") .arg(note.value) - .arg(Pitch::getPitchLabelForFrequency(note.value)); + .arg(Pitch::getPitchLabelForFrequency(note.value)) + .arg(Pitch::getPitchForFrequency(note.value)); } else { pitchText = tr("%1 %2")