This week’s App of the Week is ToneBasic.
ToneBasic includes a few things:
- Community member enchanter’s own version of the BASIC language
- An editor that allows you to run it online
- The ability to create programs that have sound--including music.
Anyway, I've been making simple BASIC interpreters for a while now and each one has been progressively more advanced than the last. I even once made a BASIC compiler for my own made up assembly language to run on a made up virtual machine! These interpreters and compilers have come in a wide variety of languages from Python to JS. I'm a rising junior in high school with no formal background, so these interpreters, along with many other projects, have been a good way to expand my knowledge and improve my coding skill on my own. ToneBasic is definitely my best interpreter so far and includes many advanced features, like infinite nested loops and full mathematical expressions. These are small improvements, but still pretty exciting to me! I ran a lot of ideas through my head for the Music Hackathon, most of them games. Unfortunately I don't have much knowledge of game design (though I'm trying to learn), so I eventually decided to just spin the theme towards something I'm good at. Computer generated music has always interested me, so I combined this with the low level programming I'm used to and ended up with an editor that lets you make music with code!
As for the technology stack there really isn't too much to it. The BASIC interpreter was written in plain JS, and code is written in the wonderful and open source, Ace Editor. The documentation (which I'm almost as proud of as the project itself) was written in StackEdit, with markdown, another first for me. I had originally planned to actually make the sounds using the ToneJS library (you might notice I took some inspiration from the name). However, after I had messed around with ToneJS for too long, I realized that it was more complicated then what I needed and decided to just use the plain WebAudio API myself.
Besides getting lost in ToneJS for a little while, having a deadline meant that this project came out incredibly smoothly. I've done my fair share of amateur web design in the past and it seems like every time I try to make something fancy and responsive it never works out. With the approaching deadline I decided to not worry to much about the design and instead focus on the BASIC interpreter. The result surprised me a lot. ToneBasic may be the smoothest and most responsive website I've ever made. It may not be flashy but it actually looks good on my iPhone and computer at the same time!