Rubber Band Library 4.0.0
rubberband-c.h File Reference

Go to the source code of this file.

Macros

#define RUBBERBAND_VERSION   "4.0.0"
 
#define RUBBERBAND_API_MAJOR_VERSION   3
 
#define RUBBERBAND_API_MINOR_VERSION   0
 
#define RB_EXTERN   extern
 

Typedefs

typedef int RubberBandOptions
 
typedef struct RubberBandState_ * RubberBandState
 
typedef int RubberBandLiveOptions
 
typedef struct RubberBandLiveState_ * RubberBandLiveState
 

Enumerations

enum  RubberBandOption {
  RubberBandOptionProcessOffline = 0x00000000 , RubberBandOptionProcessRealTime = 0x00000001 , RubberBandOptionStretchElastic = 0x00000000 , RubberBandOptionStretchPrecise = 0x00000010 ,
  RubberBandOptionTransientsCrisp = 0x00000000 , RubberBandOptionTransientsMixed = 0x00000100 , RubberBandOptionTransientsSmooth = 0x00000200 , RubberBandOptionDetectorCompound = 0x00000000 ,
  RubberBandOptionDetectorPercussive = 0x00000400 , RubberBandOptionDetectorSoft = 0x00000800 , RubberBandOptionPhaseLaminar = 0x00000000 , RubberBandOptionPhaseIndependent = 0x00002000 ,
  RubberBandOptionThreadingAuto = 0x00000000 , RubberBandOptionThreadingNever = 0x00010000 , RubberBandOptionThreadingAlways = 0x00020000 , RubberBandOptionWindowStandard = 0x00000000 ,
  RubberBandOptionWindowShort = 0x00100000 , RubberBandOptionWindowLong = 0x00200000 , RubberBandOptionSmoothingOff = 0x00000000 , RubberBandOptionSmoothingOn = 0x00800000 ,
  RubberBandOptionFormantShifted = 0x00000000 , RubberBandOptionFormantPreserved = 0x01000000 , RubberBandOptionPitchHighSpeed = 0x00000000 , RubberBandOptionPitchHighQuality = 0x02000000 ,
  RubberBandOptionPitchHighConsistency = 0x04000000 , RubberBandOptionChannelsApart = 0x00000000 , RubberBandOptionChannelsTogether = 0x10000000 , RubberBandOptionEngineFaster = 0x00000000 ,
  RubberBandOptionEngineFiner = 0x20000000
}
 This is a C-linkage interface to the Rubber Band time stretcher. More...
 
enum  RubberBandLiveOption {
  RubberBandLiveOptionWindowShort = 0x00000000 , RubberBandLiveOptionWindowMedium = 0x00100000 , RubberBandLiveOptionFormantShifted = 0x00000000 , RubberBandLiveOptionFormantPreserved = 0x01000000 ,
  RubberBandLiveOptionChannelsApart = 0x00000000 , RubberBandLiveOptionChannelsTogether = 0x10000000
}
 

Functions

RB_EXTERN RubberBandState rubberband_new (unsigned int sampleRate, unsigned int channels, RubberBandOptions options, double initialTimeRatio, double initialPitchScale)
 
RB_EXTERN void rubberband_delete (RubberBandState)
 
RB_EXTERN void rubberband_reset (RubberBandState)
 
RB_EXTERN int rubberband_get_engine_version (RubberBandState)
 
RB_EXTERN void rubberband_set_time_ratio (RubberBandState, double ratio)
 
RB_EXTERN void rubberband_set_pitch_scale (RubberBandState, double scale)
 
RB_EXTERN double rubberband_get_time_ratio (const RubberBandState)
 
RB_EXTERN double rubberband_get_pitch_scale (const RubberBandState)
 
RB_EXTERN void rubberband_set_formant_scale (RubberBandState, double scale)
 
RB_EXTERN double rubberband_get_formant_scale (const RubberBandState)
 
RB_EXTERN unsigned int rubberband_get_preferred_start_pad (const RubberBandState)
 
RB_EXTERN unsigned int rubberband_get_start_delay (const RubberBandState)
 
RB_EXTERN unsigned int rubberband_get_latency (const RubberBandState)
 
RB_EXTERN void rubberband_set_transients_option (RubberBandState, RubberBandOptions options)
 
