comparison vamp/CQVamp.cpp @ 154:768c690975ea

Another fix to parameter defaults
author Chris Cannam <c.cannam@qmul.ac.uk>
date Mon, 14 Jul 2014 12:42:30 +0100
parents 5dc56e3b6783
children 1081c73fbbe3
comparison
equal deleted inserted replaced
153:5dc56e3b6783 154:768c690975ea
48 // will come from those rather than from the m_minFrequency and 48 // will come from those rather than from the m_minFrequency and
49 // m_maxFrequency members. 49 // m_maxFrequency members.
50 static const int defaultMinMIDIPitch = 36; 50 static const int defaultMinMIDIPitch = 36;
51 static const int defaultMaxMIDIPitch = 96; 51 static const int defaultMaxMIDIPitch = 96;
52 static const int defaultBPO = 36; 52 static const int defaultBPO = 36;
53 static const float defaultMinFrequency = 110;
54 static const float defaultMaxFrequency = 14700;
53 static const float defaultTuningFrequency = 440.f; 55 static const float defaultTuningFrequency = 440.f;
54 56
55 CQVamp::CQVamp(float inputSampleRate, bool midiPitchParameters) : 57 CQVamp::CQVamp(float inputSampleRate, bool midiPitchParameters) :
56 Vamp::Plugin(inputSampleRate), 58 Vamp::Plugin(inputSampleRate),
57 m_midiPitchParameters(midiPitchParameters), 59 m_midiPitchParameters(midiPitchParameters),
59 m_maxMIDIPitch(defaultMaxMIDIPitch), 61 m_maxMIDIPitch(defaultMaxMIDIPitch),
60 m_tuningFrequency(defaultTuningFrequency), 62 m_tuningFrequency(defaultTuningFrequency),
61 m_bpo(defaultBPO), 63 m_bpo(defaultBPO),
62 m_interpolation(CQSpectrogram::InterpolateLinear), 64 m_interpolation(CQSpectrogram::InterpolateLinear),
63 m_cq(0), 65 m_cq(0),
64 m_maxFrequency(m_inputSampleRate/3), 66 m_maxFrequency(defaultMaxFrequency),
65 m_minFrequency(m_inputSampleRate/400), 67 m_minFrequency(defaultMinFrequency),
66 m_haveStartTime(false), 68 m_haveStartTime(false),
67 m_columnCount(0) 69 m_columnCount(0)
68 { 70 {
69 } 71 }
70 72
168 desc.name = "Minimum Frequency"; 170 desc.name = "Minimum Frequency";
169 desc.unit = "Hz"; 171 desc.unit = "Hz";
170 desc.description = "Lowest frequency to be included in the constant-Q transform. (The actual minimum frequency may be lower, as the range always covers an integral number of octaves below the highest frequency.)"; 172 desc.description = "Lowest frequency to be included in the constant-Q transform. (The actual minimum frequency may be lower, as the range always covers an integral number of octaves below the highest frequency.)";
171 desc.minValue = 1; 173 desc.minValue = 1;
172 desc.maxValue = 22050; 174 desc.maxValue = 22050;
173 desc.defaultValue = 110; 175 desc.defaultValue = defaultMinFrequency;
174 desc.isQuantized = false; 176 desc.isQuantized = false;
175 list.push_back(desc); 177 list.push_back(desc);
176 178
177 desc.identifier = "maxfreq"; 179 desc.identifier = "maxfreq";
178 desc.name = "Maximum Frequency"; 180 desc.name = "Maximum Frequency";
179 desc.unit = "Hz"; 181 desc.unit = "Hz";
180 desc.description = "MIDI pitch corresponding to the highest frequency to be included in the constant-Q transform"; 182 desc.description = "MIDI pitch corresponding to the highest frequency to be included in the constant-Q transform";
181 desc.minValue = 1; 183 desc.minValue = 1;
182 desc.maxValue = 22050; 184 desc.maxValue = 22050;
183 desc.defaultValue = 14700; 185 desc.defaultValue = defaultMaxFrequency;
184 desc.isQuantized = false; 186 desc.isQuantized = false;
185 list.push_back(desc); 187 list.push_back(desc);
186 } 188 }
187 189
188 desc.identifier = "bpo"; 190 desc.identifier = "bpo";