Nsound
0.9.4
|
WSOLA. More...
#include <Nsound/Stretcher.h>
Public Member Functions | |
Stretcher (const float64 &sample_rate, const float64 &window_size_seconds=0.08, const float64 &max_delta_window=0.25) | |
Default Constructor. More... | |
Stretcher (const Stretcher ©) | |
Copy constructor. More... | |
virtual | ~Stretcher () |
Destructor. More... | |
Stretcher & | operator= (const Stretcher &rhs) |
Assignment. More... | |
AudioStream | pitchShift (const AudioStream &x, const float64 &factor) |
AudioStream | pitchShift (const AudioStream &x, const Buffer &factor) |
Buffer | pitchShift (const Buffer &x, const float64 &factor) |
Buffer | pitchShift (const Buffer &x, const Buffer &factor) |
void | showProgress (boolean flag) |
AudioStream | timeShift (const AudioStream &x, const float64 &factor) |
AudioStream | timeShift (const AudioStream &x, const Buffer &factor) |
Buffer | timeShift (const Buffer &x, const float64 &factor) |
Buffer | timeShift (const Buffer &x, const Buffer &factor) |
Protected Member Functions | |
void | analyize (const Buffer &input, const float64 &factor) |
void | analyize (const Buffer &input, const Buffer &factor) |
uint32 | searchForBestMatch (const Buffer &input, uint32 source_index, uint32 search_index) const |
Buffer | overlapAdd (const Buffer &input) const |
Protected Attributes | |
Buffer * | frames_ |
float64 | sample_rate_ |
Buffer * | window_ |
uint32 | window_length_ |
uint32 | max_delta_ |
boolean | show_progress_ |
WSOLA.
Definition at line 49 of file Stretcher.h.
Stretcher::Stretcher | ( | const float64 & | sample_rate, |
const float64 & | window_size_seconds = 0.08 , |
||
const float64 & | max_delta_window = 0.25 |
||
) |
Default Constructor.
sample_rate: the sample rate window_size: default window size in seconds max_delta_window: percent of window size to search for best fit
Definition at line 54 of file Stretcher.cc.
References Nsound::Generator::drawWindowHanning(), frames_, Nsound::Buffer::getLength(), max_delta_, window_, and window_length_.
Stretcher::Stretcher | ( | const Stretcher & | copy | ) |
Copy constructor.
Definition at line 77 of file Stretcher.cc.
References frames_, window_, and window_length_.
|
virtual |
Assignment.
Definition at line 103 of file Stretcher.cc.
References frames_, max_delta_, sample_rate_, show_progress_, window_, and window_length_.
AudioStream Stretcher::pitchShift | ( | const AudioStream & | x, |
const float64 & | factor | ||
) |
Definition at line 338 of file Stretcher.cc.
References analyize(), Nsound::AudioStream::getMono(), Nsound::AudioStream::getNChannels(), Nsound::AudioStream::getSampleRate(), and overlapAdd().
Referenced by main().
AudioStream Stretcher::pitchShift | ( | const AudioStream & | x, |
const Buffer & | factor | ||
) |
Definition at line 355 of file Stretcher.cc.
References analyize(), Nsound::AudioStream::getMono(), Nsound::AudioStream::getNChannels(), Nsound::AudioStream::getSampleRate(), and overlapAdd().
Definition at line 372 of file Stretcher.cc.
References analyize(), Nsound::Buffer::getResample(), and overlapAdd().
Definition at line 384 of file Stretcher.cc.
References analyize(), Nsound::Buffer::getSpeedUp(), and overlapAdd().
|
inline |
Definition at line 86 of file Stretcher.h.
References show_progress_.
Referenced by main(), and stretch_to().
AudioStream Stretcher::timeShift | ( | const AudioStream & | x, |
const float64 & | factor | ||
) |
Definition at line 396 of file Stretcher.cc.
References analyize(), Nsound::AudioStream::getMono(), Nsound::AudioStream::getNChannels(), Nsound::AudioStream::getSampleRate(), and overlapAdd().
Referenced by main().
AudioStream Stretcher::timeShift | ( | const AudioStream & | x, |
const Buffer & | factor | ||
) |
Definition at line 413 of file Stretcher.cc.
References analyize(), Nsound::AudioStream::getMono(), Nsound::AudioStream::getNChannels(), Nsound::AudioStream::getSampleRate(), and overlapAdd().
Definition at line 430 of file Stretcher.cc.
References analyize(), and overlapAdd().
Definition at line 442 of file Stretcher.cc.
References analyize(), and overlapAdd().
Definition at line 119 of file Stretcher.cc.
Referenced by pitchShift(), and timeShift().
Definition at line 129 of file Stretcher.cc.
References Nsound::Buffer::cbegin(), frames_, Nsound::Buffer::getLength(), searchForBestMatch(), show_progress_, and window_length_.
|
protected |
Definition at line 209 of file Stretcher.cc.
References Nsound::FFTransform::fft(), Nsound::Buffer::getSum(), max_delta_, Nsound::Buffer::subbuffer(), and window_length_.
Referenced by analyize().
Definition at line 281 of file Stretcher.cc.
References Nsound::Buffer::add(), Nsound::Generator::drawLine(), frames_, Nsound::Buffer::getLength(), Nsound::Buffer::getReverse(), sample_rate_, show_progress_, Nsound::Buffer::subbuffer(), window_, and window_length_.
Referenced by pitchShift(), and timeShift().
|
protected |
Definition at line 117 of file Stretcher.h.
Referenced by analyize(), operator=(), overlapAdd(), Stretcher(), and ~Stretcher().
|
protected |
Definition at line 118 of file Stretcher.h.
Referenced by operator=(), and overlapAdd().
|
protected |
Definition at line 119 of file Stretcher.h.
Referenced by operator=(), overlapAdd(), Stretcher(), and ~Stretcher().
|
protected |
Definition at line 120 of file Stretcher.h.
Referenced by analyize(), operator=(), overlapAdd(), searchForBestMatch(), and Stretcher().
|
protected |
Definition at line 121 of file Stretcher.h.
Referenced by operator=(), searchForBestMatch(), and Stretcher().
|
protected |
Definition at line 122 of file Stretcher.h.
Referenced by analyize(), operator=(), overlapAdd(), and showProgress().