Glitched midi playback since timidity++ branch merge

Bugs that have been investigated and resolved somehow.

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.
Post Reply
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Glitched midi playback since timidity++ branch merge

Post by Marisa the Magician »

Well, now that I got MIDI to work without crashing after disabling reverb, I noticed that there's something horribly wrong with how Timidity is playing back music.

This is what "The Demon's Dead" sounds like at the moment.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Glitched midi playback since timidity++ branch merge

Post by Graf Zahl »

I have listened to hundreds of songs on the new device trying to find some problems. So far I only found two tracks which sound a bit different, but in both cases I could confirm that it was caused by some 'auto correction' stuff the Timidity loader appears to apply.

You also failed to provide any useful info to check this out. What sound font did you use and what settings?
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Glitched midi playback since timidity++ branch merge

Post by Marisa the Magician »

Ah, this might be user error. I had "timidity_channel_pressure" set to true for some reason, and this was causing the glitchiness. Other than that, all settings were default and I was using the sc-55 soundfont.

Edit: oops wait, actually, that's not the option that caused the glitchiness, it's me setting timidity_frequency to 48000 instead of 44100.
Last edited by Marisa the Magician on Mon Mar 05, 2018 1:20 pm, edited 1 time in total.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Glitched midi playback since timidity++ branch merge

Post by Graf Zahl »

Interesting. I haven't tested all those options yet but this one sounds like a good candidate for removal then.
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Glitched midi playback since timidity++ branch merge

Post by Marisa the Magician »

It does seem that any value to that cvar that isn't 44100 will just inevitably cause some notes to play incorrectly.
User avatar
Chris
Posts: 2979
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Glitched midi playback since timidity++ branch merge

Post by Chris »

I can confirm this happens with The Demon's Dead, both with the SC-55 soundfont and SGM. Oddly it's not something I've noticed in other songs before now (I've always had timidity_frequency set to 48000 to avoid extra resampling, since that's my device's output rate). I wonder if it may be due to the aforementioned 'auto correction' fixing up the pitch bend or pitch wheel for different sample rates, which is now missing?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Glitched midi playback since timidity++ branch merge

Post by Graf Zahl »

It's not just that one song but everything as long as the frequency is something other than 44100. Something must still be missing in there. The timing of the music seems to be ok but the pitch of the instruments is completely whacked.
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Glitched midi playback since timidity++ branch merge

Post by Marisa the Magician »

Even with it at 44100 I've still noticed some inconsistencies. Back to Saturn X's intermission music is one example.
User avatar
Chris
Posts: 2979
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Glitched midi playback since timidity++ branch merge

Post by Chris »

I was about to mention that too. Even at 44100, the pitch seems off. With Momento Mori, for instance, map01's song seems a bit higher pitched compared to FluidSynth and WildMIDI.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Glitched midi playback since timidity++ branch merge

Post by Graf Zahl »

That doesn't tell me much. Is it different than the external Timidity as well?
User avatar
Chris
Posts: 2979
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Glitched midi playback since timidity++ branch merge

Post by Chris »

From what I remember, it was fine with external Timidity++. Setting timidity_frequency back to 48000 seems to fix the pitch here, but reintroduces the pitch bend issue or whatever in The Demon's Dead.
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Glitched midi playback since timidity++ branch merge

Post by Marisa the Magician »

Yes, compared to external timidity++ (2.14.0 here) it's different. External timidity is closer to fluidsynth in how it plays back.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49252
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: Glitched midi playback since timidity++ branch merge

Post by Graf Zahl »

It should be ok now. There were two bugs here. One caused the streaming buffer to be created with the wrong frequency and the other made the values vanish in the nirvana when trying to initialize the player.

You'll have to recheck the wrong pitch of that Memento Mori song. That's something my ears aren't good enough for.
User avatar
Chris
Posts: 2979
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: Glitched midi playback since timidity++ branch merge

Post by Chris »

It does seem to be fixed. Both the pitch of the MM song at 44100hz, and the pitch bend of The Demon's Dead at 48000hz.
User avatar
Marisa the Magician
Banned User
Posts: 3886
Joined: Fri Feb 08, 2008 9:15 am
Preferred Pronouns: She/Her
Operating System Version (Optional): (btw I use) Arch
Graphics Processor: nVidia with Vulkan support
Location: Vigo, Galicia
Contact:

Re: Glitched midi playback since timidity++ branch merge

Post by Marisa the Magician »

Yup, playback is fine here too.
Post Reply

Return to “Closed Bugs [GZDoom]”