Page 1 of 1
MIDI (.mid) files
Posted: September 8th, 2012, 4:11 pm
by Norbert
[Edit: Changed my post.]
I've been trying to replace the MIDI files, but most of them either don't play, are too long, or sound different outside the game.
It seems that PoP1 (v1.0) only accepts type 0 MIDI files.
This program can convert type 1 and 2 files to type 0 files:
http://www.blitter.com/~russtopia/MIDI/ ... ditype.exe
It requires:
http://www.blitter.com/~russtopia/MIDI/ ... difile.exe
Re: MIDI (.mid) files
Posted: September 9th, 2012, 2:39 pm
by Norbert
A lot of the MIDI files I'm trying out sound warped inside the game.
An octave lower or something, or with different instruments.
Not sure what exactly the problem is.
programmer, how did you get the MIDI files to work in your mods?
Did you create the MIDI files yourself, or did you edit them in some way?
Re: MIDI (.mid) files
Posted: September 16th, 2012, 3:01 pm
by Norbert
[This was a reply to a post that forum user "programmer" has since removed.]
Interesting, and you did a pretty good job.
I think that maybe PR isn't 100% properly exporting/importing MIDI files, and that that's making it so difficult to create custom tunes.
Re: MIDI (.mid) files
Posted: November 8th, 2015, 2:53 pm
by elmaton
Hey guys, hallo Norbert,
Just tried to replace the
"meet JAffar Theme, which is Midi File with a length of 5 seconds.
Like I always do, I experimented a little bit just replaced it with an other midi file which was 1minute 32 seconds long.
I entered Jaffars room and the whole song played since i killed jaffar, what was pretty cool
BUT it wouldn't be me if there wasn't a problem.
As I tried to replace the original
"meet Jaffar" Theme with a midi which is also 5 seconds long, No TUNE is played as I entered Jaffars Room.
Why is that?
Sometimes things seem to easy to be true.
Thanks
Re: MIDI (.mid) files
Posted: November 8th, 2015, 4:23 pm
by doppelganger
I think the game can only play CERTAIN types of MIDI files. Your second MIDI file, I think, does not come under the 'certain type'.
Please note this is just what I THINK is the cause. Maybe this is not the reason why your second file did not work.
Re: MIDI (.mid) files
Posted: November 8th, 2015, 5:01 pm
by Norbert
doppelganger wrote:I think the game can only play CERTAIN types of MIDI files.
Yes, I think so too.
By the way, I've merged the two MIDI related forum threads.
Re: MIDI (.mid) files
Posted: November 8th, 2015, 6:40 pm
by elmaton
Ok Guys thanks. For support, but how can I find out which type of midi file I'm working with. Tried to figure out a difference but didn't find one.

Re: MIDI (.mid) files
Posted: November 15th, 2015, 3:18 pm
by David
elmaton wrote:but how can I find out which type of midi file I'm working with
You could try the programs linked in the first post.
Re: MIDI (.mid) files
Posted: December 20th, 2015, 5:32 pm
by musa
I've discovered a funny thing in the MIDIs of PoP1 v1.0 and the other versions. The v1.0 MIDIs are in type 1 format but the others are in type 0 format. My theory as to why that is: the track 0 of v1.0 MIDIs contain sysex in track 0, presumably to specify how long the song lasts, though if you use a type 0 MIDI the game will play it the same length as the real MIDI. Probably when MT-32 support was added they made the MIDIs type 0 because they needed to use the sysex to configure the instruments.
Re: MIDI (.mid) files
Posted: January 20th, 2017, 9:33 pm
by kj-5349
Been trying out the steps in the first post by Norbert and it works!
It's unfortunate that in v1.0 the sounds are distorted and totally different from the original midi.
However if by using v1.3, the music is fairly better - in Setup you need to set Roland MT-32 for Music Synthesizer. Using SoundBlaster is still distorted unfortunately. Do take note the game would start a little slower due to some Roland loading time...
Not sure yet about v1.4 but it may just be the same.
With this, it's inspired me for a new mod like KX out of time, all of Musa's mods and Jakim's A Place of Despair

Re: MIDI (.mid) files
Posted: January 21st, 2017, 12:50 am
by Norbert
kj-5349 wrote:Been trying out the steps in the first post [...]
A good alternative nowadays is to use either
SDLPoP (OGG files in data/music/) or
MININIM (OGG files in data/audio/).
More options to mod and also easier to mod.

Re: MIDI (.mid) files
Posted: January 24th, 2017, 10:57 am
by kj-5349
Thanks Norbert.
Perhaps I would try these out in the future as for now I'm accustomed to the DOS version
Btw would the midi sounds be the same when converted to OGG form and not warped like in Dosbox soundblaster?
Re: MIDI (.mid) files
Posted: January 24th, 2017, 1:22 pm
by Norbert
kj-5349 wrote:Btw would the midi sounds be the same when converted to OGG form and not warped like in Dosbox soundblaster?
It depends on how you convert to OGG. For instance, if you record straight from (digital) audio output, then the OGG is as you hear the music. Which, in turn, means the soundfont (e.g.
Freepats) you pick influences the result. If only PoP1 1.3 set to Roland plays the MIDI files exactly as you want to hear them, then you could record and convert PoP1 output. That is:
record with DOSBox to AVI, extract audio from the AVI to WAV,(*) use
Audacity to cut the WAV to just what you need, then convert the WAV to OGG.(**)
(*)
vlc in.avi --no-video --sout '#transcode{acodec=fl32}:std{mux=wav,access=file,dst=
out.wav}' -vvv
(**)
oggenc -q 10 -o
out.ogg in.wav
Re: MIDI (.mid) files
Posted: January 28th, 2017, 4:33 pm
by David
Norbert wrote:That is:
record with DOSBox to AVI, extract audio from the AVI to WAV,(*)
DOSBox has a command to record sound only, so you don't have to make an intermediate AVI: