http://oric.free.fr/DISKS/midipsg.zip
MIDI player for AY3-8912 PSG by F.Frances
-----------------------------------------
USAGE:
First load a midi file, then load the MIDIPSG program:
playback will start immediately. If the file does not have a correct format,
MIDIPSG will exit with a DATA ERROR message.
MIDI files with more than one track aren't accepted.
MIDIPSG can be called from another program: for example, you can
write your own small BASIC program to play a sequence of Midi files.
(the floppy distribution contains a "ALL.COM" program that plays the
30 MIDI files of the disk for about one hour of music).
However, be sure not to exceed 256 bytes for your BASIC program, and do a
HIMEM#600 to prevent corruption of the Midi files. Read the end of this file
to learn how to transfer Midi files to your Oric.
SPECIFICATIONS:
- supports SMF format (Standard Midi File) type 0 and 1 with one track
- notes can be played on any of the 16 MIDI channels
- monotimbral, 3 simultaneous voices
LIMITATIONS:
- a single MIDI file can not exceed 43.5 KB.
- only voice MIDI messages and two meta-events are processed, the others
are skipped: Voice On, Voice Off, Set Tempo, End Of Track.
- when 3 notes are already playing simultaneously, a new voice-on
message grab the least recently used PSG channel (i.e it stops the note
that has played for the longest time). Some classic musical pieces are
perfectly hearable with this limitation, others aren't...
- MIDIPSG only uses the tone generators of the PSG: the envelope is not used.
This is because each note can be assigned a different volume (based on
the MIDI velocity parameter); using an envelope would have given the same
volume to all notes...
HOW TO TRANSFER MIDI FILES TO THE ORIC:
Midi files have to be loaded at address $0600 (1536 decimal), and can extend
up to $B3FF, so if the file is smaller or equal to 43.5 KBytes (44544 bytes),
if fits in Oric memory.
You can use the OSDK Header program to add a tape header to that MIDI file,
like this:
osdk\bin\header -a0 MyMusic.mid MyMusic.tap $0600
Then use the tap2dsk tool to transfer this tape image to a disk image.
If you have several files you want to put on a single disk image, first
catenate all the tape images:
copy /b MyMusic.tap MySong.tap HisSong.tap HerSong.tap /b AllSongs.tap
I manage to convert many midi files for oric with this tool. Results are usually quite succesfull.
I want to use this tool for my future game projects but there's a problem. This tool plays midi tunes but during the play, oric stops responding until the end of the music.
Is it possible to create such a tool which can play midi musics in the backround while we can interact with other objects in the program? Just think about "mario bros" style game where music plays according to the level and action..