Krotos Modules 3
Loading...
Searching...
No Matches
krotos::SampleEngine Class Reference

#include <SampleEngine.h>

Inheritance diagram for krotos::SampleEngine:
krotos::KrotosAudioBufferDSP krotos::KrotosAudioBuffer

Public Member Functions

void newBlockStart ()
 
void calculatePolyphonyCount ()
 
bool isPlaying ()
 returns true if any grains are active
 
bool shouldUpdateDisplay ()
 returns true if the sample engine requires the grain display to be redrawn
 
void triggerDisplayUpdate ()
 send a trigger signal for the grain display to redraw
 
bool hasDisplayUpdated () const
 
GrainallocateGrain ()
 
void setGrainLimit (int newLimit)
 
void freeGrain (Grain *grain)
 
GraingetGrainArray ()
 
void flushGrains ()
 
void setPuckPosition (Point< float > position)
 
Point< float > getPuckPosition ()
 
void requestAnalysis ()
 
void setGranularOscillatorTypeIndicator (GranularPlaybackMode newType)
 
GranularPlaybackMode getGranularOscillatorTypeIndicator ()
 
void setGranularOscillatorMIDIMode (MIDIMode newMode)
 
MIDIMode getGranularOscillatorMIDIMode ()
 
float getIndicator1 ()
 
void setIndicator1 (float newVal)
 
float getIndicator2 ()
 
void setIndicator2 (float newVal)
 
float getIndicatorRPM ()
 
void setIndicatorRPM (float newVal)
 
void clearAudioSegments ()
 
void addAudioSegment (AudioSegment &seg)
 
int getNumAudioSegments ()
 
StringArray getAudioSegmentNames () const
 Returns a StringArray of audio segment names loaded in the engine.
 
const Array< AudioSegment > & getAudioSegments () const
 Returns the audio segment array loaded in the sample engine.(read-only)
 
Range< float > getPlayingWaveformZoomRange ()
 
int getAudioSelectionStartPosition (int segmentIndex)
 Returns the start of the selected section of an audio segment.
 
int getAudioSelectionLengthInSamples (int segmentIndex)
 Returns the length of the selected section of an audio segment.
 
int getAudioSegmentStartPosition (int segmentIndex)
 Returns the start of an audio segment.
 
int getAudioSegmentLengthInSamples (int segmentIndex)
 Returns the length of an audio segment.
 
void setAudioSelectionRangeRelative (int segmentIndex, Range< int > range)
 Sets the selection range of an audio segment relative to the segment.
 
void setAudioSelectionStartPositionAbsolute (int segmentIndex, int startPosition)
 Sets the absolute start of an audio segment selection relative to the audio buffer start.
 
void setAudioSelectionLength (int segmentIndex, int length)
 Sets the length of an audio segment selection.
 
std::vector< Range< int > > getSelectionRanges ()
 Returns an array of segment selection ranges.
 
void setSelectionRanges (const std::vector< Range< int > > &selectionRanges)
 Sets the selection ranges of the audio segments.
 
void setSegmentMuted (int segmentIndex, bool isMuted)
 'Mutes' an audio segment in the sampler. In effect, this just means the sample is skipped in the round robin selection logic.
 
Value & getSoloValue (int index)
 Returns a reference to the 'solo' Value of an audio segment. You can use Value::referTo to have the segment share the same Value as that from external state / UI to keep it up to date. The solo Value is used to ensure a soloed segment cannot be unmuted. Setting this Value to true won't solo the segment, it's just a flag to prevent unmuting. To Solo a sample, you'll need to implement this from a UI controller.
 
juce::String getGetLoadedFilePathsAsCSV ()
 
int getAudioSegmentSampleRate (int segmentIndex)
 
float getAudioSegmentNormalisationFactor (int segmentIndex)
 
void setNextSegmentIndex (int index)
 Sets the next segment index to be picked.
 
void prepareNextSegmentIndex (bool sequential=true)
 Calculate the next segment to be played back.
 
