include Yin pitch tracking algo
This commit is contained in:
@@ -1,7 +1,6 @@
|
||||
#include "PluginProcessor.h"
|
||||
#include "PluginEditor.h"
|
||||
|
||||
|
||||
LampshadeAudioProcessor::LampshadeAudioProcessor()
|
||||
#ifndef JucePlugin_PreferredChannelConfigurations
|
||||
: AudioProcessor (BusesProperties()
|
||||
@@ -69,6 +68,7 @@ void LampshadeAudioProcessor::changeProgramName (int index, const String& newNam
|
||||
|
||||
void LampshadeAudioProcessor::prepareToPlay (double sampleRate, int samplesPerBlock)
|
||||
{
|
||||
myYin = Yin(sampleRate, samplesPerBlock);
|
||||
}
|
||||
|
||||
void LampshadeAudioProcessor::releaseResources()
|
||||
@@ -105,8 +105,12 @@ void LampshadeAudioProcessor::processBlock (AudioSampleBuffer& buffer, MidiBuffe
|
||||
for (int i = totalNumInputChannels; i < totalNumOutputChannels; ++i)
|
||||
buffer.clear(i, 0, buffer.getNumSamples());
|
||||
|
||||
float pitch = myYin.getPitch(buffer.getWritePointer (0)); // returns Pitch in Hertz
|
||||
printf("pitch: %f", pitch);
|
||||
|
||||
for (int channel = 0; channel < totalNumInputChannels; ++channel) {
|
||||
//float* channelData = buffer.getWritePointer (channel);
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user