Krotos Modules 3
Loading...
Searching...
No Matches
GrainVisualiser.cpp
Go to the documentation of this file.
1#include "KrotosBinaryData.h"
2
3namespace krotos
4{
5
7 {
8 for (int i = 0; i < NUM_BACKGROUND_FRAMES; i++)
9 {
10 m_backgroundCache.push_back(Image(Image::ARGB, DISPLAY_WIDTH, DISPLAY_HEIGHT, true));
11 }
12
13 auto customBackdrop = File(AssetManager::getPluginDirectory().getFullPathName() + File::getSeparatorString() +
14 "Graphics" + File::getSeparatorString() + "backdrop.png");
15
16 if (customBackdrop.existsAsFile())
17 {
18 m_backdropImage = ImageFileFormat::loadFrom(customBackdrop);
19 }
20 else
21 {
22 m_backdropImage = ImageFileFormat::loadFrom(KrotosBinaryData::GrainBackdrop_png,
23 KrotosBinaryData::GrainBackdrop_pngSize);
24 }
25
26 auto customGrains = File(AssetManager::getPluginDirectory().getFullPathName() + File::getSeparatorString() +
27 "Graphics" + File::getSeparatorString() + "Grains");
28
29 if (customGrains.containsSubDirectories())
30 {
31 Array<File> directoryList = customGrains.findChildFiles(File::TypesOfFileToFind::findDirectories, false);
32
33 for (const auto& directoryPath : directoryList)
34 {
35 File directory(directoryPath);
36 String directoryName = directoryPath.getFullPathName();
37
38 Array<File> filePaths = directory.findChildFiles(File::TypesOfFileToFind::findFiles, false, "*.png");
39
40 Array<String> spriteNames;
41
42 for (const auto& spritePath : filePaths)
43 {
44 spriteNames.add(spritePath.getFileNameWithoutExtension());
45 }
46
47 std::vector<String> spriteNamesVector(spriteNames.begin(), spriteNames.end());
48 std::sort(spriteNamesVector.begin(), spriteNamesVector.end());
49
50 for (const auto& spriteName : spriteNamesVector)
51 {
52 File spriteFile(directoryName + File::getSeparatorString() + spriteName + ".png");
53 m_grainImages.push_back(ImageFileFormat::loadFrom(spriteFile));
54 }
55 }
56 }
57 else
58 {
60 }
61
62 // Copy the backdrop image into the dsiplay buffer as a default
63 Graphics gContext(m_displayBuffer);
64 drawBackdrop(gContext);
65
67
68 // Forces redraw of background frames after GUI has been hidden by DAW then
69 // revealed
71 }
72
74
75 void GrainVisualiser::drawGrain(Graphics& graphicContext, Graphics& overlayContext, float x, float y,
76 float diameter, float sprite, float envelope)
77 {
78 bool bulgeEnabled = true;
79 if (envelope < 0.f)
80 {
81 bulgeEnabled = false;
82 envelope = 0.f;
83 }
84 float bulge = 1.f + envelope * 0.75f;
85 float diam = jmap<float>(diameter, 0.f, 1.f, 0.01f, 0.1f);
86 diam *= bulge * 2.f * m_grainDiameter;
87 Rectangle<float> ellipseBounds{0.f, 0.f, diam * ASPECT_RATIO, diam};
88 ellipseBounds.setCentre(x, 1.f - y);
89
90 // If we have at least one grain image in the m_grainImages array ...
91 float numSprites = static_cast<float>(m_grainImages.size());
92 if (numSprites > 0.f)
93 {
94 if (bulgeEnabled)
95 {
96 graphicContext.setOpacity(envelope * m_grainAlpha);
97 overlayContext.setOpacity(envelope * m_overlayAlpha);
98 }
99
100 graphicContext.setOpacity(1.f);
101 overlayContext.setOpacity(1.f);
102
103 // ...then draw in the grain from an image
104 int spriteIndex = static_cast<int>((1.f - sprite) * numSprites);
105 int maxSpriteIndex = static_cast<int>(numSprites) - 1;
106
107 spriteIndex = std::max<int>(spriteIndex, 0);
108 spriteIndex = std::min<int>(spriteIndex, maxSpriteIndex);
109
111 {
112 // Draw the bitmap
113 drawNormalisedZoomedImage(graphicContext, m_grainImages[spriteIndex].image, ellipseBounds);
114 // Now tint the bitmap
115 drawNormalisedZoomedImage(overlayContext, m_grainImages[spriteIndex].image, ellipseBounds, true);
116 }
117 else // Legacy graphics
118 {
119 drawNormalisedZoomedImage(graphicContext, m_grainImages[spriteIndex].image, ellipseBounds);
120 }
121 }
122 else
123 {
124 // ... otherwise draw an ellipse
125 fillNormalisedZoomedEllipse(overlayContext, ellipseBounds); // Draw filled ellipse
126 drawNormalisedZoomedEllipse(graphicContext, ellipseBounds); // Draw ellipse outline
127 }
128 }
129
130 void GrainVisualiser::drawGrainPerspective(Graphics& graphicContext, Graphics& overlayContext, float x, float y,
131 float z, float /*q*/, const AffineTransform& transform, float envelope)
132 {
133 float zDisplacement = m_advancedGraphics ? m_grainZ : 0.f;
134 Point<float> slice{x - 0.5f, z - 0.5f + zDisplacement}; // Put X&Z location into a Point so we can rotate ...
135 slice.applyTransform(transform); // ... rotate around Y
136 float perspectiveScaling = jmap<float>(slice.y, -0.5f, 0.5f, PERSPECTIVE_SCALING_MAX, PERSPECTIVE_SCALING_MIN);
137 drawGrain(graphicContext, overlayContext, (slice.x * perspectiveScaling) + 0.5f,
138 ((y - 0.5f) * perspectiveScaling) + 0.5f, 1.f - slice.y, y, envelope);
139 }
140
142 {
143 g.drawImage(m_displayBuffer, g.getClipBounds().toFloat());
144 }
145
146 void GrainVisualiser::drawBackdrop(juce::Graphics& g) { g.drawImage(m_backdropImage, g.getClipBounds().toFloat()); }
147
148 inline int GrainVisualiser::calcBaseFrame(const float parallax, float& interFrame)
149 {
150 jassert(parallax >= 0 && parallax <= 1.f);
151 float fractionalFrame = parallax * BACKGROUND_INTERPOLATION_SPAN;
152 int baseFrame = static_cast<int>(fractionalFrame);
153 jassert(baseFrame >= 0 && baseFrame < (NUM_BACKGROUND_FRAMES - 1));
154 interFrame = fractionalFrame - static_cast<float>(baseFrame);
155 jassert(interFrame >= 0.f && interFrame < 1.f);
156 return baseFrame;
157 }
158
159 inline int GrainVisualiser::calcBaseFrame(const float parallax)
160 {
161 float interFrame;
162 return calcBaseFrame(parallax, interFrame);
163 }
164
165 void GrainVisualiser::drawInterpolatedBackground(juce::Graphics& g, float parallax)
166 {
167 float interFrame;
168 int baseFrame = calcBaseFrame(parallax, interFrame);
169
170 // Only draw in the background if both frames are valid
171 if (!m_backgroundCache[baseFrame].dirty && !m_backgroundCache[baseFrame + 1].dirty)
172 {
173 g.setColour(Colours::white);
174 g.drawImageAt(m_backgroundCache[baseFrame].image, 0, 0);
175 g.setOpacity(interFrame);
176 g.drawImageAt(m_backgroundCache[baseFrame + 1].image, 0, 0);
177 }
178 }
179
181 {
182 auto backColour = getLookAndFeel().findColour(ResizableWindow::backgroundColourId);
183 juce::ColourGradient cg = juce::ColourGradient::vertical(
184 backColour.darker(0.5f), 0.0f, backColour.brighter(0.2f), static_cast<float>(getHeight()));
185 g.setGradientFill(cg);
186 g.fillAll();
187 }
188
189#if JUCE_DEBUG
190 void GrainVisualiser::drawProgressTracker(juce::Graphics& g, ProgressTracker& progessTracker)
191 {
192 // Draw in the progress indicator
193 float alpha = 1.0f; // Make the pie chart fully opaque
194 drawBackdrop(g);
195
196 // Make size and position rectangle for our pie chart
197 Rectangle<float> pieBounds = Rectangle<int>{0, 0, DISPLAY_WIDTH, DISPLAY_HEIGHT}.toFloat().getProportion(
198 Rectangle<float>{0.25f, 0.25f, .5f, 0.5f});
199
200 // Draw the filled part of the pie chart
201 Path pie;
202 pie.addPieSegment(pieBounds, 0.f, progessTracker.getFilledIndicator() * TWO_PI, 0.f);
203 g.setColour(getLookAndFeel().findColour(ResizableWindow::backgroundColourId).withAlpha(alpha));
204 g.fillPath(pie);
205
206 // Draw in the loding pie slice with rotating colours
207 pie.clear();
208 pie.addPieSegment(pieBounds, progessTracker.getIndicator() * 6.28319f,
209 progessTracker.getFilledIndicator() * TWO_PI, 0.f);
210 m_indicatorHue += 0.01f; // Rotate the hue of the loading segment
211 if (m_indicatorHue > 1.0f)
212 m_indicatorHue = 0.f;
213 g.setColour(Colour::fromHSV(m_indicatorHue, 0.5f, 0.6f, 1.f).withAlpha(alpha));
214 g.fillPath(pie);
215
216 // Draw the outlined part of the pie chart
217 pie.clear();
218 pie.addPieSegment(pieBounds, 0.f, progessTracker.getIndicator() * TWO_PI, 0.f);
219 g.setColour(getLookAndFeel().findColour(ResizableWindow::backgroundColourId).brighter(0.5f).withAlpha(alpha));
220 g.strokePath(pie, PathStrokeType(2.f));
221
222 // Draw in the progress message
223 g.setColour(Colours::white.withAlpha(alpha));
224 Rectangle<float> textBounds;
225 textBounds.setSize(0.5f, 0.05f);
226 textBounds.setPosition(0.2f, 0.8f);
227 drawNormalisedZoomedText(g, progessTracker.getMessage(), textBounds);
228 }
229#endif
230
231 void GrainVisualiser::drawBackgroundFrame(Graphics& graphicContext, Graphics& overlayContext,
232 SampleEngineShallow* sampleEngine, float parallax)
233 {
234 std::vector<AudioDescriptor>& grainDescriptionByZ = sampleEngine->getGrainDescriptionByZ();
235
236#if JUCE_DEBUG
237 // Draw in the frame number and num grains
238 graphicContext.setColour(Colours::white.withAlpha(0.2f));
239 Rectangle<float> textBounds;
240 textBounds.setSize(0.5f, 0.05f);
241 textBounds.setPosition(0.25f, 0.95f);
242 drawNormalisedZoomedText(graphicContext,
243 "Grains: " + String(grainDescriptionByZ.size()) +
244 " Frame: " + String(m_redrawFrameIndex),
245 textBounds);
246#endif
247
248 auto transform = makeParallaxRotationTransform(parallax);
249
250 // Draw in every grain
251 for (auto& grainDescription : grainDescriptionByZ)
252 {
253 drawGrainPerspective(graphicContext, overlayContext, grainDescription.principalX,
254 grainDescription.principalY, grainDescription.principalZ, grainDescription.principalQ,
255 transform);
256 }
257 }
258
259 void GrainVisualiser::paint(juce::Graphics& g)
260 {
262
263 // Draw in the background from pre-rendered frames
264 Graphics displayBufferContext(m_displayBuffer); // Get a graphics context
265 drawInterpolatedBackground(displayBufferContext, m_parallaxFromPuck);
266
267 // Search for dirty background frames
268 // This finds the first frame which is flagged as dirty - in other words the first
269 // frame which needs to be re-drawn. An index to this frame will be kept in m_redrawFrameIndex
270 // where it will trigger a re-draw. It is done like this so that only one frame is drawn
271 // during each paint() call, and during successive calls to paint(), we will work our way through
272 // the dirty frames, redrawing them one at a time, marking them not dirty as we go.
273 // This helps prevent each call to paint() taking too long.
274 for (int i = 0; i < NUM_BACKGROUND_FRAMES; i++)
275 {
277 if (m_backgroundCache[testFrame].dirty)
278 {
279 m_redrawFrameIndex = testFrame;
280 // found a dirty frame, no need to search further, and we keep its index in m_redrawFrameIndex
281 break;
282 }
283 }
284
285 if (m_redrawFrameIndex >= 0)
286 {
287 // If there is any frame which is not drawn yet, we switch off the display by making it transparent
289 }
290 else
291 {
292 // Otherwise we know they are all drawn, and we start fading up the display by incrementing opacity
294 // but don't fade up greater than 1.0
295 if (m_globalDisplayOpacity > 1.f)
296 {
298 }
299 }
300
301 bool shouldRegenerateDisplayCache = false;
302
303 // Loop through the array of pointers to sound data instances
304 for (auto& engine : m_shallowEngineArray)
305 {
306 if (engine.getGrainDescriptionByZ().size() > 0) // If there are background grains
307 {
308 // Is it asking for regeneration of the background cache ?
309 if (engine.shouldRegenerateDisplayCache())
310 {
311 // If any single engine asks for cache regeneration we trigger
312 // regeneration of the entire cache
313 shouldRegenerateDisplayCache = true;
314 }
315 else
316 {
317 // We use the sample engine data to paint a frame into the display buffer
318 paintPlayingGrains(&engine);
319 }
320 }
321 }
322
323 if (m_redrawFrameIndex >= 0)
324 {
327 }
328
329 if (shouldRegenerateDisplayCache || m_requestBackgroundCacheRegeneration)
330 {
331 m_requestBackgroundCacheRegeneration = false; // Acknowledge request
332 markBackgroundFramesDirty(); // We mark all the frames as dirty
333 m_globalDisplayOpacity = 0.f; // Lets not be looking at dirty frames
334 }
335
336 drawDisplayBuffer(g); // Draw the display buffer into the supplied graphics context
337
338 // In perform mode we hide semi-complete background cacheing using display opacity
339 // In edit mode we want to see frames as soon as they are generated
340 if (m_performMode)
341 {
342 // This mechanism allows the entire display to be faded up against the backdrop
343 if (m_globalDisplayOpacity != 1.f)
344 {
345 g.setOpacity(1.f - m_globalDisplayOpacity);
346 drawBackdrop(g);
347 }
348 }
349 }
350
352 {
357#if JUCE_DEBUG
358 m_progressTracker = sampleEngine->getProgressTracker();
359#endif
360 Grain* grainArray = sampleEngine->getGrainArray();
361 m_grains.clear();
362 for (int i = 0; i < SampleEngine::MAX_NUM_GRAINS; i++)
363 {
364 // We will keep copies only of grains which are playing
365 if (grainArray[i].isPlaying)
366 {
367 m_grains.push_back(grainArray[i]);
368 }
369 }
370 }
371
372 const AffineTransform GrainVisualiser::makeParallaxRotationTransform(float parallax)
373 {
374 return AffineTransform().rotated((parallax -= 0.5f) * -ROTATION_RANGE);
375 }
376
378 {
379 jassert((sampleEngine != nullptr) && (isEnabled() == true));
380
381 // Create two contexts to the display buffer, so we can set a different colour on each
382 Graphics graphicContext(m_displayBuffer);
383 Graphics overlayContext(m_displayBuffer);
384
385 // If there are valid analysis results available
386 if (sampleEngine->analysisResultsAreValid())
387 {
388 m_grainZ = (sampleEngine->getAnalysisCoefficients().coeff5 - 0.5f) * Z_SEPARATION_SCALING;
390
394
396
398 {
400 }
401
402 // If necessary regenerate dirty background cached frame
403 if (m_redrawFrameIndex >= 0)
404 {
406 }
407
408 // Setting colour here so we don't have to do it inside the grain drawing loop
410 {
411 graphicContext.setColour(Colours::white.withAlpha(m_grainAlpha));
412 overlayContext.setColour(Colour::fromHSV(m_overlayHue, 1.0f, 1.0f, m_overlayAlpha));
413 }
414 else
415 {
416 graphicContext.setColour(Colours::white.withAlpha(LEGACY_MODE_ALPHA_VALUE));
417 }
418
420
421 for (Grain& grain : sampleEngine->getGrainArray())
422 {
423 drawGrainPerspective(graphicContext, overlayContext, grain.principalX, grain.principalY,
424 grain.principalZ, grain.principalQ, transform, grain.envelope);
425 }
426 }
427 else // There are no valid analysis results available
428 {
429#if JUCE_DEBUG
430 // If we are in perform mode, we only draw in the background
431 if (m_performMode)
432 {
433 drawBackdrop(graphicContext);
434 }
435 // If we are in edit mode, we draw in the progress tracker
436 else
437 {
438 auto progessTracker = sampleEngine->getProgressTracker();
439 // If loading/analysis is in progress
440 if (progessTracker.isLoading())
441 {
442 drawProgressTracker(graphicContext, progessTracker);
443 }
444 }
445#else
446 m_globalDisplayOpacity = 0.f; // Lets not be displaying grains when analysis invalid
447#endif
448 }
449 }
450
452 {
453 // Create an angle value to rotate the display as we iterate though the frames
454 float parallax = static_cast<float>(index) / static_cast<float>(NUM_BACKGROUND_FRAMES);
455
456 // Then draw in the background plus all the grains
457 Graphics graphicContext(m_backgroundCache[index].image);
458 Graphics overlayContext(m_backgroundCache[index].image);
459
461 {
462 graphicContext.setColour(Colours::white.withAlpha(m_grainAlpha));
463 overlayContext.setColour(Colour::fromHSV(m_overlayHue, 1.0f, 1.0f, m_overlayAlpha));
464 }
465 else
466 {
467 graphicContext.setColour(Colours::white.withAlpha(LEGACY_MODE_ALPHA_VALUE));
468 overlayContext.setOpacity(0.f);
469 }
470 drawBackgroundFrame(graphicContext, overlayContext, sampleEngine, parallax);
471 }
472
474 {
475 // Mark all the background frames as dirty
476 for (auto& backGround : m_backgroundCache)
477 {
478 // Get a graphics context for the background frame buffer which we want to draw into
479 Graphics gContext(backGround.image);
480 drawBackdrop(gContext);
481 backGround.dirty = true;
482 }
483 }
484
486 {
487 std::vector<const char*> imageArray;
488 std::vector<size_t> imageSizeArray;
489
490 switch (style)
491 {
493 imageArray = {KrotosBinaryData::Compound_0_png, KrotosBinaryData::Compound_01_png,
494 KrotosBinaryData::Compound_02_png, KrotosBinaryData::Compound_03_png,
495 KrotosBinaryData::Compound_04_png};
496
497 imageSizeArray = {KrotosBinaryData::Compound_0_pngSize, KrotosBinaryData::Compound_01_pngSize,
498 KrotosBinaryData::Compound_02_pngSize, KrotosBinaryData::Compound_03_pngSize,
499 KrotosBinaryData::Compound_04_pngSize};
500 break;
501 default:
503 imageArray = {KrotosBinaryData::DotsWithLines_01_png, KrotosBinaryData::DotsWithLines_02_png,
504 KrotosBinaryData::DotsWithLines_03_png};
505
506 imageSizeArray = {KrotosBinaryData::DotsWithLines_01_pngSize, KrotosBinaryData::DotsWithLines_02_pngSize,
507 KrotosBinaryData::DotsWithLines_03_pngSize};
508 break;
509 }
510
511 for (size_t i = 0; i < imageArray.size(); ++i)
512 {
513 m_grainImages.push_back(ImageFileFormat::loadFrom(imageArray[i], imageSizeArray[i]));
514 }
515 }
516
517} // namespace krotos
static File getPluginDirectory()
Definition AssetManager.cpp:392
Definition OscillatorUtils.h:39
std::vector< KrotosImage > m_backgroundCache
Definition GrainVisualiser.h:312
std::vector< KrotosImage > m_grainImages
Definition GrainVisualiser.h:332
Image m_displayBuffer
Definition GrainVisualiser.h:330
const float BACKGROUND_INTERPOLATION_SPAN
Definition GrainVisualiser.h:310
void drawInterpolatedBackground(juce::Graphics &g, float parallax)
Draw the background from the backgound frames store The final image will be interpolated from the two...
Definition GrainVisualiser.cpp:165
const int NUM_BACKGROUND_FRAMES
Definition GrainVisualiser.h:308
const float Z_SEPARATION_SCALING
Definition GrainVisualiser.h:299
float m_overlayAlpha
Definition GrainVisualiser.h:319
const int DISPLAY_HEIGHT
Definition GrainVisualiser.h:315
std::vector< SampleEngineShallow > m_shallowEngineArray
Definition GrainVisualiser.h:336
void drawBackdropGradient(juce::Graphics &g)
Draw a gradient for the display background.
Definition GrainVisualiser.cpp:180
const float ROTATION_RANGE
Definition GrainVisualiser.h:289
bool m_performMode
Definition GrainVisualiser.h:279
void drawGrainPerspective(Graphics &graphicContext, Graphics &overlayContext, float x, float y, float z, float q, const AffineTransform &transform, float envelope=-1.f)
Draw a grain blob into the grain display 3D.
Definition GrainVisualiser.cpp:130
float m_grainDiameter
Definition GrainVisualiser.h:317
bool m_advancedGraphics
Definition GrainVisualiser.h:322
const float NUM_GLOBAL_FADE_UP_FRAMES
Definition GrainVisualiser.h:275
const GrainRenderStyle DEFAULT_GRAIN_RENDER_STYLE
Definition GrainVisualiser.h:277
float m_parallaxFromPuck
Definition GrainVisualiser.h:281
void markBackgroundFramesDirty()
Sets the dirty flag true for every background frame.
Definition GrainVisualiser.cpp:473
const float TWO_PI
Definition GrainVisualiser.h:297
GrainRenderStyle
Enumerate the sets of PNGs used to render grains.
Definition GrainVisualiser.h:259
@ Compound
Definition GrainVisualiser.h:260
@ DotsWithLines
Definition GrainVisualiser.h:261
float m_overlayHue
Definition GrainVisualiser.h:318
int m_redrawFrameIndex
Definition GrainVisualiser.h:334
float m_grainZ
Definition GrainVisualiser.h:321
float m_grainAlpha
Definition GrainVisualiser.h:320
void drawDisplayBuffer(juce::Graphics &g)
Draw the display buffer into a graphics context.
Definition GrainVisualiser.cpp:141
void paintPlayingGrains(SampleEngineShallow *sampleEngine)
Paint the grain display into the display buffer.
Definition GrainVisualiser.cpp:377
float m_indicatorHue
Definition GrainVisualiser.h:287
volatile std::atomic< float > m_puckPositionX
Definition GrainVisualiser.h:282
Image m_backdropImage
Definition GrainVisualiser.h:324
const int DISPLAY_WIDTH
Definition GrainVisualiser.h:314
void drawBackgroundFrame(Graphics &graphicContext, Graphics &overlayContext, SampleEngineShallow *sampleEngine, float parallax)
Draws all the grain display components - background.
Definition GrainVisualiser.cpp:231
const AffineTransform makeParallaxRotationTransform(float parallax)
Make an affine transform to rotate X & Z around the Y axis.
Definition GrainVisualiser.cpp:372
const float PERSPECTIVE_SCALING_MAX
Definition GrainVisualiser.h:293
float m_globalDisplayOpacity
Definition GrainVisualiser.h:273
int calcBaseFrame(const float parallax, float &interFrame)
Calculates which frame index into the background cache for a given parallax value.
Definition GrainVisualiser.cpp:148
~GrainVisualiser() override
Definition GrainVisualiser.cpp:73
void drawGrain(Graphics &graphicContext, Graphics &overlayContext, float x, float y, float diameter, float sprite, float envelope=0.f)
Draw a grain blob into the grain display 2D.
Definition GrainVisualiser.cpp:75
const float LEGACY_MODE_ALPHA_VALUE
Definition GrainVisualiser.h:301
bool m_requestBackgroundCacheRegeneration
Definition GrainVisualiser.h:311
void updateBackgroundCacheFrame(SampleEngineShallow *sampleEngine, int index)
Regenerate a frame in the background cache.
Definition GrainVisualiser.cpp:451
const float PERSPECTIVE_SCALING_MIN
Definition GrainVisualiser.h:292
const float ASPECT_RATIO
Definition GrainVisualiser.h:295
void loadBinaryAssetGrainGraphics(GrainRenderStyle style)
Loads the PNGs for display of grains from binary assets.
Definition GrainVisualiser.cpp:485
void drawBackdrop(juce::Graphics &g)
The backdrop is graphic which is drawn into the background of the display This method draws it into t...
Definition GrainVisualiser.cpp:146
GrainVisualiser()
Definition GrainVisualiser.cpp:6
void paint(Graphics &g) override
Paints in the grains display This method is called when the component is asked to re-paint itself Thi...
Definition GrainVisualiser.cpp:259
ProgressTracker & getProgressTracker()
Get a reference to this buffer's ProgressTracker.
Definition KrotosAudioBufferDSP.cpp:24
bool analysisResultsAreValid()
Definition KrotosAudioBufferDSP.h:422
AnalysisCoefficients & getAnalysisCoefficients()
Definition KrotosAudioBufferDSP.cpp:979
bool shouldRegenerateDisplayCache()
Definition KrotosAudioBufferDSP.cpp:28
std::vector< AudioDescriptor > & getGrainDescriptionByZ()
Definition KrotosAudioBufferDSP.h:454
ProgressTracker - a class to help with display of a progresas bar during audio analysis.
Definition KrotosAudioBufferDSP.h:64
float getIndicator()
Definition KrotosAudioBufferDSP.h:71
bool isLoading()
Definition KrotosAudioBufferDSP.h:98
float getFilledIndicator()
Definition KrotosAudioBufferDSP.h:69
String & getMessage()
Definition KrotosAudioBufferDSP.h:67
Definition SampleEngine.h:84
static const int MAX_NUM_GRAINS
Definition SampleEngine.h:88
Grain * getGrainArray()
Definition SampleEngine.cpp:73
A structure to hold a "shallow" copy of a SampleEngine structure It contains only the data from a Sam...
Definition GrainVisualiser.h:24
std::vector< Grain > m_grains
Definition GrainVisualiser.h:50
std::vector< Grain > & getGrainArray()
Definition GrainVisualiser.h:46
std::vector< AudioDescriptor > & getGrainDescriptionByZ()
Definition GrainVisualiser.h:40
void shallowCopy(SampleEngine *sampleEngine)
Make a shallow copy of a sample engine This might have been this class's constructor,...
Definition GrainVisualiser.cpp:351
AnalysisCoefficients & getAnalysisCoefficients()
Definition GrainVisualiser.h:48
bool m_shouldRegenerateDisplayCache
Definition GrainVisualiser.h:54
std::vector< AudioDescriptor > m_grainDescriptionByZ
Definition GrainVisualiser.h:53
AnalysisCoefficients m_analysisCoefficients
Definition GrainVisualiser.h:55
bool analysisResultsAreValid()
Definition GrainVisualiser.h:44
bool m_analysisResultsAreValid
Definition GrainVisualiser.h:56
void SetTransformToFit(int width, int height)
Definition ZoomableComponent.cpp:123
void drawNormalisedZoomedImage(Graphics &g, Image &image, const Rectangle< float > &bounds, bool fillAlphaChannelWithCurrentBrush=false)
Definition ZoomableComponent.cpp:73
void drawNormalisedZoomedText(Graphics &g, String text, Rectangle< float > bounds) const
Definition ZoomableComponent.cpp:41
void fillNormalisedZoomedEllipse(Graphics &g, const Rectangle< float > &bounds)
Definition ZoomableComponent.cpp:80
void drawNormalisedZoomedEllipse(Graphics &g, const Rectangle< float > &bounds)
Definition ZoomableComponent.cpp:85
Definition AirAbsorptionFilter.cpp:2
float coeff6
Definition KrotosAudioBufferDSP.h:49
float dispAH
Definition KrotosAudioBufferDSP.h:56
float dispAAlpha
Definition KrotosAudioBufferDSP.h:55
float dispAA
Definition KrotosAudioBufferDSP.h:57