String getNextCuedSegmentName () const
 Returns the next cued segment name TODO: Update this to return actual cued segment. as right now it just returns the just played segment name, since the SampleEngine decides the robin index during playback.
 
const int getNextSegmentIndex () const
 Returns the index of the next segment to be played.
 
const int getCurrentSegmentIndex () const
 Returns the index of the next segment to be played.
 
const int getLastSegmentIndex () const
 Returns the index of the previous segment that was played.
 
void removeSegment (int segmentIndex)
 Remove a segment from the sample engine.
 
- Public Member Functions inherited from krotos::KrotosAudioBufferDSP
 KrotosAudioBufferDSP ()
 
 ~KrotosAudioBufferDSP ()
 
void exitSignalSent () override
 
void generalScheme ()
 
void writeSpectrogramToFile (const std::vector< std::vector< float > > &spectrogram, const juce::String filename)
 
void writeFeatureToFile (const std::vector< float > &feature, const std::string &filename)
 
float crossCorrelate (const float *referencePointer, const float *candidatePointer, const int testSize)
 crossCorrelate - Perform a cross-correlation function
 
float autoCorrelateCentred (int centerIndex, int testSize)
 autoCorrelateCentred - Autocorrelate both sides of supplied index
 
int calcFreeGrain (int centerIndex, int previousGrainSize, GrainRange range)
 calcFreeGrain - find the next grain size
 
void setPhaseAnalysisCoefficients (AnalysisCoefficientsPhase coeff)
 
int size ()
 
float * data ()
 
AnalysisCoefficientsgetAnalysisCoefficients ()
 
void analyse ()
 analyse Analyses the audio waveform stored in the buffer according to the selected scheme This method needs to be non-blocking so it doesn't hold up the message thread. If there is already an analysis in progress, this method will ask the thread to exit then restart it
 
void analysePhase ()
 
void setDefaultPhaseAnalysisCoefficients ()
 
void invalidate ()
 
void validate ()
 
bool analysisResultsAreValid ()
 
void triggerDisplayCacheRegeneration ()
 
bool shouldRegenerateDisplayCache ()
 
bool scanForGrainsFreeMarker (std::vector< int > &returnGrains, const int audioIndexStart, const int useableIndexEnd, const int startGrainSize)
 
bool scanBackwardsForGrainsFreeMarker (std::vector< int > &returnGrains, const int audioIndexStart, const int useableIndexEnd, const int startGrainSize)
 
void buildDescriptors (std::vector< AudioDescriptor > &descriptors, const std::vector< int > &grainsList, const int startGrainAudioIndex, bool goingBackwards)
 
void setAnalysisWavRange (float start, float end)
 setAnalysisWavRange - define a subset of the audio range for analysis
 
void setAnalysisGrainSizeRange ()
 Set the frequency range we want to analyse for.
 
std::vector< AudioDescriptor > & getGrainDescriptionByTime ()
 
std::vector< AudioDescriptor > & getGrainDescriptionByZ ()
 
std::size_t getNearestNeighbour2D (float x, float y)
 
std::vector< std::size_t > getNearestNeighbour2D (float x, float y, std::size_t k)
 
std::vector< std::size_t > getNearestNeighbour2D (float x, float y, float search_radius)
 
std::size_t getNearestNeighbour3D (float x, float y, float z)
 
std::vector< std::size_t > getNearestNeighbour3D (float x, float y, float z, std::size_t k)
 
std::vector< std::size_t > getNearestNeighbour3D (float x, float y, float z, float search_radius)
 
void setTrackingValue (float newValue)
 
void setTrackingCycles (float newValue)
 
AudioDescriptoraudioIndexToDescriptor (int audioIndex)
 
AudioDescriptoraudioPercentToDescriptor (float audioPercent)
 
AudioDescriptoraudioFrequencyToDescriptor (float frequency)
 
void clampGrainDescriptionByTimeIndex (size_t &index)
 
StereoSample getSampleFromGrainPhase (double grainPhase)
 
double getFrequencyFromGrainPhase (double grainPhase)
 
ProgressTrackergetProgressTracker ()
 Get a reference to this buffer's ProgressTracker.
 
