This page is made for you Cakewalk users out there! Cakewalk's own programming language, CAL (Cakewalk application language), is a very flexible way to increase its functionality. On this page, I've included some of my own CAL programs, and if you've written another nice program, then send it to me an I'll include it on this page.

The programs are shown like this:
program author
date cakewalk ver. file
program code.
with a description a the end, and sometimes an example .wrk file.

To download the program, click on the filename to download the .cal program. To run the program in Cakewalk, select the tracks you want the program to affect, choose Run CAL from the Edit menu, and select your program.


Realtime AWE32 control Lars Ahlzn
970112 2.0
; INSERT MIDI MESSAGES FOR REALTIME ; AWE32 CONTROL (like filter cutoff) ; by Lars Ahlzn (do (word pram) (word chnl) (getWord pram "Parameter (21=cutoff, 22=res):" 1 31) (getWord chnl "On which channel:" 1 16) (insert (makeTime 1 1 0) chnl CONTROL 99 127) (insert (makeTime 1 1 1) chnl CONTROL 98 pram) )
To control parameters in realtime with controller 38, you have to enter some NRPN message at the start of the track. This program will do this for you. For example, if you want to control the filter cutoff, run the program and enter 21 as parameter and the desired channel. Then you can draw the filter cutoff with controller 38 in the controller window. Handy, isn't it?

MIDI delay Lars Ahlzn
970412 2.0
; DELAY ; by Lars Ahlzn (do (dword currtime 0) (dword newtime 0) (word del 0) (word minskn 0) (word num 0) (word i 0) (word v 0) (getInt del "Delay time in ticks (120 ppq)" 1 10000) (getInt minskn "Volume factor (10=0, 5=0.5, 1=0.1)" 1 20) (getInt num "Number of delays" 1 20) (forEachEvent (do (if (== Event.Kind NOTE) (do (= currtime Event.Time) (= i num) (= v Note.Vel) (while (!= i 0) (do (= v (* v minskn)) (= v (/ v 10)) (= currtime (makeTime (meas currtime) (beat currtime)(+ (tick currtime) del))) (insert currtime Event.Chan NOTE Note.Key v Note.Dur) (-- i) ) ) ) ) ) ) )
This program creates a delay (echo) effect on the selected tracks. Very interesting effects can be achieved when you experiment with this program. Try it on drums, leads and other tracks. The delay time is how many ticks between each echo. In Cakewalk, there's 120 ticks on a quarter. For best effects, try with even numbers like 60, 90, 120, 150, 180 a.s.o, but experiment if you like. The volume factor is how much the volume will decrease every echo. 1 means that the next echo will be 1/10th of the volume, 5 means 1/2 and 10 means no decrease at all. (more than 10 will increase the volume for each echo).

Random pan Lars Ahlzn
960718 2.0
; RANDOM PAN ; by Lars Ahlzn (do (word pan 64) (forEachEvent (do (= pan (random 0 127)) (if (== Event.Kind NOTE) (insert Event.Time Event.Chan CONTROL 10 pan) ) ) ) )
As the AWE32 (or perhaps i should blame the drivers) has no Random Pan function, I created one in Cakewalk. This gives each note event a random pan value.

AWE32 reset Lars Ahlzn
970413 3.1
(do (if (< VERSION 31) (do (pause "Requires Cakewalk 3.1 or higher.") (exit) ) ) (sendMIDI -1 -1 PATCH 0) (sendMIDI -1 -1 CONTROL 91 0) (sendMIDI -1 -1 CONTROL 93 0) (sendMIDI -1 -1 CONTROL 10 64) (sendMIDI -1 -1 WHEEL 0) )
This program is useful because cakewalk doesn't automatically reset pan, reverb, chorus and other controller values when you load a song. So if you've listened to a song with certain controller values and load another one, the old controller values will be used and the song might sound strange. If you run this program when you've loaded a song, the problem will disappear.

MIDI Flanger Lars Ahlzn
970413 2.0
(do (int mindly 1) (int maxdly 4) (int direction 0) (int dly 1) (getInt maxdly "Max. delay time (2-20)" 2 20) (forEachEvent (do (if (== Event.Kind NOTE) (do (insert (makeTime (meas Event.Time) (beat Event.Time) (+ (tick Event.Time) dly)) Event.Chan NOTE Note.Key Note.Vel Note.Dur) (if (== direction 0) (do (++ dly) (if (== dly maxdly) (= direction 1) ) ) ) (if (== direction 1) (do (-- dly) (if (== dly 0) (= direction 0) ) ) ) ) ) ) ) )
This creates a flanger effect by adding a note a couple of ticks after the original. Use values of about 3-10 ticks for the best effect. Sometimes, you'll have to decrease the volume on the channel after the program, as it adds extra notes.


These are a few links where you can find CAL information and code:

© Lars Ahlzen 1997