[Added] ADLMIDI support

Moderator: Developers

Re: ADLMIDI support

Postby Graf Zahl » Wed Mar 07, 2018 3:57 pm

I force pushed a correct master. The merge commit was not supposed to pushed, I have no idea why that happened without registering on my local repo.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: ADLMIDI support

Postby Rachael » Wed Mar 07, 2018 8:14 pm

So I just tried this out.

I am sorry to say this, but in my view, but the "DOSBox OPL3" sounds the most accurate at the moment - not this new OPL library. At more extreme pitches with some instruments, ADLMIDI seems to get really messed up. Even D_RUNNIN does not sound correct.

It certainly proves to be a viable option to have, but there is absolutely no justification for removing the OPL players that are there right now. It's not ready to replace them right now, in my opinion. :(
Last edited by Rachael on Wed Mar 07, 2018 11:35 pm, edited 1 time in total.
Reason: clarification
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: ADLMIDI support

Postby Csonicgo » Wed Mar 07, 2018 9:17 pm

Rachael wrote:So I just tried this out.

I am sorry to say this, but in my view, but the "DOSBox OPL3" sounds the most accurate at the moment - not this new OPL library. At more extreme pitches with some instruments, ADLMIDI seems to get really messed up. Even D_RUNNIN does not sound correct.

It certainly proves to be a viable option to have, but there is absolutely no justification for removing the OPL players that are there right now. This library just doesn't measure up, right now, in my view, sorry. :(


This library is 1000x more complicated than the "dosbox opl3" selector. it's intended to be another midi library with its own set of sound banks and other options, such as number of chips, number of 4-op channels, custom bank locations, and 73+ built-in banks. If it sounds wrong, it's likely wrong.

I can't compile it yet due to linker errors, but here's what it can actually sound like if it's getting the correct midi events and using a custom bank.

https://soundcloud.com/sdoom4/running-from-evil-dmxopl
User avatar
Csonicgo
OPL Goddess
 
Joined: 15 Apr 2004
Location: Leeds

Re: ADLMIDI support

Postby nazakomu » Wed Mar 07, 2018 11:14 pm

Csonicgo wrote:This library is 1000x more complicated than the "dosbox opl3" selector. it's intended to be another midi library with its own set of sound banks and other options, such as number of chips, number of 4-op channels, custom bank locations, and 73+ built-in banks. If it sounds wrong, it's likely wrong.

Indeed.
I have a foobar2000 component, specifically for MIDI, which includes ADLMIDI. It has a vast assortment of sound banks that can be selected for your listening preference, as well as the option to select up to 100 chips, and full panning.
ADLMIDI options at the bottom:
User avatar
nazakomu
>^..^<
 
Joined: 30 Nov 2016
Discord: Nazakomu#3025

Re: ADLMIDI support

Postby Kotti » Thu Mar 08, 2018 3:10 am

Csonicgo wrote:This library is 1000x more complicated than the "dosbox opl3" selector. it's intended to be another midi library with its own set of sound banks and other options, such as number of chips, number of 4-op channels, custom bank locations, and 73+ built-in banks. If it sounds wrong, it's likely wrong.


So correct me if I'm wrong here: This library requires careful per-song setup to sound right? It's so complicated that running it out of the box with default settings does not work across the board?
I have to concur with Rachael that it somehow doesn't sound right - and I did test several songs with a few of those 74 default sound banks, which can be set with a CVAR.

but here's what it can actually sound like if it's getting the correct midi events and using a custom bank.


Don't you have a better track? Something like D_E1M7, maybe? Or also some non-Doom tracks? This also fails to provide any info about the settings you used to play it and how much tweaking you used.
Kotti
 
Joined: 27 Dec 2016

Re: ADLMIDI support

Postby _mental_ » Thu Mar 08, 2018 3:49 am

Updated ADLMIDI branch with fixes for non-Windows platforms.
_mental_
 
 
 
Joined: 07 Aug 2011

Re: ADLMIDI support

Postby Csonicgo » Thu Mar 08, 2018 10:13 am

Kotti wrote:
Csonicgo wrote:This library is 1000x more complicated than the "dosbox opl3" selector. it's intended to be another midi library with its own set of sound banks and other options, such as number of chips, number of 4-op channels, custom bank locations, and 73+ built-in banks. If it sounds wrong, it's likely wrong.


So correct me if I'm wrong here: This library requires careful per-song setup to sound right? It's so complicated that running it out of the box with default settings does not work across the board?
I have to concur with Rachael that it somehow doesn't sound right - and I did test several songs with a few of those 74 default sound banks, which can be set with a CVAR.

