diff options
author | Roland Stigge <stigge@antcom.de> | 2019-02-17 12:55:13 +0100 |
---|---|---|
committer | Roland Stigge <stigge@antcom.de> | 2019-02-17 12:55:13 +0100 |
commit | fef594c82518a8fe4c96794852c1fc849c0ed3b3 (patch) | |
tree | 2efbedc8b126a77d91633ce8b9201dc4a7db764c /tuner.cpp | |
parent | 1a219839034e9b11a4771fb84c90d4a2667365ce (diff) |
Added tunerdemo
Diffstat (limited to 'tuner.cpp')
-rw-r--r-- | tuner.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
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<RIT::Tuner::Impl>(size, f_sample)) +{ +} + +RIT::Tuner::~Tuner(){} + +RIT::Pitch RIT::Tuner::operator() (const std::vector<std::complex<double>> &v) +{ + std::vector<std::complex<double>> autoCorrelation = mImpl->mAC(v); + + return Pitch(); +} |