mirror of
https://codeberg.org/armin/horizont.git
synced 2026-09-01 04:10:46 +02:00
update
This commit is contained in:
parent
ed28db30a3
commit
6c0d072465
19 changed files with 2212 additions and 0 deletions
23
Source/PitchShifter.h
Normal file
23
Source/PitchShifter.h
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
#pragma once
|
||||
|
||||
#include <vector>
|
||||
|
||||
class PitchShifter
|
||||
{
|
||||
public:
|
||||
void prepare (double sampleRate);
|
||||
void reset();
|
||||
|
||||
float process (float input, float ratio);
|
||||
|
||||
private:
|
||||
float at (int index) const;
|
||||
float readCubic (float pos) const;
|
||||
|
||||
std::vector<float> buffer;
|
||||
int bufferSize = 0;
|
||||
int writePos = 0;
|
||||
float o = 0.0f;
|
||||
float baseDelay = 0.0f;
|
||||
float window = 0.0f;
|
||||
};
|
||||
Loading…
Add table
Add a link
Reference in a new issue