Mercurial > hg > vamp-aubio-plugins
comparison plugins/Notes.cpp @ 32:8a20f3488d88
(Start to) remove the channel counts from everywhere: they should always be 1 anyway as that's what Vamp::Plugin::getMaxChannelCount always defaulted to
author | Chris Cannam <cannam@all-day-breakfast.com> |
---|---|
date | Mon, 09 Jul 2012 15:50:30 +0100 |
parents | 2e979622bd93 |
children | 0f40399ca1ff |
comparison
equal
deleted
inserted
replaced
31:2e979622bd93 | 32:8a20f3488d88 |
---|---|
94 } | 94 } |
95 | 95 |
96 bool | 96 bool |
97 Notes::initialise(size_t channels, size_t stepSize, size_t blockSize) | 97 Notes::initialise(size_t channels, size_t stepSize, size_t blockSize) |
98 { | 98 { |
99 m_channelCount = channels; | 99 if (channels != 1) { |
100 std::cerr << "Notes::initialise: channels must be 1" << std::endl; | |
101 return false; | |
102 } | |
103 | |
100 m_stepSize = stepSize; | 104 m_stepSize = stepSize; |
101 m_blockSize = blockSize; | 105 m_blockSize = blockSize; |
102 | 106 |
103 size_t processingBlockSize; | 107 size_t processingBlockSize; |
104 if (m_onsettype == OnsetEnergy || | 108 if (m_onsettype == OnsetEnergy || |
106 processingBlockSize = stepSize * 2; | 110 processingBlockSize = stepSize * 2; |
107 } else { | 111 } else { |
108 processingBlockSize = stepSize * 4; | 112 processingBlockSize = stepSize * 4; |
109 } | 113 } |
110 | 114 |
111 m_ibuf = new_fvec(stepSize, channels); | 115 m_ibuf = new_fvec(stepSize); |
112 m_onset = new_fvec(1, channels); | 116 m_onset = new_fvec(1); |
113 m_fftgrain = new_cvec(processingBlockSize, channels); | 117 m_fftgrain = new_cvec(processingBlockSize); |
114 m_pv = new_aubio_pvoc(processingBlockSize, stepSize, channels); | 118 m_pv = new_aubio_pvoc(processingBlockSize, stepSize); |
115 m_peakpick = new_aubio_peakpicker(m_threshold); | 119 m_peakpick = new_aubio_peakpicker(m_threshold); |
116 | 120 |
117 m_onsetdet = new_aubio_onsetdetection(m_onsettype, processingBlockSize, channels); | 121 m_onsetdet = new_aubio_onsetdetection(m_onsettype, processingBlockSize); |
118 | 122 |
119 m_pitchdet = new_aubio_pitchdetection(processingBlockSize * 4, | 123 m_pitchdet = new_aubio_pitchdetection(processingBlockSize * 4, |
120 stepSize, | 124 stepSize, |
121 channels, | |
122 lrintf(m_inputSampleRate), | 125 lrintf(m_inputSampleRate), |
123 m_pitchtype, | 126 m_pitchtype, |
124 m_pitchmode); | 127 m_pitchmode); |
125 | 128 |
126 m_count = 0; | 129 m_count = 0; |