MDX X68000' music files and VGM Sega Megadrive's music files

All about modules/digital tunes in a variety of tracker & sampled formats

Moderators: Mug UK, lotek_style, Moderator Team

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

MDX X68000' music files and VGM Sega Megadrive's music files

Postby qq1975b » Fri Oct 03, 2014 6:42 pm

Hi,

I would like to know if someone has developed a routine to decode MDX (X68000) files and VGM (Megadrive) files for the Atari Falcon. If not...I suppose it would be difficult... :(

There are many good music files from X68000 and Sega Megadrive games that it would be nice if the Falcon can play them. The routine could be used for a chip music player, or for porting games from those platforms to the Falcon, or adapting some Atari ST games with new music...
Last edited by qq1975b on Fri Oct 03, 2014 7:04 pm, edited 1 time in total.
Trying to learn...

EvilFranky
Atari Super Hero
Atari Super Hero
Posts: 852
Joined: Thu Sep 11, 2003 10:49 pm
Location: UK
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby EvilFranky » Fri Oct 03, 2014 6:46 pm

I guess the DSP would have to emulate a Yamaha YM2151. Not entirely sure that is possible, and would likely be a lot of work?

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Fri Oct 03, 2014 6:50 pm

Yes...DSP needed to have the maximum CPU time free.

The X68000 contains two sound chips:

A Yamaha YM2151 (OPM) (8 channel FM synthesis chip)
A single OKI MSM6258 ADPCM chip (1 channel/4-bit/3.9/5.2/7.8/10.4/15.6 kHz).

MDX files are from the YM2151
Trying to learn...

User avatar
Stefan jL
Atari God
Atari God
Posts: 1240
Joined: Thu May 09, 2002 3:21 pm
Location: Sweden
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby Stefan jL » Fri Oct 03, 2014 8:20 pm

There was also an upgrade for the X68k that gave 8 PCM channels, i dont know wich samplerate it used. But together with the YM2151 (also 8-channels and samplerate at 62.5 khz) so is it way too much for a Falcon to handle.
Image

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Fri Oct 03, 2014 9:54 pm

That was the .PDX files. But I would like to know if the .MDX, that are the most common music files on X68000 can be managed by a DSP routine on Falcon... :coffe: .........easily :lol:
Trying to learn...

User avatar
Stefan jL
Atari God
Atari God
Posts: 1240
Joined: Thu May 09, 2002 3:21 pm
Location: Sweden
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby Stefan jL » Sat Oct 04, 2014 7:06 am

MDX music uses both soundchips in the X68k (and the 8 channel upgrade)... the PDX is the instrument file wich contains the samples for the MDX file if the music actually use the PCM that is, some music is YM2151 only but not many.

The closest think on Falcon right now for synthesis sounds like YM2151 would be Ace Tracker.
Image

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Sat Oct 04, 2014 12:03 pm

I'll try to focus the question about MDX (http://en.m.wikipedia.org/wiki/X68000's_MDX):

First an example of .MDX music: https://www.dropbox.com/s/kaq1u5euyxyh3 ... c.rar?dl=0 (Pacmania's X68000 music...sounds great! :lol: )

There are some players for windows that can decode the MDX files: kbmed250, AudioOverload and Chiptunes plugin for Winamp for example. Also some of them can convert it to wav.
There are also some experiments in converting MDX files to other formats: VGM and MIDI. I haven't checked the VGM (Megadrive's sound) conversion but the MIDI can only translate one of the 8 channels...so not useful if it can't select which one to decode and be able to merge them all at the end. The conversion tools are these: https://github.com/vampirefrog/mdxtools

There are too some windows drivers and libraries: http://gorry.haun.org/mx/index_e.html

The question is the decoder libraries/drivers/decoding routine can be ported from Windows/C++ to Falcon so it can be used in a player or in porting games to Falcon platform? It should use the DSP to decode it to free the maximum of CPU time.

I don't know if this translation of coding from windows to TOS is possible, or very difficult to achieve.

thank you!
Trying to learn...


User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Sat Oct 04, 2014 1:04 pm

Hi Sascha,

The idea is to make Falcon able to decode them using DSP :)

Did you thought of porting X68000 music too when working on your X68000 games porting experiment for Falcon?
Trying to learn...

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 664
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby Anima » Sat Oct 04, 2014 1:22 pm

qq1975b wrote:Did you thought of porting X68000 music too when working on your X68000 games porting experiment for Falcon?

Yes, definitely. However, sound emulation has had always the least priority on the conversion list. Except for a routine based on the PCM decoder from MAME for Pac-Mania nothing else has been done on the audio part.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby dml » Sat Oct 04, 2014 1:30 pm

If there is a convertor to MIDI single track already then it should be possible to build on that, as an intermediate format at least.

DSP is probably best for it although it could be done without DSP at greater mixing expense, or if DSP is needed for something else. I've been doing something similar for MIDI tracks (some constraints permitting).

My player does pretty much everything in realtime, but an additional flattening pass could be done to remove the MIDI event processing overhead from it, and leave just the mixing cost. I suppose the same applies if DSP was to be used.

[EDIT]

I should add that it is generally going to be more successful (if a bit more work) to aim for decent results on specific tunes, rather than general purpose emulation of all and any possible tunes. The latter always requires more 'reserve power', and support for special case features.

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Sat Oct 04, 2014 2:52 pm

Anima wrote:
qq1975b wrote:Did you thought of porting X68000 music too when working on your X68000 games porting experiment for Falcon?

Yes, definitely. However, sound emulation has had always the least priority on the conversion list. Except for a routine based on the PCM decoder from MAME for Pac-Mania nothing else has been done on the audio part.



Which PCM decoder routine from MAME? I haven't mentioned MAME because I thought it would be more difficult. I don't know how you can extract the music from roms if it is not in wav format (and that is too big in MB compared to few KB in MDX or VGM).
Trying to learn...

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Sat Oct 04, 2014 3:02 pm

dml wrote:If there is a convertor to MIDI single track already then it should be possible to build on that, as an intermediate format at least.

DSP is probably best for it although it could be done without DSP at greater mixing expense, or if DSP is needed for something else. I've been doing something similar for MIDI tracks (some constraints permitting).

My player does pretty much everything in realtime, but an additional flattening pass could be done to remove the MIDI event processing overhead from it, and leave just the mixing cost. I suppose the same applies if DSP was to be used.

[EDIT]

I should add that it is generally going to be more successful (if a bit more work) to aim for decent results on specific tunes, rather than general purpose emulation of all and any possible tunes. The latter always requires more 'reserve power', and support for special case features.


The MIDI single track decoder is in the link I writen down on the first post (mdx-tools). There are the sources in C++ so a music programmer can take a look if he is interested. I do not know if that converter can be set up to decode other channels so at the end all can be mixed again.

So, you think is better to make a decoder with general purpose but that it has to be adapted to each mdx you want to decode? So, an specific version to decode Pacmania's X68000 version would be lot easier than one decoder able to decode and play all mdx files...that is a good idea. Main basic code and focus on the tunes to convert in each game, for example.
Trying to learn...

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby dml » Sat Oct 04, 2014 3:11 pm

qq1975b wrote:The MIDI single track decoder is in the link I writen down on the first post (mdx-tools). There are the sources in C++ so a music programmer can take a look if he is interested. I do not know if that converter can be set up to decode other channels so at the end all can be mixed again.


I might take a look at that if nobody else does. Bit busy just now but later will look through the code.

qq1975b wrote:So, you think is better to make a decoder with general purpose but that it has to be adapted to each mdx you want to decode? So, an specific version to decode Pacmania's X68000 version would be lot easier than one decoder able to decode and play all mdx files...that is a good idea. Main basic code and focus on the tunes to convert in each game, for example.


I think this is probably the way to go - better chance of getting decent results for exactly what you want. General enough to parse the music, but where instruments/sounds may need work and attention for each game.

Alternatively, for truly general purpose emulation you'd probably need something as sophisticated as ACE synth on DSP - or some simplified version aimed at known waveforms produced by that soundchip. ACE might be a good idea for this BTW - but otherwise it would be a great deal of effort to implement from scratch.

User avatar
Anima
Atari Super Hero
Atari Super Hero
Posts: 664
Joined: Fri Mar 06, 2009 9:43 am
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby Anima » Sat Oct 04, 2014 5:16 pm

qq1975b wrote:Which PCM decoder routine from MAME? I haven't mentioned MAME because I thought it would be more difficult.

Sorry, I was wrong. It's an 4 bit ADPCM to 8 bit PCM converter related to the OKI sound chip. Pac-Mania uses it for the (sampled) sound effects.

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby dml » Sat Oct 04, 2014 5:26 pm

dml wrote:
qq1975b wrote:The MIDI single track decoder is in the link I writen down on the first post (mdx-tools). There are the sources in C++ so a music programmer can take a look if he is interested. I do not know if that converter can be set up to decode other channels so at the end all can be mixed again.


I might take a look at that if nobody else does. Bit busy just now but later will look through the code.


I had a quick scan through the mdxtools code. There is a simple 'mdxdump' parser for dumping out the raw command stream, and the midi version looks quite simple to follow.

I think the difficult part will be dealing with the actual commands and what they mean / what they do to the sound. Familiarity with the sound hardware etc. The actual parsing/conversion looks quite easy.

Some of the commands look quite specific to HW capabilities - LFO controls etc. This suggests a sample bank approach isn't enough - at the very least it would need mixed with some synthesis component. ACE might be the best option here especially if external control over instrument parameters can be obtained during replay.

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Sat Oct 04, 2014 7:11 pm

The Falcon can play MOD as the STE does too. Could be easier to replace poor mod samples with mdx samples? I mean, as example, get Pacmania's music from Amiga version and replace mod samples with mdx samples to have good quality mod music?
Trying to learn...

Zamuel_a
Atari God
Atari God
Posts: 1223
Joined: Wed Dec 19, 2007 8:36 pm
Location: Sweden

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby Zamuel_a » Sat Oct 04, 2014 9:35 pm

From what I understand. MDX isn't using samples, but using the FM chip for the music so there is no samples to get. Better then to try find some "real" samples to use since the X68000 isn't correct either. Atleast not if real instruments are wanted.
ST / STFM / STE / Mega STE / Falcon / TT030 / Portfolio / 2600 / 7800 / Jaguar / 600xl / 130xe

FedePede04
Atari God
Atari God
Posts: 1016
Joined: Fri Feb 04, 2011 12:14 am
Location: Denmark
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby FedePede04 » Sat Oct 04, 2014 10:02 pm

from what i could find out Zamuel_a is right, it is an Fm synth chip, so no samples.

http://en.wikipedia.org/wiki/Yamaha_YM2151

http://map.grauw.nl/resources/sound/yam ... asheet.pdf
Atari will rule the world, long after man has disappeared

sometime my English is a little weird, Google translate is my best friend :)

User avatar
Stefan jL
Atari God
Atari God
Posts: 1240
Joined: Thu May 09, 2002 3:21 pm
Location: Sweden
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby Stefan jL » Sun Oct 05, 2014 7:37 am

Zamuel_a wrote:From what I understand. MDX isn't using samples, but using the FM chip for the music so there is no samples to get...


MDX is a music format that use both soundchips in the X68k... both the FM and the PCM soundchip it all depends on the music artist if he used both, and if if the music uses the PCM soundchip (usually for drums) so are the PCM samples stored in another file.. a "*.PDX" file.
Image

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Sun Oct 05, 2014 10:27 am

In Pacmania there is only MDX files, so no PCM sound there (I think it is used for fx sounds).

I think it is a very good FM music: https://www.dropbox.com/s/tykw6o38o3tzz ... 0.WAV?dl=0

MDX Pacmania's files are on the link on one of my previous posts and here it is a good player for MDX and other formats: https://www.dropbox.com/s/4m6hkpwylxpaa ... 2.zip?dl=0
Trying to learn...

User avatar
Stefan jL
Atari God
Atari God
Posts: 1240
Joined: Thu May 09, 2002 3:21 pm
Location: Sweden
Contact:

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby Stefan jL » Sun Oct 05, 2014 12:08 pm

qq1975b wrote:In Pacmania there is only MDX files, so no PCM sound there (I think it is used for fx sounds).


I never heard the X68000 version of Pac-mania music so i don't know if it uses the PCM for drums but i know the arcade version does not use PCM in the music at all.
You must understand the MDX are not "ripped" music from the game it is re-arranged music, i don't think any X68k game used MDX files... but i am not sure since there might be doujin games that might used it.
Your Pac-mania archive lacked the documents from the arranger i have a attached it to this post for download.

Here is a page showing some info about games music drivers:
http://vgmrips.net/wiki/Sharp_X68000
You do not have the required permissions to view the files attached to this post.
Image

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby dml » Mon Oct 06, 2014 4:15 pm

I had a quick go at the Pacmania theme, here:

https://dl.dropboxusercontent.com/u/129 ... cmania.mp3

It's different from the original for sure - mainly incorrect instruments - but it's perhaps a startingpoint.

I'm quite busy so I didn't spend a lot of time on it - just converted and mapped a couple of instruments, fired it up in Hatari, encoded to mp3 with Audacity + lame.

A few earliers samples were posted here:
viewtopic.php?f=19&t=27027

User avatar
qq1975b
Atari God
Atari God
Posts: 1072
Joined: Tue May 15, 2012 9:15 am
Location: Barcelona

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby qq1975b » Mon Oct 06, 2014 5:27 pm

for being a quick go it sounds quite good! :thumbs:
Trying to learn...

User avatar
dml
Fuji Shaped Bastard
Fuji Shaped Bastard
Posts: 3472
Joined: Sat Jun 30, 2012 9:33 am

Re: MDX X68000' music files and VGM Sega Megadrive's music f

Postby dml » Mon Oct 06, 2014 7:08 pm

qq1975b wrote:for being a quick go it sounds quite good! :thumbs:


Unfortunately there are no options that involve no work. The practical approach is 'how can I approximate that with moderate effort?' :)

Doing this right would need moderate work. The best option is probably still ACE, for the flexibility - but this alternate technique is still enough to do the job - with moderate effort.


Social Media

     

Return to “The Digital Department”

Who is online

Users browsing this forum: No registered users and 1 guest