bradharding / doomretro

The classic, refined DOOM source port. For Windows PC.
https://www.doomretro.com
GNU General Public License v3.0
640 stars 78 forks source link

MIDI playback issue #566

Closed ozy24 closed 1 month ago

ozy24 commented 4 years ago

Hello,

I'm playing through Back to Saturn X and noticed some MIDI playback issues on E1M3 - The Room Taking Shape. Some of the higher notes in one part of the music track are cut off and do not play correctly. It plays as expected in GZDoom.

ozy24 commented 4 years ago

Here are two audio recordings to show the difference. I assume DR and GZDoom are using different MIDI playback engines so maybe it's just a quirk of this particular track..

midi-test.zip

P41R47 commented 4 years ago

Now this is open, i noted some little crackling sound during the reproduction of the MIDI while playing the beta, Brad. This might be what @ozy24 is issuing, too.

VGkav commented 4 years ago

Just install VirtualMIDISynth, guys. And use a nice soundfont like scc1t2.sf2 or 8mbgm_enhanced18.sf2

GZDoom has several options, I think its default is Fluidsynth with an internal soundfont that is compatible with Doom stuff.

Doom Retro just uses the native Microsoft MIDI if you haven't installed another synth.

P41R47 commented 4 years ago

Don't know if that have something to do, @AnotherLife, coz i have a few other programs that also use the microsoft native MIDI and they sound good. I reproduce the BTSX midis in that programs (Sibelius, Windows Media, Winamp, etc.) and they sound without problem there. Also, installing VirtualMIDISynth doesn't fix the issue in Doom Retro, its just a workaround.

VGkav commented 4 years ago

How does this mp3 sound to you? It is VirtualSynth + scc1t2.sf2

https://sndup.net/9bbb

This is how it sounds for me in Doom Retro, I converted it with VirtualMIDISynth

P41R47 commented 4 years ago

Yes, it sounds good. But i think thats not the matter here.

VGkav commented 4 years ago

Alright. So basically you are saying that Doom Retro using native MS MIDI has problems but other programs using native MS MIDI sound fine.

P41R47 commented 4 years ago

Thats exactly what i wrote 4 messages above. Using the Windows Media player that use the microsoft native MIDI sounds good and without problem. But while playing Doom Retro, i heard some cracklings, and i suppose that what Ozy24 might found too. Its like some notes in the high pitch end are not reproduced at its full extension, and cut off, but still sounding intermitently, thats the crackling i feel. I can't explain it because i don't know much about the internal work of the different programs. But i don't think that installing other program as a work around to fix a problem would benefit the development of Doom Retro as the problem in Doom Retro will be still there.

bradharding commented 4 years ago

Hi guys. Sorry for the late reply (real life getting in the way!). @ozy24, the difference in how MIDI sounds in DR and GZDoom is due to different methods, so @AnotherLife's suggestion of using VirtualMIDISynth will resolve that if you don't like how General MIDI sounds. As for the issue @P41R47, I suspect it's how the audio is converted before playing. There's some work I can do on that which should hopefully resolve the issue. Pablo, so you can confirm you don't get the crackling when using General MIDI with Chocolate and Crispy DOOM?

P41R47 commented 4 years ago

i will look at it in chocolate, but in windows media player it sound good

P41R47 commented 4 years ago

Yes, i confirm the crackling is also present in Chocolate with native MIDI. In crispy is there ,too but its less notorious than in choco, why? i don't know. Of the three source ports, Choco, Crispy and Retro, chocolate is where it is most notorious. But i don't think it is a problem of the engine per ce, i read in the forums that the midis in BTSX surpases the MIDI limit that the engine accept (i think it is around 99,9 kb) so Jimmy and the others had to compress it somehow. And well that might be the loose of the quality (quality in MIDI doesn't make sense) that its only appreciable under the engine limits... maybe?

I double checked the audios Ozy24 shared, and yes, the problem can be heard there pretty well. The chimes are cut off from their total duration, and the bass is a little distorted giving the crackling that sometimes i also heard on the high end of others MIDIs while playing BTSX.

I'm gonna check if this is the only case of this kind of issue. Right now i'm replaying Memento Mori with it MIDI pack and soo far, nothing is wrong.

But, Brad, take in consideration that maybe this kind of issue might be a problem to a very reduced amount of Doom Retro users. I suffer a lot from high pitch noises and have a lot of hearing range for the low end of the spectrum. So i don't think that much more people could note the difference as it is pretty insubtantial to be adressed as a real problem.

ozy24 commented 4 years ago

@P41R47 yes that's exactly it. The bell sound is the most obvious part of the recording that gets cut off. I didn't think of it as clipping at the time, rather that just not sounding "right". I'm used to hearing pops and clicks when audio files clip, but have never heard this from MIDI files. Now that I listen to it again, it sounds like there is some distortion going on.