This is a guide for using clones in scratch. Look inside for the example code that you can use.
The music visualizer at the end is best in turbowarp with 120 fps (more responsive ans smoother). https://turbowarp.org/1335580792?fps=120