Home Page

Functions And Keywords Page

Alphabetical Index

Next Topic

Previous Topic

Sample Programs

Updates And Corrections

Settings Menu Functions

This category of CAL functions are those that correspond to the SETTINGS menu features in versions up to 6 and the TOOLS menu in version 7. I list them here with little elaboration in that they should work exactly like the menu options they emulate. Refer any questions to the help topics for those options.

(SettingsMetronome play record accent count port chan key vel dur beep)
These arguments correspond to the check boxes and data fields in the METRONOME dialog box. The "play", "record", and "accent" all get a 0 for unchecked and a 1 for checked. The "count", "port", "chan", "key", "vel" and "dur" arguments are filled with the appropriate values and "beep" is for the "PC Speaker" check box. In Cakewalk 6, there were 3 more arguments added to the end that correspond to the "Use Midi" check box, and the "First Beat" values for key and velocity. Such a function for version 6 would look like this:
(SettingsMetronome play record accent count port chan other_key other_vel dur beep use_midi first_key first_vel)
(SettingsMidiIn chan1 chan2 chan3 chan4 chan5 chan6 chan7 chan8 chan9 chan10 chan11 chan12 chan13 chan14 chan15 chan16)
This function corresponds to the MIDI IN option on the SETTINGS menu in Cakewalk 3, the CHANNEL FILTER option from the SETTINGS menu in Cakewalk 6 and the MIDI INPUT tab in the Project Options selection off the TOOLS menu in versions 7 and 8. Each argument represents a MIDI channel from 1 to 16. A 0 for that argument means the channel is not recorded or echoed and a 1 means that it is.
(SettingsMidiThru mode port chan key vel local)
The only difference for this function between Cakewalk versions 3 and 6 is that version 3 calls the SETTINGS menu feature MIDI THRU and version 6 calls it MIDI ECHO. On the other hand, in version 7, this function is part of the MIDI INPUT tab in the Project Options selection off the TOOLS menu. Otherwise, the arguments correspond to the check boxes and data fields as one would expect.
(SettingsMidiOut txMIDIrt continue SSP delay zero chase MCC ID)
There is one more argument added for MIDI port in version 6:
(SettingdMidiOut txMIDIrt continue SSP delay zero chase MCC ID port)
These arguments correspond to "Transmit MIDI Start/Continue/Stop/Clock", "Use Start, Never Continue", "Transmit MIDI SSP", "Locate Delay For SSP", "Zero Controllers", "Searchback", "Transmit MCC", "Master Unit ID" and "MIDI Output Port" for versions 6 and above.
(SettingsRecordFilter note keyaft control patch chanaft wheel)
Cakewalk 3 has a RECORD FILTER feature in the SETTINGS menu. Cakewalk 6 calls it TYPE FILTER. The MIDI FILTER is the name version 7 gives it, and it's part of the Global Options selection off the TOOLS menu. Either way, this filter sets what Cakewalk will and will not accept as input. Each argument corresponds to a data type and checking it (a value of 1) will allow the event and un-checking it (a value of 0) will filter the event out. Cakewalk 6 adds two more arguments for system exclusive receiving and so the function looks like this:
(SettingsRecordFilter note keyaft control patch chanaft wheel sysx buffers)
The last two arguments allow system exclusive codes to be recorded in real time as the new SYSX DATA event type and set the maximum number of sysx bytes to allow per event.
(SettingsChannelTable on chan1 chan2 chan3 chan4 chan5 chan6 chan7 chan8 chan9 chan10 chan11 chan12 chan13 chan14 chan15 chan16)
As you record a source that has events on multiple MIDI channels, you can either record it all on one track or activate the table and sent events from each channel to their own track. In this function, the argument "on" being set to 1 switches on the table and each "chan" argument can be set to any track number from 0 to 255. This function is change in version 7 because any channel can be selected to any one or more tracks. The new function for version 7 is as follows:
(SettingsChannelTable70 track source chans)
The way this function works for versions 7 and 8 is a bit complicated. When recorded as a macro, once you hit the OK button in the "Track Sources" dialog, a separate function is then recorded for every active track, thus making for a potentially long line of "SettingsChannelTable70" functions in a row. When executed from CAL, each function updates the settings for its own track. The "source" argument selects between MIDI if set for -1 or an audio source if set for 0 or above. The "chans" argument is a bit squirrelly. Whereas the old version of this function used a track number for each of 16 channel arguments to route a given channel to a given track, this function uses a bit map for each track to allow any number of channels to be selected or excluded for that track by placing a 1 or 0 in each bit position. The result is a number between 0 and 65535 representing the decimal number equivalent to the various bits in the bit map being set on or off. A decimal number of 0 naturally means that no channels are selected and a number of 65535 means all of them are selected. The channel number bits correspond to decimal numbers as follows:
Channel 1 =1
Channel 2 = 2
Channel 3 = 4
Channel 4 = 8
Channel 5 = 16
Channel 6 = 32
Channel 7 = 64
Channel 8 = 128
Channel 9 = 256
Channel 10 = 512
Channel 11 = 1024
Channel 12 = 2048
Channel 13 = 4096
Channel 14 = 8192
Channel 15 = 16384
Channel 16 = 32768
The way you would set the channels by hand if entering this function from the CAL view would be to add together the numbers corresponding to the channels you wish to assign and thus come up with an aggregate number that you would enter as the value for the "chans" argument. For example, if you wish to select channels 1, 4, 5 and 16 for a track, you would add 1+8+16+32768 to arrive at the value 32793 which you would place in the "chans" argument. If you select "MIDI Omni" for any given track in the dialog box when recording a macro, the resulting number is 2147483648. WOW! Now where did this monster come from? Well, oddly enough, the argument value that corresponds to the Omni option is a 32 bit number with only the highest order bit (the 32nd bit) set to one and all of the rest set to zero. I have no idea why this was chosen as the way for marking the Omni selection, but it was and there it is. Given the complex nature of setting up this function by hand, I recommend that you use the MACRO Record method for putting this function (or actually this array of multiple copies of the same function - one for each active track) into your code. Place the cursor at the line where you want the group of "SettingsChannelTable70" functions to go, press the RECORD button and then from the TRACK menu, navagate to the "Property" sub menu, then click on the "Sources" option and from the resulting dialog box, set all of the inputs to all of your tracks. Click OK and then go back to the CAL view and click the STOP button. There is only one problem with this. The changes you have just made will have to be un-changed and put back the way they were by hand after you record your macro because this action is one that cannot be "Un-Done" using the "DO / UNDO" feature.
Selecting an AUDIO input source for a track is much simpler. Instead of a -1 in the "input" argument, place a number from 0 to the highest number for an audio source visable in the AUDIO drop-down list in the "Track Source" dialog box. If there are 6 audio sources listed there, then they are selected by entering a number from 0 to 5 with 0 being the first source in the list and each subsequent number corresponding to the next source in the list's order. The "chans" argument is unused, but cannot be left out or you will get a "wrong number of arguments" error. Just put a 0 for "chans". If you are going to be setting this function from the CAL editor, it might be wise to keep a copy of your audio sources in order as well as a copy of the above MIDI bit value chart handy. On second thought, just use the Macro RECORD method!
To set a track's source to "NONE", set "input" to -1 and "chans" to 0.
Next Topic Top Of Page