|
libpsynth 0.2.1
|
Scaler implementation using the RubberBand library. More...
#include <scaler.hpp>
Public Types | |
| typedef Range | range |
Public Member Functions | |
| static_assert (std::is_same< soundtouch::SAMPLETYPE, float >::value,"Soundtouch SAMPLETYPE must be flaot.") | |
| static_assert (scaler_support< Range >::is_supported::value,"Soundtouch supports only interleaved bits32sf ranges.") | |
| scaler (std::size_t frame_rate) | |
| Constructor. | |
| void | set_tempo (float tempo) |
| Sets the tempo factor. | |
| void | set_rate (float rate) |
| Sets the new sampling rate factor. | |
| void | set_pitch (float pitch) |
| Sets the new pitch factor. | |
| void | set_frame_rate (int samplerate) |
| Sets the sample rate of the original signal. | |
| float | tempo () |
| Returns the tempo scaling factor. | |
| float | rate () |
| Returns the rate scaling factor. | |
| float | pitch () |
| Returns the pitch scaling factor. | |
| std::size_t | available () |
| Returns the ammount of data availible in the scaler. | |
| std::size_t | receive (const Range &data) |
| Pops some data already processed in the scaler. | |
| void | update (const Range &data) |
| Push some data for scaling. | |
| void | clear () |
| Clears all the data left in the scaler. | |
Public Attributes | |
| float | _tempo |
| float | _rate |
| float | _pitch |
| soundtouch::SoundTouch | _st |
Scaler implementation using the RubberBand library.
| typedef Range psynth::synth::scaler< Range >::range |
| psynth::synth::scaler< Range >::scaler | ( | std::size_t | frame_rate | ) | [inline] |
Constructor.
| std::size_t psynth::synth::scaler< Range >::available | ( | ) | [inline] |
Returns the ammount of data availible in the scaler.
| void psynth::synth::scaler< Range >::clear | ( | ) | [inline] |
Clears all the data left in the scaler.
| float psynth::synth::scaler< Range >::pitch | ( | ) | [inline] |
Returns the pitch scaling factor.
| float psynth::synth::scaler< Range >::rate | ( | ) | [inline] |
Returns the rate scaling factor.
| std::size_t psynth::synth::scaler< Range >::receive | ( | const Range & | data | ) | [inline] |
Pops some data already processed in the scaler.
| data | The buffer to store the data. It will be stored in interleaved format. |
| samples | The maximum number of samples to receive. |
| void psynth::synth::scaler< Range >::set_frame_rate | ( | int | samplerate | ) | [inline] |
Sets the sample rate of the original signal.
| samplerate | The sampling rate. |
| void psynth::synth::scaler< Range >::set_pitch | ( | float | pitch | ) | [inline] |
Sets the new pitch factor.
| pitch | The new pitch factor. |
| void psynth::synth::scaler< Range >::set_rate | ( | float | rate | ) | [inline] |
Sets the new sampling rate factor.
| rate | The new rate factor. |
| void psynth::synth::scaler< Range >::set_tempo | ( | float | tempo | ) | [inline] |
Sets the tempo factor.
| tempo | The new tempo factor. |
| psynth::synth::scaler< Range >::static_assert | ( | scaler_support< Range >::is_supported::value | , |
| "Soundtouch supports only interleaved bits32sf ranges." | |||
| ) |
| psynth::synth::scaler< Range >::static_assert | ( | std::is_same< soundtouch::SAMPLETYPE, float >::value | , |
| "Soundtouch SAMPLETYPE must be flaot." | |||
| ) |
| float psynth::synth::scaler< Range >::tempo | ( | ) | [inline] |
Returns the tempo scaling factor.
| void psynth::synth::scaler< Range >::update | ( | const Range & | data | ) | [inline] |
Push some data for scaling.
| data | The buffer with the data to scale in interleaved format. |
| samples | The number of samples to push. |
| float psynth::synth::scaler< Range >::_pitch |
| float psynth::synth::scaler< Range >::_rate |
| soundtouch::SoundTouch psynth::synth::scaler< Range >::_st |
| float psynth::synth::scaler< Range >::_tempo |
1.7.4