Audio Processing Framework (APF) version 0.5.0
Namespaces | Classes | Functions
apf Namespace Reference

Audio Processing Framework. More...

Namespaces

namespace  conv
 Convolution engine.
 
namespace  dp
 Denormal prevention.
 
namespace  math
 Mathematical constants and helper functions.
 
namespace  mex
 Helper functions for creating MEX files.
 
namespace  str
 Helper functions for string manipulation.
 

Classes

class  accumulating_iterator
 An output iterator which adds on assignment. More...
 
class  BiQuad
 Direct Form II recursive filter of second order. More...
 
class  BlockDelayLine
 Block-based delay line. More...
 
class  BlockParameter
 Hold current and old value of any type. More...
 
class  Cascade
 Cascade of filter sections. More...
 
class  cast_iterator
 Iterator that casts items to T* on dereferenciation. More...
 
struct  cast_proxy
 Encapsulate a container of base pointers. More...
 
struct  cast_proxy_const
 Encapsulate a container of base pointers (const version). More...
 
class  circular_iterator
 Circular iterator class. More...
 
class  CombineChannels
 Combine channels: transform and accumulate. More...
 
class  CombineChannelsBase
 Base class for CombineChannels*. More...
 
class  CombineChannelsCopy
 Combine channels: accumulate. More...
 
class  CombineChannelsCrossfade
 Combine channels: transform, crossfade and accumulate. More...
 
class  CombineChannelsCrossfadeBase
 Base class for CombineChannelsCrossfade*. More...
 
class  CombineChannelsCrossfadeCopy
 Combine channels: crossfade and accumulate. More...
 
class  CombineChannelsInterpolation
 Combine channels: interpolate and accumulate. More...
 
class  CommandQueue
 Manage command queue from non-realtime thread to realtime thread. More...
 
class  CRTP
 Curiously Recurring Template Pattern (CRTP) base class. More...
 
class  discard_iterator
 An iterator which does nothing. More...
 
class  dual_iterator
 Iterate over two iterators at once. More...
 
struct  fftw
 Traits class to select float/double/long double versions of FFTW functions. More...
 
struct  fftw< double >
  double specialization of the traits class fftw More...
 
struct  fftw< float >
  float specialization of the traits class fftw More...
 
struct  fftw< long double >
  long double specialization of the traits class fftw More...
 
struct  fftw_allocator
 
class  fixed_list
 Derived from std::list, but without re-sizing. More...
 
class  fixed_matrix
 Two-dimensional data storage for row- and column-wise access. More...
 
class  fixed_vector
 Derived from std::vector, but without memory re-allocations. More...
 
class  has_begin_and_end
 Convenience class providing begin() and end(). More...
 
class  index_iterator
 Iterator with a built-in number. More...
 
class  iterator_proxy
 Helper class for apf::cast_proxy and apf::transform_proxy. More...
 
class  iterator_proxy_const
 Helper class for cast_proxy_const and transform_proxy_const. More...
 
class  jack_policy
 interface_policy using JACK. More...
 
class  JackClient
 C++ wrapper for a JACK client. More...
 
struct  LaplaceCoefficients
 Coefficients of analog recursive filter. More...
 
class  LockFreeFifo< T * >
 Lock-free first-in-first-out (FIFO) queue. More...
 
class  MimoProcessor
 Multi-threaded multiple-input-multiple-output (MIMO) processor. More...
 
class  NonCausalBlockDelayLine
 A block-based delay line where negative delay is possible. More...
 
class  NonCopyable
 Classes derived from this class cannot be copied (but still moved). More...
 
struct  parameter_map
 A "dictionary" for parameters. More...
 
class  pointer_policy< T * >
 interface_policy which uses plain pointers. More...
 
class  portaudio_policy
 interface_policy using PortAudio. More...
 
class  raised_cosine_fade
 Crossfade using a raised cosine. More...
 
class  RtList< T * >
 A list for realtime access and non-realtime modification. More...
 
