The Vis As Piano - Commodore VIC-20 User Manual

Hide thumbs Also See for VIC-20:
Table of Contents

Advertisement

Try substituting DATA statements to play other selections. For
example, here's an old family favorite:
300 DATA 225. 360, 225, 360, 225, 240
310 DATA 228, 120, 231, 360, 231, 240
320 DATA 228. 120, 231, 240, 232, 120
330 DATA 235, 720, 240, 360, 235, 360
340 DATA 231, 360, 225, 360, 235, 240
350 DATA 232, 120, 231, 240, 228, 120
360 DATA 225, 480
370 DATA-1
Or if you prefer classics:
300 DATA 217, 400t 213, 400, 223, 400
310 DATA 227, 200, 234, 200, 230, 400
320 DATA 227, 200, 234, 200, 230, 400
330 DATA 223T 400, 227, 400, 217, 400
340 DATA 213, 600,-1
THE VIC AS PIANO
use as many
lines as you
like to play
longer selections
but for the
purpose of this
program, stick
to 3 notes
per line.
Finally, here's a program that lets you play the VJCTs keyboard
like a piano:
NEW
10 REM STORE SOUND REGISTERS
20 S2 = 36875
30 V
-36878
40 POKES2, 0
100 REM STORE B MAJOR SCALE
110 FORN = 1 TOB
120 READ A (N)
130 NEXTN
140 DATA 223, 227T 230
150 DATA 231, 234t 236
160 DATA 238, 239
200 REM PLAY KEYBOARD
210 POKE V, 3
220 GET AS: IF AS = " +1 THEN 220
230 N = VAL(A$)
240 IF N =0 OR N =9 THEN 300
Abbreviates
the voice
registers we1
need and turns
them off
Reads B major
scale from lines
140-160
Contains POKE
values for B
major scale
Turns on the volume
Finds out what key
is being pressed
Ends the program
if you've pressed
"0" or "9"
c
c
£
i
C
<
c
c
c
<

Advertisement

Table of Contents
loading

Table of Contents