Sitenotice: 11/29/2018: The wiki is back. It turns out, some anti-virus product on my web server had an issue with the latest version of PHP. My server techs have resolved this issue, and things should be working again. During the investigation, I did restore to a backup from September. There is a chance that any changes done since then were lost, but I do not recall any edits. --OS-9 Al

8/30/2016: Massive re-work is being done on the InfoBox Templates. Read that page to keep up with the plan for that, and adding better keyword tags (categories) to all the pages. --OS-9 Al (talk) 15:28, 31 August 2016 (CDT)

Music made easy (Rainbow 1981-07)

From CoCopedia - The Tandy/Radio Shack Color Computer Wiki
Jump to: navigation, search
WELCOME
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

See Recent Changes. | About this site. | Join the E-Mail List, Facebook Group or Google+ | Contact me with updates/questions.

This page was last updated on 08/29/2019. Total Pages: 650. Total Files: 937.


Home / Publications / Rainbow / Rainbow 1981 / Rainbow 1981-07 - Music made easy (Rainbow 1981-07)


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

Links

See Rainbow Magazine 1981-07 Pag 2, in Archive.org