King's Quest IV Finale MIDI

Chat about anything related to the QuestStudios Archive, Classic PC Games, MIDI, Etc.

Moderator: Quest Studios Archive moderators

Ari
Quest Studios Veteran
Quest Studios Veteran
Posts: 44
Joined: Wed Nov 11, 2015 10:47 am

King's Quest IV Finale MIDI

Post by Ari » Thu Mar 11, 2021 5:16 am

Hi all,
One of the known issues with the MT-32 is its' clipping problem with some MIDI files. Notably, the KQ4 Finale, in which the last 30 seconds or so feature massive usage of horn instruments which clip horribly.
While Tom's digital recording of the original MT-32 version of the theme managed to bypass said clipping, the original MIDI file is quite problematic in that respect.
I've been tinkering a bit with the MIDI file using Anvil Studio, and managed to solve the problem by inserting a channel volume event change to ever so slightly decrease the volume of that part. The effect on the actual sound levels is pretty negligible IMHO, but the clipping is gone.
Also, something I noticed quite a while ago, is that there was supposed to be Timpani track on channel 3, but for some reason, just before the track begins, there's a volume event which decreases the value to 1, and thus, we never actually hear it. I increased the volume to a higher value (83), and I think it now complements the rest of the theme quite nicely. We'll never know how high it was supposed to be originally, unless someone contacts William Goldstein to ask (Here's looking at you, Spikey ;) )

Anyway, without further ado, here's the fixed MIDI file (ZIP) + a digital recording (FLAC and MP3).

https://drive.google.com/drive/folders/ ... sp=sharing

Enjoy!

jaffa225man
Quest Studios Veteran
Quest Studios Veteran
Posts: 138
Joined: Mon Jul 13, 2015 6:26 pm
Location: Chippewa Falls, Wisconsin

Re: King's Quest IV Finale MIDI

Post by jaffa225man » Fri Mar 12, 2021 4:51 pm

That's great, thanks for providing it! It sounds great with the timpani!

I don't listen to the non-soundtracks as much, so you've inadvertently provided me with another test case for my qmidiroute patches. This SysEx seemingly affecting this overflow is the "output level" in the "patch temporary area" for each part (*5-2 in the MT-32 manual). Sadly, I need to add the ability to edit single messages multiple times (due to multiple offset addresses) and that will require adding another special character to the SysEx Edit text box format. I'm thinking I'll encapsulate them in parentheses to denote this special grouping behavior, but my ideas are still in early development. On the bright side, it already made me notice and fix a bug in SysEx Edit.

On an unrelated note, I have been toying with another new feature idea to allow my qmidiroute patch's "Program Forwarding" to have a modified output velocity. This would greatly benefit some Integra-7 SuperNATURAL sounds which are, by default, quieter than the GM/GS equivalents. This would require me extending/breaking qmidiroute save format again, though.

It'll probably take me a while to get these new features released, but these are planned changes now. :)

Ari
Quest Studios Veteran
Quest Studios Veteran
Posts: 44
Joined: Wed Nov 11, 2015 10:47 am

Re: King's Quest IV Finale MIDI

Post by Ari » Sat Mar 13, 2021 7:53 am

Thanks, Jaffaman,
Honestly, I know next to nothing about Sysex messages (other than sending or deleting it).
I was under the impression that all the kq4.syx file did was mute channels 1 and 11-16 on the file, since early versions of Sierra soundtracks included other versions (Casio maybe?) of the music on the same midi file as the MT-32.
I simply erased those tracks altogether and left only the relevant parts.
I guess there's more to it than I thought.
Anyway, it sounds like you're doing something pretty awesome with your Qmidiroute program, but it sounds like Klingon to me. 😏

jaffa225man
Quest Studios Veteran
Quest Studios Veteran
Posts: 138
Joined: Mon Jul 13, 2015 6:26 pm
Location: Chippewa Falls, Wisconsin

Re: King's Quest IV Finale MIDI

Post by jaffa225man » Sat Mar 13, 2021 7:29 pm

Ari wrote:
Sat Mar 13, 2021 7:53 am
Thanks, Jaffaman,
Honestly, I know next to nothing about Sysex messages (other than sending or deleting it).
I was under the impression that all the kq4.syx file did was mute channels 1 and 11-16 on the file, since early versions of Sierra soundtracks included other versions (Casio maybe?) of the music on the same midi file as the MT-32.
The higher tracks, I think I heard were for Adlib. Spikey would know. But actually, they aren't muted with this SysEx because I heard them on my CM-64 before using the separate channel 11-16 mute file. I haven't deciphered all that this SysEx does, but realized it's setting all the MT-32 part output levels in a single SysEx message (the third message, if memory serves). That is how it mutes the timpani's channel and raises the volume to the point of digitally overflowing the trumpet and/or french horn.
I simply erased those tracks altogether and left only the relevant parts.
I guess there's more to it than I thought.
Anyway, it sounds like you're doing something pretty awesome with your Qmidiroute program, but it sounds like Klingon to me. 😏
It's not all that complicated, really, but yeah I get too technical when describing it. And it's probably something only a few of us will appreciate when it's completed. I don't know Klingon, but I do enjoy Star Trek (and Doctor Who). :)

jaffa225man
Quest Studios Veteran
Quest Studios Veteran
Posts: 138
Joined: Mon Jul 13, 2015 6:26 pm
Location: Chippewa Falls, Wisconsin

