Attempt adding control of refresh rate of random phases but some problem getting the plugin parameter to work

This commit is contained in:
xenakios
2018-11-15 20:14:56 +02:00
parent b192c720d7
commit e5af6e1da1
6 changed files with 60 additions and 7 deletions

View File

@ -124,13 +124,22 @@ class FFT
void applywindow(FFTWindow type);
std::vector<REALTYPE> smp;//size of samples/2
std::vector<REALTYPE> freq;//size of samples
std::vector<unsigned int> phases;
int nsamples=0;
void setPhaseRefreshRate(int rate)
{
m_phaserefreshrate = rate;
}
private:
fftwf_plan planfftw,planifftw;
FFTWBuffer<REALTYPE> data;
int m_phaserefreshcounter = 0;
int m_phaserefreshrate = 1;
void updatePhases();
struct{
std::vector<REALTYPE> data;
FFTWindow type;
@ -165,7 +174,11 @@ class Stretch
freezing=new_freezing;
};
bool isFreezing() { return freezing; }
void setPhaseRefreshRate(int rate)
{
jassert(fft != nullptr);
fft->setPhaseRefreshRate(rate);
}
std::vector<REALTYPE> out_buf;//pot sa pun o variabila "max_out_bufsize" si asta sa fie marimea lui out_buf si pe out_bufsize sa il folosesc ca marime adaptiva
int get_nsamples(REALTYPE current_pos_percents);//how many samples are required