|
DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
|
Namespaces | |
| namespace | continuous_clip |
| namespace | fft |
| namespace | offline_clip |
| namespace | offline_sinc |
| namespace | stereo_color_coefficients |
Typedefs | |
| template<typename T > | |
| using | OfflineScratchArray = std::unique_ptr< T[], OfflineScratchDeleter< T > > |
| using | OfflineBeatMemory = OfflineMemoryPool |
Enumerations | |
| enum class | ClipperCurve { Hard , Tanh , Sine , GoldenRatio , SymmetricKnee , AsymmetricKnee } |
Functions | |
| double | advanceBoxAverage (double incoming, double outgoing, double &sum, double inverseLength) noexcept |
| template<ClipperCurve Curve, FloatType T> | |
| constexpr T | clipperSmallSignalSlope () noexcept |
| Exact small-signal slope of the implemented stateless curve. | |
| template<ClipperCurve Curve, FloatType T> | |
| std::array< T, 2 > | clipperLinearLimits (T ceiling) noexcept |
| Exact linear-region endpoints of a rational clipping curve. | |
| template<ClipperCurve Curve, FloatType T> | |
| T | clipperShape (T sample, T ceiling) noexcept |
| Shared transfer functions; no state or implicit antialiasing. | |
| double | dcBlockStep (double pole, DcBlockState &state, double input) noexcept |
| Applies (1 - z^-1) / (1 - pole * z^-1), with a pole in [0, 1). | |
| template<typename T > | |
| T | logCosh (T x) noexcept |
| double | integralLogCosh (double x) noexcept |
| double | offlineClipPeakErrorDb (double peak, double target) noexcept |
| bool | offlineClipTargetMet (double peak, double target, double errorDb) noexcept |
| template<class Render > | |
| OfflineClipCalibration | offlineCalibrateClip (double initialCeiling, double target, Render render) |
| template<class Result , FloatType T, class Report , class CursorFactory > | |
| Result | offlineRenderGain (OfflineAudioSource< T > &source, const OfflineAudioSpec &spec, const OfflineFingerprint &expectedFingerprint, double inputPeak, bool valid, bool changed, const Report &report, OfflineAudioSink< T > &sink, const OfflineJobOptions &options, CursorFactory makeCursor, OfflineGainRenderSettings settings={}) |
| template<class LeftReader , class RightReader , class Consumer > | |
| void | offlineBandlimitedProduct (OfflineSession &job, std::int64_t frames, LeftReader left, RightReader right, Consumer consume, int block=0) |
| template<FloatType T> | |
| double | offlineRepresentablePeakGain (double inputPeak, double gain) noexcept |
| template<FloatType T, class Consume > | |
| OfflineSourceSummary | offlineScanSource (OfflineAudioSource< T > &source, const OfflineAudioSpec &spec, OfflineBlock< T > &scratch, const OfflineSession &job, OfflinePhase phase, Consume consume) |
| template<FloatType T, class Consume > | |
| void | offlineScanMagnitude (OfflineAudioSource< T > &source, const OfflineAudioSpec &spec, const OfflineFingerprint &expectedFingerprint, double inputPeak, OfflineBlock< T > &scratch, const OfflineSession &job, Consume consume) |
| template<class Function > | |
| void | offlineCallSink (Function &&function) |
| template<class Processor , FloatType T, int MaxChannels, class Options > | |
| Processor::Result | offlineRun (const Processor &processor, const AudioBuffer< T, MaxChannels > &input, AudioBuffer< T, MaxChannels > &output, double sampleRate, const Options &options, const OfflineJobOptions &job) |
| template<FloatType T> | |
| T | rationalKneeMagnitude (T magnitude, T knee, T ceiling) noexcept |
| Positive magnitude of the original Clipper rational soft knee. | |
| double | rationalKneeShape (double input, double positiveKnee, double negativeKnee) noexcept |
| Unit-ceiling curve with independent positive and negative knees. | |
| double | rationalKneeIntegral (double input, double positiveKnee, double negativeKnee) noexcept |
| Antiderivative of the unit-ceiling curve, with F(0) = 0. | |
| template<FloatType T> | |
| TptSvfOutput< T > | tptSvfStep (T input, TptSvfState< T > &state, T a1, T a2, T a3) noexcept |
| Advances the expanded Simper TPT recurrence by one sample. | |
| double | hilbertIdealImpulse (std::int64_t index) noexcept |
| void | offlineFail (OfflineStatus status) |
| OfflineStatus | offlineExceptionStatus () noexcept |
| std::size_t | offlineBytes (std::uint64_t count, std::size_t size) |
| OfflineJobOptions | offlineRemaining (const OfflineJobOptions &job, std::size_t used) |
| void | offlineValidateSpec (const OfflineAudioSpec &spec, int maximumChannels=16) |
| template<FloatType T> | |
| void | offlineRead (OfflineAudioSource< T > &source, const OfflineAudioSpec &expected, std::int64_t first, AudioBufferView< T > block) |
| template<FloatType T> | |
| void | offlineHash (OfflineFingerprint &state, T sample) noexcept |
| void | appendStateJsonString (std::string &out, const std::string &s) |
| Appends a JSON string literal, escaping the characters JSON forbids. Keys follow the [A-Za-z0-9._] convention (so this normally emits verbatim), but the convention is not enforced on the writer or reader, and untrusted blobs can carry arbitrary key bytes; escaping keeps the emitted JSON valid and non-injectable in every case. | |
| void | appendStateJsonNumber (std::string &out, float v) |
| Locale-independent float rendering ("%.9g" with a forced dot). Non-finite payloads (NaN/Inf – e.g. a corrupt blob or a bugged parameter) are emitted as JSON-legal 0 so the output always parses and round-trips. | |
| const char * | parseStateJsonNumber (const char *s, const char *end, double &out) noexcept |
| Locale-independent number parse over [s, end); nullptr on failure. | |
| std::string | stateToJsonImpl (const std::vector< uint8_t > &blob, int depth) |
| std::vector< uint8_t > | stateFromJsonImpl (const std::string &json, int depth) |
Variables | |
| template<FloatType T> | |
| constexpr std::array< T, 5 > | fastSinPolynomial |
| constexpr int | kMaxStateJsonDepth = 32 |
| using dspark::detail::OfflineBeatMemory = typedef OfflineMemoryPool |
Definition at line 23 of file OfflineBeatEngine.h.
| using dspark::detail::OfflineScratchArray = typedef std::unique_ptr<T[], OfflineScratchDeleter<T> > |
Definition at line 312 of file OfflineProcessing.h.
|
strong |
| Enumerator | |
|---|---|
| Hard | |
| Tanh | |
| Sine | |
| GoldenRatio | |
| SymmetricKnee | |
| AsymmetricKnee | |
Definition at line 23 of file ClipperShape.h.
|
inlinenoexcept |
Definition at line 12 of file BoxAverage.h.
|
inline |
Locale-independent float rendering ("%.9g" with a forced dot). Non-finite payloads (NaN/Inf – e.g. a corrupt blob or a bugged parameter) are emitted as JSON-legal 0 so the output always parses and round-trips.
Definition at line 323 of file StateBlob.h.
|
inline |
Appends a JSON string literal, escaping the characters JSON forbids. Keys follow the [A-Za-z0-9._] convention (so this normally emits verbatim), but the convention is not enforced on the writer or reader, and untrusted blobs can carry arbitrary key bytes; escaping keeps the emitted JSON valid and non-injectable in every case.
Definition at line 289 of file StateBlob.h.
|
inlinenoexcept |
Exact linear-region endpoints of a rational clipping curve.
Definition at line 45 of file ClipperShape.h.
|
inlinenoexcept |
Shared transfer functions; no state or implicit antialiasing.
Definition at line 62 of file ClipperShape.h.
|
constexprnoexcept |
Exact small-signal slope of the implemented stateless curve.
Definition at line 35 of file ClipperShape.h.
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inlinenoexcept |
|
inline |
Definition at line 460 of file OfflineProduct.h.
|
inline |
Definition at line 289 of file OfflineProcessing.h.
| OfflineClipCalibration dspark::detail::offlineCalibrateClip | ( | double | initialCeiling, |
| double | target, | ||
| Render | render | ||
| ) |
Definition at line 82 of file OfflineClip.h.
|
inline |
Definition at line 186 of file OfflineWorker.h.
|
inlinenoexcept |
Definition at line 62 of file OfflineClip.h.
|
inlinenoexcept |
Definition at line 70 of file OfflineClip.h.
|
inlinenoexcept |
Definition at line 269 of file OfflineProcessing.h.
|
inline |
Definition at line 262 of file OfflineProcessing.h.
|
inlinenoexcept |
Definition at line 537 of file OfflineProcessing.h.
|
inline |
Definition at line 517 of file OfflineProcessing.h.
|
inline |
Definition at line 469 of file OfflineProcessing.h.
| Result dspark::detail::offlineRenderGain | ( | OfflineAudioSource< T > & | source, |
| const OfflineAudioSpec & | spec, | ||
| const OfflineFingerprint & | expectedFingerprint, | ||
| double | inputPeak, | ||
| bool | valid, | ||
| bool | changed, | ||
| const Report & | report, | ||
| OfflineAudioSink< T > & | sink, | ||
| const OfflineJobOptions & | options, | ||
| CursorFactory | makeCursor, | ||
| OfflineGainRenderSettings | settings = {} |
||
| ) |
Definition at line 124 of file OfflineGain.h.
|
inlinenoexcept |
Definition at line 26 of file OfflineWorker.h.
| Processor::Result dspark::detail::offlineRun | ( | const Processor & | processor, |
| const AudioBuffer< T, MaxChannels > & | input, | ||
| AudioBuffer< T, MaxChannels > & | output, | ||
| double | sampleRate, | ||
| const Options & | options, | ||
| const OfflineJobOptions & | job | ||
| ) |
Definition at line 206 of file OfflineWorker.h.
|
inline |
Definition at line 82 of file OfflineWorker.h.
|
inline |
Definition at line 45 of file OfflineWorker.h.
|
inline |
Definition at line 479 of file OfflineProcessing.h.
|
inlinenoexcept |
Locale-independent number parse over [s, end); nullptr on failure.
Definition at line 334 of file StateBlob.h.
|
inlinenoexcept |
Antiderivative of the unit-ceiling curve, with F(0) = 0.
Definition at line 39 of file RationalKnee.h.
|
inlinenoexcept |
Positive magnitude of the original Clipper rational soft knee.
Definition at line 21 of file RationalKnee.h.
|
inlinenoexcept |
Unit-ceiling curve with independent positive and negative knees.
Definition at line 31 of file RationalKnee.h.
|
inline |
Definition at line 431 of file StateBlob.h.
|
inline |
Definition at line 391 of file StateBlob.h.
|
inlinenoexcept |
Advances the expanded Simper TPT recurrence by one sample.
| input | Current input sample. |
| state | Integrator memories, updated in place. |
| a1 | 1 / (1 + g * (g + k)), where g = tan(pi * f / fs) and k = 1 / Q. |
| a2 | g * a1. |
| a3 | g * a2. |
|
inlineconstexpr |
|
constexpr |
Nesting cap for the JSON round-trip: real processor states nest 2-3 levels; a crafted input must not be able to overflow the stack.
Definition at line 282 of file StateBlob.h.