VISR  0.12.0
Versatile Interactive Scene Renderer
visr::rcl::TimeFrequencyTransform Class Reference

#include <time_frequency_transform.hpp>

Inheritance diagram for visr::rcl::TimeFrequencyTransform:
visr::AtomicComponent visr::Component

Public Types

using SampleType = visr::SampleType
 

Public Member Functions

 TimeFrequencyTransform (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfChannels, std::size_t dftLength, std::size_t windowLength, std::size_t hopSize, char const *fftImplementation="default")
 
 TimeFrequencyTransform (SignalFlowContext const &context, char const *name, CompositeComponent *parent, std::size_t numberOfChannels, std::size_t dftLength, efl::BasicVector< SampleType > const &window, std::size_t hopSize, char const *fftImplementation="default")
 
 ~TimeFrequencyTransform () override
 
void process () override
 
- Public Member Functions inherited from visr::AtomicComponent
 AtomicComponent (SignalFlowContext const &context, char const *name, CompositeComponent *parent=nullptr)
 
 AtomicComponent (AtomicComponent const &)=delete
 
 AtomicComponent (AtomicComponent &&)=delete
 
virtual ~AtomicComponent () override
 
- Public Member Functions inherited from visr::Component
 Component (SignalFlowContext const &context, char const *componentName, CompositeComponent *parent)
 
 Component (SignalFlowContext const &context, std::string const &componentName, CompositeComponent *parent)
 
 Component (Component const &)=delete
 
 Component (Component &&)=delete
 
Componentoperator= (Component const &)=delete
 
Componentoperator= (Component &&)=delete
 
virtual ~Component ()
 
std::string const & name () const
 
std::string fullName () const
 
void status (StatusMessage::Kind status, char const *message)
 
template<typename ... MessageArgs>
void status (StatusMessage::Kind status, MessageArgs ... args)
 
bool isComposite () const
 
AudioPortBaseaudioPort (char const *portName)
 
AudioPortBase const & audioPort (char const *portName) const
 
AudioPortBaseaudioPort (std::string const &portName)
 
AudioPortBase const & audioPort (std::string const &portName) const
 
ParameterPortBaseparameterPort (char const *portName)
 
ParameterPortBase const & parameterPort (char const *portName) const
 
ParameterPortBaseparameterPort (std::string const &portName)
 
ParameterPortBase const & parameterPort (std::string const &portName) const
 
SamplingFrequencyType samplingFrequency () const
 
std::size_t period () const
 
bool isTopLevel () const
 
impl::ComponentImplementationimplementation ()
 
impl::ComponentImplementation const & implementation () const
 

Additional Inherited Members

- Static Public Member Functions inherited from visr::Component
static const std::string & nameSeparator ()
 
- Protected Member Functions inherited from visr::Component
 Component (impl::ComponentImplementation *impl)
 

Detailed Description

Component to transform a multichannel input audio signal into a sequence of time-frequency parameter data.

Member Typedef Documentation

◆ SampleType

Constructor & Destructor Documentation

◆ TimeFrequencyTransform() [1/2]

visr::rcl::TimeFrequencyTransform::TimeFrequencyTransform ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent,
std::size_t  numberOfChannels,
std::size_t  dftLength,
std::size_t  windowLength,
std::size_t  hopSize,
char const *  fftImplementation = "default" 
)
explicit

Constructor. Creates a time-frequency transformation component with a default window shape.

Parameters
contextConfiguration object containing basic execution parameters.
nameThe name of the component. Must be unique within the containing composite component (if there is one).
parentPointer to a containing component if there is one. Specify nullptr in case of a top-level component
numberOfChannelsThe number of distinct audio waveforms received through the input audio port.
dftLengthThe size of the DFT transform used. Must be a power of two for most FFT implementations.
windowLengthThe length of the window. A Hann window modified to satisfy the Constant Overlap-Add (COLA) property is used.
hopSizeAdvance (in samples) between successive frames. The component's period size must be an ineger multiple of the hop size.
fftImplementationString desribing the FFT implementation to be used. Optional parameter, defaults to the platform's default FFT implementation.

◆ TimeFrequencyTransform() [2/2]

visr::rcl::TimeFrequencyTransform::TimeFrequencyTransform ( SignalFlowContext const &  context,
char const *  name,
CompositeComponent parent,
std::size_t  numberOfChannels,
std::size_t  dftLength,
efl::BasicVector< SampleType > const &  window,
std::size_t  hopSize,
char const *  fftImplementation = "default" 
)
explicit

Constructor. Creates a time-frequency transformation component with a user-defined window shape.

Parameters
contextConfiguration object containing basic execution parameters.
nameThe name of the component. Must be unique within the containing composite component (if there is one).
parentPointer to a containing component if there is one. Specify nullptr in case of a top-level component
numberOfChannelsThe number of distinct audio waveforms received through the input audio port.
dftLengthThe size of the DFT transform used. Must be a power of two for most FFT implementations.
windowThe coefficients of the window applied to the time-domain input frames.
hopSizeAdvance (in samples) between successive frames. The component's period size must be an ineger multiple of the hop size.
fftImplementationString desribing the FFT implementation to be used. Optional parameter, defaults to the platform's default FFT implementation.

◆ ~TimeFrequencyTransform()

visr::rcl::TimeFrequencyTransform::~TimeFrequencyTransform ( )
overridedefault

Destructor (virtual)

Member Function Documentation

◆ process()

void visr::rcl::TimeFrequencyTransform::process ( )
overridevirtual

Pure virtual process() function. The overriding methods of base classes are called in regular intervals, each processing a fixed number (context.period()) number of samples.

Implements visr::AtomicComponent.


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