SegmentationMethod getSegmentationMethod () const
 
FeatureExtrMethod getFeatureExtractionMethod ()
 
AnalysisScheme getAnalysisScheme ()
 
void setSegmentationMethod (SegmentationMethod segmentation)
 
void setFeatureExtrMethod (FeatureExtrMethod featureExtraction)
 
void setAnalysisScheme (AnalysisScheme scheme)
 
- Public Member Functions inherited from krotos::KrotosAudioBuffer
 KrotosAudioBuffer ()
 
 KrotosAudioBuffer (int channels, int size)
 
 KrotosAudioBuffer (const AudioBuffer< float > &buffer)
 Creates a krotos buffer from a juce buffer.
 
 KrotosAudioBuffer (const AudioBuffer< float > &buffer, int numOfChannels)
 Creates a krotos buffer from a juce buffer but with a new number of channels, this constructor tries to be as efficient as possible by not reallocating or clearing the extra space.
 
 ~KrotosAudioBuffer ()
 
float getPeak (int channel) const
 
float getRMS (int channel) const
 
void setSize (int newNumChannels, int numSamples, bool keepExistingContent=true, bool clearExtraSpace=true, bool avoidReallocating=true)
 
void setSize (KrotosAudioBuffer &prototypeBuffer)
 
void copyFrom (int destChannel, const float *source, int numSamples)
 
void copyFrom (KrotosAudioBuffer &sourceBuffer)
 
void addFrom (int destChannel, const float *source, int numSamples)
 
void addFrom (KrotosAudioBuffer &srcBuffer)
 
void processWetDry (KrotosAudioBuffer &wetBuffer, SmoothedFloat &wetDryValue)
 
void processGain (SmoothedFloat &gainFactor)
 
void processGain (float gainFactor)
 
void processPan (SmoothedFloat &panValue)
 
bool processClamp (float clampValue)
 
void fillWithNoise ()
 
void processMute (MuteStateMachine &state)
 
void setDataValid (bool state)
 
bool isDataValid () const
 
void setSampleRate (float sampleRate)
 
float getSampleRate (void)
 
void setSourceSampleRate (float sampleRate)
 
float getSourceSampleRate (void)
 
float getNativeNoteFrequency (void)
 
void setInterpolationType (InterpolationType newInterpolationType)
 
StereoSample makeRamp (StereoSample startValue, int samples)
 Create a ramp in the buffer.
 
StereoSample getLastSample ()
 Get the last stereo sample from the audio buffer.
 
StereoSample getInterpolatedSample (double index)
 Get a stereo sample from the audio buffer.
 
float getInterpolatedSampleMono (float playHead)
 
KrotosAudioBuffer getMonoBuffer ()
 
void reverse (int channel, int startSample, int numSamples)
 
void reverse (int startSample, int numSamples)
 
juce::AudioBuffer< float > & getJuceAudioBuffer ()
 
void equalPowerCrossFadeFrom (const KrotosAudioBuffer &previousBuffer)
 
float findAbsMax ()
 
void normaliseTo (float scale)
 

Static Public Attributes

static const int MAX_NUM_GRAINS {200}
 

Private Member Functions

void setAudioSelectionRangeAbsolute (int segmentIndex, Range< int > range)
 Sets the absolute selection range of an audio segment relative to the audio buffer start.
 
void setAudioSegmentStartPosition (int segmentIndex, int startPosition)
 Sets the start of an audio segment relative to the audio buffer start.
 
void setAudioSegmentLength (int segmentIndex, int length)
 Sets the length an audio segment.
 
void setAudioSegmentRange (int segmentIndex, Range< int > range)
 Sets the start and end of an audio segment relative to the audio buffer start.
 
Range< int > getAudioSegmentRange (int segmentIndex)
 Returns the start and end positions of an audio segment as a Range.
 
float getAudioSegmentStartPositionPercent (int segmentIndex)
 Returns the start position of an audio segment as a fraction of the audio buffer length.
 
float getAudioSegmentEndPositionPercent (int segmentIndex)
 Returns the end position of an audio segment as a fraction of the audio buffer length.
 
