Multiresolution power spectrum on the grid of SpectralReadout.
More...
#include <DetailAnalysis.h>
|
| void | prepare (const AudioSpec &spec) |
| | Allocates for a layout (an invalid spec is ignored).
|
| |
| void | reset () noexcept |
| | Clears the signal and the spectra.
|
| |
| void | setWidth (double octaves) noexcept |
| | The width of what is told apart, from kWidest to kFinest octaves (1/12 by default). No allocation; the next read() follows it.
|
| |
| double | getWidth () const noexcept |
| |
| void | setExhaustive (bool on) noexcept |
| | Reads every level every hop in place of the long ones in turns (for a render).
|
| |
| bool | isExhaustive () const noexcept |
| |
| void | setLinked (bool on) noexcept |
| | One reading for every channel, of their mean power; it holds from the next update().
|
| |
| bool | isLinked () const noexcept |
| |
| void | setTimeFocus (bool on) noexcept |
| | Reads the shortest window through one shorter as frequency rises and gives that reading a hop later (off by default); it holds from the next update().
|
| |
| bool | isTimeFocus () const noexcept |
| |
| void | feed (int channel, const T *x, int count) noexcept |
| | Takes the next samples of a channel (any count).
|
| |
| void | update (int channels) noexcept |
| | A hop: takes the spectra of the levels due. The two shortest windows are read every hop, the longer ones every two or four, in turns.
|
| |
| void | read (int channel, T *power) const noexcept |
| | The power at every point (a sine of full scale reads 1).
|
| |
| void | read (int channel, T *power, int first, int end) const noexcept |
| | The power at the points from first to before end only (the others are left as they are): what read() gives there.
|
| |
| double | getWindowSeconds (int point) const noexcept |
| |
|
| static constexpr int | kPoints = SpectralReadout<T>::kPoints |
| | Points of a reading.
|
| |
| static constexpr int | kMaxChannels = 16 |
| | Channels read at most.
|
| |
| static constexpr double | kFinest = 1.0 / 24.0 |
| | Narrowest width, in octaves.
|
| |
| static constexpr double | kWidest = 1.0 |
| | Widest width, in octaves.
|
| |
template<FloatType T>
class dspark::DetailAnalysis< T >
Multiresolution power spectrum on the grid of SpectralReadout.
- Template Parameters
-
| T | Sample type (float or double). |
Definition at line 71 of file DetailAnalysis.h.
◆ feed()
Takes the next samples of a channel (any count).
- Parameters
-
| channel | The channel; one out of range is ignored. |
| x | The samples. |
| count | How many. |
Definition at line 207 of file DetailAnalysis.h.
◆ frequency()
- Returns
- The frequency of a point, in hertz.
Definition at line 80 of file DetailAnalysis.h.
◆ getWidth()
◆ getWindowSeconds()
- Returns
- The length of the window a point is read through, in seconds.
Definition at line 299 of file DetailAnalysis.h.
◆ isExhaustive()
◆ isLinked()
◆ isTimeFocus()
- Returns
- Whether the shortest window is read through the focus.
Definition at line 199 of file DetailAnalysis.h.
◆ prepare()
Allocates for a layout (an invalid spec is ignored).
- Parameters
-
Definition at line 86 of file DetailAnalysis.h.
◆ read() [1/2]
The power at every point (a sine of full scale reads 1).
- Parameters
-
| channel | The channel; one out of range reads zero. |
| power | kPoints values. |
Definition at line 269 of file DetailAnalysis.h.
◆ read() [2/2]
The power at the points from first to before end only (the others are left as they are): what read() gives there.
- Parameters
-
| channel | The channel; one out of range reads zero. |
| power | kPoints values. |
| first | The first point read (clamped to the grid). |
| end | One past the last (clamped to the grid). |
Definition at line 279 of file DetailAnalysis.h.
◆ reset()
◆ setExhaustive()
Reads every level every hop in place of the long ones in turns (for a render).
Definition at line 183 of file DetailAnalysis.h.
◆ setLinked()
◆ setTimeFocus()
Reads the shortest window through one shorter as frequency rises and gives that reading a hop later (off by default); it holds from the next update().
Definition at line 197 of file DetailAnalysis.h.
◆ setWidth()
The width of what is told apart, from kWidest to kFinest octaves (1/12 by default). No allocation; the next read() follows it.
- Parameters
-
| octaves | The width; non-finite values are ignored. |
Definition at line 171 of file DetailAnalysis.h.
◆ update()
A hop: takes the spectra of the levels due. The two shortest windows are read every hop, the longer ones every two or four, in turns.
- Parameters
-
| channels | The channels fed since the last hop. |
Definition at line 233 of file DetailAnalysis.h.
◆ kFinest
◆ kMaxChannels
◆ kPoints
◆ kWidest
The documentation for this class was generated from the following file: