Peter,

Here are the changes I made to the firmware to add MOD file sound effects.

There are three modified files in the firmware directory. Audio.c is based on the file you emailed me.

In the demo folder is a BASIC program with a test song. When you run it, the on-screen instructions will tell you what to do.

Here is the documentation for the command. You can use this in the manual if you like it. I've tried to use similar wording to what is there already:

--------------------

PLAY MODSAMPLE sampleno, channelno [,volume] [,samplerate]

This will play an audio sample at the same time as a MOD file is playing, which is useful for simultaneous sound effects.

'sampleno' is the number of the sample in the MOD file.
'channelno' is a number from 1 to 4 allowing for four simultaneous samples. These channels are separate from the usual 32 channels used by the MOD player for playing music.
'volume' is optional and must be between 1 and 64. It defaults to 64.
'samplerate' is optional and must be between 150 and 500000. The default is 16000. Higher sample rates result in higher-pitched playback, while lower sample rates produce lower-frequency sounds. Setting the sample rate to the same rate at which a sample was recorded plays it back at a normal pitch and speed.

Note: You will need to use a MOD tracker or similar utility to add the sound effects to your MOD file. This may not be possible if all the sample slots are already used by instruments.

--------------------

Hope you like it!

-Andy