Author Topic: MID2SND  (Read 4409 times)

0 Members and 1 Guest are viewing this topic.

Offline gumby

MID2SND
« on: July 04, 2012, 11:08:52 AM »
I've been using this application, along with testing a port of it to C# which I think is very close to being ready for release.  This is what I used to create the midi sound pack.

While I was performing the conversions & playing them through a test game, I noticed that some midis will play for a while, then crap out and go silent.  This seems to be the case at least with the SNDBLAST & MTBLAST drivers when utilizing them for playback.  When I play the sound in Soundbox, I have no issues.

It doesn't seem to be an issue with my C# application, as the original MID2SND generates the same results - the music just goes silent, consistently in the same place for a converted midi regardless of the playback driver.  I know there is a limitation of how many channels can be playing at once for the AdLib, but I didn't think there was the same limit for MT32.

It seems like it might be related to how many instruments or sounds are being played at once, I've noticed that 'simpler' sounding midis seem to work fine, but when I get a more 'complex' sounding midi it has a better chance of just not being able to play all the way through.

Anyone seen this behavior before?

EDIT:  I've got a test file and in Soundbox is looks like only one channel (0) is playing, no other channels have any notes playing on them yet.  So it doesn't appear to be the number of channels.  Maybe an invalid instrument # is being referenced?
« Last Edit: July 04, 2012, 12:06:43 PM by gumby »


In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: MID2SND
« Reply #1 on: July 04, 2012, 06:25:43 PM »
The MT-32 does have a polyphony limit. Also, only channels 2-10 playback on the MT-32. Channels 11-16 don't exist on the MT-32. Is this maybe what's happening?
Brass Lantern Prop Competition

Offline gumby

Re: MID2SND
« Reply #2 on: July 04, 2012, 08:35:08 PM »
Could be - but both Adlib and MT32 are affected.  Do these devices have limitations in common?

I'm going to shorten the midi up to the first 10 seconds, including the portion that causes the drivers to go silent.  Then I'll put some debugging statements into my Mid2Snd port and see if I can spot something that is being set out-of-range.

When you say polyphony limit, could this happen on a single channel?  Maybe notes are playing over each other or there are notes too close together?

EDIT:  Arrrgggh.  Shortening the midi 'fixes' the file.
« Last Edit: July 04, 2012, 09:51:54 PM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline MusicallyInspired

Re: MID2SND
« Reply #3 on: July 05, 2012, 01:56:48 AM »
Yes, if too many voices are playing on a single channel it will break the polyphony limit and not allow other instruments to sound, depending on how the MT-32 PATCH's instruments are set up. Some partials have priority over others and it's different with every SYX/PATCH.

Adlib's limitations are even more restrictive than the MT-32's.
Brass Lantern Prop Competition

Offline Collector

Re: MID2SND
« Reply #4 on: July 05, 2012, 02:07:29 AM »
Could this just be a limitation with SCI0? How many differences are there between SCI0 and SCI1 sound resources? Does the MIDI play through with SCI1? If the MIDI could be converted to a SCI1 *.SND resource, you could just drop it in an existing game to override the identically named *.SND resource in the game.

But then, adapting your Mid2Snd port to output SCI1 would probably involve more work and research than would be the worth of the information gained. Just thinking out loud.
KQII Remake Pic

Offline gumby

Re: MID2SND
« Reply #5 on: July 06, 2012, 08:58:25 PM »
Yeah, I'm thinking that would turn into a dead end.  Which is pretty much where I am anyway.  I just not knowledgeable about MIDI.  I tried to put together some logging, but going through the log I have no way to relate file position to playback times.  I'm not even sure if a single track (is track right?) midi file can be read 'chronologically', from start to end.
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition

Offline gumby

Re: MID2SND
« Reply #6 on: July 07, 2012, 12:50:08 PM »
I figured it out.  Turns out that I was dealing with 'broken' MIDI files, which are easily fixed with Anvil.  Here are the steps that worked for me when converting midis to sound resources:

1)  Open MIDI in Anvil
2)  Choose File->Repair Song (Answer no to: 'Do you want to delete all notes with a duration longer than 1 measure?').
3)  Choose File->Export Midi-Format 0 file
5)  Run MID2SND to convert to SOUND resource

Now the sound resources that were 'going silent' work just fine.
« Last Edit: July 07, 2012, 01:32:21 PM by gumby »
In the Great Underground Empire (Zork port in development)
Winter Break 2012 Rope Prop Competition


SMF 2.0.19 | SMF © 2021, Simple Machines
Simple Audio Video Embedder

Page created in 0.075 seconds with 23 queries.