cw_cal_plan
Generates the exact CAL run plan—script source, target dialog field, and data-based proof—without writing files or posting commands; call cw_cal_run to execute it.
Instructions
The exact plan for a CAL run: the script source, the dialog field to write, and how to prove the result from data. Pure — it writes no file and posts no command, so it is safe to call speculatively. Use cw_cal_run to actually do it.
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. | |
| port | No | For setTrackRouting: output port. | |
| maxKey | No | For deleteNotes: high end of the pitch range to remove (inclusive). | |
| minKey | No | For deleteNotes: low end of the pitch range to remove (inclusive). | |
| channel | No | For setTrackRouting: forced MIDI channel, 1..16. | |
| percent | No | For scaleVelocity / setDuration: the percentage to scale by. | |
| program | Yes | Which generated program to plan. NOTES: setVelocity | scaleVelocity | addNotes | deleteNotes | transpose | setDuration | queryNotes | dumpNotes. TRACKS: renameTrack | setTrackMute | setTrackRouting. | |
| velocity | No | For setVelocity: the value to set every note to. | |
| intervals | No | For addNotes: semitone offsets to add above each source note, e.g. [12,16,19]. Negative values add below. | |
| semitones | No | For transpose: the interval. SIGNED. | |
| 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. |