What I did on my Holiday: Turning jdBasic into a Live-Coding Synth & More
Like many developers, I spent my holidays and the start of the New Year doing exactly what I love most: coding. I’ve been working on jdBasic, my own interpreted language, and over the last few weeks, I went on a bit of a feature spree.
From building a "Strudel-like" music sequencer to adding hardware support and refining the syntax, here is a breakdown of how jdBasic evolved over the break.
Phase 1: The "Pro" Sound Upgrade (December)
I started the holidays with a goal: I didn't just want to play beeps; I wanted a full live-coding music environment.
I overhauled the SoundSystem to reach what I call "more pro status." The biggest addition was the Live Coding Sequencer. Inspired by tools like Strudel, I implemented a "mini-notation" parser that allows for complex rhythmic patterns using simple text strings.
Instead of writing loop logic manually, you can now sequence beats like this:
' A basic 4-step techno kick
SOUND.SEQ 0, "c2 ~ c2 ~", "SQUARE"
' Fast hi-hats using subdivision (two hits in one step)
SOUND.SEQ 1, "[c4 c4] [c4 c4] [c4 c4] [c4 c4]", "NOISE"
I also added a suite of sound design commands to shape the sound in real-time:
SOUND.VOICE: Configures ADSR envelopes and waveforms.SOUND.FILTER&SOUND.LFO: For that sweeping synth feel.SOUND.SIDECHAIN: Because you can't have electronic music without ducking the synth to the kick drum!
Phase 2: System Tools & "CODEC" (Early Jan)
After the New Year, I shifted focus from art to utility. I wanted jdBasic to play nicer with the OS and binary data.
Binary I/O and Clipboards
I introduced BINWRITER and BINREADER$, allowing the language to handle raw byte data without encoding issues. To go with this, I added PACK$ and UNPACK for converting numbers into binary structures (Little/Big Endian support included).
I also finally added Clipboard support (CLIPBOARD.SET, CLIPBOARD.GET$), which is incredibly useful for a language that has its own built-in editor.
The CODEC Module
I added a new module called CODEC. This creates a standard way to handle data transformations:
CODEC.BASE64_ENCODE$/DECODE$: Essential for web APIs.CODEC.SHA256$: For hashing.CODEC.UUID$: For generating unique identifiers.
I also upgraded the DIR$ function. It now supports an "extended info" mode that returns a 2D matrix containing file sizes, dates, and attributes, rather than just a simple list of names. This will fit for a nice file explorer in ImGUI.
Phase 3: Hardware Control (Jan 11)
Things got physical this week. I wanted jdBasic to interact with more than just the screen.
1. Joystick Support (JOY): I added a full module for reading Gamepads. You can now query axis positions, button presses, and even the D-Pad "Hat" state.
I wrote a little mine sweeper clone for testing:
2. Serial Communication (SERIAL): This was a big one. jdBasic can now talk to Arduinos or other serial devices. I implemented SERIAL.OPEN, WRITE, READ$, and FLUSH.
' Talking to an Arduino
hCom = SERIAL.OPEN("COM3", 9600)
SERIAL.WRITE hCom, "LED_ON"
Phase 4: Syntax Polish & Bug Hunting (Jan 12)
Finally, I spent yesterday refining the actual coding experience.
One-Line IF and Loop Control
I expanded the IF statement logic. Previously, IF was strictly a block statement or a simple command. Now, I support proper one-liners with ELSE clauses:
IF A = 10 THEN PRINT "Yes" ELSE PRINT "No"
I also added CONTINUEFOR, CONTINUEDO, and CONTINUELOOP to skip the rest of a loop iteration without breaking out of it completely.
Summary
It’s been a productive start to 2026. jdBasic has gone from a simple interpreter to a language capable of live music synthesis, binary file manipulation, and hardware control.
Now, I think I need another holiday to recover from the coding holiday. 🚀