RB_EXTERN void rubberband_set_detector_option (RubberBandState, RubberBandOptions options)
 
RB_EXTERN void rubberband_set_phase_option (RubberBandState, RubberBandOptions options)
 
RB_EXTERN void rubberband_set_formant_option (RubberBandState, RubberBandOptions options)
 
RB_EXTERN void rubberband_set_pitch_option (RubberBandState, RubberBandOptions options)
 
RB_EXTERN void rubberband_set_expected_input_duration (RubberBandState, unsigned int samples)
 
RB_EXTERN unsigned int rubberband_get_samples_required (const RubberBandState)
 
RB_EXTERN void rubberband_set_max_process_size (RubberBandState, unsigned int samples)
 
RB_EXTERN unsigned int rubberband_get_process_size_limit (RubberBandState)
 
RB_EXTERN void rubberband_set_key_frame_map (RubberBandState, unsigned int keyframecount, unsigned int *from, unsigned int *to)
 
RB_EXTERN void rubberband_study (RubberBandState, const float *const *input, unsigned int samples, int final)
 
RB_EXTERN void rubberband_process (RubberBandState, const float *const *input, unsigned int samples, int final)
 
RB_EXTERN int rubberband_available (const RubberBandState)
 
RB_EXTERN unsigned int rubberband_retrieve (const RubberBandState, float *const *output, unsigned int samples)
 
RB_EXTERN unsigned int rubberband_get_channel_count (const RubberBandState)
 
RB_EXTERN void rubberband_calculate_stretch (RubberBandState)
 
RB_EXTERN void rubberband_set_debug_level (RubberBandState, int level)
 
RB_EXTERN void rubberband_set_default_debug_level (int level)
 
RB_EXTERN RubberBandLiveState rubberband_live_new (unsigned int sampleRate, unsigned int channels, RubberBandOptions options)
 
RB_EXTERN void rubberband_live_delete (RubberBandLiveState)
 
RB_EXTERN void rubberband_live_reset (RubberBandLiveState)
 
RB_EXTERN void rubberband_live_set_pitch_scale (RubberBandLiveState, double scale)
 
RB_EXTERN double rubberband_live_get_pitch_scale (const RubberBandLiveState)
 
RB_EXTERN void rubberband_live_set_formant_scale (RubberBandLiveState, double scale)
 
RB_EXTERN double rubberband_live_get_formant_scale (const RubberBandLiveState)
 
RB_EXTERN unsigned int rubberband_live_get_start_delay (const RubberBandLiveState)
 
RB_EXTERN void rubberband_live_set_formant_option (RubberBandLiveState, RubberBandOptions options)
 
RB_EXTERN unsigned int rubberband_live_get_block_size (RubberBandLiveState)
 
RB_EXTERN void rubberband_live_shift (RubberBandLiveState, const float *const *input, float *const *output)
 
RB_EXTERN unsigned int rubberband_live_get_channel_count (const RubberBandLiveState)
 
RB_EXTERN void rubberband_live_set_debug_level (RubberBandLiveState, int level)
 
RB_EXTERN void rubberband_live_set_default_debug_level (int level)
 

Macro Definition Documentation

◆ RUBBERBAND_VERSION

#define RUBBERBAND_VERSION   "4.0.0"

Definition at line 32 of file rubberband-c.h.

◆ RUBBERBAND_API_MAJOR_VERSION

#define RUBBERBAND_API_MAJOR_VERSION   3

Definition at line 33 of file rubberband-c.h.

◆ RUBBERBAND_API_MINOR_VERSION

#define RUBBERBAND_API_MINOR_VERSION   0

Definition at line 34 of file rubberband-c.h.

◆ RB_EXTERN

#define RB_EXTERN   extern

Definition at line 44 of file rubberband-c.h.

Typedef Documentation

◆ RubberBandOptions

typedef int RubberBandOptions

Definition at line 106 of file rubberband-c.h.

◆ RubberBandState

typedef struct RubberBandState_* RubberBandState

Definition at line 109 of file rubberband-c.h.

◆ RubberBandLiveOptions

typedef int RubberBandLiveOptions

Definition at line 177 of file rubberband-c.h.

◆ RubberBandLiveState

typedef struct RubberBandLiveState_* RubberBandLiveState

