Rubber Band Library
1.8.1
|
Go to the documentation of this file.
24 #ifndef _RUBBERBANDSTRETCHER_H_
25 #define _RUBBERBANDSTRETCHER_H_
27 #define RUBBERBAND_VERSION "1.8.1"
28 #define RUBBERBAND_API_MAJOR_VERSION 2
29 #define RUBBERBAND_API_MINOR_VERSION 5
336 double initialTimeRatio = 1.0,
337 double initialPitchScale = 1.0);
561 void study(
const float *
const *input,
size_t samples,
bool final);
569 void process(
const float *
const *input,
size_t samples,
bool final);
593 size_t retrieve(
float *
const *output,
size_t samples)
const;
void setPitchOption(Options options)
Change an OptionPitch configuration setting.
float getFrequencyCutoff(int n) const
Return the value of internal frequency cutoff value n.
void setFormantOption(Options options)
Change an OptionFormant configuration setting.
void setDetectorOption(Options options)
Change an OptionDetector configuration setting.
void setMaxProcessSize(size_t samples)
Tell the stretcher the maximum number of sample frames that you will ever be passing in to a single p...
size_t getLatency() const
Return the processing latency of the stretcher.
static void setDefaultDebugLevel(int level)
Set the default level of debug output for subsequently constructed stretchers.
size_t getSamplesRequired() const
Ask the stretcher how many audio sample frames should be provided as input in order to ensure that so...
int available() const
Ask the stretcher how many audio sample frames of output data are available for reading (via retrieve...
std::vector< int > getOutputIncrements() const
In offline mode, retrieve the sequence of internal block increments for output, for the entire audio ...
@ OptionPitchHighConsistency
std::vector< int > getExactTimePoints() const
In offline mode, retrieve the sequence of internal frames for which exact timing has been sought,...
std::vector< float > getPhaseResetCurve() const
In offline mode, retrieve the sequence of internal phase reset detection function values,...
Option
Processing options for the timestretcher.
void calculateStretch()
Force the stretcher to calculate a stretch profile.
size_t retrieve(float *const *output, size_t samples) const
Obtain some processed output data from the stretcher.
void setPitchScale(double scale)
Set the pitch scaling ratio for the stretcher.
size_t getInputIncrement() const
Retrieve the value of the internal input block increment value.
void setKeyFrameMap(const std::map< size_t, size_t > &)
Provide a set of mappings from "before" to "after" sample numbers so as to enforce a particular stret...
void setExpectedInputDuration(size_t samples)
Tell the stretcher exactly how many input samples it will receive.
void study(const float *const *input, size_t samples, bool final)
Provide a block of "samples" sample frames for the stretcher to study and calculate a stretch profile...
double getPitchScale() const
Return the last pitch scaling ratio value that was set (either on construction or with setPitchScale(...
@ OptionDetectorPercussive
size_t getChannelCount() const
Return the number of channels this stretcher was constructed with.
double getTimeRatio() const
Return the last time ratio value that was set (either on construction or with setTimeRatio()).
void setPhaseOption(Options options)
Change an OptionPhase configuration setting.
void setFrequencyCutoff(int n, float f)
Set the value of internal frequency cutoff n to f Hz.
void setDebugLevel(int level)
Set the level of debug output.
void setTimeRatio(double ratio)
Set the time ratio for the stretcher.
void reset()
Reset the stretcher's internal buffers.
void setTransientsOption(Options options)
Change an OptionTransients configuration setting.
void process(const float *const *input, size_t samples, bool final)
Provide a block of "samples" sample frames for processing.
RubberBandStretcher(size_t sampleRate, size_t channels, Options options=DefaultOptions, double initialTimeRatio=1.0, double initialPitchScale=1.0)
Construct a time and pitch stretcher object to run at the given sample rate, with the given number of...