Cakewalk CAL
The Cakewalk Application Language: a small, Lisp-syntax event-processing language built into Twelve Tone Systems' Cakewalk MIDI sequencers from 1989, which lets musicians write their own editing commands. BandLab deprecated it in favour of the Lua-based CakeScript in June 2026, though Sonar still runs legacy CAL scripts
Created by Twelve Tone Systems, Inc. (Greg Hendershott, founder), Boston
CAL, the Cakewalk Application Language, is a small scripting language built into the Cakewalk family of MIDI sequencers and digital audio workstations. Cakewalk’s manuals call it “an event-processing language that you use to extend Cakewalk with custom editing commands”. A CAL program usually walks through the MIDI events a user has selected and changes, inserts or deletes them: randomizing timing, thinning controller data, building chords, splitting a drum track by note. The syntax is fully parenthesized prefix notation borrowed from Lisp, while the data model of typed integer variables and assignment operators feels closer to C. CAL first appeared in Twelve Tone Systems’ Cakewalk Professional for MS-DOS in 1989. It has outlived the company that created it. More than 35 years later BandLab’s Sonar still runs CAL scripts, although in June 2026 BandLab declared CAL deprecated and introduced a Lua-based replacement, CakeScript.
History and Origins
Twelve Tone Systems and Cakewalk
Greg Hendershott founded Twelve Tone Systems in Boston in 1987. In a 2007 interview with Create Digital Music he said he had been a philosophy major at Oberlin College who spent most of his time in the conservatory’s electronic music studio, where Gary Nelson was working in APL with music extensions Nelson called MPL. After college, working temp jobs, he decided to start over on the software he had written at Oberlin and write a basic sequencer, which he sold through a small ad. When he found the name he had picked (he remembered it as “something like Opus”) was already taken, he chose “Cakewalk” from a dictionary of music terms. Cakewalk 1.0 for MS-DOS came out in 1987. It was a MIDI sequencer for the IBM PC, and it had no scripting language.
CAL arrives in Cakewalk Professional (1989)
The encyclopedia index lists CAL under 1987, the year of Cakewalk itself. The earliest dated evidence for the language is two years later. From November 1989 Twelve Tone’s ads in Keyboard magazine announced the “new Cakewalk Professional 3.0” and told readers “Use CAL to create your own commands!” Keyboard’s review of Cakewalk Professional 3.0, by Michael Marans in the February 1990 issue, had a section headed “Cakewalk Application Language (CAL)”. It opened: “Ever wish that you could get into the innards of a program and change things around?” The review warned that CAL would be hard going “unless you’re familiar with computer languages, particularly C and/or LISP”, and compared it with the programmable features of Dr. T’s T-Basic and GFmusic 4.0.
Through 1990 the ads described Cakewalk Professional as working “just like standard Cakewalk” but with extras, among them keyboard macros and CAL, which “lets you create your own editing commands, using a simple programming language”. CAL stayed a feature of the Professional edition. Twelve Tone’s 1993 manual for the cheaper Cakewalk Apprentice for Windows lists CAL among the Professional features Apprentice does not have.
Cakewalk’s own 20th-anniversary ad in 2007 places CAL alongside Cakewalk Professional for Windows, and Wikipedia’s article on the sequencer says CAL arrived with Windows version 3.01. Both are contradicted by the 1989–1991 DOS ads. They are best read as the point where CAL reached Windows, not where it began.
Windows, the CAL Contest and Pro Audio
Cakewalk moved to Windows in 1991, and CAL went with it. That August Keyboard reported that Twelve Tone was sponsoring a “Cakewalk Professional CAL Contest”. CAL users were invited to send their routines to Twelve Tone on 5¼-inch or 3½-inch diskettes by 13 September. The winning programs were later offered on a disk to registered Cakewalk Professional owners.
When Cakewalk became Cakewalk Pro Audio and added digital audio, CAL stayed in the product as a MIDI editing tool. Game Developer gave Cakewalk Pro Audio 6 its 1998 Front Line Award for audio composition software and its review described CAL, in quotation marks, as “an interpreted language for writing custom editing commands”. The Pro Audio 9 User’s Guide (1999) devoted a chapter to it.
Design Philosophy
CAL is a language for editing a piece of music, and nearly everything about it follows from that:
- Events are the data. A Cakewalk track is a list of time-stamped MIDI events. CAL’s central construct,
forEachEvent, runs a block of code once for each event in the user’s selection, with that event’s fields (Event.Time,Event.Kind,Note.Key,Note.Vel,Note.Dur,Control.Numand so on) exposed as ordinary variables that can be read and assigned. - Everything is a function call. In the manual’s words, “Every statement in CAL is a call to a function, and the function returns a value.” Arithmetic, comparison, assignment and control flow are all written the same way.
- Borrow from two familiar languages. The Pro Audio 9 guide says “CAL blends elements of C and LISP”. The parenthesized prefix syntax is Lisp’s. The operator names (
==,!=,&&,||,+=,++) and typed integer declarations are C’s. - Let users record, not only write. “Most Pro Audio commands have CAL equivalents,” the guide says. Users could record a sequence of commands in the CAL view and save it as a CAL program, then bind it to a key.
Key Features
Syntax
The Pro Audio 9 guide introduces the syntax with a one-line program:
| |
It then admits that treating arithmetic as function calls “will be comfortable to LISP hackers, but others may find it a little unnatural at first”:
| |
The guide’s main example asks the user for a number and adds it to the velocity of every selected note:
| |
do groups expressions into a block, int declares and initializes a variable, getInt puts up a dialog with a prompt and a range, and if takes a condition, a then-expression and an optional else-expression. Comments start with a semicolon, as in Lisp.
Built-in vocabulary
Surviving scripts and the manuals show the kinds of built-ins CAL provides:
| Kind | Examples |
|---|---|
| Declarations | int, dword, long |
| Control | do, if, forEachEvent, include |
| Operators | +, -, ==, !=, >=, <=, &&, ||, =, +=, -=, *=, /=, ++ |
| Event fields | Event.Kind, Event.Time, Note.Key, Note.Vel, Note.Dur, Control.Num |
| Constants | NOTE, CONTROL, CHANAFT, KEYAFT, TIMEBASE, From |
| Editing | insert, delete, index, EditCut |
| User interface | getInt, message, pause, delay |
A reply on the Cakewalk forum in December 2025 shows how compact a typical CAL edit is. This deletes every controller-12 event in the selection:
| |
Program structure
Most CAL files are a single do expression. Some older scripts use a three-part layout instead. UNDUPE.CAL, a duplicate-note remover that circulates among users, is laid out as a prolog expression that declares variables and asks for settings, a body expression that its comment says is “evaluated once for each selected event”, and an epilog expression that reports how many events were deleted.
The include function runs one CAL file from inside another. Sample scripts in the SONAR era open with a version check:
| |
That is the only public trace of CAL’s version numbering: the sample files assume at least CAL 2.0. When version 2.0 appeared, and what it changed, is not documented in any source found.
Tooling
In the Pro Audio era, Cakewalk had a CAL view, “a small notepad-like editor for creating, editing, saving, recording, and running CAL programs”. A running program could be interrupted with Esc, which the manual recommends only if you “suspect it is stuck in an infinite loop”. The on-line help held a full function reference. For more depth, Cakewalk pointed users to a third-party tutorial, CAL Tutor from Clockwork Music. In later Cakewalk products CAL files are run from Process > Run CAL, which opens a file dialog and applies the chosen script to the selected MIDI data. The SONAR X3 documentation notes that CAL was not available in the entry-level SONAR LE.
Evolution
| Period | Host product | What happened to CAL |
|---|---|---|
| 1989–1990 | Cakewalk Professional 3.0 (MS-DOS) | First advertised and reviewed |
| 1991–1993 | Cakewalk Professional for Windows | Carried to Windows; CAL Contest; Professional-only feature |
| Mid–late 1990s | Cakewalk Pro Audio 6–9 | CAL view editor, macro recording, sample library; the Pro Audio 9 guide says “Run CAL” moved from the Tools menu to the Edit menu (its appendix heading and body disagree on direction) |
| 2000s–2017 | SONAR (Cakewalk, later owned by Roland and then Gibson) | Retained; sample scripts require CAL 2.0 or later; Scott R. Garrigus’s SONAR 3 Power! has a “CAL 101” chapter |
| 2018–2025 | Cakewalk by BandLab | Retained, run from Process > Run CAL |
| 2025 | BandLab’s relaunched Sonar | Still runs, but users describe it as unsupported and unmaintained |
| June 2026– | Sonar 2026.06 and later | Officially deprecated in favour of the Lua-based CakeScript; legacy CAL scripts can still be run, with a warning that CAL “may not be offered in the future” |
The company around CAL changed hands several times. Twelve Tone Systems renamed itself Cakewalk, Inc. in September 2008 after Roland took a majority stake. Hendershott stepped down as CEO on 1 July 2012, after 25 years. Gibson bought Cakewalk in December 2013 and announced on 17 November 2017 that it was ending development. On 23 February 2018 BandLab Technologies bought Cakewalk’s intellectual property, and it released SONAR as the free Cakewalk by BandLab that April. In June 2023 BandLab announced that the free product would be replaced by a paid, redesigned Sonar. Through all of this CAL itself appears to have changed little. Scripts written decades ago are still traded and run. In June 2026 BandLab finally replaced it (see below).
Current Relevance
The encyclopedia lists CAL as historical, and as a language it is: no new features and no documented development since the SONAR era. It has not gone away, though. In a July 2025 thread titled “Are CAL scripts doomed?” on the official Cakewalk forum, one user reported that “CAL scripts are still available in Sonar”, and another said he had tested his key-bound scripts in the free tier of Sonar and they “work fine”. A third called CAL “an unsupported and unmaintained feature of Sonar” but saw no sign of its removal. In December 2025 forum members were still debugging a user’s CAL fade-out script together.
BandLab made its position official with Sonar 2026.06, announced on 12 June 2026. The release introduced CakeScript, which the release notes call “a brand-new, modern scripting language that replaces the deprecated CAL”. CakeScript is built on Lua and reaches far beyond MIDI events to tracks, buses and project settings. There is no automatic converter. The notes say users “can optionally choose to run a legacy CAL script from within CakeScript today, though you should plan to migrate soon as CAL may not be offered in the future”, and the sample CakeScripts shipped with Sonar are ports of the old CAL samples. Running a CakeScript requires a paid BandLab membership. On the forum, Cakewalk’s Noel Borthwick described CAL as “an ancient model from the original cakewalk so from the 90’s that was deprecated decades ago”. Users have since been porting their CAL scripts to Lua, some with help from AI chatbots and some by rewriting them from scratch.
Collections of CAL scripts survive on personal sites such as hexachord.net and in GitHub repositories. Cakewalk’s legacy documentation for “Using CAL”, “Running CAL programs” and the sample files is still online. There is no standalone CAL interpreter: CAL runs only inside Cakewalk software on Windows, so there is no Docker image.
Why It Matters
CAL let users of a commercial PC sequencer script the editor itself, from 1989 on. Its audience was musicians, and Keyboard’s reviewer was frank that CAL asked them to think like C or Lisp programmers. Twelve Tone’s answer was to make the language small, to tie it tightly to the events musicians already saw on screen, and to let them record commands into scripts rather than write every line. For more than three decades, users have used it for jobs the menus never covered: splitting drum tracks, thinning controller floods, building chords, removing duplicates, humanizing virtual instruments. That kept a Lisp-syntax language from the MS-DOS era in use inside a modern Windows DAW until 2026, when its owner finally called time on it.
Timeline
Notable Uses & Legacy
Bundled Cakewalk editing scripts
Cakewalk shipped a set of CAL programs with the product for years, including Split Note to Tracks (splitting a single drum track into one track per drum), Split Channel to Tracks (for Type 0 MIDI files), Random Time, Thin Controller Data, Thin Pitch Wheel and chord builders such as Major Chord and Minor Chord
Twelve Tone's 1991 CAL Contest
Twelve Tone Systems invited Cakewalk Professional owners to submit their CAL routines on diskette in 1991. The company's 1993 Cakewalk Apprentice manual offered 'a disk of CAL Contest winning programs' to registered owners of Cakewalk Professional
Game Developer's 1998 Front Line Award
Game Developer magazine's 1998 Front Line Awards gave Cakewalk Pro Audio 6 its audio composition prize and called Cakewalk a favourite of game audio developers. The review picked out CAL for recording macros of keystroke commands and for custom tasks such as building chords from single notes, thinning data and creating arpeggios. The magazine does not name any game whose audio was made with CAL
Clockwork Music's CAL Tutor
A third-party tutorial product for learning CAL, recommended by name in the Cakewalk Pro Audio 9 User's Guide. Electronic Musician's March 1997 issue lists CAL Tutor 2.1 from Clockwork Music of Boulder, Colorado, at $25 direct
MIDI humanization and fade scripts in Sonar
Users on the Cakewalk forum in 2025 described maintaining their own CAL scripts for detailed MIDI humanization and for fading out expression controllers at the end of MIDI files, and swapped CAL fixes in the forum. After CakeScript arrived in 2026, forum members began porting such scripts to Lua, often by rewriting them from scratch