DSPark 1.8.0
Header-only C++20 DSP for real-time and offline audio
Loading...
Searching...
No Matches
dspark::OfflineBeatCompressor< T > Class Template Referencefinal

Complete-source pulse compression with one positive reduction-dB control. More...

#include <OfflineBeatCompressor.h>

Classes

struct  Options
 
class  Plan
 
struct  PlanResult
 
struct  Pulse
 
struct  Report
 
struct  Result
 

Public Types

enum class  Note : std::uint8_t { Eighth , Quarter , Half , Whole }
 
enum class  TempoSource : std::uint8_t { Local , Manual , Fallback }
 
enum class  Reason : std::uint8_t {
  Compressed , EvenPulses , ZeroAmount , NoSignal ,
  NoPulses , AllExcluded
}
 

Public Member Functions

PlanResult makePlan (OfflineAudioSource< T > &source, const typename OfflineTransientAnalyzer< T >::Analysis &analysis, const typename OfflineTempoAnalyzer< T >::Analysis &tempo, const Options &options={}, const OfflineJobOptions &jobOptions={}) const
 Reuses source-bound pulse and tempo maps; one verified PCM scan. A valid tempo map must match the source fingerprint even with manual BPM. An empty tempo map is accepted only with manual BPM or a zero amount.
 
PlanResult makePlan (OfflineAudioSource< T > &source, const typename OfflineTransientAnalyzer< T >::Analysis &analysis, const Options &options={}, const OfflineJobOptions &job={}) const
 Reuses retained features to build tempo; manual BPM skips the tempo engine.
 
PlanResult analyze (OfflineAudioSource< T > &source, const Options &options={}, const OfflineJobOptions &job={}) const
 Complete-source automatic analysis and planning, with no retained audio.
 
Result render (OfflineAudioSource< T > &source, const Plan &plan, OfflineAudioSink< T > &sink, const OfflineJobOptions &job={}) const
 Verified transactional render through the shared bandlimited gain operator.
 
template<int MaxChannels>
Result run (const AudioBuffer< T, MaxChannels > &input, AudioBuffer< T, MaxChannels > &output, double sampleRate, const Options &options={}, const OfflineJobOptions &job={}) const
 Owning convenience operation; aliases are safe and failure preserves output.
 

Detailed Description

template<FloatType T>
class dspark::OfflineBeatCompressor< T >

Complete-source pulse compression with one positive reduction-dB control.

Definition at line 42 of file OfflineBeatCompressor.h.

Member Enumeration Documentation

◆ Note

template<FloatType T>
enum class dspark::OfflineBeatCompressor::Note : std::uint8_t
strong
Enumerator
Eighth 
Quarter 
Half 
Whole 

Definition at line 45 of file OfflineBeatCompressor.h.

◆ Reason

template<FloatType T>
enum class dspark::OfflineBeatCompressor::Reason : std::uint8_t
strong
Enumerator
Compressed 
EvenPulses 
ZeroAmount 
NoSignal 
NoPulses 
AllExcluded 

Definition at line 62 of file OfflineBeatCompressor.h.

◆ TempoSource

template<FloatType T>
enum class dspark::OfflineBeatCompressor::TempoSource : std::uint8_t
strong
Enumerator
Local 
Manual 
Fallback 

Definition at line 46 of file OfflineBeatCompressor.h.

Member Function Documentation

◆ analyze()

template<FloatType T>
PlanResult dspark::OfflineBeatCompressor< T >::analyze ( OfflineAudioSource< T > &  source,
const Options &  options = {},
const OfflineJobOptions &  job = {} 
) const
inline

Complete-source automatic analysis and planning, with no retained audio.

Definition at line 266 of file OfflineBeatCompressor.h.

◆ makePlan() [1/2]

template<FloatType T>
PlanResult dspark::OfflineBeatCompressor< T >::makePlan ( OfflineAudioSource< T > &  source,
const typename OfflineTransientAnalyzer< T >::Analysis &  analysis,
const Options &  options = {},
const OfflineJobOptions &  job = {} 
) const
inline

Reuses retained features to build tempo; manual BPM skips the tempo engine.

Definition at line 243 of file OfflineBeatCompressor.h.

◆ makePlan() [2/2]

template<FloatType T>
PlanResult dspark::OfflineBeatCompressor< T >::makePlan ( OfflineAudioSource< T > &  source,
const typename OfflineTransientAnalyzer< T >::Analysis &  analysis,
const typename OfflineTempoAnalyzer< T >::Analysis &  tempo,
const Options &  options = {},
const OfflineJobOptions &  jobOptions = {} 
) const
inline

Reuses source-bound pulse and tempo maps; one verified PCM scan. A valid tempo map must match the source fingerprint even with manual BPM. An empty tempo map is accepted only with manual BPM or a zero amount.

Definition at line 137 of file OfflineBeatCompressor.h.

◆ render()

template<FloatType T>
Result dspark::OfflineBeatCompressor< T >::render ( OfflineAudioSource< T > &  source,
const Plan &  plan,
OfflineAudioSink< T > &  sink,
const OfflineJobOptions &  job = {} 
) const
inline

Verified transactional render through the shared bandlimited gain operator.

Definition at line 287 of file OfflineBeatCompressor.h.

◆ run()

template<FloatType T>
template<int MaxChannels>
Result dspark::OfflineBeatCompressor< T >::run ( const AudioBuffer< T, MaxChannels > &  input,
AudioBuffer< T, MaxChannels > &  output,
double  sampleRate,
const Options &  options = {},
const OfflineJobOptions &  job = {} 
) const
inline

Owning convenience operation; aliases are safe and failure preserves output.

Definition at line 322 of file OfflineBeatCompressor.h.


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