home *** CD-ROM | disk | FTP | other *** search
- PROGRAMMABLE SOUND GENERATOR REGISTER 6
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
- As you may already know, there are 14 different PSG registers which
- control the music or sound effects that the YM2149 chip generates. One
- use for three of these registers is for the ever-famous VU meters (8,
- 9, and 10). After a little bit of research and experimentation, I have
- come across something which may interest people who want different VU
- meters.
-
- The register that I am talking about is number 6; the noise generator.
- This is used by the musicians to produce the drum effects in their
- music.
-
- By reading PSG(6) while music is playing, you are able to determine
- what percussion instrument is playing at any given time. First of all,
- however, you need to find out which value each different drum has.
-
- This program shows what I mean:
-
- 10 dreg(0)=1 : call 3 : loke $4d2,start(3)+8
- 15 rem Assumes you have MAD MAX music in bank 3
- 20 repeat
- 30 print PSG(6)
- 40 h=hardkey
- 50 until h=57
- 60 loke $4d2,0 : silence
-
- This should produce a continuous list of numbers, mostly 0's, but some
- 12's or 7's or 14's. These other numbers are printed whenever the noise
- generator is called.
-
- So, by watching which number is produced whenever a drum sounds, you
- can note it's value, and use it later on. Unfortunately, different
- pieces of music use different values for each drum, so the values of
- PSG(6) are unique to each demo.
-
- Load up PSG6.BAS and you will see what can be done with this function.
-
- Article: BLACK EAGLE 26/6/93
-