float getAudioSelectionStartPositionPercent (int segmentIndex)
 Returns the start position of an audio segment selection as a fraction of the audio buffer length.
 
float getAudioSelectionEndPositionPercent (int segmentIndex)
 Returns the end position of an audio segment selection as a fraction of the audio buffer length.
 
Range< int > getAudioSelectionRange (int segmentIndex)
 Returns the start and end position of an audio segment selection as a Range.
 
Range< int > getAudioSelectionRangeRelative (int segmentIndex)
 Returns the selection range of an audio segment relative to the segment's start position.
 
const String & getAudioSegmentName (int segmentIndex) const
 Returns the name of an audio segment.
 
bool allSegmentsMuted ()
 

Private Attributes

bool m_updateDisplayTrigger {false}
 
volatile bool m_advancedMode {false}
 
Point< float > m_puckPosition {0.f, 0.f}
 
GranularPlaybackMode m_oscillatorTypeIndicator {GranularPlaybackMode::MSampler}
 
MIDIMode m_oscillatorMIDIMode {MIDIMode::All}
 
volatile bool m_AnalysisRequested {false}
 
volatile bool m_AnalysisInProgress {false}
 
int m_currentPolyphony {0}
 
Grain m_grainArray [MAX_NUM_GRAINS]
 
int m_grainLimit {MAX_NUM_GRAINS}
 
volatile float m_indicator1Value {0.f}
 
volatile float m_indicator2Value {0.f}
 
volatile float m_indicatorRPMValue {0.f}
 
Array< AudioSegmentm_audioSegments
 
int m_segmentRoundRobinIndex {0}
 
int m_lastSegmentRoundRobinIndex {-1}
 
bool m_allSegmentsMuted {false}
 
int m_skippedSegmentIndex {-1}
 

Additional Inherited Members

- Public Types inherited from krotos::KrotosAudioBufferDSP
enum class  SegmentationMethod {
  SegmentationNone = 0 , STFT = 32 , EnvOnset = 64 , OverlapWindow = 96 ,
  SuperFlux = 128 , NUM_SEGMENTATIONS = 129
}
 
enum class  FeatureExtrMethod {
  FeatureExtrMethodNone = 0 , Harmonic_PitchEstimation = 1 , MFCC_PCA = 32 , Centroid_Level = 64 ,
  SpCentroid_RMS = 96 , SpFlatness_RMS = 128 , ERBSpCentroid_RMS = 160 , ERBSpCentroid_ERBSpFlatness = 192 ,
  NUM_FEATUREMETHODS = 193
}
 
enum class  AnalysisScheme { SchemeNone = 0 , Vehicle , GeneralScheme , NUM_SCHEMES }
 
- Public Types inherited from krotos::KrotosAudioBuffer
enum  BufferType { Samples = 0 , Spectral }
 
enum  InterpolationType {
  Linear = 0 , Cubic , Cosine , Cubic3d ,
  NUM_TYPES
}
 
- Static Public Member Functions inherited from krotos::KrotosAudioBuffer
static KrotosAudioBuffer mixToMono (KrotosAudioBuffer &multiChannelBuffer)
 

Member Function Documentation

◆ addAudioSegment()

void krotos::SampleEngine::addAudioSegment ( AudioSegment & seg)

◆ allocateGrain()

Grain * krotos::SampleEngine::allocateGrain ( )

◆ allSegmentsMuted()

bool krotos::SampleEngine::allSegmentsMuted ( )
private

◆ calculatePolyphonyCount()

void krotos::SampleEngine::calculatePolyphonyCount ( )

◆ clearAudioSegments()

void krotos::SampleEngine::clearAudioSegments ( )

◆ flushGrains()

void krotos::SampleEngine::flushGrains ( )

◆ freeGrain()

void krotos::SampleEngine::freeGrain ( Grain * grain)

◆ getAudioSegmentEndPositionPercent()

float krotos::SampleEngine::getAudioSegmentEndPositionPercent ( int segmentIndex)
private

Returns the end position of an audio segment as a fraction of the audio buffer length.

