Hi, Now after getting a bit familiar with the tgi and joy drivers I would like to write a small abc-driver to take care of melodies and sound effects. The abc would be an implementation of abc-music notation with some small additions. This driver requires some kind of mechanism for maintaining a sound waveform without CPU support. The Lynx has a timer, a shift register and a xor-gate that is good enough for this purpose. I hope the other targets have something similar or better. The calls I planned to use are - abc_instrument( channel, instrument ); - abc_tempo( channel, tempo ); - abc_volume( channel, volume ); - abc_play_tune( channel, tune ); - abc_update(); where channel = 0..n number of separate melodies the hardware can play simultaneously. tune = "CCCE DDDG FFEE 4D"; A melody where notes are described in ASCII letters. abc_update(void); is called frequently (perhaps once per graphics frame) to keep the music going. Every target should also create some defines that makes setting up good instruments easier like: #define ABC_FLUTE 1 #define ABC_DRUM 2 #define ABC_EXPLOSION 3 ... These could then be used by the programmer like: abc_instrument(0, ABC_FLUTE); abc_play_tune(0, "CDEFGAB5c"); abc_instrument(1, ABC_DRUM); abc_play_tune(1, "C3zC3zcccc"); while (1) { usleep(100ms); abc_update(); } I know that this is quite far from any ANSI standards etc. But I have used abc-notation in several Lynx games already and I like it. Besides, if someone wants to create another sound driver you could then just create a different set of drivers for it like mid_* for a midi driver or smp_* for digitized samples. Or whatever... Comments? Would this be a good addition to our set of drivers? Or should I keep this to myself. -- Cheers, Karri ---------------------------------------------------------------------- To unsubscribe from the list send mail to majordomo@musoftware.de with the string "unsubscribe cc65" in the body(!) of the mail.Received on Wed Oct 20 08:19:11 2004
This archive was generated by hypermail 2.1.8 : 2004-10-20 08:19:20 CEST