Marsyas  0.5.0-beta1
Public Member Functions
SoundFileSourceHopper Class Reference

Generates slices from a sound file source in a sliding window fashion with hopping. More...

#include <SoundFileSourceHopper.h>

Inherits MarSystem.

Public Member Functions

MarSystemclone () 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.

Detailed Description

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.

See also:
SoundFileSource, ShiftInput, MixToMono


Additional SoundFileSource settings can be configured through the internal SoundFileSource "src", for example with a control string like "SoundFileSource/src/mrs_string/currentlyPlaying".

: provide reset functionality to reset the Shiftinput memory and also takes reseting the SoundFileSource into account.

Definition at line 76 of file SoundFileSourceHopper.h.

Constructor & Destructor Documentation

SoundFileSourceHopper ( std::string  name)

SoundFileSourceHopper constructor.

Add any specific controls needed by this MarSystem.

Definition at line 27 of file SoundFileSourceHopper.cpp.

SoundFileSourceHopper copy constructor.

Definition at line 45 of file SoundFileSourceHopper.cpp.

SoundFileSourceHopper destructor.

Definition at line 67 of file SoundFileSourceHopper.cpp.

Member Function Documentation

MarSystem * clone ( ) const [virtual]

Implementation of the MarSystem::clone() method.

Implements MarSystem.

Definition at line 72 of file SoundFileSourceHopper.cpp.

void myProcess ( realvec in,
realvec out 
) [virtual]

Implementation of the MarSystem::myProcess method.

Implements MarSystem.

Definition at line 161 of file SoundFileSourceHopper.cpp.

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