comparison layer/SpectrogramLayer.cpp @ 42:1bdf285c4eac

* Add "Export Audio File" option * Make note layer align in frequency with any spectrogram layer on the same view (if it's set to frequency mode) * Start to implement mouse editing for ranges of points by dragging the selection * First scrappy attempt at a vertical scale for time value layer
author Chris Cannam
date Mon, 27 Feb 2006 17:34:41 +0000
parents f2c416cbdaa9
children 78515b1e29eb
comparison
equal deleted inserted replaced
41:f2c416cbdaa9 42:1bdf285c4eac
2029 #ifdef DEBUG_SPECTROGRAM_REPAINT 2029 #ifdef DEBUG_SPECTROGRAM_REPAINT
2030 std::cerr << "SpectrogramLayer::paint() returning" << std::endl; 2030 std::cerr << "SpectrogramLayer::paint() returning" << std::endl;
2031 #endif 2031 #endif
2032 } 2032 }
2033 2033
2034 float
2035 SpectrogramLayer::getYForFrequency(float frequency) const
2036 {
2037 return m_view->getYForFrequency(frequency,
2038 getEffectiveMinFrequency(),
2039 getEffectiveMaxFrequency(),
2040 m_frequencyScale == LogFrequencyScale);
2041 }
2042
2043 float
2044 SpectrogramLayer::getFrequencyForY(int y) const
2045 {
2046 return m_view->getFrequencyForY(y,
2047 getEffectiveMinFrequency(),
2048 getEffectiveMaxFrequency(),
2049 m_frequencyScale == LogFrequencyScale);
2050 }
2051
2034 int 2052 int
2035 SpectrogramLayer::getCompletion() const 2053 SpectrogramLayer::getCompletion() const
2036 { 2054 {
2037 if (m_updateTimer == 0) return 100; 2055 if (m_updateTimer == 0) return 100;
2038 size_t completion = m_fillThread->getFillCompletion(); 2056 size_t completion = m_fillThread->getFillCompletion();