Authors
Publication
Pub Details
Date
Pages
This month I will show you how to make an echo while playing a music. I call this echo ‘THE FALSE ECHO’ because it isn’t really one, let me explain…This ‘echo’ only works well with a music that contains pauses. During these pauses what happens is that the sound isn’t completely turned off!
Let’s say we have a music, Register 8 (volume of music or noise channel A) containing the value 15, during a pause we lower that value to 10 (the sound becomes softer!) so that the sound isn’t turned off, that’s what creates the ‘echo’. Also when changing notes you may lower the volume to 13 so that it sounds smoother. Here is an example:
10 DATA 1,0,1…
20 READ A,B,C
30 IF A=255 THEN STOP
40 IF A=254 THEN SOUND 8,10: GOTO 70
50 SOUND 8,15;7,62;1,A;0,B
60 IF A<>254 THEN SOUND 8,13
70 PAUSE C10 (SPEED)
80 GOTO 20
I used 255 to tell the computer when to stop the music and 254 to indicate that this was a pause. (You may change these values for your convenience) MUSIcomp files use this method, 254 means PAUSE and 255 means END OF MUSIC. (See MUSIcomp instructions)
Let me explain each line in details…
Line 20: READ A,B,CA= Coarse tune B= Fine tune C= Duration of note Line
30: IF A=255 THEN STOP If A=255 that means that the music is over and the program stops
Line 40: IF A=254 THEN SOUND 8,10: GOTO 70 If a=254 then it’s a pause, the volume is lowered to 10 and the program goes to Line 70.
Line 50: SOUND 8,15;7,62;1,A;0,B Plays the note!
Line 60: IF A<>254 THEN SOUND 8,13 If A is not equal to 254 (PAUSE!) then lower volume just a bit, enough to see the separation between the notes.
This gives a smoother delivery than if you turned the sound off completely. (Usually when you turn off the sound completely you hear a little ‘TICK!’ between the notes)
Line 70: PAUSE C10 This is the duration of the note, the value 10 may be changed depending on the speed of the music.
Line 80: GOTO 20 Completes loop to return to Line 20
It’s pretty easy isn’t it?
By the way, you will find an example of this technique after the magazine. The LOADING NAME of this program is “FALSE ECHO”.
Well that’s it for this month, in the December issue I will talk about the ‘REAL ECHO’, that one is a biggie! So won’t you join me next month for chapter 5 of the SOUND EFFECTS!
Do you have tips you’d like to share with our subscribers? Have a question? Well, send it to:
BYTE POWER programs/reviews/articles/tips
1748 Meadowview Avenue
Pickering, Ontario, Canada L1V 3G8
Products
Downloadable Media
Image Gallery
Note: Type-in program listings on this website use ZMAKEBAS notation for graphics characters.