WorldSynth2.h 754 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef WORLDSYNTH2_H
  2. #define WORLDSYNTH2_H
  3. // move to sekai
  4. #include <world/synthesis.h>
  5. #include "sekai/OLABuffer.h"
  6. class WorldSynth2 : public OLABuffer {
  7. float f0;
  8. bool silence;
  9. int fft_size;
  10. int fs;
  11. ForwardRealFFT forward_real_fft;
  12. InverseRealFFT inverse_real_fft;
  13. MinimumPhaseAnalysis minimum_phase;
  14. double *aperiodic_response;
  15. double *periodic_response;
  16. double *dc_remover;
  17. double *response;
  18. double *spectral_envelope;
  19. double *aperiodic_ratio;
  20. public:
  21. WorldSynth2(int bufferLen, int fft_size, int fs);
  22. void setF0(float f0) { this->f0 = f0; }
  23. void setSilence() { this->silence = true; }
  24. void setFrame(float *mel_cepstrum1, float *mel_cepstrum2,
  25. int cepstrum_length);
  26. void doSynth();
  27. };
  28. #endif