5.2. Making Music on PLAYe
Using the operator can very PLAY
easy to create good trehgolosye tunes. All its features are
described in chapter 5, so here I am limited to a few
Examples:
10 PLAY "T60W0X10000U3g4g1CCb5b3f4f1aag
5g3eag1g # f5f3feda5g "
10 PLAY "T180W0X10000U7c6e3f9 & 7c6e3f & O4
efefe5g & "," O3U3c & & & e & & f & E & F & 6G3
c & & & e & & f & O4EFEFE5G3c "
Melody can be customized with a
percussion instruments. For example, all
well-known song "The grass grasshopper sat"
punk rock:
10 PLAY "T240M35fcfcfee & ececeff & fcfcfee
& EcecefH "," V14O4 & f & c & e & c & e & c & f &
c & f & c & e & c & e & c & f "," W0X2000Uc &) "
Despite the fact that with the help of the operator PLAY you
can create good music and effects, the most beautiful versions
of the codes are obtained. Therefore, we strongly advise you to
explore the next chapter.
6. Managing music coprocessor
Music coprocessor AY-3-8910 (AY3-8912) allows us to generate
a three-channel sound with adjustable volume and sound effects.
This chip contains a sixteen registers that control
sound. Registers designated R0 ... R15.
The choice of register is done by writing its number to port
65533 (# FFFD), and then reading the contents of a selected
register from the same port, or writing the new value of the
selected register in the port 49,149 (# BFFD). Selecting the
register number of a again, you can perform any number of
read or write. And only when
require access to other registers must be
Change the contents of port 65533.
After specifying the necessary parameters
coprocessor begins to generate sound,
Z80 freeing to perform other operations.
All time slots on a chip AY
obtained by dividing the clock frequency is equal to 1.7734
MHz, at a certain number.