but here's what it can actually sound like if it's getting the correct midi events and using a custom bank.


Don't you have a better track? Something like D_E1M7, maybe? Or also some non-Doom tracks? This also fails to provide any info about the settings you used to play it and how much tweaking you used.


Nah, it doesn't take per-song setup. You just pick a bank you want and go with it.

And yes, I have tons of tracks that are "better" I guess. here they are:
https://soundcloud.com/user-81457305/br ... ink-dmxopl

https://soundcloud.com/sdoom4/al-unser- ... ing-dmxopl

https://soundcloud.com/sdoom4/adrians-pen-dmxopl
User avatar
Csonicgo
OPL Goddess
 
Joined: 15 Apr 2004
Location: Leeds

Re: ADLMIDI support

Postby Graf Zahl » Thu Mar 08, 2018 12:06 pm

I'd really like to hear some tracks I know well enough to compare. You chose two of my least favorite ones from Doom 2 which I rarely listen to in their entirety.

Some suggestions:
D_E1M7 would be great because ADLMIDI shows the same glitch here as Timidity, but strangely enough not OPL: The lead instrument seems to be far too quiet.
alienz.mid from Duke Nukem.
Weather Warning (MAP25 from BTSX II)
MAP04 from Eternal Doom 3.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: ADLMIDI support

Postby Csonicgo » Thu Mar 08, 2018 1:56 pm

Graf Zahl wrote:I'd really like to hear some tracks I know well enough to compare. You chose two of my least favorite ones from Doom 2 which I rarely listen to in their entirety.

Some suggestions:
D_E1M7 would be great because ADLMIDI shows the same glitch here as Timidity, but strangely enough not OPL: The lead instrument seems to be far too quiet.
alienz.mid from Duke Nukem.
Weather Warning (MAP25 from BTSX II)
MAP04 from Eternal Doom 3.


About the quietness - what volume model is being used? There are several - Generic, DMX, Native, Apogee, and 9X. Given that Bobby Prince likely never checked for this stuff (and who would?), I would use Generic.

Here's Demons On The Prey (D_E1M7) with Generic volume model:

https://soundcloud.com/sdoom4/doom-demo ... rey-dmxopl

EDIT: the guitar fret being quiet is my fault. It was designed for another volume model, I'll need to increase the volume to compensate. All the other voices are fine.

https://soundcloud.com/sdoom4/duke-nuke ... ers-dmxopl And here is the Duke Nukem 3D request.
User avatar
Csonicgo
OPL Goddess
 
Joined: 15 Apr 2004
Location: Leeds

Re: ADLMIDI support

Postby Wohlstand » Thu Mar 08, 2018 9:26 pm

Graf Zahl wrote:D_E1M7 would be great because ADLMIDI shows the same glitch here as Timidity

Can you explain to me which glitch you are mean?

Gez wrote:For the drum length fixer, the AdlMIDI code is there.

As I told, the drum-length fixer is part of MIDI player and not part of Synthesizer (which accepts MIDI events to interpret them).

Inside of my MIDI Player (I completely reworked it to provide full seek ability and pre-processing), all events taken from MIDI (or MUS or XMI) file are converting into queues of structures where MIDI event data are stored. Then, there are preprocessing in some count of cycles: the first cycle does sorting of events are in the same row to prevent some issues are caused by wrong order of events inside of MIDI file and put real-time markers per each event row (which are calculated by using of tempo change events to be accurate). Inside of the same cycle, is a check for loop events (loopStart and loopEnd), and to avoid any possible issues caused by invalid placement of them, there are auto-removing when there are wrong, and a song will be played without using of loop points.
The second cycle is a drum length expanding. Here is a check for a distance between of note-on and note-off, and if it is shorter than minimal ticks distance (or real-time delay), there are will be moved forward into next event row until minimal delay will be passed, or end of a track will be reached.

P.S. I have seen you got a conflict with "nukedopl.c" between of your nukedopl.cpp. It's same Nuked OPL3, but at me is a bit newer version, and also recently some guy has tried to optimize it to let it work faster, and I took his optimization for benchmarking and testing, and seems it works almost same. Feel free to use any of NukedOPL3 you have at you or at me as it's same if not count adding of functions to mix stream rather replacing of the input buffer with a new-generated output.

P.P.S. DosBox's emulator even looks accurate and fast, it still has some few issues (with some IMF files I have). The NukedOPL3 emulator does logic of a real chip which gives the best accuracy, however, it requires much more power to work. Is not feeling desktop computers or laptops, but works very slow and choppy on mobile devices if you will don't use audio buffer right.
User avatar
Wohlstand
lib[ADL&OPN]MIDI Developer
 
Joined: 17 Dec 2017
Location: Moscow, Russia
Discord: Wohlstand#4881

Re: ADLMIDI support

Postby Wohlstand » Thu Mar 08, 2018 9:55 pm

nazakomu wrote:
Csonicgo wrote:This library is 1000x more complicated than the "dosbox opl3" selector. it's intended to be another midi library with its own set of sound banks and other options, such as number of chips, number of 4-op channels, custom bank locations, and 73+ built-in banks. If it sounds wrong, it's likely wrong.

Indeed.
I have a foobar2000 component, specifically for MIDI, which includes ADLMIDI. It has a vast assortment of sound banks that can be selected for your listening preference, as well as the option to select up to 100 chips, and full panning.
ADLMIDI options at the bottom:

Hey, can you show me it? Or did you write it yourself? Just interesting to look what it is inside of it...
EDIT: Okay, I have googled this: https://gitlab.kode54.net/kode54/foo_mi ... Player.cpp

Jammie O'Connel made full panning in his MIDI driver for real OPL3 chip (worked on Windows 3x and 9x), but with giving limit in 6 channels when full panning option is turned off while 12 channels in regular mode (that driver is nice, but I totally dislike his idea to force AdLib drums mode is very limited in polyphony).
User avatar
Wohlstand
lib[ADL&OPN]MIDI Developer
 
Joined: 17 Dec 2017
Location: Moscow, Russia
Discord: Wohlstand#4881

Re: ADLMIDI support

Postby Csonicgo » Wed Mar 21, 2018 10:16 pm

I just tested this myself and something is horribly wrong. This is not how the library sounds in anything else that I've tried.

And I can't really be much help since I can't really say "what" is wrong with it (because everything is, to be honest).

I know this is a WIP but, it's unbearable to listen to.
User avatar
Csonicgo
OPL Goddess
 
Joined: 15 Apr 2004
Location: Leeds

Re: ADLMIDI support

Postby Wohlstand » Thu Mar 22, 2018 1:24 am

I think I'll need to try to build GZDoom by myself to check the playback... I can't guess the error from too common words...

EDIT: Just now checked, YEAH, It's silly to understand! DMX library uses both 10 and 16 channels for percussions. ADLMIDI uses 10'th only and the 16'th channel is melodic! I know that very long time while I experimented with music replacement in original DOS Doom.
You must map 16'th channel into 10'th to avoid any future mistakes, OR, on a beginning of a song, set a bank of the 16'th channel to XG-Percussion to let it work as an independent percussive channel if you don't want merge 10'th and 16'th channel

Also, you did use the wrong function to change program:
adl_rt_bankChange() is needed to change GS/XG bank (use more 127 instruments in the same bank). You need to use adl_rt_patchChange() to set the Patch which is an instrument/program. Be careful, dude ;3

It's my fix I made to make ADLMIDI be playable (apply this as patch).
adlmidi-fix.txt
ADLMIDI fix
(1 KiB) Downloaded 18 times


Anyway, I have found another issue with D_DDTBLU track which results in silent percussions... I'll review that at my home, (at the moment I posted this, I was at my job and I had 10:10 UTC+3 time).
I tried to export all MUS files from DOOM2, and played that track - it worked fine...

P.S. I sent a pull-request with my quick fix: https://github.com/coelckers/gzdoom/pull/439
User avatar
Wohlstand
lib[ADL&OPN]MIDI Developer
 
Joined: 17 Dec 2017
Location: Moscow, Russia
Discord: Wohlstand#4881

Re: ADLMIDI support

Postby Rachael » Thu Mar 22, 2018 3:41 am

Merged the pull request. This sounds *MUCH* better.

This may or may not make it into the version 3.3 release, but I'm going to go ahead and merge the adlMIDI branch into QZDoom for general testing, once I fix my build environment for it and my devbuild dispatcher script.
User avatar
Rachael
QZDoom + Webmaster
 
Joined: 13 Jan 2004

Re: ADLMIDI support

Postby Graf Zahl » Thu Mar 22, 2018 3:57 am

Thanks a lot for that bit of help. After a first quick check I do not see a reason to withhold this any longer, but I'm going to test a few more songs this evening when I have more time and better listening equipment.
User avatar
Graf Zahl
Lead GZDoom Developer
 
Joined: 19 Jul 2003
Location: Germany

PreviousNext

Return to Closed Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests