home *** CD-ROM | disk | FTP | other *** search
- ---------------------------------------
-
- SD
-
- SD is a pseudovariable (it cannot be assigned a value by a program) that
- returns the activity status of the three sound voices. Each active voice
- is represented in a <sum> value returned by SD. Voice 1 adds 1 to the
- <sum>, voice 2 adds 2, and voice 3 adds 4. SD ranges from 0 (no voice is
- active) to 7 (1+2+4, all three voices active).
-
- Examples:
-
- 10 PRINT SD
- 20 DO: LOOP UNTIL SD=0
-
- --------------------------------------
-
- TONE <voice# [,<sum>]>, <frequency> [,<duration>]
-
- The TONE statement sets the fundamental frequency of one or more voices,
- turns them on or off, and sets the length of time voices will be active.
-
- <Voice# [,<sum>]> has the same form and behavior as described for the
- ENVELOPE statement.
-
- <Frequency> may range from 0 to 65535 and produces an actual frequency
- according to the equation (for NTSC (North American) systems):
-
- <Actual> = <frequency> * 0.60959458 Hz
-
- If <frequency> is non-zero, the ADSR cycle of the voice specified is
- started and the pseudovariable SD will indicate the voice active. It is
- important to note that being active is not the same thing as being audible.
- For example, if a voice with a sustain value of zero is activated for an
- indefinite period of time, it will produce a tone that will die away and
- become inaudible, but SD will continue to indicate the voice active until
- it is explicitly turned off.
-
- If <frequency> is non-zero and <duration> is not present, the voice will be
- turned on and remain on indefinitely. The net effect is that the voice
- will never be released, executing only the attack, decay, and sustain
- phases of the ADSR envelope. To turn the voice off or to restart the ADSR
- cycle, another TONE statment must be executed.
-
- If <frequency> is zero the voice will be turned off and <duration> has no
- effect.
-
- <Duration> may range from 0 to 255. If <duration> is non-zero it sets the
- the number of "jiffies" the voice will be active for. A "jiffy" is one
- tick of the software jiffy clock (about 1/60th of a second, or 16
- milliseconds). The maximum <duration> therefore represents about four
- seconds. If the <duration> is for less time than the release point set by
- the ENVELOPE statement the release will not occur before the voice is
- turned off.
-
- If <duration> is zero <frequency> will be set but the voice will not be
- turned on. This can be used to set the frequency of the second voice used
- for synchronization or ring modulation.
-
- Examples:
-
-
-
-
-
-
-
- 10 TONE 1, 10000
- 20 TONE I, F(I), D(I)
- 30 IF SD<>0 THEN TONE 0, 7, 0
-
- ---------------------------------------
-
- UNTIL <exp>
-
- The optional UNTIL keyword following immediately after a DO or LOOP
- statement allows execution of a DO/LOOP to continue only so long as the
- <exp> is zero (false). If the <exp> is non-zero (true), the loop is exited
- and program execution continues with the statement following the LOOP that
- matches the DO.
-
- Examples:
-
- 10 DO UNTIL A<>0
- 20 LOOP UNTIL ST=64
- 30 DO: GET A$: LOOP UNTIL A$<>""
-
- ---------------------------------------
-
- VERIFY [<filename$>] [,<dvc#>]
-
- The V2 Basic command VERIFY has been modified to verify a file on the
- default mass-storage device if <dvc#> is not specified. There is no other
- change in its behavior.
-
- Examples:
-
- 10 VERIFY
- 20 VERIFY "MYPROGRAM"
- 30 VERIFY "THISPROGRAM",9
-
- --------------------------------------
-
- VOL <volume>
-
- VOL sets the overall volume of the SID chip. <Volume> may range from 0 to
- 15. Volume must be set to a non-zero value before any sound can be heard.
-
- Example:
-
- 10 VOL 15
- 20 VOL V(I)
-
- ---------------------------------------
-
- WAVE <voice# [,<sum>]> [,<waveform> [,<pulsewidth>]]
-
- The WAVE statement sets the fundamental waveform of a voice, which
- primarily affects timbre, or tonal quality. The <pulsewidth> parameter
- offers additional control over the timbre of the pulse waveform.
-
- <Waveform> may range from 0 to 4:
-
- # Waveform Timbre
-
- 0 triangle mellow, flute-like
-
-
-
-
-
-
- 1 sawtooth bright, brassy
- 2 pulse nasal, reedy to bright, hollow
- 3 noise rumbling to hissing
- 4 ring bell, gong
-
- The <pulsewidth> parameter affects the timbre of only the pulse waveform,
- although it may be included whatever waveform is being specified.
- <Pulsewidth> may range from 0 to 4095. Values at the extremes tend to
- produce a nasal, reedy timbre while values toward the middle of the range
- tend to produce a bright, hollow timbre.
-
- The ring waveform is really the triangular waveform of one voice "ring
- modulated" with a second voice. Varying the frequency of the first voice
- with respect to the second produces a wide range of non-harmonic overtones
- useful for bell or gong sounds. The second voice must have a non-zero
- frequency, and no other parameter of the second voice has any effect.
-
- Synchronization effects can be added to any voice by adding 8 to the
- <waveform> number. This synchronizes the fundamental frequencies of two
- voices, producing complex harmonics in the first voice at the frequency of
- the second. The second voice must have a non-zero frequency, preferably
- lower than the frequency of the first voice, and no other parameter of the
- second voice has any effect.
-
- For both ring modulation and synchronization the relationships between the
- first and second voices are fixed. Voice 3 always uses voice 2 as the
- second voice, voice 2 uses voice 1, and voice 1 uses voice 3.
-
- Examples:
-
- 10 WAVE 1, 3
- 20 WAVE 2, 2, 2048
- 30 FOR I=0 TO 4095: WAVE A, , I: NEXT
-
- ---------------------------------------
-
- WHILE <exp>
-
- The optional WHILE keyword following immediately after a DO or LOOP
- statement allows execution of a DO/LOOP to continue only so long as the
- <exp> is non-zero (true). If the <exp> is zero (false), the loop is exited
- and program execution continues with the statement following the LOOP that
- matches the DO.
-
- Examples:
-
- 10 DO WHILE A=0
- 20 LOOP WHILE ST<>64
- 30 DO: GET A$: LOOP WHILE A$=""
-
- ---------------------------------------
-
- WRITE <exp> [[;][<exp>]...]
-
- The WRITE statement puts text on the physical (not the logical) screen in
- the bitmap modes. It behaves very much like the PRINT statement does for
- the text screens. Like PRINT, WRITE will accept any expression, string or
- numeric. WRITE also responds to a number of control characters.
-
- The upper left corner of the first character of <exp> is placed at the
-
-
-
-
-
-
- current cursor position (other than this, WRITE does not pay attention to
- logical screen coordinates. Character sizes are constant no matter what
- the logical screen size). Characters must fit entirely on the screen.
- After each printable character is placed on the screen WRITE tabs the
- cursor right the current character size, so the cursor is at the upper left
- corner of the next character.
-
- The cursor will not move past the top or bottom edge of the screen, but
- will wrap at the left and right edges. Tabbing past the left and right
- edges will also move the cursor up or down the current character size,
- provided it is not also at the top or bottom edge.
-
- WRITE will accept as many expressions as will fit on a program line,
- optionally separated by semicolons. Like PRINT, WRITE performs an implied
- carriage return following the last expression, except if the last
- expression is followed by a semicolon. In this case the cursor remains at
- the last position <exp> caused it to move to.
-
- The control codes recognized by WRITE are:
-
- Action Character CHR$()
-
- Set Pen 0 CTRL-Z 26
- Set Pen 1 CTRL-X 24
- Set Pen 2 CTRL-C 3
- Set Pen 3 CTRL-V 22
- Set Pen 4 CTRL-B 2
-
- Normal X-size F1 133
- Double X-size F2 137
- Normal Y-size F3 134
- Double Y-size F4 138
-
- Set Uppercase 142
- Set Lowercase CTRL-N 14
- Disable Switching CTRL-H 8
- Enable Switching CTRL-I 9
- Reverse On CTRL-R 18
- Reverse Off 146
-
- Home CTRL-S 19
- Clear/Home 147
- Return CTRL-M 13
- Cursor Down CRSR-DN 17
- Cursor Right CRSR-RT 29
- Cursor Up CRSR-UP 145
- Cursor Left CRSR-LF 157
-
- Examples:
-
- 10 WRITE "HELLO"
- 20 WRITE "COUNT";A(I)
- 30 WRITE A$+B$;
-