Oric computers >> Announce: simple MIDI player for PSG available

by Euphoric » Sun, 19 Dec 2004 19:03:02 GMT

< XXXX@XXXXX.COM > a rit dans le message de
news: XXXX@XXXXX.COM ...
> P. S. may be it will be funny too if we have midi player for Oric that
> can play simple three track midis without correct soundings of
> instruments, all with one organ voice of oric sound chip like produced
> by MUSIC command?

Ok, I've spent a few hours on it and here it is...
A simple MIDI player that plays the music on Oric's internal PSG.
It's monotimbral only, and it can only play 3 notes simultaneously, so it's sole
interest is to be able to read single-instrument music compositions in standard
MIDI format...
However, it uses a Least Recently Used channel scheme so that some tunes that
need more than 3 voices are still hearable with it...

A distribution on a single 360KB disk, filled with near one hour of classics
music pieces is available on
http://oric.free.fr/DISKS/midipsg.zip

Best regards to all,

Fabrice



Oric computers >> Announce: simple MIDI player for PSG available

by Steve Marshall » Mon, 20 Dec 2004 09:50:20 GMT



"Euphoric" < XXXX@XXXXX.COM > wrote

it's sole
standard
that
classics

Cheers, Fabrice.

I haven't given it a trial yet. How big can the MIDI file be and how do you
convert the MIDI file to Oric disk ?

Steve M

Oric computers >> Announce: simple MIDI player for PSG available

by Steve Marshall » Mon, 20 Dec 2004 11:10:22 GMT


"Steve Marshall" < XXXX@XXXXX.COM > wrote

you

SORRY !

All answers can be found in the text file provided with the program ! 'Look
before you leap', they say !!!


Steve M

Oric computers >> Announce: simple MIDI player for PSG available

by mrrik » Mon, 20 Dec 2004 20:04:53 GMT

It is wonderful!
I am listening midis now with Oric ;)
Thank You very very very much!!!!!!

I'll try to make some one track midis specially for Oric ;)

Feature, that anyone can play midis from his program is exellent!
It is very cool have such advanced tool for Oric!
I am impressed very much, thank You again

Oric computers >> Announce: simple MIDI player for PSG available

by Euphoric » Tue, 21 Dec 2004 17:47:33 GMT

Thanks for these comments, but please remember it is very limited ...
3 simultaneous notes maximum, and an awful square-wave sound (unless you are
completely nostalgic of these simple tone generators...)
If you want to hear fully-fledged MIDI files, you still need to build an
UART/MIDI interface and use the Karaoke program...

Cheers,

Fabrice

Oric computers >> Announce: simple MIDI player for PSG available

by Mickael Pointier » Wed, 22 Dec 2004 03:13:37 GMT

> > P. S. may be it will be funny too if we have midi player for Oric that
it's sole
standard
that
classics

That's cool :)

I myself have some few things to release, but it needs some tweaking...
Just have to say that it _requires_ the hardware vsync, but I think it worth
it =)

Dbug

Oric computers >> Announce: simple MIDI player for PSG available

by Euphoric » Wed, 22 Dec 2004 17:30:15 GMT


"Mickael Pointier" < XXXX@XXXXX.COM > a rit dans le message de


Great !
Could you add support to software vsync too, for those who are always frightened
by "hardware" tricks (even if in this case it's a very simple cable connection
that doesn't need modification inside the oric) ?

Cheers,

Fabrice

Oric computers >> Announce: simple MIDI player for PSG available

by Simon » Thu, 23 Dec 2004 02:14:01 GMT


Anyone around familiard with some MIDI program?
Each time I tried to make my own MID file, it was rejected by Fabrice's
player. It seems though that my file has a single track and is in SMF 0
format, but I'm not quite sure and I have no idea if it's "monotimbral"
or not (this means only 1 instrument, right?)... Is there a free
(Windows if possible) program to clearly know / convert the format of a
midi file?

Thanks!
Simon

PS: I'm off for a few days

Oric computers >> Announce: simple MIDI player for PSG available

by Euphoric » Thu, 23 Dec 2004 03:41:46 GMT


"Simon" < XXXX@XXXXX.COM > a rit dans le message de


Hello Simon,
you shouldn't have any problem if it is Type 0 (in this case it only has a
single track)
I would rather think you don't load the MIDI file at the location MIDIPSG is
expecting ($0600, ie. 1536 decimal)...
Or maybe you are using a M$ program that encapsulate the MIDI file in a RIFF
format ?

