Mercurial > hg > svgui
comparison layer/SpectrogramLayer.cpp @ 65:7f608ec9a061
* More structural work on feature extraction plugin C <-> C++ adapter
* Allow use of LADSPA/DSSI plugins with control outputs as feature extraction
plugins (DSSI with MIDI output still to come)
* Reorder labels on spectrogram status box
* Minor tweaks in doc etc.
author | Chris Cannam |
---|---|
date | Mon, 27 Mar 2006 15:03:02 +0000 |
parents | 705f05ab42e3 |
children | 72fa239a4880 |
comparison
equal
deleted
inserted
replaced
64:10bcd53ddc71 | 65:7f608ec9a061 |
---|---|
2117 adjFreqMin, adjFreqMax)) { | 2117 adjFreqMin, adjFreqMax)) { |
2118 return ""; | 2118 return ""; |
2119 } | 2119 } |
2120 | 2120 |
2121 if (adjFreqMin != adjFreqMax) { | 2121 if (adjFreqMin != adjFreqMax) { |
2122 adjFreqText = tr("Adjusted Frequency:\t%1 - %2 Hz\n") | 2122 adjFreqText = tr("Peak Frequency:\t%1 - %2 Hz\n") |
2123 .arg(adjFreqMin).arg(adjFreqMax); | 2123 .arg(adjFreqMin).arg(adjFreqMax); |
2124 } else { | 2124 } else { |
2125 adjFreqText = tr("Adjusted Frequency:\t%1 Hz\n") | 2125 adjFreqText = tr("Peak Frequency:\t%1 Hz\n") |
2126 .arg(adjFreqMin); | 2126 .arg(adjFreqMin); |
2127 } | 2127 } |
2128 | 2128 |
2129 QString pmin = Pitch::getPitchLabelForFrequency(adjFreqMin); | 2129 QString pmin = Pitch::getPitchLabelForFrequency(adjFreqMin); |
2130 QString pmax = Pitch::getPitchLabelForFrequency(adjFreqMax); | 2130 QString pmax = Pitch::getPitchLabelForFrequency(adjFreqMax); |
2131 | 2131 |
2132 if (pmin != pmax) { | 2132 if (pmin != pmax) { |
2133 adjPitchText = tr("Adjusted Pitch:\t%3 - %4\n").arg(pmin).arg(pmax); | 2133 adjPitchText = tr("Peak Pitch:\t%3 - %4\n").arg(pmin).arg(pmax); |
2134 } else { | 2134 } else { |
2135 adjPitchText = tr("Adjusted Pitch:\t%2\n").arg(pmin); | 2135 adjPitchText = tr("Peak Pitch:\t%2\n").arg(pmin); |
2136 } | 2136 } |
2137 | 2137 |
2138 } else { | 2138 } else { |
2139 | 2139 |
2140 if (!getYBinSourceRange(v, y, freqMin, freqMax)) return ""; | 2140 if (!getYBinSourceRange(v, y, freqMin, freqMax)) return ""; |
2150 text += tr("Time:\t%1\n") | 2150 text += tr("Time:\t%1\n") |
2151 .arg(rtMin.toText(true).c_str()); | 2151 .arg(rtMin.toText(true).c_str()); |
2152 } | 2152 } |
2153 | 2153 |
2154 if (freqMin != freqMax) { | 2154 if (freqMin != freqMax) { |
2155 text += tr("Frequency:\t%1 - %2 Hz\n%3Pitch:\t%4 - %5\n%6") | 2155 text += tr("%1Bin Frequency:\t%2 - %3 Hz\n%4Bin Pitch:\t%5 - %6\n") |
2156 .arg(adjFreqText) | |
2156 .arg(freqMin) | 2157 .arg(freqMin) |
2157 .arg(freqMax) | 2158 .arg(freqMax) |
2159 .arg(adjPitchText) | |
2160 .arg(Pitch::getPitchLabelForFrequency(freqMin)) | |
2161 .arg(Pitch::getPitchLabelForFrequency(freqMax)); | |
2162 } else { | |
2163 text += tr("%1Bin Frequency:\t%2 Hz\n%3Bin Pitch:\t%4\n") | |
2158 .arg(adjFreqText) | 2164 .arg(adjFreqText) |
2159 .arg(Pitch::getPitchLabelForFrequency(freqMin)) | |
2160 .arg(Pitch::getPitchLabelForFrequency(freqMax)) | |
2161 .arg(adjPitchText); | |
2162 } else { | |
2163 text += tr("Frequency:\t%1 Hz\n%2Pitch:\t%3\n%4") | |
2164 .arg(freqMin) | 2165 .arg(freqMin) |
2165 .arg(adjFreqText) | 2166 .arg(adjPitchText) |
2166 .arg(Pitch::getPitchLabelForFrequency(freqMin)) | 2167 .arg(Pitch::getPitchLabelForFrequency(freqMin)); |
2167 .arg(adjPitchText); | |
2168 } | 2168 } |
2169 | 2169 |
2170 if (haveValues) { | 2170 if (haveValues) { |
2171 float dbMin = AudioLevel::multiplier_to_dB(magMin); | 2171 float dbMin = AudioLevel::multiplier_to_dB(magMin); |
2172 float dbMax = AudioLevel::multiplier_to_dB(magMax); | 2172 float dbMax = AudioLevel::multiplier_to_dB(magMax); |