MT-32 emulator development: Good news!

General chat related to ScummVM, adventure gaming, and so on.

Moderator: ScummVM Team

User avatar
noize
Posts: 126
Joined: Mon Oct 31, 2005 3:08 pm

Post by noize »

As you can see in cvs, some new features are on-the-fly sawtooth and blitsquare generation. For now this needs a lot of extra cpu power.

But as canadacow wrote himself, one of the main objectives next to better emulation of mt32 sound, is cpu optimalisation.

It will just take some time. I'll bet in a year or so these guys will have this gem running smoothly.
RvLeshrac
Posts: 6
Joined: Wed May 13, 2009 5:34 am

Post by RvLeshrac »

*edit* replaced the post here with what I had been trying to post originally (thanks fingolfin!)

-----

It ran *reasonably* well on my laptop's Turion @ 2.1ghz, after I ran it through the Intel compiler. CPU usage is at 50%, which is to say "100% of one core," when playing back some tracks. On other tracks, it barely peaks over 30%. The much-improved audio definitely comes at a price. (for comparison, DOSBox-MT32 doesn't even break 30%)

The new code isn't optimised at all, and a large amount of the audio clipping stems from the Win32 driver *and* the fact that I'm running it on Vista, which no longer has the appropriate level of support for all of the DirectMusic calls in the driver. (can you do lots of math? can you code? there might be a project for you...) I did fix this to a degree by tweaking the buffers, but that broke inline-sysex handling.

As far as multicore, that's a big "no" right now. I'd test it on a big single-core, but my single-core system is dead ATM, and it runs XP. The build I did currently only runs (at all) on Vista (Why? nfi. I don't code). My best guess is that multithreading in MUNT is spotty for several reasons, chief among them being that the waveforms have to be produced in sync and mixed together.

I'm glad people are enjoying the video. Hopefully it reaches someone with the right skillset to contribute to the project.
Last edited by RvLeshrac on Thu May 14, 2009 10:05 am, edited 1 time in total.
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

RvLeshrac wrote:running Vista.
That would explain the lag, lol;)
User avatar
md5
ScummVM Developer
Posts: 2250
Joined: Thu Nov 03, 2005 9:31 pm
Location: Athens, Greece

Post by md5 »

Jonatan wrote:
RvLeshrac wrote:running Vista.
That would explain the lag, lol;)
er... no
User avatar
Longcat
Posts: 1061
Joined: Sat Sep 23, 2006 3:15 pm

Post by Longcat »

md5 wrote:
Jonatan wrote:
RvLeshrac wrote:running Vista.
That would explain the lag, lol;)
er... no
er... joke? bad day [md5]?:P
RvLeshrac
Posts: 6
Joined: Wed May 13, 2009 5:34 am

Post by RvLeshrac »

It *does* explain the clipping, to a degree. The Win32 driver uses DirectMusic, and DirectMusic's kernel support was removed from Vista.
RvLeshrac
Posts: 6
Joined: Wed May 13, 2009 5:34 am

Post by RvLeshrac »

By request, I made an OGG of the Monkey Island (1) Introduction.

MIDI courtesy of http://s-island.mixnmojo.com

You can grab it from:

https://cid-81940f2fc1006a8a.skydrive.l ... spx/Public
User avatar
LogicDeLuxe
Posts: 437
Joined: Thu Nov 10, 2005 9:54 pm

Post by LogicDeLuxe »

RvLeshrac wrote:By request, I made an OGG of the Monkey Island (1) Introduction.
Sounds strange. Like all the volumes in the mix are wrong for some reason. Most of the flutes are barely noticeable for instance.

Another interesting thing I noticed, the engine seems to render the wave at more than 32000 Hz. With original Roland hardware (also true for Soundcanvas), you have mirror frequencies in the spectrum above 16 kHz, but in this recording, it is apparent that instruments were resampled and reach higher frequencies.
This might be a good idea from a hifi point of view, but probably not for accurately emulating the MT-32. And it causes extra CPU usage, I think.

Edit: As a reminder, here is what it sounds on a real MT-32 recorded with a M-Audio Delta 44: http://www.rapidspread.com/file.jsp?id=fy1s3ng8mu
RvLeshrac
Posts: 6
Joined: Wed May 13, 2009 5:34 am

Post by RvLeshrac »

Good catch. 44khz it is, though there's a comment in the code about that being incorrect.

*edit*

Actually, I do get output at 32k now. Though I no longer get any debug messages.
User avatar
MusicallyInspired
Posts: 1138
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Post by MusicallyInspired »

Sounds good. A lot better than it used to be, anyway. Sounds like they still don't have the reverb properly emulated, though. Still, progress is progress.
RvLeshrac
Posts: 6
Joined: Wed May 13, 2009 5:34 am

Post by RvLeshrac »

MusicallyInspired wrote:Sounds good. A lot better than it used to be, anyway. Sounds like they still don't have the reverb properly emulated, though. Still, progress is progress.
Perhaps someone can make a dump of the reverb ROM... *hint*
canadacow
Posts: 3
Joined: Thu Jul 23, 2009 9:12 am

Post by canadacow »

We have a dump of the reverb ROM. Thanks! :-)

Right now almost all the math in MUNT has become floating point which allows us to tinker more but places a heavier burden on the CPU.

We were making pretty good progress and then I had to go finish porting X11 and writing a VNC client for my iPhone app. I showed up here as Monkey Island: SE got released for the iPhone tonight and I wanted to see what ScummVM's reaction was. And then I saw this post. I'm glad to see there's still a good bit of interest in MUNT's development.
Reckless
Posts: 221
Joined: Tue Nov 01, 2005 1:12 am

Post by Reckless »

Pretty sure a lot of people would love to have an updated MT32 implementation :) Put that iPhone down and get back to it :twisted:
User avatar
MusicallyInspired
Posts: 1138
Joined: Fri Mar 02, 2007 8:03 am
Location: Manitoba, Canada
Contact:

Post by MusicallyInspired »

I'm eagerly awaiting a fully functional MT-32 emulator and I own an actual MT-32!
RvLeshrac
Posts: 6
Joined: Wed May 13, 2009 5:34 am

Post by RvLeshrac »

MusicallyInspired wrote:I'm eagerly awaiting a fully functional MT-32 emulator and I own an actual MT-32!
I think most of us who are eager to see a full MT-32 imp. are either owners or former owners. The main reason I'm interested is because it is getting harder and harder to hook up the MT on newer machines, and nigh-impossible on a laptop (which would defeat the portability aspect anyway). Also, the ability to use the MT-32 emu as a virtual instrument will, hopefully, see some action in various music communities.
Post Reply