From fef594c82518a8fe4c96794852c1fc849c0ed3b3 Mon Sep 17 00:00:00 2001 From: Roland Stigge Date: Sun, 17 Feb 2019 12:55:13 +0100 Subject: Added tunerdemo --- tuner.cpp | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 tuner.cpp (limited to 'tuner.cpp') diff --git a/tuner.cpp b/tuner.cpp new file mode 100644 index 0000000..d1833a3 --- /dev/null +++ b/tuner.cpp @@ -0,0 +1,24 @@ +#include "tuner.h" + +#include "autocorrelation.h" +#include "fft.h" + +struct RIT::Tuner::Impl { +public: + Impl(int size, int f_sample): mAC(size), m_f_sample(f_sample) {} + RIT::AutoCorrelation mAC; + int m_f_sample; +}; + +RIT::Tuner::Tuner(int size, int f_sample): mImpl(std::make_unique(size, f_sample)) +{ +} + +RIT::Tuner::~Tuner(){} + +RIT::Pitch RIT::Tuner::operator() (const std::vector> &v) +{ + std::vector> autoCorrelation = mImpl->mAC(v); + + return Pitch(); +} -- cgit v1.2.3