Newer version of ZDOOM Timidity? (a.k.a. Timidity Bugs)
Moderator: GZDoom Developers
Forum rules
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Please don't bump threads here if you have a problem - it will often be forgotten about if you do. Instead, make a new thread here.
Newer version of ZDOOM Timidity? (a.k.a. Timidity Bugs)
I wasn't sure which forum to post this in (as it refers to buglets within Timidity, not ZDOOM itself).
I was just wondering who modified and compiled the modifed version of Timidity.exe (timidity4zdoom.zip). It appears that the sources used for the special version for ZDOOM were an older version of Timidity (version 2.10.4), which suffers from several bugs when using SF2 format SoundFonts (instead of Gravis format patches) for the base soundbank.
I'm not sure exactly what is the newest version of (regular standalone) Timidity and it's sources, but I have confirmed that version 2.11.3 of the regular standalone version of Timidity fixes these problems (the older regular standalone version - v2.10.4 - also had these bugs contained in it like the special modified ZDOOM version).
Anyhow, I guess what I'm asking is, whoever is/was in charge of the Timidity modificiations and special-build compiling, could Timidity.exe (in timidity4zdoom.zip) be recompiled using newer Timidity sources? Would fix the afore mentioned bugs in question -:
I was just wondering who modified and compiled the modifed version of Timidity.exe (timidity4zdoom.zip). It appears that the sources used for the special version for ZDOOM were an older version of Timidity (version 2.10.4), which suffers from several bugs when using SF2 format SoundFonts (instead of Gravis format patches) for the base soundbank.
I'm not sure exactly what is the newest version of (regular standalone) Timidity and it's sources, but I have confirmed that version 2.11.3 of the regular standalone version of Timidity fixes these problems (the older regular standalone version - v2.10.4 - also had these bugs contained in it like the special modified ZDOOM version).
Anyhow, I guess what I'm asking is, whoever is/was in charge of the Timidity modificiations and special-build compiling, could Timidity.exe (in timidity4zdoom.zip) be recompiled using newer Timidity sources? Would fix the afore mentioned bugs in question -:
That's a good question <G>. I dunno who made the special mods to the source for the special ZDOOM version, but you could probably find the source avaailable for donload for the regular version at http://timidity.sourceforge.net .
The original author's web page seems to have disappeared ( http://www.timidity.jp ), I'm pretty sure that he had the source available there (for the version that I was refering to that had the bug fixes in it). You can see a Google cache of the page here -> http://72.14.203.104/search?q=cache:z2r ... 2&ie=UTF-8 .
An Internet Archive search results is here -> http://web.archive.org/web/*/http://www.timidity.jp
P.S. To elaborate a bit on the fixes: One in particular is the way that the SF2 fromat soundfont interpreter (dunno the "real" name for it/the source routines) works. The older version(s) didn't handle LFO enevelopes properly in many multi-layered SF2 format soundfonts, whereas the bug-fixed version did. Because of the problem, many largish custom soundfonts resulted in really screwy sounding MIDI playback (instruments/presets TOTALLY out of tune, vibrato/tremelo effects that didn't play properly, etc...)
The original author's web page seems to have disappeared ( http://www.timidity.jp ), I'm pretty sure that he had the source available there (for the version that I was refering to that had the bug fixes in it). You can see a Google cache of the page here -> http://72.14.203.104/search?q=cache:z2r ... 2&ie=UTF-8 .
An Internet Archive search results is here -> http://web.archive.org/web/*/http://www.timidity.jp
P.S. To elaborate a bit on the fixes: One in particular is the way that the SF2 fromat soundfont interpreter (dunno the "real" name for it/the source routines) works. The older version(s) didn't handle LFO enevelopes properly in many multi-layered SF2 format soundfonts, whereas the bug-fixed version did. Because of the problem, many largish custom soundfonts resulted in really screwy sounding MIDI playback (instruments/presets TOTALLY out of tune, vibrato/tremelo effects that didn't play properly, etc...)
Re: Newer version of ZDOOM Timidity? (a.k.a. Timidity Bugs)
I did it, but it looks like I lost the source code, probably when I upgraded to XP and reorganized my hard drives. (Which means I should take the binary down, since I don't have any source to offer.)RFNagel wrote:I was just wondering who modified and compiled the modifed version of Timidity.exe (timidity4zdoom.zip).
From memory, all I did was:
- Disable the parts not needed for a MIDI player. FMOD already played modules, so there's no reason to have an external executable doing the same thing.
- Add checking of the "Timidity Killer" event so there would be some way for ZDoom to tell it to quit. Unlike Unix, Windows doesn't seem to have a means of sending a break signal to other processes, so I needed to use a named event instead.
- Force binary mode on stdin/stdout. They defaulted to text mode, so were unusable as a pipe.
Re: Newer version of ZDOOM Timidity? (a.k.a. Timidity Bugs)
No, *Please* don't take the binary offline, it still works with quite a few SF2 format soundfonts just *fine*, as well as with all Gravis patch sets (such as this one -> http://www.doomworld.com/idgames/?id=12527 )randy wrote:I did it, but it looks like I lost the source code, probably when I upgraded to XP and reorganized my hard drives. (Which means I should take the binary down, since I don't have any source to offer.)

