A backpackable oscilloscope engine. Click the green flag to see the oscilloscope in action. Watch it here for much smoother animation: https://turbowarp.org/886659815?fps=60 Look inside to see how to use it with your own sounds.
Thanks to @LeeJH10 for the awesome original project oscilloscope: https://scratch.mit.edu/projects/564625966 All the logic and code is by @LeeJH10, so go show your appreciation! I basically only added comments explaining how to use it. I also made some code adjustments to optimize performance, but they were very minor. Oh yeah, I also changed the variable names to make them easier to understand (for me at least). They all have underscore "_" prefixes because that is how I format all local variables to distinguish them from global variables. The sound is something I whipped up in BeepBox to demonstrate a few different wave types. I exported the song to WAV, and used Audacity to save it in 4000 Hz 8-bit encoding. And then I used https://tomeko.net/online_tools/file_to_hex.php?lang=en to convert it to hexadecimal.