LASP 1.0
Library for Acoustic Signal Processing
Loading...
Searching...
No Matches

Sweep signal. More...

#include <lasp_siggen_impl.h>

Inheritance diagram for Sweep:
Collaboration diagram for Sweep:

Public Member Functions

 Sweep (const d fl, const d fu, const d Ts, const d Tq, const us sweep_flags)
 
 ~Sweep ()=default
 
- Public Member Functions inherited from Periodic
vd getSequence () const
 Return copy of the generated sequence.
 
virtual vd genSignalUnscaled (const us nframes) override final
 
 ~Periodic ()=default
 
- Public Member Functions inherited from Siggen
virtual ~Siggen ()=default
 
void setFilter (const std::string &name, std::shared_ptr< Filter > f)
 Set a filter on the signal. For example to EQ the signal, or otherwise to shape the spectrum. Filters are stored in a map, and setFilter can be used to overwrite them, if a null pointer is given.
 
void setDCOffset (d offset)
 Set a linear DC offset value to the signal.
 
void setMute (bool mute=true)
 Mute the signal. Passes through the DC offset. No lock is hold. If it just works one block later, than that is just the case.
 
void setLevel (const d level, bool dB=true)
 Set the level of the signal generator.
 
void reset (const d newFs)
 Reset the signal generator. Should be called whenever the output is based on a different sampling frequency. Note that derived classes from this class should call the base class!
 
vd genSignal (const us nframes)
 Called whenever the implementation needs to create new samples.
 

Static Public Attributes

static constexpr int ForwardSweep = 1 << 0
 
static constexpr int BackwardSweep = 1 << 1
 
static constexpr int LinearSweep = 1 << 2
 
static constexpr int LogSweep = 1 << 3
 

Additional Inherited Members

- Protected Attributes inherited from Periodic
vd _signal { 1, arma::fill::zeros}
 
us _cur_pos = 0
 
- Protected Attributes inherited from Siggen
std::mutex _mtx
 
_fs = 0
 

Detailed Description

Sweep signal.

Definition at line 82 of file lasp_siggen_impl.h.

Constructor & Destructor Documentation

◆ Sweep()

Sweep::Sweep ( const d  fl,
const d  fu,
const d  Ts,
const d  Tq,
const us  sweep_flags 
)

Create a sweep signal

Parameters
[in]flLower frequency [Hz]
[in]fuUpper frequency [Hz]
[in]TsSweep time [s]
[in]TqQuescent tail time [s]. Choose this value long enough to avoid temporal aliasing in case of measuring impulse responses.
[in]sweep_flagsSweep period [s]

Definition at line 57 of file lasp_siggen_impl.cpp.

◆ ~Sweep()

Sweep::~Sweep ( )
default

Member Data Documentation

◆ BackwardSweep

constexpr int Sweep::BackwardSweep = 1 << 1
staticconstexpr

Definition at line 92 of file lasp_siggen_impl.h.

◆ ForwardSweep

constexpr int Sweep::ForwardSweep = 1 << 0
staticconstexpr

Definition at line 91 of file lasp_siggen_impl.h.

◆ LinearSweep

constexpr int Sweep::LinearSweep = 1 << 2
staticconstexpr

Definition at line 93 of file lasp_siggen_impl.h.

◆ LogSweep

constexpr int Sweep::LogSweep = 1 << 3
staticconstexpr

Definition at line 94 of file lasp_siggen_impl.h.


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