Wohlstand / libADLMIDI

A Software MIDI Synthesizer library with OPL3 (YMF262) emulator
GNU Lesser General Public License v3.0
170 stars 17 forks source link

Crackling sound in certain MIDI file #251

Closed freq-mod closed 7 months ago

freq-mod commented 2 years ago

hoshipas.mid.zip -MIDI file, recording of a problem, and a bank file used for recording. Tried playing back this song with a few banks, results were different - some had just a very slight noise (Fat Man 2op), other crackle horribly (attached bank). Number of emulated chips dont matter. Neither does changing the emulation core. I see nothing suspicious with my bank. No idea what is wrong.

Wohlstand commented 2 years ago

Let's check on real OPL3 chip, because there is a similar crap happens with Heretic title theme when playing in OPL3 mode using libADLMIDI even on real OPL3 chip (because of SynthString1 at DMX-family banks)

freq-mod commented 2 years ago

crackling happens on MIDI ch 0, 1, 2, (contrabass, fiddle, violin instrs. made by me), but who knows, analogous situation may occur here

freq-mod commented 2 years ago

In case if it turns out to be OPL3 bug, would it possible to add OPL2 mode support?

Wohlstand commented 2 years ago

btw, I tried to play the thing at me (I used default settings), it didn't cause the same mess as you. Which program you had used to play the thing? Which settings mode you had used to play the thing?

freq-mod commented 2 years ago

SMF-DSP 2 Nuked cores, automatic arpeggio off, automatic volume model

Wohlstand commented 2 years ago

SMF-DSP

Are you sure the latest libADLMIDI is bundled? Little note that some older versions of libADLMIDI had the bug because of modulation processing at the real-time API used by SMF-DSP.

BTW, Gonna add the auto-arpeggio flag into VLC plugin...

freq-mod commented 2 years ago

Are you sure the latest libADLMIDI is bundled?

Well, now checked... it's 9 months old. So, I guess, I must ping @jpcima to update the submodules, if this is the case..

freq-mod commented 2 years ago

@Wohlstand bad news - on libADLMIDIplay command line library utility, such crap is still there. Even on .wav dump! hoshipas.zip (listen, especially towards the end

Are you sure you played the file with the attached bank file from my zip? 2op Fatman seems to behave kinda properly, for some reason. try bank 72, alternatively (DMXOPL), or 59 (Fat Man 4op).

Wohlstand commented 2 years ago

Just for an experiment, I played the same thing using DosBox command_016.avi.zip

freq-mod commented 2 years ago

and some crackling can be heard very clearly.

Wohlstand commented 2 years ago

I still need to try to play the same on a real OPL3 chip, however, the required computer is at another flat yet, probably I'll try to take it on this week.

Wohlstand commented 2 years ago

I recorded the thing using a real OPL3 chip, so, look at the result:

https://user-images.githubusercontent.com/6751442/146703089-2b0f1ace-d43f-4cee-9a4e-1a2cd3664450.mp4

I guess, for the control test I should convert the bank into multiple formats (such as DMX OPL and ASS TMB and try to play the same song via demo tools)

freq-mod commented 2 years ago

Oh, it cracks too... so it can be an OPL problem, after all

Wohlstand commented 7 months ago

Closing this because of long time no response.