Mercurial > hg > svgui
comparison layer/SpectrogramLayer.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 |
---|---|
3786 } | 3786 } |
3787 | 3787 |
3788 bool | 3788 bool |
3789 SpectrogramLayer::scaleClicked(const View *v, QMouseEvent *e) | 3789 SpectrogramLayer::scaleClicked(const View *v, QMouseEvent *e) |
3790 { | 3790 { |
3791 std::cerr<< "Mouse click detected in the spectrogram scale area: (" << e->x() << "," << e->y() << ")" << std::endl; | 3791 //std::cerr<< "Mouse click detected in the spectrogram scale area: (" << e->x() << "," << e->y() << ")" << std::endl; |
3792 | 3792 |
3793 float freq; | 3793 float freq; |
3794 QString unit; | 3794 QString unit; |
3795 float *centsOffsetReturn = 0; | 3795 float *centsOffsetReturn = 0; |
3796 float concertA = 0.0; | 3796 float concertA = 0.0; |
3798 | 3798 |
3799 if (getYScaleValue(v, e->y(), freq, unit)) { | 3799 if (getYScaleValue(v, e->y(), freq, unit)) { |
3800 | 3800 |
3801 midipitch = Pitch::getPitchForFrequency(freq,centsOffsetReturn,concertA); | 3801 midipitch = Pitch::getPitchForFrequency(freq,centsOffsetReturn,concertA); |
3802 | 3802 |
3803 std::cerr<< "Frequency: " << freq << " " << unit.toStdString() << " (midi pitch = " << midipitch << ")" << std::endl; | 3803 //std::cerr<< "Frequency: " << freq << " " << unit.toStdString() << " (midi pitch = " << midipitch << ")" << std::endl; |
3804 | 3804 |
3805 if ((midipitch>=0)&&(midipitch<127)) { | 3805 if ((midipitch>=0)&&(midipitch<127)) { |
3806 v->playExampleNote(midipitch); | 3806 v->playExampleNote(midipitch); |
3807 } | 3807 } |
3808 | 3808 |