If you don't hear the sound or it's lagging, try turning on reduced mode by clicking the stage (less quality). Then it will only try to play ~124 sounds instead of ~266 at once. Also close anything that could play or record a sound if it wanted. I have managed to include all 90 seconds as precomputed spectrogram. The project needs the precomputed spectrogram to play on Scratch, because my constant Q transform doesn't run in real time without a compiler. https://turbowarp.org/1039396371 If you import your own sound: you can press the green flag while it's precomputing to hear what it has done so far, but that pauses the precomputing process until it stops playing the sound. You can import your own audio - see inside and go to Stage for instructions. With other music: https://scratch.mit.edu/projects/1038391268/ Lighter version: https://scratch.mit.edu/projects/1062861981/
Music: Never Gonna Give You Up by Rick Astley I used the FFT by @SpinningCube to implement the constant Q transform. (https://scratch.mit.edu/projects/941518411/) I read about the constant Q transform and about Gabor wavelets on the Wikipedia. The Q in my implementation is not exactly the Q on Wikipedia. How does this work? What is a constant Q transform? My CQT implementation's is described in the next block of text. All other answers: See the original project's description, but the differences from the original project are: This project doesn't use an external program to calculate the spectrogram. I divided the octave into 24 bands instead of 16. I replaced the sine waves with narrow-band noise (it sounds similar to a sine wave) for the sound reconstruction. That fixed noise sounds. I made the new sounds start with silence, that fixed the sound spike at the start, however it made the loudness wobbling a bit. (every clone plays 2 sounds alternately that overlap in 3/8 of the time) How does your constant Q implementation work? I choose a Gabor wavelet for the frequency I'm checking. Then I calculate the length of the wavelet and of its Fourier transform where they are bigger than 0.001. I choose the shorter and then multiply it point by point with the waveform or with its Fourier transform and sum the results. This gives a complex number. Then I set the intensity of the frequency to the absolute value of the sum. Change log: 2024. November 21. - Move the set volume block to a broadcast from the loop 2024. September 04. - Replaced sound components, reduced mode now plays a slice of the spectrum instead of playing 12 bands/octave. <no timestamp> - added time slider