|
DSPark 1.9.0
Header-only C++20 DSP for real-time and offline audio
|
Minimum-phase filtering by a curve on a log-frequency grid, fine in the low end. More...
#include <DetailFilter.h>
Public Member Functions | |
| void | prepare (const AudioSpec &spec) |
| Allocates for a layout (an invalid spec is ignored; channels over kMaxChannels pass through). | |
| void | reset () noexcept |
| Clears the signal and the curves. | |
| void | setLinked (bool on) noexcept |
| One curve and one filter for every channel. | |
| bool | isLinked () const noexcept |
| void | setShortKernel (bool on) noexcept |
| Cuts the kernels of the high part (all but the fine detail of the low end) to its window and tapers them over their whole length, from the next one designed (off by default: a kernel keeps the room the padding leaves, with only its tail tapered). A cut there then rings for a shorter time after the event, at the same depth; the fine detail of the low end keeps the length it takes. | |
| bool | isShortKernel () const noexcept |
| void | setHold (DetailHold hold) noexcept |
| By the frame, how each point holds its moves before the kernels are designed (DetailHold::Largest by default). By the block there is no hold. | |
| DetailHold | getHold () const noexcept |
| void | setRemovalListen (bool on) noexcept |
| Outputs what is taken out: the programme, delayed, less the filtered one. | |
| bool | isRemovalListen () const noexcept |
| int | getLatency () const noexcept |
| int | getHopSize () const noexcept |
| int | getCurveCount () const noexcept |
| bool | isDisplayDue (int shownAt) const noexcept |
| void | publishPlayed (int channels=2) noexcept |
| Hands the last kernels of both parts to a display (audio thread): a copy of them, for playedValue() and playedExtreme(). | |
| T | playedValue (int channel, int point) const noexcept |
| T | playedExtreme () const noexcept |
| void | getPlayedCurve (int channel, T *played) noexcept |
| The response being applied now: publishPlayed() and the points of a channel (for the owner's thread, not while a display reads). | |
| template<typename Design > | |
| void | processBlock (AudioBufferView< T > buffer, Design &&design) noexcept |
| Filters a block in place by curves that do not read the signal. | |
| template<typename Feed , typename Design > | |
| void | processBlock (AudioBufferView< T > buffer, Feed &&feed, Design &&design) noexcept |
| Filters a block in place. | |
Static Public Member Functions | |
| static double | frequency (int point) noexcept |
Static Public Attributes | |
| static constexpr int | kPoints = SpectralReadout<T>::kPoints |
| Points of a curve. | |
| static constexpr int | kMaxChannels = 16 |
| Channels filtered at most. | |
Minimum-phase filtering by a curve on a log-frequency grid, fine in the low end.
| T | Sample type (float or double). |
| L | When it hands the samples back (DetailLatency; Frame unless given). |
Definition at line 510 of file DetailFilter.h.
|
inlinestaticnoexcept |
Definition at line 520 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 679 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 666 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 676 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 674 of file DetailFilter.h.
|
inlinenoexcept |
The response being applied now: publishPlayed() and the points of a channel (for the owner's thread, not while a display reads).
| channel | 0 or 1 (0 when linked); others give zeros. |
| played | kPoints values, in decibels. |
Definition at line 730 of file DetailFilter.h.
|
inlinenoexcept |
| shownAt | The curve count a display was last drawn at. |
Definition at line 686 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 641 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 671 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 657 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 718 of file DetailFilter.h.
|
inlinenoexcept |
Definition at line 711 of file DetailFilter.h.
|
inline |
Allocates for a layout (an invalid spec is ignored; channels over kMaxChannels pass through).
| spec | Rate and channels. |
Definition at line 527 of file DetailFilter.h.
|
inlinenoexcept |
Filters a block in place by curves that do not read the signal.
| Design | void(int channel, T* curveDb), as below. |
| buffer | The audio. |
| design | The callback, run once a hop. |
Definition at line 746 of file DetailFilter.h.
|
inlinenoexcept |
Filters a block in place.
| Feed | void(int offset, int count): the samples [offset, offset + count) of the block, still untouched, are about to be taken; all of a hop's have been given when its curve is asked for. Must not throw. |
| Design | void(int channel, T* curveDb): writes the kPoints gains wanted now, in decibels (held from one hop to the next). The channel is 0 when linked. Must not throw. |
| buffer | The audio. |
| feed | The callback that reads the block (or a key beside it). |
| design | The callback, run once at the end of each hop. |
Definition at line 766 of file DetailFilter.h.
|
inlinenoexcept |
Hands the last kernels of both parts to a display (audio thread): a copy of them, for playedValue() and playedExtreme().
| channels | The channels processed (one shows on both). |
Definition at line 693 of file DetailFilter.h.
|
inlinenoexcept |
Clears the signal and the curves.
Definition at line 606 of file DetailFilter.h.
|
inlinenoexcept |
By the frame, how each point holds its moves before the kernels are designed (DetailHold::Largest by default). By the block there is no hold.
Definition at line 664 of file DetailFilter.h.
|
inlinenoexcept |
One curve and one filter for every channel.
Definition at line 634 of file DetailFilter.h.
|
inlinenoexcept |
Outputs what is taken out: the programme, delayed, less the filtered one.
Definition at line 669 of file DetailFilter.h.
|
inlinenoexcept |
Cuts the kernels of the high part (all but the fine detail of the low end) to its window and tapers them over their whole length, from the next one designed (off by default: a kernel keeps the room the padding leaves, with only its tail tapered). A cut there then rings for a shorter time after the event, at the same depth; the fine detail of the low end keeps the length it takes.
Definition at line 651 of file DetailFilter.h.
|
staticconstexpr |
Channels filtered at most.
Definition at line 517 of file DetailFilter.h.
|
staticconstexpr |
Points of a curve.
Definition at line 516 of file DetailFilter.h.