24#ifndef RUBBERBAND_LIVE_SHIFTER_H
25#define RUBBERBAND_LIVE_SHIFTER_H
27#define RUBBERBAND_VERSION "4.0.0"
28#define RUBBERBAND_API_MAJOR_VERSION 3
29#define RUBBERBAND_API_MINOR_VERSION 0
31#undef RUBBERBAND_LIVE_DLLEXPORT
33#define RUBBERBAND_LIVE_DLLEXPORT __declspec(dllexport)
35#define RUBBERBAND_LIVE_DLLEXPORT
99 OptionWindowShort = 0x00000000,
100 OptionWindowMedium = 0x00100000,
102 OptionFormantShifted = 0x00000000,
103 OptionFormantPreserved = 0x01000000,
105 OptionChannelsApart = 0x00000000,
106 OptionChannelsTogether = 0x10000000
118 DefaultOptions = 0x00000000
141 virtual void log(
const char *) = 0;
144 virtual void log(
const char *,
double) = 0;
147 virtual void log(
const char *,
double,
double) = 0;
176 std::shared_ptr<Logger> logger,
303 void shift(
const float *
const *input,
float *
const *output);
#define RUBBERBAND_LIVE_DLLEXPORT
RubberBandLiveShifter(const RubberBandLiveShifter &)=delete
RubberBandLiveShifter(size_t sampleRate, size_t channels, std::shared_ptr< Logger > logger, Options options)
Construct a pitch shifter object with a custom debug logger.
double getPitchScale() const
Return the last pitch scaling ratio value that was set (either on construction or with setPitchScale(...
static void setDefaultDebugLevel(int level)
Set the default level of debug output for subsequently constructed shifters.
RubberBandLiveShifter & operator=(const RubberBandLiveShifter &)=delete
void setFormantOption(Options options)
Change an OptionFormant configuration setting.
void setPitchScale(double scale)
Set the pitch scaling ratio for the shifter.
void shift(const float *const *input, float *const *output)
Pitch-shift a single block of sample frames.
size_t getStartDelay() const
Return the output delay of the shifter.
void setFormantScale(double scale)
Set a pitch scale for the vocal formant envelope separately from the overall pitch scale.
size_t getBlockSize() const
Query the number of sample frames that must be passed to, and will be returned by,...
double getFormantScale() const
Return the last formant scaling ratio that was set with setFormantScale, or 0.0 if the default automa...
void reset()
Reset the shifter's internal buffers.
RubberBandLiveShifter(size_t sampleRate, size_t channels, Options options)
Construct a pitch shifter object to run at the given sample rate, with the given number of channels.
size_t getChannelCount() const
Return the number of channels this shifter was constructed with.
int Options
A bitwise OR of values from the RubberBandLiveShifter::Option enum.
void setDebugLevel(int level)
Set the level of debug output.
Interface for log callbacks that may optionally be provided to the shifter on construction.
virtual void log(const char *, double)=0
Receive a log message and one accompanying numeric value.
virtual void log(const char *, double, double)=0
Receive a log message and two accompanying numeric values.
virtual void log(const char *)=0
Receive a log message with no numeric values.