blob: df17c0fbcf1be6164cdd155c02029eb91108e99e (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
|
#pragma once
#include <complex>
#include <memory>
#include <string>
#include <vector>
namespace RIT {
struct Pitch {
double f{}; // in Hz
double deviation{}; // 0.0 == perfect, +/-1.0: at next note
std::string name; // "" for none, "A", "A#", ... for notes
};
class Tuner {
public:
Tuner(int size, int f_sample);
~Tuner();
Pitch operator() (const std::vector<std::complex<double>> &v);
private:
struct Impl;
std::unique_ptr<Impl> mImpl;
}; // class Tuner
} // namespace RIT
|