◆ getAudioSegmentLengthInSamples()

int krotos::SampleEngine::getAudioSegmentLengthInSamples ( int segmentIndex)

Returns the length of an audio segment.

◆ getAudioSegmentName()

const String & krotos::SampleEngine::getAudioSegmentName ( int segmentIndex) const
private

Returns the name of an audio segment.

◆ getAudioSegmentNames()

StringArray krotos::SampleEngine::getAudioSegmentNames ( ) const

Returns a StringArray of audio segment names loaded in the engine.

◆ getAudioSegmentNormalisationFactor()

float krotos::SampleEngine::getAudioSegmentNormalisationFactor ( int segmentIndex)
inline

◆ getAudioSegmentRange()

Range< int > krotos::SampleEngine::getAudioSegmentRange ( int segmentIndex)
private

Returns the start and end positions of an audio segment as a Range.

◆ getAudioSegments()

const Array< AudioSegment > & krotos::SampleEngine::getAudioSegments ( ) const
inline

Returns the audio segment array loaded in the sample engine.(read-only)

◆ getAudioSegmentSampleRate()

int krotos::SampleEngine::getAudioSegmentSampleRate ( int segmentIndex)
inline

◆ getAudioSegmentStartPosition()

int krotos::SampleEngine::getAudioSegmentStartPosition ( int segmentIndex)

Returns the start of an audio segment.

◆ getAudioSegmentStartPositionPercent()

float krotos::SampleEngine::getAudioSegmentStartPositionPercent ( int segmentIndex)
private

Returns the start position of an audio segment as a fraction of the audio buffer length.

◆ getAudioSelectionEndPositionPercent()

float krotos::SampleEngine::getAudioSelectionEndPositionPercent ( int segmentIndex)
private

Returns the end position of an audio segment selection as a fraction of the audio buffer length.

◆ getAudioSelectionLengthInSamples()

int krotos::SampleEngine::getAudioSelectionLengthInSamples ( int segmentIndex)

Returns the length of the selected section of an audio segment.

◆ getAudioSelectionRange()

Range< int > krotos::SampleEngine::getAudioSelectionRange ( int segmentIndex)
private

Returns the start and end position of an audio segment selection as a Range.

◆ getAudioSelectionRangeRelative()

Range< int > krotos::SampleEngine::getAudioSelectionRangeRelative ( int segmentIndex)
private

Returns the selection range of an audio segment relative to the segment's start position.

◆ getAudioSelectionStartPosition()

int krotos::SampleEngine::getAudioSelectionStartPosition ( int segmentIndex)

Returns the start of the selected section of an audio segment.

◆ getAudioSelectionStartPositionPercent()

float krotos::SampleEngine::getAudioSelectionStartPositionPercent ( int segmentIndex)
private

Returns the start position of an audio segment selection as a fraction of the audio buffer length.

◆ getCurrentSegmentIndex()

const int krotos::SampleEngine::getCurrentSegmentIndex ( ) const
inline

Returns the index of the next segment to be played.

◆ getGetLoadedFilePathsAsCSV()

String krotos::SampleEngine::getGetLoadedFilePathsAsCSV ( )

◆ getGrainArray()

Grain * krotos::SampleEngine::getGrainArray ( )

◆ getGranularOscillatorMIDIMode()

MIDIMode krotos::SampleEngine::getGranularOscillatorMIDIMode ( )
inline

Fetch the MIDI receive mode

Returns
Returns the MIDI receive mode

◆ getGranularOscillatorTypeIndicator()

GranularPlaybackMode krotos::SampleEngine::getGranularOscillatorTypeIndicator ( )
inline

◆ getIndicator1()

float krotos::SampleEngine::getIndicator1 ( )

◆ getIndicator2()

float krotos::SampleEngine::getIndicator2 ( )

◆ getIndicatorRPM()

float krotos::SampleEngine::getIndicatorRPM ( )

◆ getLastSegmentIndex()

const int krotos::SampleEngine::getLastSegmentIndex ( ) const

Returns the index of the previous segment that was played.

