ADLMIDI support

Moderator: GZDoom Developers

User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: ADLMIDI support

Post by Rachael »

Unfortunately, some Heretic tracks are still a bit messed up, but on the all and whole this still sounds way better. You can hear some issues with the very title track of Heretic.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ADLMIDI support

Post by Graf Zahl »

I'm wondering a bit about the channel 16 issue? How are the software synths handling this? Or isn't it a concern there?
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: ADLMIDI support

Post by Wohlstand »

Rachael wrote:Unfortunately, some Heretic tracks are still a bit messed up, but on the all and whole this still sounds way better. You can hear some issues with the very title track of Heretic.
That explainable:
  • Synth-strings 1 are clipping when 4 concurrent chips are emulated. In some cases there are may clip even with a single chip... That resolvable by adding the low-pass filter to the output of every virtual chip. I can add that, but I will need an implementation of a low-pass filter itself to use it or some info to let me implement that easily.
  • Also, when using too few chips, exciting channels of all virtual chips will cause automatical arpeggio work. It's a feature originally made by Joel Yliluoma into original ADLMIDI implementation which is kept in the libADLMIDI.
User avatar
Rachael
Posts: 13532
Joined: Tue Jan 13, 2004 1:31 pm
Preferred Pronouns: She/Her
Contact:

Re: ADLMIDI support

Post by Rachael »

Well - the low-pass filter that first comes to mind is Audacity's. But that may need further optimization, since Audacity was never meant for live audio filtering. (I haven't looked at the code, myself, yet)
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: ADLMIDI support

Post by Wohlstand »

Graf Zahl wrote:I'm wondering a bit about the channel 16 issue? How are the software synths handling this? Or isn't it a concern there?
Okay, just now I have checked the work when I disabled my code to setup of 16'th channel and everything works fine as MUS2MID on your side sets percussion channel into 10'th. In Vanilla Doom engines used both 10'th and 16'th channels for percussions.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: ADLMIDI support

Post by Wohlstand »

Rachael wrote:Well - the low-pass filter that first comes to mind is Audacity's. But that may need further optimization since Audacity was never meant for live audio filtering. (I haven't looked at the code, myself, yet)
I'll check/benchmark that, and in any way, I'll make it be disablable as filtering may result in different sounding, therefore will appear a holy war between of filtered and pure-original sounding.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: ADLMIDI support

Post by Wohlstand »

Okay, I know why drums are was silent in that song - it's incorrect pitch!

Use next code to pass pitch change:

Code: Select all

adl_rt_pitchBendML(Renderer, chan, parm2, parm1);
because of adl_rt_pitchBend() is buggy as I incorrectly parsing the input... So, I'll fix that on my side to allow use it in regular way without of confusions.

When I changed that, drums now sounding fine!
User avatar
Csonicgo
Posts: 1193
Joined: Thu Apr 15, 2004 3:28 pm
Location: Leeds

Re: ADLMIDI support

Post by Csonicgo »

OH thank goodness! Is it possible to add the custom bank support too?

EDIT: I would use an offset filter or a high pass filter set to a low value, lowpass would be unneeded. It's the extreme low-end that's the problem, not the high end. you want everything 6Hz and up to be played. so set the high pass filter to 5 Hz and have the filter be 36-48dB or something, to Knock that whole 0-5Hz range out.
Last edited by Csonicgo on Thu Mar 22, 2018 8:33 am, edited 1 time in total.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: ADLMIDI support

Post by Wohlstand »

Csonicgo wrote:OH thank goodness! Is it possible to add the custom bank support too?
I think, by the same way as FluidSynth to allow manually specify a path to the bank, or list WOPL banks in the specific directory (pointed in config file (or in same folder as SF2 soundfonts by default))

P.S. I made another pull-request where I have applied my fixes: https://github.com/coelckers/gzdoom/pull/441
User avatar
Csonicgo
Posts: 1193
Joined: Thu Apr 15, 2004 3:28 pm
Location: Leeds

Re: ADLMIDI support

Post by Csonicgo »

I compiled this last night and tweaked the source a bit to use DMXOPL bank, and upped the chip count.... It's wonderful. It's going to work!
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ADLMIDI support

Post by Graf Zahl »

Now this actually sounds like OPL. I just merged it to master so it will be in the upcoming release.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: ADLMIDI support

Post by Wohlstand »

Nice!
The one thing is left is a binding of settings to allow changing the bank number and the ability to pass a custom bank file (must be a choice to use embedded or a custom).
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
Posts: 49056
Joined: Sat Jul 19, 2003 10:19 am
Location: Germany

Re: ADLMIDI support

Post by Graf Zahl »

The sound menu will need some minor extensions for Timidity++ as well, but adding custom banks won't make it into the upcoming release - the time is too short for that. Setting the bank number already exists as a CVAR, it only needs to be exported to the menu.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: ADLMIDI support

Post by Wohlstand »

I think, that fine, let's full support of setup will come into next release.
As option idea for future: I would allow support of default/custom OP2 files came from off WAD resources, but keep the option which bank to use: in-WAD resource (embedded bank as fallback), one of the embedded banks, or custom bank from external file (embedded bank will come as fallback here too). I'll try to provide a function that will convert OP2 into WOPN you will be able to pass into ADLMIDI as a custom bank.

P.S. I see existing OPL synth emulator has the support for full-panning, that is not implemented yet, but I have a plan for that.
User avatar
Csonicgo
Posts: 1193
Joined: Thu Apr 15, 2004 3:28 pm
Location: Leeds

Re: ADLMIDI support

Post by Csonicgo »

Thanks to everyone who made this possible! So nice to hear my patches played properly!
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”