Re: King's Quest IV Finale MIDI

Post by jaffa225man » Sun Mar 14, 2021 7:46 pm

Well, after getting multiple SysEx edits to a single message working, I still saw the volume increase (and decrease on the timpani), so I looked for other reasons. It turns out, that when outputting only SysEx (including those with the edits), the volumes were correct, but as soon as the notes began, the volume changed. The culprit was ultimately MIDI controller 7 (cc#7) messages superseding the volume crafted with SysEx. How redundant! Because I think the multi-edit feature will be useful in games that set volume purely by SysEx, I still plan to finish and release this modification, although it wasn't what KQ4 needed.

What you did, editing the file, probably was exactly what was necessary for fixing the KQ4 finale! Depending on the sequencer you used to edit it, those very controller 7 messages, were likely modified.

Thanks for everything! :)

Ari
Quest Studios Veteran
Quest Studios Veteran
Posts: 44
Joined: Wed Nov 11, 2015 10:47 am

Re: King's Quest IV Finale MIDI

Post by Ari » Mon Mar 15, 2021 4:45 am

Yep, that's what I encountered in the midi file and subsequently fixed (though I'm not sure the values I gave those controllers were exactly as were intended).
I used Anvil Studio, btw. It's not as easy for me to use as old CakeWalk3, but it get's the job done quite nicely.

You're quite welcome! :)

jaffa225man
Quest Studios Veteran
Quest Studios Veteran
Posts: 138
Joined: Mon Jul 13, 2015 6:26 pm
Location: Chippewa Falls, Wisconsin

Re: King's Quest IV Finale MIDI

Post by jaffa225man » Tue Mar 16, 2021 4:17 am

Ari wrote:
Mon Mar 15, 2021 4:45 am
Yep, that's what I encountered in the midi file and subsequently fixed (though I'm not sure the values I gave those controllers were exactly as were intended).
I used Anvil Studio, btw. It's not as easy for me to use as old CakeWalk3, but it get's the job done quite nicely.

You're quite welcome! :)
I've heard of Anvil Studio, but not tried it as I'm a GNU/Linux person and only dabble in windows when I have to (most of my work).

Because I recently bought a MIDI-through device, I hooked up through it, rather than my custom "transmidifier" device, to test my latest changes to qmidiroute. I noticed that Anvil Studio must be converting Note On with velocities of 0 to Note Off with a seemingly random velocity. It's not a big deal, especially since I had just added another new feature to qmidiroute: it is a simple check box to force Note Off messages to always have 0 velocity. That does seem interesting, though. Are you aware of any reason software or hardware would want a non-zero Note Off velocity? Are they encoding funny messages for those who notice them? I may just try an ASCII conversion tomorrow. :) - Edit: Nope, it's either more cleverly concealed than I've been able to decode, or it is truly meaningless/random garbage.

Here's the file I recorded through qmidiroute to remove Note Off Velocity (and I also included a .mid (SMF) version of the .SYX file, since it's what the audacious (3.4.3) player I use supports:
KQ4_5_Fix.zip
(19.02 KiB) Downloaded 190 times
I can remove it after you get it, if you want.

Ari
Quest Studios Veteran
Quest Studios Veteran
Posts: 44
Joined: Wed Nov 11, 2015 10:47 am

Re: King's Quest IV Finale MIDI

Post by Ari » Wed Mar 17, 2021 4:34 am

Yeah, I noticed those "Note Off" messages, but had no idea it was something Anvil Studio did and wasn't there originally, and basically disregarded those events altogether (Have I mentioned I miss using CakeWalk3? ;) ).
I have no idea what's the purpose of those events, or why anyone or anything would want them there.
Anyway, I've downloaded your version, and it seems to run just fine with my gear, so I guess that's that. It's probably a good idea to replace the KQ4 midi file on the website with the fixed one, so it isn't forgotten. :)

Spikey
Moderator
Moderator
Posts: 124
Joined: Tue Jul 07, 2015 4:11 pm

Re: King's Quest IV Finale MIDI

Post by Spikey » Wed Mar 17, 2021 10:39 am

Great job, Ari and Jaffa. Always appreciate hard work, and I was considering recording/enhancing the KQ4 Finale for a project I'm (slowly) working on.

I did become friends with William Goldstein on Facebook recently, interestingly enough. Not sure if you guys saw, but he released an "official" version of the score, although it misses a lot of tracks, I think (I don't know this score very well).

I wonder- is "Note Off" the same as "All Notes Off" in the sequencer I use? Seems to be controller #123. If so, it is used in some Sierra scores, at least in the game if not the master files.

Spikey
Moderator
Moderator
Posts: 124
Joined: Tue Jul 07, 2015 4:11 pm

Re: King's Quest IV Finale MIDI

Post by Spikey » Wed Mar 17, 2021 10:42 am

OK, with Note Off, you guys mean the velocity for "Note Off", not a controller command, right? I see that KQ4 uses nonstandard values. In every Sierra game, barring maybe an odd track here or there, the default 64 is used for "Off" velocity, and KQ4 uses sometimes 64 and sometimes varying values. I'm guessing this is what you're referring to?

Even that aside, I can't think of many games where a note would have a velocity of 127 and the instrument itself would be set to CC #7 Volume of 127. Are you saying it's not that that's the issue, Jaffa, but some SysEx volume part change, or are you saying the SysEx and the high controller values in tandem are causing the "volume overflow"?

Post Reply