[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: apple II 8bit sound programmers
aiiadict@gmail.com wrote:
hi,
the level sequencer of my game allows you to specify:
0)time enemy appears
1)type of enemy
2)speed of enemy
3)location of enemy
the code would work perfect for adding a sound routine
(1bit speaker sound)...
I would need 1) a song ---in a format similar to this:
time=0 note = 4
time=1 note = 3
time=2 note = 2
time=3 note = 3
time=4 note = 4
time=5 note = 4
time=6 note = 4
can anyone name that tune? :-)
Mer-ri-ly we roll a-long... ;-)
and a small routine to play the note
ldy duration ;duration is fixed in this example
loop0
lda speaker
ldx note,time ; note = frequency of sound to play
loop
dex ;
bne loop ;
dey
bne loop0
anyone interested in writing a simple tune for an
arcade game?
would be neat to have "I shot the sherrif" playing through
the speaker as you shoot enemies :-)
In order to fit within your graphics time constraints, you'll
need to limit the durations of the notes--that may make them
pretty short. In theory, the graphical manipulations could
be timed and fit into the delay loop, for simultaneous sound
and graphics updates--but that's quite a job!
RT.SYNTH saves music in a format <note #> <dur lo> <dur hi>
where:
note # is 0-127 (same note codes as MIDI)
>127 = command (e.g. 128 = end, 129 = rest)
dur lo,dur hi = duration of note in 92 cycle units
It is easy to pick out tunes, record them, and save them.
An Applesoft program can then easily transform the music
file into any form you need, including assembler source. ;-)
-michael
Music synthesis for 8-bit Apple II's!
Home page: http://members.aol.com/MJMahon/
"The wastebasket is our most important design
tool--and it is seriously underused."