From what I read in the various ZDOOM versions' changelogs/history, I think that was all of the modificationsrandy wrote:From memory, all I did was:
- Disable the parts not needed for a MIDI player. FMOD already played modules, so there's no reason to have an external executable doing the same thing.
- Add checking of the "Timidity Killer" event so there would be some way for ZDoom to tell it to quit. Unlike Unix, Windows doesn't seem to have a means of sending a break signal to other processes, so I needed to use a named event instead.
- Force binary mode on stdin/stdout. They defaulted to text mode, so were unusable as a pipe.
Here: timidity4zdoom2.zip (290k) based on the latest source code.
And here is my modified source code: timidity4zdoom2src.zip (2.38M). Configure has already been run to create Makefiles for mingw, the timidity Makefile was tweaked to omit linking with libunimod, all module-related code in the timidity directory is now conditionally compiled, and a named event can be used to quit the program. This time around, I left archive support intact, because it seemed to much trouble to remove it. (Wish I hadn't lost my old source so I could see how I got rid of it before.)
Or a patch with just my changes: timidity4zdoom2.patch (6.5k)
And here is my modified source code: timidity4zdoom2src.zip (2.38M). Configure has already been run to create Makefiles for mingw, the timidity Makefile was tweaked to omit linking with libunimod, all module-related code in the timidity directory is now conditionally compiled, and a named event can be used to quit the program. This time around, I left archive support intact, because it seemed to much trouble to remove it. (Wish I hadn't lost my old source so I could see how I got rid of it before.)
Or a patch with just my changes: timidity4zdoom2.patch (6.5k)
Last edited by randi on Tue Apr 04, 2006 10:24 pm, edited 1 time in total.
Works like a champ!randy wrote:Here: timidity4zdoom2.zip (290k) based on the latest source code.
I have one minor problem though. The music sounds choppy (breaks up) when using any keyboard controls while playing a game. Mouse input doesn't seem to be a problem, only when I press keys on my keyboard. I tried my original GUS patches as well as several soundfonts with the same results.
The older version of ZDOOM Timidity didn't exhibit this problem, but one thing that I've always noticed throughout the year(s) with ZDOOM (using ZDOOM with or without Timidity installed): When using MP3 files for music playback, I had the same problem as described above with the MIDI playback. I always attributed it to being my lowley antique of a PC <G> (as MP3 decoding would require more processor power).
Does (do you have any idea if) the newer version of the ZDOOM Timidity modification requires more CPU power than the older version? Maybe there is some buffer settting than I can adjust?
P.S. I have reverb, chorus, and stereo disabled, as well as forcing Timidity playback at 20,050 (which all of the above should allow for better overall performance)
Here's ya a good one -> timidity4zdoom2src.zip -:)Graf Zahl wrote:The source link loads the binaries, not the source.
Yes, I noticed this version seems to use more CPU time too. I'm not familiar at all with the changes made between the two versions. Try seeing if you can change the sample interpolation method it uses; I noticed there were several different varieties of that. (Sorry, not sure where you'd set that; command line or cfg, I'd assume.)
Thanks for the info -:) When I get a chance, I'll try adjusting the interpolation value and see if that helps.randy wrote:Yes, I noticed this version seems to use more CPU time too. I'm not familiar at all with the changes made between the two versions. Try seeing if you can change the sample interpolation method it uses; I noticed there were several different varieties of that. (Sorry, not sure where you'd set that; command line or cfg, I'd assume.)
FYI, any command line parameters can be set in your ZDoom{name}.ini file (mine is "ZDoom-Richard F. Nagel.ini") using the "timidity_extargs=" line under the "[GlobalSettings]" header of the INI file. For example:
[GlobalSettings]
timidity_extargs=-N 25
P.S. (You prolly already know this one) "timidity.exe -help>timidity.txt" to pipe the command line parameters to the text file "timidity.txt" -:
Update: I wasn't having much luck with the interpolation command line parameters (as far as better performance or fixing the afore mentioned problem), but one thing that I found that fixed the choppy sound was the "-e" (lower case) command line parameter... which stands for "Evil"... increases the thread priority.
While this command line parameter does indeed fix the choppy music when using the keyboard, unfortunately overall gameplay and graphics are choppy as a result (due to the incresed priority of Timidity
While this command line parameter does indeed fix the choppy music when using the keyboard, unfortunately overall gameplay and graphics are choppy as a result (due to the incresed priority of Timidity