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

#include <VoiceSample.h>

Inheritance diagram for VoiceSample:
Inheritance graph
Collaboration diagram for VoiceSample:
Collaboration graph

Public Member Functions

 VoiceSample ()
 
void noteOn (SamplePlaybackGuide *guide, uint32_t samplesLate, int priorityRating)
 
bool noteOffWhenLoopEndPointExists (Voice *voice, VoiceSamplePlaybackGuide *voiceSource)
 
void setupCacheLoopPoints (SamplePlaybackGuide *voiceSource, Sample *sample, int loopingType)
 
int attemptLateSampleStart (SamplePlaybackGuide *voiceSource, Sample *sample, int64_t rawSamplesLate, int numSamples=0)
 
void endTimeStretching ()
 
bool render (SamplePlaybackGuide *guide, int32_t *oscBuffer, int numSamples, Sample *sample, int numChannels, int loopingType, int32_t phaseIncrement, int32_t timeStretchRatio, int32_t amplitude, int32_t amplitudeIncrement, int bufferSize, int desiredInterpolationMode, int priorityRating)
 
void beenUnassigned ()
 
bool shouldObeyMarkers ()
 
void readSamplesResampledPossiblyCaching (int32_t **oscBufferPos, int32_t **oscBufferRPos, int numSamples, Sample *sample, int jumpAmount, int numChannels, int numChannelsAfterCondensing, int32_t phaseIncrement, int32_t *sourceAmplitudeNow, int32_t amplitudeIncrement, int bufferSize, int reduceMagnitudeBy=1)
 
bool sampleZoneChanged (SamplePlaybackGuide *voiceSource, Sample *sample, int markerType, int loopingType, int priorityRating, bool forAudioClip=false)
 
int32_t getPlaySample (Sample *sample, SamplePlaybackGuide *guide)
 
bool stopUsingCache (SamplePlaybackGuide *guide, Sample *sample, int priorityRating, bool loopingAtLowLevel)
 
bool possiblySetUpCache (SampleControls *sampleControls, SamplePlaybackGuide *guide, int32_t phaseIncrement, int32_t timeStretchRatio, int priorityRating, int loopingType)
 
bool fudgeTimeStretchingToAvoidClick (Sample *sample, SamplePlaybackGuide *guide, int32_t phaseIncrement, int numSamplesTilLoop, int playDirection, int priorityRating)
 
- Public Member Functions inherited from SampleLowLevelReader
 SampleLowLevelReader ()
 
 ~SampleLowLevelReader ()
 
void unassignAllReasons ()
 
void jumpForwardLinear (int numChannels, int byteDepth, uint32_t bitMask, int jumpAmount, int32_t phaseIncrement)
 
void jumpForwardZeroes (int bufferSize, int numChannels, int32_t phaseIncrement)
 
void interpolate (int32_t *sampleRead, int numChannels, int whichKernel)
 
void interpolateLinear (int32_t *sampleRead, int numChannels, int whichKernel)
 
void fillInterpolationBufferRetrospectively (Sample *sample, int bufferSize, int startI, int playDirection)
 
void jumpBackSamples (Sample *sample, int numToJumpBack, int playDirection)
 
void setupForPlayPosMovedIntoNewCluster (SamplePlaybackGuide *guide, Sample *sample, int bytePosWithinNewCluster, int byteDepth)
 
bool setupClusersForInitialPlay (SamplePlaybackGuide *guide, Sample *sample, int byteOvershoot=0, bool justLooped=false, int priorityRating=1)
 
bool moveOnToNextCluster (SamplePlaybackGuide *guide, Sample *sample, int priorityRating=1)
 
bool changeClusterIfNecessary (SamplePlaybackGuide *guide, Sample *sample, bool loopingAtLowLevel, int priorityRating=1)
 
bool considerUpcomingWindow (SamplePlaybackGuide *guide, Sample *sample, int *numSamples, int32_t phaseIncrement, bool loopingAtLowLevel, int bufferSize, bool allowEndlessSilenceAtEnd=false, int priorityRating=1)
 
void setupReassessmentLocation (SamplePlaybackGuide *guide, Sample *sample)
 
void misalignPlaybackParameters (Sample *sample)
 
void realignPlaybackParameters (Sample *sample)
 
bool reassessReassessmentLocation (SamplePlaybackGuide *guide, Sample *sample, int priorityRating)
 
int32_t getPlayByteLowLevel (Sample *sample, SamplePlaybackGuide *guide, bool compensateForInterpolationBuffer=false)
 
void cloneFrom (SampleLowLevelReader *other, bool stealReasons=false)
 
bool setupClustersForPlayFromByte (SamplePlaybackGuide *guide, Sample *sample, int32_t startPlaybackAtByte, int priorityRating)
 
virtual bool shouldObeyMarkers ()
 
void readSamplesNative (int32_t **__restrict__ oscBufferPos, int numSamplesTotal, Sample *sample, int jumpAmount, int numChannels, int numChannelsAfterCondensing, int32_t *amplitude, int32_t amplitudeIncrement, TimeStretcher *timeStretcher=NULL, bool bufferingToTimeStretcher=false)
 
void readSamplesResampled (int32_t **__restrict__ oscBufferPos, int numSamples, Sample *sample, int jumpAmount, int numChannels, int numChannelsAfterCondensing, int32_t phaseIncrement, int32_t *amplitude, int32_t amplitudeIncrement, int bufferSize, bool writingCache, char **__restrict__ cacheWritePos, bool *doneAnySamplesYet, TimeStretcher *timeStretcher, bool bufferingToTimeStretcher, int whichKernel)
 
