176 Range<float> zoomRange(0.f, 1.f);
264 return m_audioSegments[segmentIndex % numSegments].normalisationFactor;
Definition OscillatorUtils.h:39
Definition KrotosAudioBufferDSP.h:276
ProgressTracker & getProgressTracker()
Get a reference to this buffer's ProgressTracker.
Definition KrotosAudioBufferDSP.cpp:24
bool isLoading()
Definition KrotosAudioBufferDSP.h:98
Definition SampleEngine.h:84
void setAudioSelectionRangeAbsolute(int segmentIndex, Range< int > range)
Sets the absolute selection range of an audio segment relative to the audio buffer start.
Definition SampleEngine.cpp:183
void setGranularOscillatorTypeIndicator(GranularPlaybackMode newType)
Definition SampleEngine.h:133
volatile bool m_advancedMode
Definition SampleEngine.h:345
GranularPlaybackMode m_oscillatorTypeIndicator
Definition SampleEngine.h:347
int getAudioSegmentLengthInSamples(int segmentIndex)
Returns the length of an audio segment.
Definition SampleEngine.cpp:269
bool hasDisplayUpdated() const
Definition SampleEngine.h:119
void setGrainLimit(int newLimit)
Definition SampleEngine.cpp:64
float getIndicator2()
Definition SampleEngine.cpp:87
int m_grainLimit
Definition SampleEngine.h:355
void flushGrains()
Definition SampleEngine.cpp:75
MIDIMode getGranularOscillatorMIDIMode()
Definition SampleEngine.h:147
float getAudioSegmentNormalisationFactor(int segmentIndex)
Definition SampleEngine.h:259
float getAudioSelectionStartPositionPercent(int segmentIndex)
Returns the start position of an audio segment selection as a fraction of the audio buffer length.
Definition SampleEngine.cpp:169
int getAudioSelectionStartPosition(int segmentIndex)
Returns the start of the selected section of an audio segment.
Definition SampleEngine.cpp:243
void setAudioSelectionStartPositionAbsolute(int segmentIndex, int startPosition)
Sets the absolute start of an audio segment selection relative to the audio buffer start.
Definition SampleEngine.cpp:200
void setSegmentMuted(int segmentIndex, bool isMuted)
'Mutes' an audio segment in the sampler. In effect, this just means the sample is skipped in the roun...
Definition SampleEngine.cpp:372
volatile bool m_AnalysisInProgress
Definition SampleEngine.h:351
bool allSegmentsMuted()
Definition SampleEngine.cpp:360
const String & getAudioSegmentName(int segmentIndex) const
Returns the name of an audio segment.
Definition SampleEngine.cpp:164
Range< int > getAudioSelectionRange(int segmentIndex)
Returns the start and end position of an audio segment selection as a Range.
Definition SampleEngine.cpp:150
void setSelectionRanges(const std::vector< Range< int > > &selectionRanges)
Sets the selection ranges of the audio segments.
Definition SampleEngine.cpp:106
void freeGrain(Grain *grain)
Definition SampleEngine.cpp:66
juce::String getGetLoadedFilePathsAsCSV()
Definition SampleEngine.cpp:212
Grain * allocateGrain()
Definition SampleEngine.cpp:31
float getIndicatorRPM()
Definition SampleEngine.cpp:90
void setAudioSelectionLength(int segmentIndex, int length)
Sets the length of an audio segment selection.
Definition SampleEngine.cpp:206
float getAudioSegmentEndPositionPercent(int segmentIndex)
Returns the end position of an audio segment as a fraction of the audio buffer length.
Definition SampleEngine.cpp:142
const Array< AudioSegment > & getAudioSegments() const
Returns the audio segment array loaded in the sample engine.(read-only)
Definition SampleEngine.h:172
bool m_allSegmentsMuted
Definition SampleEngine.h:366
volatile float m_indicator2Value
Definition SampleEngine.h:358
static const int MAX_NUM_GRAINS
Definition SampleEngine.h:88
float getAudioSelectionEndPositionPercent(int segmentIndex)
Returns the end position of an audio segment selection as a fraction of the audio buffer length.
Definition SampleEngine.cpp:175
void setAudioSelectionRangeRelative(int segmentIndex, Range< int > range)
Sets the selection range of an audio segment relative to the segment.
Definition SampleEngine.cpp:189
Point< float > getPuckPosition()
Definition SampleEngine.h:129
int m_lastSegmentRoundRobinIndex
Definition SampleEngine.h:364
void prepareNextSegmentIndex(bool sequential=true)
Calculate the next segment to be played back.
Definition SampleEngine.cpp:319
const int getCurrentSegmentIndex() const
Returns the index of the next segment to be played.
Definition SampleEngine.h:299
void setNextSegmentIndex(int index)
Sets the next segment index to be picked.
Definition SampleEngine.cpp:291
float getIndicator1()
Definition SampleEngine.cpp:84
Grain m_grainArray[MAX_NUM_GRAINS]
Definition SampleEngine.h:354
int getAudioSelectionLengthInSamples(int segmentIndex)
Returns the length of the selected section of an audio segment.
Definition SampleEngine.cpp:249
const int getNextSegmentIndex() const
Returns the index of the next segment to be played.
Definition SampleEngine.cpp:413
Array< AudioSegment > m_audioSegments
Definition SampleEngine.h:361
volatile float m_indicator1Value
Definition SampleEngine.h:357
int getNumAudioSegments()
Definition SampleEngine.h:161
volatile bool m_AnalysisRequested
Definition SampleEngine.h:350
GranularPlaybackMode getGranularOscillatorTypeIndicator()
Definition SampleEngine.h:135
void setIndicator1(float newVal)
Definition SampleEngine.cpp:85
std::vector< Range< int > > getSelectionRanges()
Returns an array of segment selection ranges.
Definition SampleEngine.cpp:96
bool shouldUpdateDisplay()
returns true if the sample engine requires the grain display to be redrawn
Definition SampleEngine.h:103
String getNextCuedSegmentName() const
Returns the next cued segment name TODO: Update this to return actual cued segment....
Definition SampleEngine.cpp:411
const int getLastSegmentIndex() const
Returns the index of the previous segment that was played.
Definition SampleEngine.cpp:414
bool isPlaying()
returns true if any grains are active
Definition SampleEngine.cpp:17
void triggerDisplayUpdate()
send a trigger signal for the grain display to redraw
Definition SampleEngine.h:117
volatile float m_indicatorRPMValue
Definition SampleEngine.h:359
void clearAudioSegments()
Definition SampleEngine.cpp:93
bool m_updateDisplayTrigger
Definition SampleEngine.h:344
void setIndicatorRPM(float newVal)
Definition SampleEngine.cpp:91
Point< float > m_puckPosition
Definition SampleEngine.h:346
Range< int > getAudioSelectionRangeRelative(int segmentIndex)
Returns the selection range of an audio segment relative to the segment's start position.
Definition SampleEngine.cpp:158
int m_segmentRoundRobinIndex
Definition SampleEngine.h:363
void calculatePolyphonyCount()
Definition SampleEngine.cpp:4
Range< int > getAudioSegmentRange(int segmentIndex)
Returns the start and end positions of an audio segment as a Range.
Definition SampleEngine.cpp:283
void requestAnalysis()
Definition SampleEngine.h:131
void setPuckPosition(Point< float > position)
Definition SampleEngine.h:127
Value & getSoloValue(int index)
Returns a reference to the 'solo' Value of an audio segment. You can use Value::referTo to have the s...
Definition SampleEngine.cpp:416
int getAudioSegmentSampleRate(int segmentIndex)
Definition SampleEngine.h:246
Range< float > getPlayingWaveformZoomRange()
Definition SampleEngine.h:174
void addAudioSegment(AudioSegment &seg)
Definition SampleEngine.cpp:94
int getAudioSegmentStartPosition(int segmentIndex)
Returns the start of an audio segment.
Definition SampleEngine.cpp:263
float getAudioSegmentStartPositionPercent(int segmentIndex)
Returns the start position of an audio segment as a fraction of the audio buffer length.
Definition SampleEngine.cpp:136
Grain * getGrainArray()
Definition SampleEngine.cpp:73
void setIndicator2(float newVal)
Definition SampleEngine.cpp:88
void newBlockStart()
Definition SampleEngine.h:86
StringArray getAudioSegmentNames() const
Returns a StringArray of audio segment names loaded in the engine.
Definition SampleEngine.cpp:233
int m_skippedSegmentIndex
Definition SampleEngine.h:367
int m_currentPolyphony
Definition SampleEngine.h:353
void setAudioSegmentStartPosition(int segmentIndex, int startPosition)
Sets the start of an audio segment relative to the audio buffer start.
Definition SampleEngine.cpp:118
void setAudioSegmentRange(int segmentIndex, Range< int > range)
Sets the start and end of an audio segment relative to the audio buffer start.
Definition SampleEngine.cpp:130
void setAudioSegmentLength(int segmentIndex, int length)
Sets the length an audio segment.
Definition SampleEngine.cpp:124
void setGranularOscillatorMIDIMode(MIDIMode newMode)
Definition SampleEngine.h:141
void removeSegment(int segmentIndex)
Remove a segment from the sample engine.
Definition SampleEngine.cpp:310
MIDIMode m_oscillatorMIDIMode
Definition SampleEngine.h:348
Definition AirAbsorptionFilter.cpp:2
GranularPlaybackMode
Definition SampleEngine.h:46
MIDIMode
Definition SampleEngine.h:54
A struct to describe an audio sample (as appears in the waveform view)
Definition SampleEngine.h:24
int segmentLength
Definition SampleEngine.h:31
float normalisationFactor
Definition SampleEngine.h:28
volatile int selectionStartPosition
Definition SampleEngine.h:39
String name
Definition SampleEngine.h:25
int segmentStartPosition
Definition SampleEngine.h:30
volatile bool muted
Definition SampleEngine.h:41
int sampleRate
Definition SampleEngine.h:27
volatile int selectionLength
Definition SampleEngine.h:40
Value solo
Definition SampleEngine.h:42
String path
Definition SampleEngine.h:26