Audaspace 1.8.0
A high level audio library.
Loading...
Searching...
No Matches
TimeStretchPitchScale Class Reference

This sound allows a sound to be time-stretched and pitch scaled. More...

#include <TimeStretchPitchScale.h>

Inheritance diagram for TimeStretchPitchScale:

Public Member Functions

 TimeStretchPitchScale (std::shared_ptr< ISound > sound, double timeRatio, double pitchScale, StretcherQuality quality, bool preserveFormant)
 Creates a new time-stretch, pitch scaled sound.
double getTimeRatio () const
 Returns the time ratio.
double getPitchScale () const
 Returns the pitch scale.
bool getPreserveFormant () const
 Returns whether formant preservation is enabled.
StretcherQuality getStretcherQuality () const
 Returns the quality of the stretcher.
virtual std::shared_ptr< IReadercreateReader ()
 Creates a reader for playback of the sound source.
Public Member Functions inherited from Effect
 Effect (std::shared_ptr< ISound > sound)
 Creates a new sound.
virtual ~Effect ()
 Destroys the sound.
std::shared_ptr< ISoundgetSound () const
 Returns the saved sound.
Public Member Functions inherited from ISound
virtual ~ISound ()
 Destroys the sound.

Additional Inherited Members

Protected Member Functions inherited from Effect
std::shared_ptr< IReadergetReader () const
 Returns the reader created out of the sound.
Protected Attributes inherited from Effect
std::shared_ptr< ISoundm_sound
 If there is no reader it is created out of this sound.

Detailed Description

This sound allows a sound to be time-stretched and pitch scaled.

Note
The reader has to be seekable.

Constructor & Destructor Documentation

◆ TimeStretchPitchScale()

TimeStretchPitchScale::TimeStretchPitchScale ( std::shared_ptr< ISound > sound,
double timeRatio,
double pitchScale,
StretcherQuality quality,
bool preserveFormant )

Creates a new time-stretch, pitch scaled sound.

Parameters
soundThe input sound.
timeRatioThe factor by which to stretch or compress time.
pitchScaleThe factor by which to adjust the pitch.
qualityThe processing quality level.
preserveFormantWhether to preserve the vocal formants for the stretcher.

Member Function Documentation

◆ createReader()

virtual std::shared_ptr< IReader > TimeStretchPitchScale::createReader ( )
virtual

Creates a reader for playback of the sound source.

Returns
A pointer to an IReader object or nullptr if there has been an error.
Exceptions
ExceptionAn exception may be thrown if there has been a more unexpected error during reader creation.

Implements ISound.


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