Mercurial > hg > svgui
diff layer/LayerFactory.cpp @ 37:21d061e66177
* Make the frequency estimation mode in the spectrogram layer actually useful,
and make sure it gets mostly the right results... Still some tidying to do
in here.
author | Chris Cannam |
---|---|
date | Wed, 22 Feb 2006 17:45:18 +0000 |
parents | 10ba9276a315 |
children | ad214997dddb |
line wrap: on
line diff
--- a/layer/LayerFactory.cpp Mon Feb 20 17:23:40 2006 +0000 +++ b/layer/LayerFactory.cpp Wed Feb 22 17:45:18 2006 +0000 @@ -58,6 +58,10 @@ // that should be encoded in its name return Layer::tr("Spectrogram"); + case PeakFrequencySpectrogram: + // likewise + return Layer::tr("Spectrogram"); + default: break; } @@ -76,6 +80,7 @@ if (dynamic_cast<DenseTimeValueModel *>(model)) { types.insert(Spectrogram); types.insert(MelodicRangeSpectrogram); + types.insert(PeakFrequencySpectrogram); } if (dynamic_cast<RangeSummarisableTimeValueModel *>(model)) { @@ -272,6 +277,11 @@ static_cast<SpectrogramLayer *>(layer)->setChannel(channel); break; + case PeakFrequencySpectrogram: + layer = new SpectrogramLayer(view, SpectrogramLayer::MelodicPeaks); + static_cast<SpectrogramLayer *>(layer)->setChannel(channel); + break; + default: break; }