FIFE  6e1afdbeda11afe9ac53e6023a4be96ef88f1dc6
FIFE::PitchShifter Class Reference

The pitch shifter applies time-invariant pitch shifting to the input signal, over a one octave range and controllable at a semi-tone and cent resolution. More...

#include <soundeffect.h>

+ Inheritance diagram for FIFE::PitchShifter:
+ Collaboration diagram for FIFE::PitchShifter:

Public Member Functions

 PitchShifter ()
 Constructor. More...
 
void setCoarseTune (int16_t value)
 Sets coarse tune, the number of semitones by which the pitch is shifted. More...
 
int16_t getCoarseTune () const
 Return coarse tune. More...
 
void setFineTune (int16_t value)
 Sets fine tune, the number of cents between Semitones a pitch is shifted. More...
 
int16_t getFineTune () const
 Return fine tune. More...
 
- Public Member Functions inherited from FIFE::SoundEffect
 SoundEffect ()
 Constructor. More...
 
virtual ~SoundEffect ()
 Destructor. More...
 
ALuint getEffectId () const
 Return the OpenAL effect handle. More...
 
void setSlotId (ALuint slot)
 Sets the OpenAL auxiliary slot handle. More...
 
ALuint getSlotId ()
 Return the OpenAL auxiliary slot handle. More...
 
SoundEffectType getEffectType () const
 Return sound effect type. More...
 
void setEnabled (bool enabled)
 Enables or disables the effect. More...
 
bool isEnabled () const
 Return true if the effect is enabled, false otherwise. More...
 
void setFilter (SoundFilter *filter)
 Sets the additional sound filter. More...
 
SoundFiltergetFilter ()
 Return sound filter or NULL. More...
 

Private Attributes

int16_t m_coarseTune
 
int16_t m_fineTune
 

Additional Inherited Members

- Protected Attributes inherited from FIFE::SoundEffect
ALuint m_effect
 Effect object id. More...
 
ALuint m_slot
 Effect slot id;. More...
 
SoundEffectType m_effectType
 Sound effect type. More...
 
bool m_enabled
 Effect enabled. More...
 
SoundFilterm_filter
 Additional filter effect. More...
 

Detailed Description

The pitch shifter applies time-invariant pitch shifting to the input signal, over a one octave range and controllable at a semi-tone and cent resolution.

Definition at line 658 of file soundeffect.h.

Constructor & Destructor Documentation

FIFE::PitchShifter::PitchShifter ( )

Member Function Documentation

int16_t FIFE::PitchShifter::getCoarseTune ( ) const

Return coarse tune.

Definition at line 679 of file soundeffect.cpp.

References m_coarseTune.

int16_t FIFE::PitchShifter::getFineTune ( ) const

Return fine tune.

Definition at line 690 of file soundeffect.cpp.

References m_fineTune.

void FIFE::PitchShifter::setCoarseTune ( int16_t  value)

Sets coarse tune, the number of semitones by which the pitch is shifted.

There are 12 semitones per octave.

Parameters
valueRange -12 to 12, default 12.

Definition at line 672 of file soundeffect.cpp.

References FIFE::alEffecti, m_coarseTune, and FIFE::SoundEffect::m_effect.

void FIFE::PitchShifter::setFineTune ( int16_t  value)

Sets fine tune, the number of cents between Semitones a pitch is shifted.

A Cent is 1/100th of a Semitone.

Parameters
valueRange -50 to 50, default 0.

Definition at line 683 of file soundeffect.cpp.

References FIFE::alEffecti, FIFE::SoundEffect::m_effect, and m_fineTune.

Member Data Documentation

int16_t FIFE::PitchShifter::m_coarseTune
private

Definition at line 685 of file soundeffect.h.

Referenced by getCoarseTune(), and setCoarseTune().

int16_t FIFE::PitchShifter::m_fineTune
private

Definition at line 686 of file soundeffect.h.

Referenced by getFineTune(), and setFineTune().


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