cw_cal_run
Runs a CAL program in Cakewalk SONAR to create, delete, or read MIDI notes on a free build, stopping at the open dialog and reporting required accessibility steps.
Instructions
Write a CAL program into the folder SONAR reads, select everything, and open 处理 > 运行 CAL 程序 (0x806A). CAL needs no licence, so this is how notes get CREATED, DELETED or READ on a free build — the edit dialogs cover only transformation. This process cannot click, so it stops at the open dialog and reports the exact steps an accessibility runtime must take. The script ends with a modal pause that has to be dismissed, and CAL reports only a count — prove the effect by exporting and parsing.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mute | No | For setTrackMute: true mutes, false un-mutes. TrackActive TRUE means AUDIBLE — the shipped script comments it as "Un-mute the track". | |
| name | No | For renameTrack: the new track name. Quotes and backslashes are stripped, since CAL has no escape syntax in any shipped script. | |
| port | No | For setTrackRouting: output port. | |
| backup | No | Write a .bak beside the script file before overwriting it. | |
| maxKey | No | ||
| minKey | No | ||
| channel | No | For setTrackRouting: forced MIDI channel, 1..16. | |
| confirm | No | deleteNotes requires the exact token "deleteNotes". | |
| percent | No | ||
| program | Yes | Which generated program to run. queryNotes RENAMES the track as its output channel, so it needs allowRename. | |
| velocity | No | ||
| intervals | No | ||
| semitones | No | ||
| trackIndex | No | For the track programs: which track, 0-based. CAL counts project tracks from 0; an exported .mid puts the conductor first, so CAL track N is export track N+1. | |
| allowRename | No | queryNotes works by writing its summary into the track name, which modifies the project. Set this to accept that. For reading note data with no side effect, export to .mid and use cw_read_midi_file instead. | |
| selectFirst | No | Post 编辑 > 选择 > 全部 first. The CAL body runs once per selected event, so without a selection these programs do nothing. |