Help with music variables

Yeah so a lot of this is stuff I’m messing with in this topic. Press B to play the short demo song I have in there right now. I’m pretty proud of it!
If you open the console, you can see that it prints a giant block of data, which is your current song, and that’s how I plan to have song exporting work. I still have no idea how importing will work barring editing the code, which is what I do now. Maybe copy and paste will work as I know I have been able to use that before.

At the bottom of that topic you’ll also see a hand pan / steel drum sounding instrument I made which plays the main frequency of the note you play and then all the other frequencies of the other possible notes at a much lower volume to replicate the sound. Many instruments can be replicated this way, though probably @UnsignedArduino will be able to speak more on that.

Many things in beepbox will most definitely not be possible without some pull requests to the Makecode source code to make new instruments, which I have no experience with nor do I have any desire to do myself. Anything you can do by chaining sound instructions together is perfectly possible, and sound instructions can be down to 1 ms in length.

All the sounds in my editor use music.playInstructions() to play the “raw” sound buffers, mostly because I wanted to learn how to implement stuff like LFO and other effects myself.
Feel free to look at that code and ask any questions you want!

3 Likes