Deluge Firmware
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
TimeStretcher Class Reference

#include <TimeStretcher.h>

Collaboration diagram for TimeStretcher:
Collaboration graph

Public Member Functions

 TimeStretcher ()
 
bool init (Sample *sample, VoiceSample *voiceSample, SamplePlaybackGuide *guide, int64_t newSamplePosBig, int numChannels, int32_t phaseIncrement, int32_t timeStretchRatio, int playDirection, int priorityRating, int fudgingNumSamplesTilLoop, int loopingType)
 
void reInit (int64_t newSamplePosBig, SamplePlaybackGuide *guide, VoiceSample *voiceSample, Sample *sample, int numChannels, int32_t timeStretchRatio, int32_t phaseIncrement, uint64_t combinedIncrement, int playDirection, int loopingType, int priorityRating)
 
void beenUnassigned ()
 
void unassignAllReasonsForPercLookahead ()
 
void unassignAllReasonsForPercCacheClusters ()
 
bool hopEnd (SamplePlaybackGuide *guide, VoiceSample *voiceSample, Sample *sample, int numChannels, int32_t timeStretchRatio, int32_t phaseIncrement, uint64_t combinedIncrement, int playDirection, int loopingType, int priorityRating)
 
void rememberPercCacheCluster (Cluster *cluster)
 
void updateClustersForPercLookahead (Sample *sample, uint32_t sourceBytePos, int playDirection)
 
int32_t getSamplePos (int playDirection)
 
bool allocateBuffer (int numChannels)
 
void readFromBuffer (int32_t *oscBufferPos, int numSamples, int numChannels, int numChannelsAfterCondensing, int32_t sourceAmplitudeNow, int32_t amplitudeIncrementNow, int *bufferReadPos)
 
void setupCrossfadeFromCache (SampleCache *cache, int cacheBytePos, int numChannels)
 

Public Attributes

TimeStretchernextUnassigned
 
int64_t samplePosBig
 
uint32_t crossfadeProgress
 
uint32_t crossfadeIncrement
 
int32_t samplesTilHopEnd
 
SampleLowLevelReader olderPartReader
 
int32_t * buffer
 
bool olderHeadReadingFromBuffer
 
bool hasLoopedBackIntoPreMargin
 
bool playHeadStillActive [2]
 
uint8_t numTimesMissedHop
 
int olderBufferReadPos
 
ClusterclustersForPercLookahead [NUM_CLUSTERS_LOADED_AHEAD]
 
ClusterpercCacheClustersNearby [2]
 

Constructor & Destructor Documentation

◆ TimeStretcher()

TimeStretcher::TimeStretcher ( )
inline

Member Function Documentation

◆ allocateBuffer()

bool TimeStretcher::allocateBuffer ( int  numChannels)

◆ beenUnassigned()

void TimeStretcher::beenUnassigned ( )

◆ getSamplePos()

int32_t TimeStretcher::getSamplePos ( int  playDirection)

◆ hopEnd()

bool TimeStretcher::hopEnd ( SamplePlaybackGuide guide,
VoiceSample voiceSample,
Sample sample,
int  numChannels,
int32_t  timeStretchRatio,
int32_t  phaseIncrement,
uint64_t  combinedIncrement,
int  playDirection,
int  loopingType,
int  priorityRating 
)

◆ init()

bool TimeStretcher::init ( Sample sample,
VoiceSample voiceSample,
SamplePlaybackGuide guide,
int64_t  newSamplePosBig,
int  numChannels,
int32_t  phaseIncrement,
int32_t  timeStretchRatio,
int  playDirection,
int  priorityRating,
int  fudgingNumSamplesTilLoop,
int  loopingType 
)

◆ readFromBuffer()

void TimeStretcher::readFromBuffer ( int32_t *  oscBufferPos,
int  numSamples,
int  numChannels,
int  numChannelsAfterCondensing,
int32_t  sourceAmplitudeNow,
int32_t  amplitudeIncrementNow,
int *  bufferReadPos 
)

◆ reInit()

void TimeStretcher::reInit ( int64_t  newSamplePosBig,
SamplePlaybackGuide guide,
VoiceSample voiceSample,
Sample sample,
int  numChannels,
int32_t  timeStretchRatio,
int32_t  phaseIncrement,
uint64_t  combinedIncrement,
int  playDirection,
int  loopingType,
int  priorityRating 
)

◆ rememberPercCacheCluster()

void TimeStretcher::rememberPercCacheCluster ( Cluster cluster)

◆ setupCrossfadeFromCache()

void TimeStretcher::setupCrossfadeFromCache ( SampleCache cache,
int  cacheBytePos,
int  numChannels 
)

◆ unassignAllReasonsForPercCacheClusters()

void TimeStretcher::unassignAllReasonsForPercCacheClusters ( )

◆ unassignAllReasonsForPercLookahead()

void TimeStretcher::unassignAllReasonsForPercLookahead ( )

◆ updateClustersForPercLookahead()

void TimeStretcher::updateClustersForPercLookahead ( Sample sample,
uint32_t  sourceBytePos,
int  playDirection 
)

Member Data Documentation

◆ buffer

int32_t* TimeStretcher::buffer

◆ clustersForPercLookahead

Cluster* TimeStretcher::clustersForPercLookahead[NUM_CLUSTERS_LOADED_AHEAD]

◆ crossfadeIncrement

uint32_t TimeStretcher::crossfadeIncrement

◆ crossfadeProgress

uint32_t TimeStretcher::crossfadeProgress

◆ hasLoopedBackIntoPreMargin

bool TimeStretcher::hasLoopedBackIntoPreMargin

◆ nextUnassigned

TimeStretcher* TimeStretcher::nextUnassigned

◆ numTimesMissedHop

uint8_t TimeStretcher::numTimesMissedHop

◆ olderBufferReadPos

int TimeStretcher::olderBufferReadPos

◆ olderHeadReadingFromBuffer

bool TimeStretcher::olderHeadReadingFromBuffer

◆ olderPartReader

SampleLowLevelReader TimeStretcher::olderPartReader

◆ percCacheClustersNearby

Cluster* TimeStretcher::percCacheClustersNearby[2]

◆ playHeadStillActive

bool TimeStretcher::playHeadStillActive[2]

◆ samplePosBig

int64_t TimeStretcher::samplePosBig

◆ samplesTilHopEnd

int32_t TimeStretcher::samplesTilHopEnd

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