bool readSamplesForTimeStretching (int32_t *oscBufferPos, SamplePlaybackGuide *guide, Sample *sample, int numSamples, int numChannels, int numChannelsAfterCondensing, int32_t phaseIncrement, int32_t amplitude, int32_t amplitudeIncrement, bool loopingAtLowLevel, int jumpAmount, int bufferSize, TimeStretcher *timeStretcher, bool bufferingToTimeStretcher, int whichPlayHead, int whichKernel, int priorityRating)
 
void bufferIndividualSampleForInterpolation (uint32_t bitMask, int numChannels, int byteDepth, char *playPosNow)
 
void bufferZeroForInterpolation (int numChannels)
 

Public Attributes

VoiceSamplenextUnassigned
 
uint32_t pendingSamplesLate
 
TimeStretchertimeStretcher
 
SampleCachecache
 
int32_t cacheBytePos
 
bool doneFirstRenderYet
 
bool fudging
 
bool forAudioClip
 
bool writingToCache
 
int32_t cacheLoopEndPointBytes
 
int32_t cacheEndPointBytes
 
uint32_t cacheLoopLengthBytes
 
- Public Attributes inherited from SampleLowLevelReader
uint32_t oscPos
 
char * currentPlayPos
 
char * reassessmentLocation
 
char * clusterStartLocation
 
uint8_t reassessmentAction
 
int8_t interpolationBufferSizeLastTime
 
int16x4_t interpolationBuffer [2][INTERPOLATION_MAX_NUM_SAMPLES > > 2]
 
Clusterclusters [NUM_CLUSTERS_LOADED_AHEAD]
 

Constructor & Destructor Documentation

◆ VoiceSample()

VoiceSample::VoiceSample ( )

Member Function Documentation

◆ attemptLateSampleStart()

int VoiceSample::attemptLateSampleStart ( SamplePlaybackGuide voiceSource,
Sample sample,
int64_t  rawSamplesLate,
int  numSamples = 0 
)

◆ beenUnassigned()

void VoiceSample::beenUnassigned ( )

◆ endTimeStretching()

void VoiceSample::endTimeStretching ( )

◆ fudgeTimeStretchingToAvoidClick()

bool VoiceSample::fudgeTimeStretchingToAvoidClick ( Sample sample,
SamplePlaybackGuide guide,
int32_t  phaseIncrement,
int  numSamplesTilLoop,
int  playDirection,
int  priorityRating 
)

◆ getPlaySample()

int32_t VoiceSample::getPlaySample ( Sample sample,
SamplePlaybackGuide guide 
)

◆ noteOffWhenLoopEndPointExists()

bool VoiceSample::noteOffWhenLoopEndPointExists ( Voice voice,
VoiceSamplePlaybackGuide voiceSource 
)

◆ noteOn()

void VoiceSample::noteOn ( SamplePlaybackGuide guide,
uint32_t  samplesLate,
int  priorityRating 
)

◆ possiblySetUpCache()

bool VoiceSample::possiblySetUpCache ( SampleControls sampleControls,
SamplePlaybackGuide guide,
int32_t  phaseIncrement,
int32_t  timeStretchRatio,
int  priorityRating,
int  loopingType 
)

◆ readSamplesResampledPossiblyCaching()

void VoiceSample::readSamplesResampledPossiblyCaching ( int32_t **  oscBufferPos,
int32_t **  oscBufferRPos,
int  numSamples,
Sample sample,
int  jumpAmount,
int  numChannels,
int  numChannelsAfterCondensing,
int32_t  phaseIncrement,
int32_t *  sourceAmplitudeNow,
int32_t  amplitudeIncrement,
int  bufferSize,
int  reduceMagnitudeBy = 1 
)

◆ render()

bool VoiceSample::render ( SamplePlaybackGuide guide,
int32_t *  oscBuffer,
int  numSamples,
Sample sample,
int  numChannels,
int  loopingType,
int32_t  phaseIncrement,
int32_t  timeStretchRatio,
int32_t  amplitude,
int32_t  amplitudeIncrement,
int  bufferSize,
int  desiredInterpolationMode,
int  priorityRating 
)

◆ sampleZoneChanged()

bool VoiceSample::sampleZoneChanged ( SamplePlaybackGuide voiceSource,
Sample sample,
int  markerType,
int  loopingType,
int  priorityRating,
bool  forAudioClip = false 
)

◆ setupCacheLoopPoints()

void VoiceSample::setupCacheLoopPoints ( SamplePlaybackGuide voiceSource,
Sample sample,
int  loopingType 
)

◆ shouldObeyMarkers()

bool VoiceSample::shouldObeyMarkers ( )
inlinevirtual

Reimplemented from SampleLowLevelReader.

◆ stopUsingCache()

bool VoiceSample::stopUsingCache ( SamplePlaybackGuide guide,
Sample sample,
int  priorityRating,
bool  loopingAtLowLevel 
)

Member Data Documentation

◆ cache

SampleCache* VoiceSample::cache

◆ cacheBytePos

int32_t VoiceSample::cacheBytePos

◆ cacheEndPointBytes

int32_t VoiceSample::cacheEndPointBytes

◆ cacheLoopEndPointBytes

int32_t VoiceSample::cacheLoopEndPointBytes

◆ cacheLoopLengthBytes

uint32_t VoiceSample::cacheLoopLengthBytes

◆ doneFirstRenderYet

bool VoiceSample::doneFirstRenderYet

◆ forAudioClip

bool VoiceSample::forAudioClip

◆ fudging

bool VoiceSample::fudging

◆ nextUnassigned

VoiceSample* VoiceSample::nextUnassigned

◆ pendingSamplesLate

uint32_t VoiceSample::pendingSamplesLate

◆ timeStretcher

TimeStretcher* VoiceSample::timeStretcher

◆ writingToCache

bool VoiceSample::writingToCache

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