Marsyas
0.6.0-alpha
|
Generates slices from a sound file source in a sliding window fashion with hopping. More...
#include <SoundFileSourceHopper.h>
Inherits MarSystem.
Public Member Functions | |
MarSystem * | clone () const |
Implementation of the MarSystem::clone() method. | |
void | myProcess (realvec &in, realvec &out) |
Implementation of the MarSystem::myProcess method. | |
SoundFileSourceHopper (std::string name) | |
SoundFileSourceHopper constructor. | |
SoundFileSourceHopper (const SoundFileSourceHopper &a) | |
SoundFileSourceHopper copy constructor. | |
~SoundFileSourceHopper () | |
SoundFileSourceHopper destructor. |
Generates slices from a sound file source in a sliding window fashion with hopping.
The SoundFileSourceHopper provides the basic IO functionality in audio processing of producing slices of audio data in a sliding window fashion with a given window size and hop size.
Traditionally, a sliding window with hopping had to be implemented in Marsyas by a normal SoundFileSource Marsystem (without hopping), followed by a ShiftInput Marsystem (to provide the hopping). This was not very intuitive, e.g. there was no explicit "hopSize" control. Moreover, the hop size had to be set through the window size of the top level MarSystem, which was unobvious, lead too easily to bugs with wrongly overwritten hop sizes and made it near to impossible to provide it as a reusable component. The SoundFileSourceHopper is designed to be a reusable sliding/hopping windowing component for without the issues mentioned above.
The implementation of SoundFileSourceHopper is largely based on Series, especially SoundFileSourceHopper::myUpdate() and SoundFileSourceHopper::myProcess(). The main difference is that SoundFileSourceHopper is prefilled with a SoundFileSource, ShiftInput and MixToMono MarSystem and SoundFileSourceHopper::myUpdate() sets the inSamples control of the internal SoundFileSource based on the desired hop size instead of the inSamples control of the container.
Controls:
Additional SoundFileSource settings can be configured through the internal SoundFileSource "src", for example with a control string like "SoundFileSource/src/mrs_string/currentlyPlaying".
Definition at line 76 of file SoundFileSourceHopper.h.
SoundFileSourceHopper | ( | std::string | name | ) |
SoundFileSourceHopper constructor.
Add any specific controls needed by this MarSystem.
Definition at line 27 of file SoundFileSourceHopper.cpp.
SoundFileSourceHopper | ( | const SoundFileSourceHopper & | a | ) |
SoundFileSourceHopper copy constructor.
Definition at line 45 of file SoundFileSourceHopper.cpp.
SoundFileSourceHopper destructor.
Definition at line 67 of file SoundFileSourceHopper.cpp.
Implementation of the MarSystem::clone() method.
Implements MarSystem.
Definition at line 72 of file SoundFileSourceHopper.cpp.
Implementation of the MarSystem::myProcess method.
Implements MarSystem.
Definition at line 161 of file SoundFileSourceHopper.cpp.