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

#include <Sample.h>

Inheritance diagram for Sample:
Inheritance graph
Collaboration diagram for Sample:
Collaboration graph

Public Member Functions

 Sample ()
 
 ~Sample ()
 
void workOutBitMask ()
 
int initialize (int numClusters)
 
void markAsUnloadable ()
 
float determinePitch (bool doingSingleCycle, float minFreqHz, float maxFreqHz, bool doPrimeTest)
 
void workOutMIDINote (bool doingSingleCycle, float minFreqHz=20, float maxFreqHz=10000, bool doPrimeTest=true)
 
uint32_t getLengthInMSec ()
 
SampleCachegetOrCreateCache (SampleHolder *sampleHolder, int32_t phaseIncrement, int32_t timeStretchRatio, bool reversed, bool mayCreate, bool *created)
 
void deleteCache (SampleCache *cache)
 
int getFirstClusterIndexWithAudioData ()
 
int getFirstClusterIndexWithNoAudioData ()
 
int fillPercCache (TimeStretcher *timeStretcher, int32_t startPosSamples, int32_t endPosSamples, int playDirection, int maxNumSamplesToProcess)
 
void percCacheClusterStolen (Cluster *cluster)
 
void deletePercCache (bool beingDestructed=false)
 
uint8_t * prepareToReadPercCache (int pixellatedPos, int playDirection, int *earliestPixellatedPos, int *latestPixellatedPos)
 
bool getAveragesForCrossfade (int32_t *totals, int startBytePos, int crossfadeLengthSamples, int playDirection, int lengthToAverageEach)
 
void convertDataOnAnyClustersIfNecessary ()
 
int32_t getMaxPeakFromZero ()
 
int32_t getFoundValueCentrePoint ()
 
int32_t getValueSpan ()
 
void finalizeAfterLoad (uint32_t fileSize)
 
void convertOneData (int32_t *value)
 
- Public Member Functions inherited from AudioFile
 AudioFile (int newType)
 
virtual ~AudioFile ()
 
int loadFile (AudioFileReader *reader, bool isAiff, bool makeWaveTableWorkAtAllCosts)
 
virtual void finalizeAfterLoad (uint32_t fileSize)
 
void addReason ()
 
void removeReason (char const *errorCode)
 
bool mayBeStolen (void *thingNotToStealFrom=NULL)
 
void steal (char const *errorCode)
 
int getAppropriateQueue ()
 
- Public Member Functions inherited from Stealable
 Stealable ()
 
virtual bool mayBeStolen (void *thingNotToStealFrom)=0
 
virtual void steal (char const *errorCode)=0
 
virtual int getAppropriateQueue ()=0
 
- Public Member Functions inherited from BidirectionalLinkedListNode
 BidirectionalLinkedListNode ()
 
virtual ~BidirectionalLinkedListNode ()
 
void remove ()
 
void insertOtherNodeBefore (BidirectionalLinkedListNode *otherNode)
 
bool isLast ()
 

Public Attributes

String tempFilePathForRecording
 
uint8_t byteDepth
 
uint32_t sampleRate
 
uint32_t audioDataStartPosBytes
 
uint64_t audioDataLengthBytes
 
uint32_t bitMask
 
uint64_t lengthInSamples
 
uint32_t fileLoopStartSamples
 
uint32_t fileLoopEndSamples
 
float midiNoteFromFile
 
uint8_t rawDataFormat
 
bool unloadable
 
bool unplayable
 
bool partOfFolderBeingLoaded
 
bool fileExplicitlySpecifiesSelfAsWaveTable
 
bool lock
 
float midiNote
 
int32_t minValueFound
 
int32_t maxValueFound
 
OrderedResizeableArrayWithMultiWordKey caches
 
uint8_t * percCacheMemory [2]
 
OrderedResizeableArrayWith32bitKey percCacheZones [2]
 
Cluster ** percCacheClusters [2]
 
int numPercCacheClusters
 
int32_t beginningOffsetForPitchDetection
 
bool beginningOffsetForPitchDetectionFound
 
uint32_t waveTableCycleSize
 
SampleClusterArray clusters
 
- Public Attributes inherited from AudioFile
String filePath
 
const uint8_t type
 
uint8_t numChannels
 
String loadedFromAlternatePath
 
int32_t numReasonsToBeLoaded
 
- Public Attributes inherited from Stealable
uint32_t lastTraversalNo
 
- Public Attributes inherited from BidirectionalLinkedListNode
BidirectionalLinkedListNodenext
 
BidirectionalLinkedListNode ** prevPointer
 
BidirectionalLinkedListlist
 

Protected Member Functions

void numReasonsDecreasedToZero (char const *errorCode)
 
- Protected Member Functions inherited from AudioFile
virtual void numReasonsIncreasedFromZero ()
 
virtual void numReasonsDecreasedToZero (char const *errorCode)
 

Constructor & Destructor Documentation

◆ Sample()

Sample::Sample ( )

◆ ~Sample()

Sample::~Sample ( )

Member Function Documentation

