MIDI play for Oric.

This forum is about audio tools, including samplers, sound trackers, sound chip editors, how to do sound effects, etc...
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

MIDI play for Oric.

Post by peacer »

Probably as many of you already know, we have chance to convert midi files to Oric and play with Fabrice Frances' midipsg tool

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..
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: MIDI play for Oric.

Post by ibisum »

I'd love to hear some demo's of what the Oric sounds like rendering some MIDI files ..
User avatar
barnsey123
Flight Lieutenant
Posts: 379
Joined: Fri Mar 18, 2011 10:04 am
Location: Birmingham

Re: MIDI play for Oric.

Post by barnsey123 »

ibisum wrote:I'd love to hear some demo's of what the Oric sounds like rendering some MIDI files ..
I can't get this to work....

Creating the tap file from a midi file as described in the docs works fine. As does converting the tap to dsk. So now I have two disks:

1. the midipsg disk (from oric.fr with the demo tunes on there - they all work fine using all.com)
2. The newly created disk (with one tap2dsk'ed tap file containing 1 midi file)

In oricutron I can't get the second disk to load properly ("invalid disk image"). Any thoughts?

Using "tap2dsk tapfilename.tap diskfilename.dsk"
From this:
valkyrie.tap
tap file containing midi file
(39.55 KiB) Downloaded 820 times
I get this:
valkyrie.dsk
dsk file containing converted tap file
(89.5 KiB) Downloaded 795 times
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: MIDI play for Oric.

Post by Dbug »

Shameless plug: Midi is not the only way to get music on the Oric.
You can also replay Atari/Amstrad/MSX/Spectrum musics with the mym player.
I's not particularly efficient memory wise, but it works.
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 background 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..
The author of Athanor can testify that it works, even with BASIC programs, I made him a small test program to play some of his musics in his game.

I can release something with a test music if you want.
User avatar
Chema
Game master
Posts: 3013
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: MIDI play for Oric.

Post by Chema »

Barnsey, I'm talking by memory, but didn't you need to run old2mfm with the generated dsk to get a valid image? Can check tomorrow, but maybe worth a try...

Check how it is done in the OSDK when it generates a dsk image. That should be on the bat files...
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: MIDI play for Oric.

Post by peacer »

Dbug wrote:Shameless plug: Midi is not the only way to get music on the Oric.
You can also replay Atari/Amstrad/MSX/Spectrum musics with the mym player.
I's not particularly efficient memory wise, but it works.
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 background 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..
The author of Athanor can testify that it works, even with BASIC programs, I made him a small test program to play some of his musics in his game.

I can release something with a test music if you want.
Hmm I have no idea about that. Any help would be nice. Thanks !
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Re: MIDI play for Oric.

Post by waskol »

What is interesting i that any sound (voice, sfx, etc..) can be played back on an Oric.
Have a look to the "Voice" system as described in Theoric n°6 :
http://www.defence-force.org/computing/ ... oric-6.pdf
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: MIDI play for Oric.

Post by peacer »

Why I insist on MIDI format ? Because, we have vast supply of midi archive of every kind of music. Its so easy to find and convert and edit with PC utilities.
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: MIDI play for Oric.

Post by Dbug »

peacer wrote:Why I insist on MIDI format ? Because, we have vast supply of midi archive of every kind of music. Its so easy to find and convert and edit with PC utilities.
The problem of your vast supply of midi archive is that it was made assuming a certain degree of polyphony.
When we were using MIDI for our PlayStation game back in the day we had problems having the music sound good despite us having 24 individual audio channels available.

What makes or break a MIDI player is the ability to find the correct note to stop when a new note has to be played: Will you cut the long piano note, the short drum hit, the super long bass playing in the background?

Now, if you are willing to spend th time editing and modifying musics, then yeah that's probably ok.

One thing the MIDI format will not help you with, is how it sounds. MIDI just sends information that says 'Play this note of a piano' or 'now the Sax' starts. It does not actually defines anything about what a Piano or Saxophone sounds like, so you may end up having all the instrument sound more or less the same.
User avatar
peacer
Flight Lieutenant
Posts: 451
Joined: Wed Jun 09, 2010 9:23 pm
Location: Turkey
Contact:

Re: MIDI play for Oric.

Post by peacer »

Of course, sampling and music device is something more important.

As many of us do, I have no chance and time to create and compose tunes . Instead, editing and cutting a midi tune which is already prepared before is simple.

If somebody could produce a PC utility to arrange music files suitable to run on Oric with different samples and rhythm like Twilighte's trackers, that would be nice though :)

But for this stage, I can get a midi file, remove the effects and drum channels and let only mellody channel stays. Even this is really amazing to run on Oric and what I asked was, if we can play it in the background of a game. I know we can only play one channel music notes only with this technique..

Anyone willing to write a PC based software, which can load MIDI file, and create oric music data with 3 channels selected from midi file?
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: MIDI play for Oric.

Post by Dbug »

I'm using the YM tunes for the same reasons as you wanting to use MIDI: I do not have the time or skills to compose musics.
That being said, there are active musicians on YM (Ay Riders, YM Rockers, ...) who are willing to compose music for Atari, Amstrad, MSX or Spectrum games.

My last try to convince you: Listen to that https://www.facebook.com/photo.php?v=10 ... =2&theater
It's an Atari ST tune converted directly to the Oric, without any work. 2 minutes top.

If you like it, then you can go to http://sndh.atari.org and download the SNDH sound archive and a music player (like WinJam), and then you have almost 4000 musics to listen to. Not all can be played on the Oric (some have complex sample and sid effects, or just would not fit in memory), but I'm pretty sure at least a good 1000 can be played out of the box.

If the idea is to use an existing tune made by somebody else, why choosing the format that sounds the worse?
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: MIDI play for Oric.

Post by ibisum »

One thing I'd like to say is that the reason to do standard MIDI on the Oric is that it will thus integrate into a lot of things. The MIDI port on the Telestrat may not be usable, but the Oric can have a MIDI interface .. and this is enough to do very interesting things, such as actually using it as a networking protocol (which it is). Imagine throwing MIDI In/Out/Thru on a chain of Orics; oila, suitably sufficient networking.

So if someone actually does wire up background MIDI playback in the Oric, it'd be nice to know how ..
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: MIDI play for Oric.

Post by Dbug »

ibisum wrote:One thing I'd like to say is that the reason to do standard MIDI on the Oric is that it will thus integrate into a lot of things. The MIDI port on the Telestrat may not be usable, but the Oric can have a MIDI interface .. and this is enough to do very interesting things, such as actually using it as a networking protocol (which it is). Imagine throwing MIDI In/Out/Thru on a chain of Orics; oila, suitably sufficient networking.

So if someone actually does wire up background MIDI playback in the Oric, it'd be nice to know how ..
The original request has nothing to do with MIDI interface: It's about replaying MIDI files on the Oric.

If it was about using the MIDI files to drive a MIDI interface and replay the music on an external peripheral/synthesizer/expander, sure. But here it's just about using the MIDI file format to play musics with the internal sound-chip of the Oric.

That being said, most Oric games don't have any music at all, so I guess any music is better than no music...
User avatar
ibisum
Wing Commander
Posts: 1643
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: MIDI play for Oric.

Post by ibisum »

The MIDI file format is essentially a stream of bytes that one would find on the MIDI serial network interface itself. A MIDI file is little more than a recording of that activity.

MIDI as a standard, consists of two 'realms' - indeed, the MIDI hardware interface, and the MIDI file standards. They go hand in hand, and - while MIDI hardware interfaces are still used by die-hards, the most endearing aspect of the standard is, in fact, the .MID file collections.

Rendering .MID files with the Oric is clearly easy, and fun; after all the Yamaha YM2419 is a constant in the chiptune legacy, and the reason is that its a great synthesis chip, even still today.

My interest in putting MIDI on the Oric, in the context of this thread, is that the very same problems you're solving with a background MIDI player lead to solutions in the MIDI networking department. If the Oric-1 had a MIDI interface, for example, there wouldn't be a requirement to convert the .MID files and do the .DSK dance; you could simply fire up a "MIDISYNTH.BAS", and play the file back from your PC - turning the Oric into a 'proper MIDI multi-timbral synthesizer', which it is capable of being, in spades..
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: MIDI play for Oric.

Post by Dbug »

ibisum wrote:Rendering .MID files with the Oric is clearly easy, and fun; after all the Yamaha YM2419 is a constant in the chiptune legacy, and the reason is that its a great synthesis chip, even still today.
Let's agree that we disagree.

My best example would be the games like King Quest or Space Quest on the Atari ST that have midi musics instead of real YM musics, sure they sound nice if you have a midi expander connected to the ST, but when the ST itself replays the music it's just plain bad. Feels like listening to a 8 bit computer :)

Good luck with on getting Midi sound great on the Oric, I would love that you all prove me wrong.
Post Reply