|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
Streaming phase-gradient vocoder with a strike-anchored time map. More...
#include <StudioVocoder.h>
Classes | |
| struct | Params |
| The control-published parameter set (adopted as ONE unit). More... | |
Public Member Functions | |
| bool | prepare (double sampleRate, int numChannels, int fftSize, bool resampleCompensation) |
| Allocates every buffer the stream will use. | |
| void | reset () noexcept |
| Clears all signal state and adopts the latest parameters (jump, no glide). Stream owner only. | |
| void | publishParams (const Params &p) noexcept |
| Publishes a whole parameter set (one control thread only). | |
| int | samplesToNextHop () const noexcept |
| void | pushInput (int ch, const T *src, int count) noexcept |
Writes count (<= samplesToNextHop(), or any count when it is 0... see commitInput) samples of channel ch at the input head. | |
| void | commitInput (int count, int numActiveChannels) noexcept |
Advances the input head by count and runs at most one frame. | |
| void | steerTimeline (double nominalCentre) noexcept |
| Owner-supplied nominal analysis centre for the NEXT frame (a resampling owner keeps its reader and the timeline in step with it). | |
| void | setAnchorLeadLimit (double samples) noexcept |
| Caps how far a strike anchor may move the analysis ahead of the nominal timeline, in input samples (owner with a fixed latency budget; unlimited by default). | |
| double | activeRatio () const noexcept |
| double | nextNominalCentre () const noexcept |
| double | nextStreamCentre () const noexcept |
| double | streamPositionOf (double x) const noexcept |
| const T * | olaData (int ch) const noexcept |
| int64_t | olaMask () const noexcept |
| int | olaSize () const noexcept |
| int64_t | writeHead () const noexcept |
| int | fftSize () const noexcept |
| int | synthHop () const noexcept |
| int | lookahead () const noexcept |
| int64_t | inputCount () const noexcept |
Streaming phase-gradient vocoder with a strike-anchored time map.
| T | Sample type (float or double). |
Definition at line 98 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 326 of file StudioVocoder.h.
|
inlinenoexcept |
Advances the input head by count and runs at most one frame.
The onset detector consumes the new input first, so a strike it finds is planned before the frame that would reach it is analysed.
Definition at line 297 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 348 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 353 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 351 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 329 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 332 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 343 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 344 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 345 of file StudioVocoder.h.
|
inline |
Allocates every buffer the stream will use.
| sampleRate | Sample rate in Hz. |
| numChannels | Channel count (>= 1). |
| fftSize | Frame size, power of two in [256, 1 << 20]. |
| resampleCompensation | True for owners that resample the stream by the ratio afterwards (pitch shifting): enables the anti-alias taper and the formant pre-warp. |
Definition at line 129 of file StudioVocoder.h.
|
inlinenoexcept |
Publishes a whole parameter set (one control thread only).
Definition at line 260 of file StudioVocoder.h.
|
inlinenoexcept |
Writes count (<= samplesToNextHop(), or any count when it is 0... see commitInput) samples of channel ch at the input head.
Definition at line 283 of file StudioVocoder.h.
|
inlinenoexcept |
Clears all signal state and adopts the latest parameters (jump, no glide). Stream owner only.
Definition at line 212 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 275 of file StudioVocoder.h.
|
inlinenoexcept |
Caps how far a strike anchor may move the analysis ahead of the nominal timeline, in input samples (owner with a fixed latency budget; unlimited by default).
A lock of half-width h runs h (1/r - 1) ahead of the timeline as it starts below ratio 1, and h (1 - 1/r) ahead as it ends above it; the cap narrows the lock instead of letting a frame need input the owner's latency does not cover.
Definition at line 323 of file StudioVocoder.h.
|
inlinenoexcept |
Owner-supplied nominal analysis centre for the NEXT frame (a resampling owner keeps its reader and the timeline in step with it).
Definition at line 307 of file StudioVocoder.h.
|
inlinenoexcept |
x on the timeline in force at reset. Definition at line 338 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 349 of file StudioVocoder.h.
|
inlinenoexcept |
Definition at line 347 of file StudioVocoder.h.