◆ convertDataOnAnyClustersIfNecessary()

void Sample::convertDataOnAnyClustersIfNecessary ( )

◆ convertOneData()

void Sample::convertOneData ( int32_t *  value)
inline

◆ deleteCache()

void Sample::deleteCache ( SampleCache cache)

◆ deletePercCache()

void Sample::deletePercCache ( bool  beingDestructed = false)

◆ determinePitch()

float Sample::determinePitch ( bool  doingSingleCycle,
float  minFreqHz,
float  maxFreqHz,
bool  doPrimeTest 
)

◆ fillPercCache()

int Sample::fillPercCache ( TimeStretcher timeStretcher,
int32_t  startPosSamples,
int32_t  endPosSamples,
int  playDirection,
int  maxNumSamplesToProcess 
)

◆ finalizeAfterLoad()

void Sample::finalizeAfterLoad ( uint32_t  fileSize)
virtual

Reimplemented from AudioFile.

◆ getAveragesForCrossfade()

bool Sample::getAveragesForCrossfade ( int32_t *  totals,
int  startBytePos,
int  crossfadeLengthSamples,
int  playDirection,
int  lengthToAverageEach 
)

◆ getFirstClusterIndexWithAudioData()

int Sample::getFirstClusterIndexWithAudioData ( )

◆ getFirstClusterIndexWithNoAudioData()

int Sample::getFirstClusterIndexWithNoAudioData ( )

◆ getFoundValueCentrePoint()

int32_t Sample::getFoundValueCentrePoint ( )

◆ getLengthInMSec()

uint32_t Sample::getLengthInMSec ( )

◆ getMaxPeakFromZero()

int32_t Sample::getMaxPeakFromZero ( )

◆ getOrCreateCache()

SampleCache * Sample::getOrCreateCache ( SampleHolder sampleHolder,
int32_t  phaseIncrement,
int32_t  timeStretchRatio,
bool  reversed,
bool  mayCreate,
bool *  created 
)

◆ getValueSpan()

int32_t Sample::getValueSpan ( )

◆ initialize()

int Sample::initialize ( int  numClusters)

◆ markAsUnloadable()

void Sample::markAsUnloadable ( )

◆ numReasonsDecreasedToZero()

void Sample::numReasonsDecreasedToZero ( char const *  errorCode)
protectedvirtual

Reimplemented from AudioFile.

◆ percCacheClusterStolen()

void Sample::percCacheClusterStolen ( Cluster cluster)

◆ prepareToReadPercCache()

uint8_t * Sample::prepareToReadPercCache ( int  pixellatedPos,
int  playDirection,
int *  earliestPixellatedPos,
int *  latestPixellatedPos 
)

◆ workOutBitMask()

void Sample::workOutBitMask ( )

◆ workOutMIDINote()

void Sample::workOutMIDINote ( bool  doingSingleCycle,
float  minFreqHz = 20,
float  maxFreqHz = 10000,
bool  doPrimeTest = true 
)

Member Data Documentation

◆ audioDataLengthBytes

uint64_t Sample::audioDataLengthBytes

◆ audioDataStartPosBytes

uint32_t Sample::audioDataStartPosBytes

◆ beginningOffsetForPitchDetection

int32_t Sample::beginningOffsetForPitchDetection

◆ beginningOffsetForPitchDetectionFound

bool Sample::beginningOffsetForPitchDetectionFound

◆ bitMask

uint32_t Sample::bitMask

◆ byteDepth

uint8_t Sample::byteDepth

◆ caches

◆ clusters

SampleClusterArray Sample::clusters

◆ fileExplicitlySpecifiesSelfAsWaveTable

bool Sample::fileExplicitlySpecifiesSelfAsWaveTable

◆ fileLoopEndSamples

uint32_t Sample::fileLoopEndSamples

◆ fileLoopStartSamples

uint32_t Sample::fileLoopStartSamples

◆ lengthInSamples

uint64_t Sample::lengthInSamples

◆ lock

bool Sample::lock

◆ maxValueFound

int32_t Sample::maxValueFound

◆ midiNote

float Sample::midiNote

◆ midiNoteFromFile

float Sample::midiNoteFromFile

◆ minValueFound

int32_t Sample::minValueFound

◆ numPercCacheClusters

int Sample::numPercCacheClusters

◆ partOfFolderBeingLoaded

bool Sample::partOfFolderBeingLoaded

◆ percCacheClusters

Cluster** Sample::percCacheClusters[2]

◆ percCacheMemory

uint8_t* Sample::percCacheMemory[2]

◆ percCacheZones

OrderedResizeableArrayWith32bitKey Sample::percCacheZones[2]

◆ rawDataFormat

uint8_t Sample::rawDataFormat

◆ sampleRate

uint32_t Sample::sampleRate

◆ tempFilePathForRecording

String Sample::tempFilePathForRecording

◆ unloadable

bool Sample::unloadable

◆ unplayable

bool Sample::unplayable

◆ waveTableCycleSize

uint32_t Sample::waveTableCycleSize

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