Returns

◆ getNextCuedSegmentName()

String krotos::SampleEngine::getNextCuedSegmentName ( ) const

Returns the next cued segment name TODO: Update this to return actual cued segment. as right now it just returns the just played segment name, since the SampleEngine decides the robin index during playback.

◆ getNextSegmentIndex()

const int krotos::SampleEngine::getNextSegmentIndex ( ) const

Returns the index of the next segment to be played.

◆ getNumAudioSegments()

int krotos::SampleEngine::getNumAudioSegments ( )
inline

◆ getPlayingWaveformZoomRange()

Range< float > krotos::SampleEngine::getPlayingWaveformZoomRange ( )
inline

◆ getPuckPosition()

Point< float > krotos::SampleEngine::getPuckPosition ( )
inline

◆ getSelectionRanges()

std::vector< Range< int > > krotos::SampleEngine::getSelectionRanges ( )

Returns an array of segment selection ranges.

◆ getSoloValue()

Value & krotos::SampleEngine::getSoloValue ( int index)

Returns a reference to the 'solo' Value of an audio segment. You can use Value::referTo to have the segment share the same Value as that from external state / UI to keep it up to date. The solo Value is used to ensure a soloed segment cannot be unmuted. Setting this Value to true won't solo the segment, it's just a flag to prevent unmuting. To Solo a sample, you'll need to implement this from a UI controller.

Parameters
index
Returns

◆ hasDisplayUpdated()

bool krotos::SampleEngine::hasDisplayUpdated ( ) const
inline

◆ isPlaying()

bool krotos::SampleEngine::isPlaying ( )

returns true if any grains are active

Returns

◆ newBlockStart()

void krotos::SampleEngine::newBlockStart ( )
inline

◆ prepareNextSegmentIndex()

void krotos::SampleEngine::prepareNextSegmentIndex ( bool sequential = true)

Calculate the next segment to be played back.

◆ removeSegment()

void krotos::SampleEngine::removeSegment ( int segmentIndex)

Remove a segment from the sample engine.

Parameters
segmentIndexThe index of the segment to remove.

◆ requestAnalysis()

void krotos::SampleEngine::requestAnalysis ( )
inline

◆ setAudioSegmentLength()

void krotos::SampleEngine::setAudioSegmentLength ( int segmentIndex,
int length )
private

Sets the length an audio segment.

◆ setAudioSegmentRange()

void krotos::SampleEngine::setAudioSegmentRange ( int segmentIndex,
Range< int > range )
private

Sets the start and end of an audio segment relative to the audio buffer start.

◆ setAudioSegmentStartPosition()

void krotos::SampleEngine::setAudioSegmentStartPosition ( int segmentIndex,
int startPosition )
private

Sets the start of an audio segment relative to the audio buffer start.

◆ setAudioSelectionLength()

void krotos::SampleEngine::setAudioSelectionLength ( int segmentIndex,
int length )

Sets the length of an audio segment selection.

◆ setAudioSelectionRangeAbsolute()

void krotos::SampleEngine::setAudioSelectionRangeAbsolute ( int segmentIndex,
Range< int > range )
private

Sets the absolute selection range of an audio segment relative to the audio buffer start.

◆ setAudioSelectionRangeRelative()

void krotos::SampleEngine::setAudioSelectionRangeRelative ( int segmentIndex,
Range< int > range )

Sets the selection range of an audio segment relative to the segment.

◆ setAudioSelectionStartPositionAbsolute()

void krotos::SampleEngine::setAudioSelectionStartPositionAbsolute ( int segmentIndex,
int startPosition )

Sets the absolute start of an audio segment selection relative to the audio buffer start.

◆ setGrainLimit()

void krotos::SampleEngine::setGrainLimit ( int newLimit)

◆ setGranularOscillatorMIDIMode()

void krotos::SampleEngine::setGranularOscillatorMIDIMode ( MIDIMode newMode)
inline

Inform the Sample Engine of the required MIDI receive mode

Parameters
newModeThe mode you want to set

◆ setGranularOscillatorTypeIndicator()

