Holiday Greetings

Type
Sound
Category
Christmas card with four-part music
Author
Nina R. Franco
Published in
Antic, December 1983 (Vol. 2, No. 9)
Year
1983
Language
Atari BASIC
Requirements
Any Atari 8-bit, Atari BASIC
A Christmas tree in GRAPHICS 2 built from the words WE WISH YOU A MERRY CHRISTMAS AND A HAPPY NEW YEAR in green, red and blue letters, with inverse star characters, and the text FROM NINA AND ALBERTO, CHRISTMAS,1983 below

About the program

"At the holiday season simple things are often the best," wrote Nina Franco, introducing her video Christmas card in December 1983. Her program is short and simple on purpose, so that even a beginner can follow it and make one for a friend or relative. It shows a Christmas tree made entirely of the words of a greeting, plays a seasonal tune in four-part harmony, prints your own message in the text window and then makes the star on top flash for ever. The REMs explain every part. Its REM is dated 2/3/83, and the card is signed "from Nina and Alberto".

What you need

Any Atari with Atari BASIC.

Typing it in

The tree uses inverse characters ({inv}…{/inv}, the Atari key): an inverse * for the ornaments and the star, and an inverse CTRL-J, written {inv}{CTRL-J}{/inv}, for the little triangular "needles". As the REM in line 1000 says, press the Atari key, then hold CTRL and press J. In GRAPHICS 2, inverse and lower-case letters come out in different colours, which is what makes the tree multicoloured. Line 4010 is where you put your own message.

How to use it

RUN it. The tree appears, the carol plays (51 chords from the DATA in lines 5000–5070), your message appears, and the star blinks until you press BREAK.

How it works

  • The tree. Lines 1020–1060 POSITION each row one column further left and print a longer string, so the words form a triangle. Upper-case, lower-case and inverse characters each take a different colour register in GRAPHICS 2.
  • The music. Line 3010 READs four pitch values and plays them on all four voices at once. The melody is on voice 0 at volume 10 and the harmony on voices 1–3 at volume 5. A delay loop in line 4000 sets the tempo. The last group of DATA is 744,744,744,744, an end marker that lines 3020–3030 test before switching the voices off.
  • The star. Lines 4020–4030 print a blank and then the inverse * at the top of the tree, with short delays, for ever.

Variations to try

Change the message in line 4010. Change the colour with the SETCOLOR 0,12,6 in line 1010, or replace the DATA with another tune, keeping four values per chord and the 744 marker at the end, and changing the 51 in line 3000 to the new number of chords.

Listing

0 REM ANTIC MAGAZINE
1 REM VIDEO CHRISTMAS CARD PROGRAM BY....NINA R. FRANCO  2/3/83
1000 GRAPHICS 2:REM LINES 1000,2000 MAKE THE TREE,TO GET THIS SYMBOL"{inv}{CTRL-J}{/inv}"HIT REVERSE CTRL J
1010 COLOR 0:SETCOLOR 0,12,6
1020 POSITION 10,0:? #6;"{inv}*{/inv}":POSITION 9,1:? #6;"{inv}{CTRL-J}{/inv}WE":POSITION 8,2:? #6;"WISH{inv}*{/inv}":POSITION 7,3:? #6;"{inv}{CTRL-J}{/inv}YOU{inv}*{/inv}A{inv}{CTRL-J}{/inv}"
1030 POSITION 6,4:? #6;"MERRY{inv}{CTRL-J}{/inv}CHR":POSITION 5,5:? #6;"{inv}{CTRL-J}{/inv}ISTMAS{inv}*{/inv}WE{inv}{CTRL-J}{/inv}"
1040 POSITION 4,6:? #6;"{inv}*{/inv}WISH{inv}{CTRL-J}{/inv}YOU{inv}{CTRL-J}{/inv}A{inv}*{CTRL-J}{/inv}"
1050 POSITION 3,7:? #6;"MERRY{inv}*{/inv}CHRISTMAS":POSITION 2,8:? #6;"{inv}{CTRL-J}{/inv}AND{inv}*{/inv}A{inv}{CTRL-J}{/inv}HAPPY{inv}*{/inv}NEW{inv}{CTRL-J}{/inv}"
1060 POSITION 8,9:? #6;"YEAR"
2000 POKE 752,1:REM THIS TURNS OFF CURSOR
3000 FOR CYCLE=1 TO 51:REM 3000,4000 SETS UP SOUND
3010 READ J:READ K:READ L:READ M:SOUND 0,J,10,10:SOUND 1,K,10,5:SOUND 2,L,10,5:SOUND 3,M,10,5
3020 IF J=744 THEN SOUND 0,J,0,0:IF K=744 THEN SOUND 1,K,0,0:IF L=744 THEN SOUND 2,L,0,0
3030 IF M=744 THEN SOUND 3,M,0,0
4000 FOR Q=1 TO 91:NEXT Q:NEXT CYCLE
4010 ? "FROM NINA AND ALBERTO, CHRISTMAS,1983":REM PRINT YOUR PERSONAL MESSAGE HERE
4020 POSITION 10,0:? #6;" ":FOR B=1 TO 70:NEXT B:POSITION 10,0:? #6;"{inv}*{/inv}":FOR C=1 TO 70:NEXT C
4030 GOTO 4020:REM 4020,4030 MAKES STAR FLASH
4099 REM LINES 5000,5070 ARE YOUR NOTE VALUES
5000 DATA 91,136,108,91,91,136,108,91,68,136,108,91,68,136,108,91,68,136,108,91,60,136,108,91,68,136,108,91
5010 DATA 72,136,108,91,81,204,162,136,81,204,162,136,81,204,162,136,81,204,162,136,81,204,162,136
5020 DATA 81,204,162,136,60,121,96,81,60,121,96,81,60,121,96,81,53,121,96,81,60,121,96,81
5030 DATA 68,121,96,81,72,182,144,121,72,182,144,121,91,182,144,121,91,182,144,121,91,182,144,121,91,182,144,121
5040 DATA 53,108,85,72,53,108,85,72,53,108,85,72,50,108,85,72,53,108,85,72,60,108,85,72,68,162,136,108
5050 DATA 68,162,136,108,81,162,136,108,81,162,136,108,91,136,108,91,91,136,108,91,81,204,162,136,81,204,162,136
5060 DATA 60,121,102,81,60,121,102,81,72,182,144,121,72,182,144,121,68,136,108,91,68,136,108,91,68,136,108,91
5070 DATA 68,136,108,91,68,136,108,91,68,136,108,91,744,744,744,744

Download

The original program from the Antic disk, to LOAD or ENTER instead of typing it: XMASTREE.BAS.

Credits