struct  SosCoefficients
 Coefficients of digital recursive filter (second order section). More...
 
class  StopWatch
 A simple stopwatch. More...
 
class  stride_iterator
 A stride iterator. More...
 
class  transform_iterator
 Iterator adaptor with a function call at dereferenciation. More...
 
struct  transform_proxy
 Wrap a container and provide a transform_iterator instead of the normal one. More...
 
struct  transform_proxy_const
 Wrap a container and provide a transform_iterator (const version). More...
 

Functions

template<typename T >
bool no_nullptr (T *in)
 Check for null-pointer. More...
 
template<typename T >
bool no_nullptr (T &)
 Dummy overload for non-pointers. More...
 
template<typename I , typename... Args>
has_begin_and_end< I > make_begin_and_end (I first, Args &&... args)
 
template<typename I >
accumulating_iterator< I > make_accumulating_iterator (I base_iterator)
 Helper function to create an accumulating_iterator. More...
 
template<typename T , typename I >
cast_iterator< T, I > make_cast_iterator (I base_iterator)
 Helper function to create a cast_iterator. More...
 
template<typename T , typename Container >
cast_proxy< T, Container > make_cast_proxy (Container &l)
 Helper function to create a cast_proxy. More...
 
template<typename T , typename Container >
cast_proxy_const< T, Container > make_cast_proxy_const (Container &l)
 Helper function to create a cast_proxy_const. More...
 
template<typename I >
circular_iterator< I > make_circular_iterator (I begin, I end)
 Helper function to create a circular_iterator. More...
 
template<typename I >
circular_iterator< I > make_circular_iterator (I begin, I end, I current)
 Helper function to create a circular_iterator. More...
 
template<typename I , typename F >
transform_iterator< I, F > make_transform_iterator (I base_iterator, F f)
 Helper function to create a transform_iterator. More...
 
template<typename T >
index_iterator< T > make_index_iterator (T start)
 Helper function to create an index_iterator. More...
 
template<typename I1 , typename I2 >
dual_iterator< I1, I2 > make_dual_iterator (I1 i1, I2 i2)
 Helper function to create an dual_iterator. More...
 
template<typename T >
SosCoefficients< T > bilinear (LaplaceCoefficients< T > coeffs_in, int fs, int fp)
 Bilinear transform. More...
 
template<typename L1 , typename L2 >
void append_pointers (L1 &source, L2 &target)
 Append pointers to the elements of the first list to the second list. More...
 
template<typename L1 , typename L2 >
void append_pointers (const L1 &source, L2 &target)
 Const-version of append_pointers() More...
 
template<typename L1 , typename L2 , typename DataMember >
void distribute_list (L1 &source, L2 &target, DataMember member)
 Splice list elements from source to member lists of target. More...
 
template<typename L1 , typename L2 , typename DataMember , typename L3 >
void undistribute_list (const L1 &source, L2 &target, DataMember member, L3 &garbage)
 The opposite of distribute_list() – sorry for the strange name! More...
 
template<typename Processor >
int mimoprocessor_file_io (Processor &processor, const std::string &infilename, const std::string &outfilename)
 Use MimoProcessor-based object with multichannel audio file input and output. More...
 
SndfileHandle load_sndfile (const std::string &name, size_t sample_rate, size_t channels)
 Load sound file, throw exception if something's wrong. More...
 

Detailed Description

Audio Processing Framework.

Function Documentation

◆ no_nullptr() [1/2]

template<typename T >
bool apf::no_nullptr ( T *  in)

◆ no_nullptr() [2/2]

template<typename T >
bool apf::no_nullptr ( T &  )

Dummy overload for non-pointers.

Returns
Always true
Note
We can only check if plain pointers are NULL, use _GLIBCXX_DEBUG to check for singular iterators!

Definition at line 70 of file iterator.h.

◆ make_begin_and_end()

template<typename I , typename... Args>
has_begin_and_end< I > apf::make_begin_and_end ( first,
Args &&...  args 
)

