CODING - fade out the music at any time.

Deja Vu #04
SoundTrack: "CRAZY MAN" BY SEC70R ?!...
__________________________________________


Author: Cardinal / PGC / BD
__________________________________________



   This article focuses on various
players AY-shnoy music. I'll tell you about a rather important 
effect (especially in demomeykerstve) of the fade out music at 
any time. Go tell that none of the existing PLAYER'ov

compiled Mouzon (whether Pro Tracker; Sound Tracker Pro by KSA, 
etc) no such a function that would allow the smooth

reduce the volume of the music. And therefore let us go in 
order ... 

   To make this effect, we must understand
how the processor communicates with AY and a little digging 
around in PLAYERe. In the co-processor is AY 16 registers, 
which are generated by different sounds. Each of these 
registers, performs its function. All I I will not speak, and 
focus only on three. It registers, R8, R9, R10, under 5

bits which control the loudness (amplitude) of channels A, B 
and C. Generally, to gain access to any register AY, to its 
number (0 to 15) recorded in the Port # FFFD, and the value - 
the port # BFFD. 

   I deliberately did not mention this detail because it was 
described in the book of Larcheko and Rodionova "ZX-Spectrum 
'TR-DOS for users and programmers. "


   The whole conversation, I started to the fact that
need to PLAYER'e find a place where recorded
some values ​​in registers R8, R9 and R10.
So, before you need a place to put
trap, (CALL address, where address - your
protsedurka) will change (decrease in
certain value) bytes of those same
values ​​before PLAYER will give them
Registers R8, R9 and R10 musical coprocessor. In the Appendix 
you will find five sources in a format ALASM v3.8c. Each source 
is only good for Mouzon compiled in the following editors and 
compilers: Sound Tracker Pro by KSA Software; Pro Tracker v2.4; 
Sound Tracker Song Compiler v1.2; Sound Tracker Music's 
Recompiler v2.1 by KSA; Pro Tracker v 2.1 by Golden Disk. 

   Sources pretty raw, but well-demonstrated effect. How do I 
use them? Download the source code in assembler, you leave

in the STS, with loads compiled Mouzon
PLAYER'om, return to the editor, corrects value of the label 
MUZAK (it indicates the address of a loaded Mouzon) 
assembliruete and running. If you hear music, so hearing you 
all right :-)... Then try to click button "L" - music should 
fall The smoothly. Click on "K" - the music will play at normal 
volume. SPACE - out. Once again I repeat that the sources 
demonstration, and if you use them in their programs - remove 
the excess and try to optimize their length, especially the 
routine starts with tags GLUSH to end, if you, of course,

succeed :-).

   Finally I want to say that PLAYGEAR
COMPANY blinded part of PROGRESS MEGADEMO,
so wait for a demo of SERIOUS SPECCY GROUP! I also want to 
congratulate SPECCY with pyatnadtsitiletiem and wish him to 
live another same ..!