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

The delay of a tape moved by a transport with inertia, wow and flutter. More...

#include <TapeTransport.h>

Classes

struct  Settings
 The transport's constants. More...
 

Public Member Functions

void prepare (double sampleRate, double nominalSamples, double ips, const Settings &settings=Settings {}) noexcept
 Sets the rate, the head distance (as a delay at the nominal speed), the nominal speed and the constants; resets.
 
void reset () noexcept
 Speed at nominal, delay at the head distance, phases and noise from the start.
 
void setSpeed (double ips) noexcept
 A new nominal speed: the tape glides to it from the speed it has.
 
void setSpeedNow (double ips) noexcept
 A new nominal speed, taken at once (no glide).
 
void setTargetDelay (double samples) noexcept
 A delay to glide to, in samples: the speed nominal / samples, reached with the transport's inertia (the head distance stays).
 
void setTargetDelayNow (double samples) noexcept
 A delay taken at once: the speed and the delay jump to it.
 
void setLimits (double lo, double hi) noexcept
 The range the delay stays in, in samples (default from 3 up).
 
void syncDelay (double samples) noexcept
 Starts the delay from a value (switching in from another reader).
 
double getDelay () const noexcept
 
double getNominal () const noexcept
 
double getSpeedRatio () const noexcept
 
double next (double depth) noexcept
 The delay for the next sample.
 

Detailed Description

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

The delay of a tape moved by a transport with inertia, wow and flutter.

Template Parameters
TSample type of the owner (the state is double).

Definition at line 56 of file TapeTransport.h.

Member Function Documentation

◆ getDelay()

template<FloatType T>
double dspark::TapeTransport< T >::getDelay ( ) const
inlinenoexcept

Definition at line 166 of file TapeTransport.h.

◆ getNominal()

template<FloatType T>
double dspark::TapeTransport< T >::getNominal ( ) const
inlinenoexcept

Definition at line 167 of file TapeTransport.h.

◆ getSpeedRatio()

template<FloatType T>
double dspark::TapeTransport< T >::getSpeedRatio ( ) const
inlinenoexcept

Definition at line 168 of file TapeTransport.h.

◆ next()

template<FloatType T>
double dspark::TapeTransport< T >::next ( double  depth)
inlinenoexcept

The delay for the next sample.

Parameters
depthDepth of the deviation, 0 to 1 (the transport keeps moving at 0).

Definition at line 174 of file TapeTransport.h.

◆ prepare()

template<FloatType T>
void dspark::TapeTransport< T >::prepare ( double  sampleRate,
double  nominalSamples,
double  ips,
const Settings &  settings = Settings {} 
)
inlinenoexcept

Sets the rate, the head distance (as a delay at the nominal speed), the nominal speed and the constants; resets.

Parameters
sampleRateRate in hertz (invalid values are ignored).
nominalSamplesThe delay at the nominal speed, in samples.
ipsNominal speed, inches per second.
settingsThe constants.

Definition at line 81 of file TapeTransport.h.

◆ reset()

template<FloatType T>
void dspark::TapeTransport< T >::reset ( )
inlinenoexcept

Speed at nominal, delay at the head distance, phases and noise from the start.

Definition at line 109 of file TapeTransport.h.

◆ setLimits()

template<FloatType T>
void dspark::TapeTransport< T >::setLimits ( double  lo,
double  hi 
)
inlinenoexcept

The range the delay stays in, in samples (default from 3 up).

Definition at line 156 of file TapeTransport.h.

◆ setSpeed()

template<FloatType T>
void dspark::TapeTransport< T >::setSpeed ( double  ips)
inlinenoexcept

A new nominal speed: the tape glides to it from the speed it has.

Definition at line 121 of file TapeTransport.h.

◆ setSpeedNow()

template<FloatType T>
void dspark::TapeTransport< T >::setSpeedNow ( double  ips)
inlinenoexcept

A new nominal speed, taken at once (no glide).

Definition at line 129 of file TapeTransport.h.

◆ setTargetDelay()

template<FloatType T>
void dspark::TapeTransport< T >::setTargetDelay ( double  samples)
inlinenoexcept

A delay to glide to, in samples: the speed nominal / samples, reached with the transport's inertia (the head distance stays).

Definition at line 140 of file TapeTransport.h.

◆ setTargetDelayNow()

template<FloatType T>
void dspark::TapeTransport< T >::setTargetDelayNow ( double  samples)
inlinenoexcept

A delay taken at once: the speed and the delay jump to it.

Definition at line 147 of file TapeTransport.h.

◆ syncDelay()

template<FloatType T>
void dspark::TapeTransport< T >::syncDelay ( double  samples)
inlinenoexcept

Starts the delay from a value (switching in from another reader).

Definition at line 164 of file TapeTransport.h.


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