Let there be Sound!

Jun 30, 2026 ⋮ The Kireji Project ⋮ 2 min read
For the first time, I have added sound into the demo app ecosystem in the form of music in the background of Orbital.
It's nothing much so far, just a looping four-chord song with a simple bass line and arpeggios. However, the important thing is that the music is synthesized in real time. This, to me, is a major win over including MP3 files. Here are a few reasons why:
- MP3 (among other compressed audio formats) is a proprietary format. I can't easily crack the file open and customize it at runtime.
- A single song of decent quality would be larger in file size than the entire ecosystem currently is. That would be hard to justify given my goal of keeping the combined size of all content below 5 MB.
- A dynamically generated song is much tinier - in the KB range instead of the MB range - and has no compression artifacts.
- Dynamically generated music and sound effects can be programmatically controlled so that music can cleanly transition depending on the action going on in the game.
- I get to create my own instruments and audio pipeline. Using the native Web Audio API is truly exciting. It is a playground of potential - like owning an unending collection of synthesizers, signal generators, and advanced audio equipment that you can customize and plug up however you want. Then, you get to ship that exact setup with your project.
- Like everything else in the Kireji web framework, sound and music synthesis becomes an in-house feature with no third-party dependencies. The stuff I build today will be integrated as reusable components available across all future projects.
As a kid, I always had at least one electronic piano or synthesizer in the house growing up. Each time I got a new one, it was better than the last and I remember experimenting on it for hours on end to learn all of its functions and to create music.
For me, the Web Audio API brings back that experience and then some, with the added bonus that the sound you create is delivered verbatim and at full quality to your audience. It's hard to believe it's just been sitting there available to me all this time.
Spending years focused on programming may have caused me to forget for a while that I also have a lot of experience and fond memories creating music and that those experiences were foundational for me.
Conclusion
I'm so glad I decided to dive into the Web Audio API. The games in the demo app ecosystem are the perfect test bed for me to gain experience with the API while also expressing myself as a musician in the process.
The timing is perfect, because I'm also revisiting my environment art roots while working on these games. Hopefully, I'll be able to create a powerful background score to drive the story of Orbital forward. This will also let me develop sound utilities and maybe even synth instruments that will become part of the Kireji framework and be available to other developers.