Definition at line 180 of file rubberband-c.h.

Enumeration Type Documentation

◆ RubberBandOption

This is a C-linkage interface to the Rubber Band time stretcher.

This is a wrapper interface: the primary interface is in C++ and is defined and documented in RubberBandStretcher.h and RubberBandLiveShifter.h. The library itself is implemented in C++, and requires C++ standard library support even when using the C-linkage API.

Please see RubberBandStretcher.h and RubberBandLiveShifter.h for documentation.

If you are writing to the C++ API, do not include this header.

Enumerator
RubberBandOptionProcessOffline 
RubberBandOptionProcessRealTime 
RubberBandOptionStretchElastic 
RubberBandOptionStretchPrecise 
RubberBandOptionTransientsCrisp 
RubberBandOptionTransientsMixed 
RubberBandOptionTransientsSmooth 
RubberBandOptionDetectorCompound 
RubberBandOptionDetectorPercussive 
RubberBandOptionDetectorSoft 
RubberBandOptionPhaseLaminar 
RubberBandOptionPhaseIndependent 
RubberBandOptionThreadingAuto 
RubberBandOptionThreadingNever 
RubberBandOptionThreadingAlways 
RubberBandOptionWindowStandard 
RubberBandOptionWindowShort 
RubberBandOptionWindowLong 
RubberBandOptionSmoothingOff 
RubberBandOptionSmoothingOn 
RubberBandOptionFormantShifted 
RubberBandOptionFormantPreserved 
RubberBandOptionPitchHighSpeed 
RubberBandOptionPitchHighQuality 
RubberBandOptionPitchHighConsistency 
RubberBandOptionChannelsApart 
RubberBandOptionChannelsTogether 
RubberBandOptionEngineFaster 
RubberBandOptionEngineFiner 

Definition at line 62 of file rubberband-c.h.

◆ RubberBandLiveOption

Enumerator
RubberBandLiveOptionWindowShort 
RubberBandLiveOptionWindowMedium 
RubberBandLiveOptionFormantShifted 
RubberBandLiveOptionFormantPreserved 
RubberBandLiveOptionChannelsApart 
RubberBandLiveOptionChannelsTogether 

Definition at line 165 of file rubberband-c.h.

Function Documentation

◆ rubberband_new()

RB_EXTERN RubberBandState rubberband_new ( unsigned int sampleRate,
unsigned int channels,
RubberBandOptions options,
double initialTimeRatio,
double initialPitchScale )

◆ rubberband_delete()

RB_EXTERN void rubberband_delete ( RubberBandState )

◆ rubberband_reset()

RB_EXTERN void rubberband_reset ( RubberBandState )

◆ rubberband_get_engine_version()

RB_EXTERN int rubberband_get_engine_version ( RubberBandState )

◆ rubberband_set_time_ratio()

RB_EXTERN void rubberband_set_time_ratio ( RubberBandState ,
double ratio )

◆ rubberband_set_pitch_scale()

RB_EXTERN void rubberband_set_pitch_scale ( RubberBandState ,
double scale )

◆ rubberband_get_time_ratio()

RB_EXTERN double rubberband_get_time_ratio ( const RubberBandState )

◆ rubberband_get_pitch_scale()

RB_EXTERN double rubberband_get_pitch_scale ( const RubberBandState )

◆ rubberband_set_formant_scale()

RB_EXTERN void rubberband_set_formant_scale ( RubberBandState ,
double scale )

◆ rubberband_get_formant_scale()

RB_EXTERN double rubberband_get_formant_scale ( const RubberBandState )

◆ rubberband_get_preferred_start_pad()

RB_EXTERN unsigned int rubberband_get_preferred_start_pad ( const RubberBandState )

◆ rubberband_get_start_delay()

RB_EXTERN unsigned int rubberband_get_start_delay ( const RubberBandState )

◆ rubberband_get_latency()

RB_EXTERN unsigned int rubberband_get_latency ( const RubberBandState )

◆ rubberband_set_transients_option()

RB_EXTERN void rubberband_set_transients_option ( RubberBandState ,
RubberBandOptions options )

◆ rubberband_set_detector_option()

RB_EXTERN void rubberband_set_detector_option ( RubberBandState ,
RubberBandOptions options )

