2020: NameSpaces are going to be implemented this year to better separate content. OS-9 Al (talk) 11:18, 15 April 2020 (CDT)
2020-05-17: If a page gives you an error about some revision not being found, just EDIT the page and the old page should appear in the editor. If it does, just SAVE that and the page should be restored. OS-9 Al (talk) 12:22, 17 May 2020 (CDT)
Music made easy (Rainbow 1981-07)
|Looking for CoCo help? If you are trying to do something with your old Color Computer, read this quick reference. Want to contribute to this wiki? Be sure to read this first. This CoCo wiki project was started on October 29, 2004. --OS-9 Al|
This page was last updated on 08/30/2019. Total Pages: 688. Total Files: 961.
For those of you who like music, let us first recommend the fine article on the COLOR Computer in the latest issue of "80-Microcomputing." By far the best program there is one named "Music-Music-Music." And it is written for the COLOR Computer. But one of the things it does not do is allow you to play songs as a part of any other Programs you might wish to run. It's an entity (albeit a fine one) to itself.
What we were trying to do was put together a horse race program which we were going to call Derby (remem-ber, the RAINBOW comes from Louisville). We wanted the program to play "My Old Kentucky Home" as the horses moved to the post. But, a couple of try's in decoding notes from a music book into SOUND (and PLAY) statements left a lot to be desired.
Well, the "Music Music Music" program solved that problem for us, we used it to get a really good rendition of "My Old Kentucky Home." The problem was, how to get that code into another program.
Enter "Music Made Easy" We just wrote the following few lines, added them to their own little space on the "Music Music Music" program, loaded a data tape for the song we wanted and then "broke" the original program. That left all the notes in their array, each with the proper code for SOUND's syntax. We then instructed the COLOR Computer to GOTO6000 (the line where the Codebreaker started). The result was a Printout of the proper codes for SOUND. The codebreaker is listed below:
6000 FOR X=0 TO 750 6010 PRINT#-2,X,P(X)" "D(X) 6020 NEXT X
Here's the routine to Play the music for which you have obtained the codes. As to explanation Lines 1-5 READ in the conversion of the code obtained in the previous program and the numbers necessary to make SOUND work right. Line 10 is set to the number of notes -- which you will get from your codebreaker. Line 30 is a very important line, which converts musical "rests" into a FOR-NEXT loop. Line 40 actually plays the note. And Line 60 onward is the code from the codebreaker, all in DATA statements.
Here's the Program:
1 DIM N(48) 2 FOR N=1 TO 48 3 READ N(N):NEXT 4 DATA 5,19,32,43,58,69,78,89,99,108,117,125,133,140,147,153,159,165,170,176,180,185,189,193 5 DATA 197,200,204,207,210,213,216,218,221,223,225,227,229,231,232,234,236,237,238,239,241,242,243,244 10 FOR X=1 TO 250:'SET TO # NOTES 20 READ P,D 30 IF P=0 THEN FOR T=1 TO (D*5):NEXT: GOTO50 40 SOUND N(P),D 50 NEXT X 60 DATA 17,8,10,8,12,8,17,8
Transcriber's notes: For this example: on line 10, instead of 250 you should write 4 notes