arduino-audio-tools
Loading...
Searching...
No Matches
Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
PitchShift Class Reference

Shifts the pitch by the indicated step size: e.g. 2 doubles the pitch. More...

#include <AudioEffect.h>

Inheritance diagram for PitchShift:
AudioEffect

Public Member Functions

 PitchShift (const PitchShift &ref)
 
 PitchShift (float shift_value=1.0, int buffer_size=1000)
 
virtual bool active ()
 determines if the effect is active
 
PitchShiftclone ()
 
int id ()
 Allows to identify an effect.
 
effect_t process (effect_t input)
 calculates the effect output from the input
 
virtual void setActive (bool value)
 sets the effect active/inactive
 
void setId (int id)
 Allows to identify an effect.
 
void setValue (float value)
 
float value ()
 

Protected Member Functions

int16_t clip (int32_t in, int16_t clipLimit=32767, int16_t resultLimit=32767)
 generic clipping method
 
void copyParent (AudioEffect *copy)
 

Protected Attributes

bool active_flag = true
 
VariableSpeedRingBuffer< int16_tbuffer
 
float effect_value
 
int id_value = -1
 
int size
 

Detailed Description

Shifts the pitch by the indicated step size: e.g. 2 doubles the pitch.

Author
Phil Schatzmann

Constructor & Destructor Documentation

◆ PitchShift() [1/2]

PitchShift ( float  shift_value = 1.0,
int  buffer_size = 1000 
)
inline

Boost Constructor: volume 0.1 - 1.0: decrease result; volume >0: increase result

◆ PitchShift() [2/2]

PitchShift ( const PitchShift ref)
inline

Member Function Documentation

◆ active()

virtual bool active ( )
inlinevirtualinherited

determines if the effect is active

◆ clip()

int16_t clip ( int32_t  in,
int16_t  clipLimit = 32767,
int16_t  resultLimit = 32767 
)
inlineprotectedinherited

generic clipping method

◆ clone()

PitchShift * clone ( )
inlinevirtual

Implements AudioEffect.

◆ copyParent()

void copyParent ( AudioEffect copy)
inlineprotectedinherited

◆ id()

int id ( )
inlineinherited

Allows to identify an effect.

◆ process()

effect_t process ( effect_t  in)
inlinevirtual

calculates the effect output from the input

Implements AudioEffect.

◆ setActive()

virtual void setActive ( bool  value)
inlinevirtualinherited

sets the effect active/inactive

◆ setId()

void setId ( int  id)
inlineinherited

Allows to identify an effect.

◆ setValue()

void setValue ( float  value)
inline

◆ value()

float value ( )
inline

Member Data Documentation

◆ active_flag

bool active_flag = true
protectedinherited

◆ buffer

VariableSpeedRingBuffer<int16_t> buffer
protected

◆ effect_value

float effect_value
protected

◆ id_value

int id_value = -1
protectedinherited

◆ size

int size
protected

The documentation for this class was generated from the following file: