ADLMIDI support

Post a reply

Smilies
:D :) :( :o :shock: :? 8-) :lol: :x :P :oops: :cry: :evil: :twisted: :roll: :wink: :geek: :ugeek: :!: :?: :idea: :arrow: :| :mrgreen: :3: :wub: >:( :blergh:
View more smilies

BBCode is OFF
Smilies are ON

Topic review
   

Expand view Topic review: ADLMIDI support

Re: ADLMIDI support

by Wohlstand » Thu Apr 12, 2018 4:59 pm

Csonicgo wrote: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.
Just now I have checked out the DOOM's synth strings 4-notes chords (8 parallel channels in use) on one chip in the bank editor, and the clipping happens. It's going even before output will be written into the middle buffer, I.e. inside of emulator itself, and I bet, same will happen on the real chip which I'll test now on my Win98 computer.

EDIT: Okay, the filter will NOT help as the clip happens on ONE chip. The filter is intended to avoid future clip when multiple chips are exciting max sample value. Just now I tried my OPL3 Bank Editor to play chords with the same clip-ish SynthString1 instrument, and clipping has been reproduced, the same as in title theme of Heretic.

Re: ADLMIDI support

by Wohlstand » Wed Apr 04, 2018 5:56 pm

Speaking about of adding other emulators into libADLMIDI: for now, I experimenting with libOPNMIDI where I have added ability to switch emulators at runtime and going to make same on libADLMIDI. I have tried to take JavaOPL3 for experiments, but it looks too integrated into GZDoom's code and needs to be refactored to allow use it as a standalone and independent library. In OPL3 Bank Editor (and in OPN2 Bank Editor) I have added an emulator benchmarking to compare the performance of various emulators. So, I still want to take a full set of OPLx emulators as possible to benchmark all of them.

Re: ADLMIDI support

by Csonicgo » Mon Mar 26, 2018 8:50 am

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

Re: ADLMIDI support

by Wohlstand » Sat Mar 24, 2018 9:38 am

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.

Re: ADLMIDI support

by Graf Zahl » Sat Mar 24, 2018 9:30 am

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.

Re: ADLMIDI support

by Wohlstand » Sat Mar 24, 2018 9:21 am

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).

Re: ADLMIDI support

by Graf Zahl » Fri Mar 23, 2018 4:14 pm

Now this actually sounds like OPL. I just merged it to master so it will be in the upcoming release.

Re: ADLMIDI support

by Csonicgo » Fri Mar 23, 2018 9:46 am

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!

Re: ADLMIDI support

by Wohlstand » Thu Mar 22, 2018 8:30 am

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

Re: ADLMIDI support

by Csonicgo » Thu Mar 22, 2018 8:28 am

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.

Re: ADLMIDI support

by Wohlstand » Thu Mar 22, 2018 5:39 am

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!

Re: ADLMIDI support

by Wohlstand » Thu Mar 22, 2018 3:28 am

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.

Re: ADLMIDI support

by Wohlstand » Thu Mar 22, 2018 3:27 am

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.

Re: ADLMIDI support

by Rachael » Thu Mar 22, 2018 3:24 am

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)

Re: ADLMIDI support

by Wohlstand » Thu Mar 22, 2018 3:17 am

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.

Top