Some basics about CSL command and configuration files/Keating

CSL works in terms of commands. For classes and some common tasks, certain commands may be pre-programmed for users. But if you want to do anything the least bit different from what is already set up, you must understand how CSL uses commands.
 

  1. CSL commands
  2. CSL macro or command files (filename.cmd)
  3. CSL key files (filename.key)
  4. CSL configuration files (filename.cfg)
  5. Two sample .key files that bypass cmd files
  6. My cfg file "pk1tr.cfg"

1. CSL commands

Commands either perform operations, or SET parameters/options of operations.

Forms of command:

 i) command (source) location1 (location2)

  • command = the operation (using all parameters as currently set)
  • source = where to find the thing to do it to (which window), if not the default (remember, the active window is where you want the results of the operation dumped
  • location = where in the source (at the cursor, at some time value, ...)
  • If two locations are given, they define a range the whole of which is used
  • P. 65 of the manual has an important list of representations for locations (whole: 0 *; displayed: < >; between marks: m1 m2; between tags: tn tm; at cursor: =)
  •  Examples:
  • ENERGY a m1 m2 (puts into the active window the energy, according to current settings, of signal between marks in A)
  • SPG A T1 T2 (puts into the active window a spectrogram, according to current settings, of signal between tags in A)
  • FMT A < > (puts into the active window a formant history, according to current settings, of signal now displayed in A)
  • RUN FILENAME (runs a file such as a .cmd, .cfg, or. key file)
  • ii) set parameter newvalue
  • set = this word begins a "set" command
  • parameter = what you want to set (a parameter of some command)
  • newvalue = the value to give to that parameter
  • Examples:
  • SET SPK.REPEAT SINGLE (causes "play" functions to play only once)
  • SET DIRECTORY C:\USERS\104 (sets directory in which files to be loaded are to be found)
  • SET LPC.ORDER 14 (sets the number of LPC coefficients to 14)
  • Commands can be executed by menu selection, or by typing on the command line, (you do not have to type space bar before typing a command, but Kay recommends doing so to avoid possible conflicts with defined key functions), or by running a command file.