Just in case, once you have loaded your MIDI file, please issue a
FOR I=#600 TO #611: PRINT HEX$(PEEK(I)); : NEXT
and check that
- first 4 bytes must be #4D #54 #68 #64 ("MThd")
- next 4 bytes must be 0,0,0,6 (=> size of this chunk of data)
- next 2 bytes must be 0,0 or 0,1 (SMF 0 or SMF 1)
- next 2 bytes must be 0,1 (one track only)
- the first byte of the next two bytes must less than #80 (I don't accept SMPTE
format, but I don't think this is your problem, I have never seen a MIDI file
using it yet)
- next 4 bytes must be #4D #54 #72 #6B ("MTrk")


It does not need to be monotimbral: if you have several instruments in the same
track, they will all sound the same (hardly bearable square-wave PSG sound :-)

If you still have a problem, please send me your MIDI file so that I have a look
at it...
Otherwise, please tell us what was the problem...

Cheers,

Fabrice

Oric computers >> Announce: simple MIDI player for PSG available

by Simon » Thu, 23 Dec 2004 04:14:14 GMT

Thanks for the reply Fabrice!


Hehe nope, I've used my incredible and wonderfully fantastic own tool to
create the tape header ;-) Just checked with an hex editor and it's #600
indeed.


Midi Music Maker on Atari ST ;-)
Which I'm not familiar with, I must say, that's why I'm not quite sure
about the format.


Everything's ok so far


That's whete things go wrong.
I got 00 02 00 C0
So I have 2 tracks, but Winamp tells me "1 track". You also said that
SMF 0 has only 1 track so I suspect this value was coded wrong by the
Atari program?


Yes Sir!

I've switched to "terminator mode" and forced the wrong values to 00 01
00 80.
I now can hear the file with your player, great! At about half the speed
though. So I suspect: could this be some stereo cheat, have one track
splitted in two for some stereo effect, and when I force back to 1 track
the notes are played twice, so it seems to be at half-speed?
Does this make sense?

I'll try and check again that Atari program, see if I can make files
which are really 1-track files.

Thanks again for the information Fabrice!
Simon

Oric computers >> Announce: simple MIDI player for PSG available

by Euphoric » Thu, 23 Dec 2004 19:18:13 GMT

"Simon" < XXXX@XXXXX.COM > a rit dans le message de


Ok, sorry for the insult :-)


Is the second byte 0 (SMF Type 0) or 1 (SMF Type 1) ?


2 tracks, but one of them seems to only contain information about the music
program that was used to generate the file...


80 instead of C0? why did you change the PPQN (Pulse Per Quarter Note) parameter
?
As a result, you are slowing the speed...


Don't worry, just don't modify the PPQN value and the speed will be ok...
When I was telling about the less than (strictly less than) $80 value, it was
the first byte only (ie. the most significant byte, big indian order is used
here), ie. a positive word...


Great to see someone is trying it :-)
How do you then transfer your file from the Atari to the Oric ?

Cheers,

Fabrice

Oric computers >> Announce: simple MIDI player for PSG available

by Anders Carlsson » Fri, 24 Dec 2004 19:08:26 GMT

"Euphoric" < XXXX@XXXXX.COM > writes:


Two months ago, I promised to upload a 256 byte "waveform" player
written on the VIC-20 by Adam Klotblixt in 1996. If you are interested
in how it works and if you can get some ideas or improve it for
use in a future MIDI or other player, you can get it here:

http://www.cbm.sfks.se/files/256play.lzh

Merry Christmas!

--
Anders Carlsson

Oric computers >> Announce: simple MIDI player for PSG available

by Simon » Mon, 27 Dec 2004 00:32:49 GMT


It's a 0, I've saved as a SMF0 midi file to try and avoid the
multi-tracks problem


Ooooops I misread your original post, sorry.
I've changed it again to C0 and everything works fine now :-)
So I'll just have to manually change this 2-tracks value.
Actaully, I'm converting old Atari ST Music Studio files to Midi to port
them on Oric ;-)


Right now I'm working with emulators, so I'm saving the ST files on a
"ST hard drive" (a PC folder), then add the header with THC and load
them on the Oric. If I convert lots of files, I suspect I'll have to
write a routine, unless TAP2DSK can now handle several files at time?
(just kidding ;-)

With my real ST, I have lots of possibilities to send the files to PC
(Jaz disk, simple 720Ko disk, Ghostlink which is an incredible piece of
software but sadly only using a serial link which is a little slow).

Hope I'll have time to convert several songs for the midi player, then
I'll share them with the Oric world.

Cheers!
Simon

Oric computers >> Announce: simple MIDI player for PSG available

by Euphoric » Tue, 28 Dec 2004 00:51:03 GMT


"Simon" < XXXX@XXXXX.COM > a rit dans le message de


Ah, so it really is a deviation of the SMF format, Type 0 should only have one
track...


But it can handle several files at once !
It can only transfer one tape image to a disk image, but you can have several
files in your tape image :-)


Great !

Cheers,

Fabrice