Edit: maybe I wasn’t clear enough on how to reproduce this problem:
- open projucer on an m-series mac
- from projucer open JUCE/examples/Plugins/SamplerPluginDemo.h
- click on the xcode generator which opens xcode
- in xcode change the scheme to Sampler Plugin - Standalone Plugin
- click run button and the sampler plugin demo will appear with a small file loaded
- click “load new sample” and open a file > 90 seconds (this will take a long time to load because SamplerPluginDemo.h uses a very small sourceSamplesPerThumbnailSample, but that is not the issue here)
- click in the ruler and drag up and down to zoom in and out. When I do this I see very bad performance
Edit: ok, good news (I think). Got Visual Studio running on a gaming pc, nothing special, i7-13700h with an nvidia 4060 (which I assume is not being used here due to there being no opengl?) SamplerAudioPlugin has no problem at all zooming in and out of a large waveform, very fast and smooth. I assume this is a problem related to Sequoia.
Greetings, new to JUCE and currently (re)learning c++, having a great time with both! My app will involve manipulating large samples, over 1 minute, maybe up to 5, and with AudioThumbnail zooming in and out, scrolling, and even just moving the plugin window around are extremely sluggish. Video examples are attached.
I have been adapting the JUCE example SamplerAudioPlugin.h for my own uses. Both my adapted code and SamplerAudioPlugin struggle with zooming large files. I’m using the develop branch of JUCE 8.0.4, just pulled yesterday and built with Release on an M1 Mac with Sequoia 15.1. Xcode 16.0, Apple clang version 16.0.0 (clang-1600.0.26.3).
I have tried downsampling a 90 second file from 44.1k to 1k. I have tried sourceSamplesPerThumbnailSample at 512 and 8192. I’ve tried both Debug and Release builds and not noticed a difference. Relevant code section here:
WaveformView (const DataModel& model,
const VisibleRangeDataModel& vr)
: dataModel (model),
visibleRange (vr),
thumbnailCache (64),
thumbnail (8192, dataModel.getAudioFormatManager(), thumbnailCache)
{
I’ve spent a lot of time searching through the forum and while I see complaints about the appearance of the waveform, the consensus seems to be that AudioThumbnail is fast. So I’m confused. Is SamplerAudioPlugin not a good example of how to use AudioThumbnail? Am I asking too much of it?
https://youtu.be/MQn-rV9_GRw 90secs 8192samplesPerSample 44.1k SR
https://youtu.be/MEBmctspWM4 90secs-512samplesPerSample-44.1k SR
https://youtu.be/z3ebulzm0jc 90secs 8192samplesPerSample 1k SR
https://youtu.be/djAHik52LiY 90secs 512samplesPerSample 1k SR