◆ rubberband_set_phase_option()

RB_EXTERN void rubberband_set_phase_option ( RubberBandState ,
RubberBandOptions options )

◆ rubberband_set_formant_option()

RB_EXTERN void rubberband_set_formant_option ( RubberBandState ,
RubberBandOptions options )

◆ rubberband_set_pitch_option()

RB_EXTERN void rubberband_set_pitch_option ( RubberBandState ,
RubberBandOptions options )

◆ rubberband_set_expected_input_duration()

RB_EXTERN void rubberband_set_expected_input_duration ( RubberBandState ,
unsigned int samples )

◆ rubberband_get_samples_required()

RB_EXTERN unsigned int rubberband_get_samples_required ( const RubberBandState )

◆ rubberband_set_max_process_size()

RB_EXTERN void rubberband_set_max_process_size ( RubberBandState ,
unsigned int samples )

◆ rubberband_get_process_size_limit()

RB_EXTERN unsigned int rubberband_get_process_size_limit ( RubberBandState )

◆ rubberband_set_key_frame_map()

RB_EXTERN void rubberband_set_key_frame_map ( RubberBandState ,
unsigned int keyframecount,
unsigned int * from,
unsigned int * to )

◆ rubberband_study()

RB_EXTERN void rubberband_study ( RubberBandState ,
const float *const * input,
unsigned int samples,
int final )

◆ rubberband_process()

RB_EXTERN void rubberband_process ( RubberBandState ,
const float *const * input,
unsigned int samples,
int final )

◆ rubberband_available()

RB_EXTERN int rubberband_available ( const RubberBandState )

◆ rubberband_retrieve()

RB_EXTERN unsigned int rubberband_retrieve ( const RubberBandState ,
float *const * output,
unsigned int samples )

◆ rubberband_get_channel_count()

RB_EXTERN unsigned int rubberband_get_channel_count ( const RubberBandState )

◆ rubberband_calculate_stretch()

RB_EXTERN void rubberband_calculate_stretch ( RubberBandState )

◆ rubberband_set_debug_level()

RB_EXTERN void rubberband_set_debug_level ( RubberBandState ,
int level )

◆ rubberband_set_default_debug_level()

RB_EXTERN void rubberband_set_default_debug_level ( int level)

◆ rubberband_live_new()

RB_EXTERN RubberBandLiveState rubberband_live_new ( unsigned int sampleRate,
unsigned int channels,
RubberBandOptions options )

◆ rubberband_live_delete()

RB_EXTERN void rubberband_live_delete ( RubberBandLiveState )

◆ rubberband_live_reset()

RB_EXTERN void rubberband_live_reset ( RubberBandLiveState )

◆ rubberband_live_set_pitch_scale()

RB_EXTERN void rubberband_live_set_pitch_scale ( RubberBandLiveState ,
double scale )

◆ rubberband_live_get_pitch_scale()

RB_EXTERN double rubberband_live_get_pitch_scale ( const RubberBandLiveState )

◆ rubberband_live_set_formant_scale()

RB_EXTERN void rubberband_live_set_formant_scale ( RubberBandLiveState ,
double scale )

◆ rubberband_live_get_formant_scale()

RB_EXTERN double rubberband_live_get_formant_scale ( const RubberBandLiveState )

◆ rubberband_live_get_start_delay()

RB_EXTERN unsigned int rubberband_live_get_start_delay ( const RubberBandLiveState )

◆ rubberband_live_set_formant_option()

RB_EXTERN void rubberband_live_set_formant_option ( RubberBandLiveState ,
RubberBandOptions options )

◆ rubberband_live_get_block_size()

RB_EXTERN unsigned int rubberband_live_get_block_size ( RubberBandLiveState )

◆ rubberband_live_shift()

RB_EXTERN void rubberband_live_shift ( RubberBandLiveState ,
const float *const * input,
float *const * output )

◆ rubberband_live_get_channel_count()

RB_EXTERN unsigned int rubberband_live_get_channel_count ( const RubberBandLiveState )

◆ rubberband_live_set_debug_level()

RB_EXTERN void rubberband_live_set_debug_level ( RubberBandLiveState ,
int level )

◆ rubberband_live_set_default_debug_level()

RB_EXTERN void rubberband_live_set_default_debug_level ( int level)