void krotos::SampleEngine::setGranularOscillatorTypeIndicator ( GranularPlaybackMode newType)
inline

◆ setIndicator1()

void krotos::SampleEngine::setIndicator1 ( float newVal)

◆ setIndicator2()

void krotos::SampleEngine::setIndicator2 ( float newVal)

◆ setIndicatorRPM()

void krotos::SampleEngine::setIndicatorRPM ( float newVal)

◆ setNextSegmentIndex()

void krotos::SampleEngine::setNextSegmentIndex ( int index)

Sets the next segment index to be picked.

Parameters
index

◆ setPuckPosition()

void krotos::SampleEngine::setPuckPosition ( Point< float > position)
inline

◆ setSegmentMuted()

void krotos::SampleEngine::setSegmentMuted ( int segmentIndex,
bool isMuted )

'Mutes' an audio segment in the sampler. In effect, this just means the sample is skipped in the round robin selection logic.

Note, it's not possible to mute all samples in the engine, the last remaining sample will remain unmuted.

Parameters
segmentIndexThe segment index of the sample to set the mute state
isMutedMute state to set the sample to

◆ setSelectionRanges()

void krotos::SampleEngine::setSelectionRanges ( const std::vector< Range< int > > & selectionRanges)

Sets the selection ranges of the audio segments.

Parameters
selectionRangesA vector of Range<int> objects representing the selection ranges

◆ shouldUpdateDisplay()

bool krotos::SampleEngine::shouldUpdateDisplay ( )
inline

returns true if the sample engine requires the grain display to be redrawn

Returns

◆ triggerDisplayUpdate()

void krotos::SampleEngine::triggerDisplayUpdate ( )
inline

send a trigger signal for the grain display to redraw

Member Data Documentation

◆ m_advancedMode

volatile bool krotos::SampleEngine::m_advancedMode {false}
private

◆ m_allSegmentsMuted

bool krotos::SampleEngine::m_allSegmentsMuted {false}
private

◆ m_AnalysisInProgress

volatile bool krotos::SampleEngine::m_AnalysisInProgress {false}
private

◆ m_AnalysisRequested

volatile bool krotos::SampleEngine::m_AnalysisRequested {false}
private

◆ m_audioSegments

Array<AudioSegment> krotos::SampleEngine::m_audioSegments
private

◆ m_currentPolyphony

int krotos::SampleEngine::m_currentPolyphony {0}
private

◆ m_grainArray

Grain krotos::SampleEngine::m_grainArray[MAX_NUM_GRAINS]
private

◆ m_grainLimit

int krotos::SampleEngine::m_grainLimit {MAX_NUM_GRAINS}
private

◆ m_indicator1Value

volatile float krotos::SampleEngine::m_indicator1Value {0.f}
private

◆ m_indicator2Value

volatile float krotos::SampleEngine::m_indicator2Value {0.f}
private

◆ m_indicatorRPMValue

volatile float krotos::SampleEngine::m_indicatorRPMValue {0.f}
private

◆ m_lastSegmentRoundRobinIndex

int krotos::SampleEngine::m_lastSegmentRoundRobinIndex {-1}
private

◆ m_oscillatorMIDIMode

MIDIMode krotos::SampleEngine::m_oscillatorMIDIMode {MIDIMode::All}
private

◆ m_oscillatorTypeIndicator

GranularPlaybackMode krotos::SampleEngine::m_oscillatorTypeIndicator {GranularPlaybackMode::MSampler}
private

◆ m_puckPosition

Point<float> krotos::SampleEngine::m_puckPosition {0.f, 0.f}
private

◆ m_segmentRoundRobinIndex

int krotos::SampleEngine::m_segmentRoundRobinIndex {0}
private

◆ m_skippedSegmentIndex

int krotos::SampleEngine::m_skippedSegmentIndex {-1}
private

◆ m_updateDisplayTrigger

bool krotos::SampleEngine::m_updateDisplayTrigger {false}
private

◆ MAX_NUM_GRAINS

const int krotos::SampleEngine::MAX_NUM_GRAINS {200}
static

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