Mercurial > hg > svgui
comparison layer/SpectrumLayer.cpp @ 595:c080d14ff414 integration_library
Put some debug outputs in comments
author | mathieub <mathieu.barthet@eecs.qmul.ac.uk> |
---|---|
date | Tue, 23 Aug 2011 14:45:02 +0100 |
parents | a13aa5320221 |
children |
comparison
equal
deleted
inserted
replaced
594:5fa210337bee | 595:c080d14ff414 |
---|---|
874 } | 874 } |
875 | 875 |
876 bool | 876 bool |
877 SpectrumLayer::scaleClicked(const View *v, QMouseEvent *e) | 877 SpectrumLayer::scaleClicked(const View *v, QMouseEvent *e) |
878 { | 878 { |
879 std::cerr<< "Mouse click detected in the spectrum scale area: (" << e->x() << "," << e->y() << ")" << std::endl; | 879 //std::cerr<< "Mouse click detected in the spectrum scale area: (" << e->x() << "," << e->y() << ")" << std::endl; |
880 | 880 |
881 float freq; | 881 float freq; |
882 QString unit; | 882 QString unit; |
883 float *centsOffsetReturn = 0; | 883 float *centsOffsetReturn = 0; |
884 float concertA = 0.0; | 884 float concertA = 0.0; |
886 | 886 |
887 if (getXScaleValue(v, e->x(), freq, unit)) { | 887 if (getXScaleValue(v, e->x(), freq, unit)) { |
888 | 888 |
889 midipitch = Pitch::getPitchForFrequency(freq,centsOffsetReturn,concertA); | 889 midipitch = Pitch::getPitchForFrequency(freq,centsOffsetReturn,concertA); |
890 | 890 |
891 std::cerr<< "Frequency: " << freq << " " << unit.toStdString() << " (midi pitch = " << midipitch << ")" << std::endl; | 891 //std::cerr<< "Frequency: " << freq << " " << unit.toStdString() << " (midi pitch = " << midipitch << ")" << std::endl; |
892 | 892 |
893 if ((midipitch>=0)&&(midipitch<127)) { | 893 if ((midipitch>=0)&&(midipitch<127)) { |
894 v->playExampleNote(midipitch); | 894 v->playExampleNote(midipitch); |
895 } | 895 } |
896 | 896 |