Definition at line 377 of file iterator.h.

◆ make_cast_proxy()

template<typename T , typename Container >
cast_proxy< T, Container > apf::make_cast_proxy ( Container &  l)

Helper function to create a cast_proxy.

Definition at line 632 of file iterator.h.

◆ make_cast_proxy_const()

template<typename T , typename Container >
cast_proxy_const< T, Container > apf::make_cast_proxy_const ( Container &  l)

Helper function to create a cast_proxy_const.

Definition at line 657 of file iterator.h.

◆ bilinear()

template<typename T >
SosCoefficients< T > apf::bilinear ( LaplaceCoefficients< T >  coeffs_in,
int  fs,
int  fp 
)

Bilinear transform.

Template Parameters
Tinternal data type
Parameters
coeffs_incoefficients of filter design in Laplace domain
fssampling rate
fpprewarping frequency
Returns
coefficients in z-domain
See also
BiQuad

Definition at line 289 of file biquad.h.

◆ append_pointers() [1/2]

template<typename L1 , typename L2 >
void apf::append_pointers ( L1 &  source,
L2 &  target 
)

Append pointers to the elements of the first list to the second list.

Note
L2::value_type must be a pointer to L1::value_type!

Definition at line 610 of file container.h.

◆ append_pointers() [2/2]

template<typename L1 , typename L2 >
void apf::append_pointers ( const L1 &  source,
L2 &  target 
)

Const-version of append_pointers()

Note
L2::value_type must be a pointer to const L1::value_type!

Definition at line 621 of file container.h.

◆ distribute_list()

template<typename L1 , typename L2 , typename DataMember >
void apf::distribute_list ( L1 &  source,
L2 &  target,
DataMember  member 
)

Splice list elements from source to member lists of target.

Parameters
sourceElements of this list are distributed to the corresponding member lists of target. This must have the same type as member.
targetEach element of this list receives one element of source.
memberThe distributed elements are appended at member.end().
Note
Lists must have the same size. If not, an exception is thrown.
There is no const version, both lists are modified.
Postcondition
source will be empty.
The member of each target element will have one more element.

Definition at line 639 of file container.h.

◆ undistribute_list()

template<typename L1 , typename L2 , typename DataMember , typename L3 >
void apf::undistribute_list ( const L1 &  source,
L2 &  target,
DataMember  member,
L3 &  garbage 
)

The opposite of distribute_list() – sorry for the strange name!

Parameters
sourceContainer of items which will be removed from member of the corresponding target elements.
targetContainer of elements which have a member.
memberMember container from which elements will be removed. Must have a splice() member function (like std::list).
garbageRemoved elements are appended to this list. Must have the same type as member.
Exceptions
std::logic_errorIf any element isn't found in the corresponding member.
Attention
If a list element is not found, an exception is thrown and the original state is not restored!

Definition at line 669 of file container.h.

◆ mimoprocessor_file_io()

template<typename Processor >
int apf::mimoprocessor_file_io ( Processor &  processor,
const std::string &  infilename,
const std::string &  outfilename 
)

Use MimoProcessor-based object with multichannel audio file input and output.

Parameters
processorObject derived from MimoProcessor
infilenameInput audio file name
outfilenameOutput audio file name (will be overwritten if it exists)
Examples
audiofile_simpleprocessor.cpp.

Definition at line 44 of file mimoprocessor_file_io.h.

References apf::fixed_matrix< T, Allocator >::get_channel_ptrs(), apf::fixed_matrix< T, Allocator >::set_channels(), and apf::fixed_matrix< T, Allocator >::slices.

◆ load_sndfile()

SndfileHandle apf::load_sndfile ( const std::string &  name,
size_t  sample_rate,
size_t  channels 
)
inline

Load sound file, throw exception if something's wrong.

Parameters
namefile name
sample_rateexpected sample rate
channelsexpected number of channels
Exceptions
std::logic_errorwhenever something is wrong

Definition at line 46 of file sndfiletools.h.

References apf::str::A2S().