Compilers · FIB-UPC
JSBach Interpreter
Write music with code: JSBach is a small language with procedures, variables, loops, and conditionals that plays back musical notes. Try the examples or write your own.
<:> C4 play a note
<!> "text" print
x <- 5 assign
|: ... :| block Examples
Code Editor
About this project
Originally built with ANTLR4 and Python for a compilers course at FIB-UPC. The language supports procedures, recursion, arithmetic, lists, conditionals, loops, and musical note playback. This browser version uses a hand-written parser and the Web Audio API for sound synthesis.