OPL emulation?

Moderator: Raze Developers

OPL emulation?

Postby Priscilla Pickstock » Mon Oct 05, 2020 3:41 pm

Will Raze have OPL emulation at some point? That's the way I played the music when I was a kid. :)
Priscilla Pickstock
 

Re: OPL emulation?

Postby wildweasel » Mon Oct 05, 2020 3:46 pm

... Does it not already?
User avatar
wildweasel
change o' pace.
Moderator Team Lead
 
Joined: 15 Jul 2003

Re: OPL emulation?

Postby Graf Zahl » Mon Oct 05, 2020 4:00 pm

No. The current OPL code cannot be used due to licensing restrictions. It's all GPL.
The Doom-based OPL doesn't sound that great anyway because the instruments don't match, which would leave libADL. That one's not bad, actually but with the current licensing quagmire it's not usable. So the only chance would be to adjust the player in EDuke32, but that one poses problems as well, because it's licensed under the GPLv2 with no upgrade clause! :( so I cannot integrate it in ZMusic and would have to write a standalone player recreating all the funcionality of ZMusic's sequencer.

The situation here is unfortunately an utter mess so I'm a bit stuck. That's the Build license's effects and the fact that nobody working on these games seems to have the slightest interest to at least present the non-Build code under a consistent and compatible license.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: OPL emulation?

Postby Wohlstand » Fri Oct 16, 2020 4:49 pm

Graf Zahl wrote:The Doom-based OPL doesn't sound that great anyway because the instruments don't match, which would leave libADL. That one's not bad, actually but with the current licensing quagmire it's not usable. So the only chance would be to adjust the player in EDuke32

I want to tell some:
- Yeah, I took the care to make the sounding being closed to original OPL engines like DMX, Apogee, AIL, HMI, and Win9x. Together with my recent updates, the accuracy is even more.
- About licensing, I have some cases when I can get at least LGPL licensing for my libADLMIDI and libOPNMIDI libraries:
-- Original code from which I made libADLMIDI, is GPL-licensed. I asked permission for LGPL, however, the author has asked me to make him the library based on his ancient state. Here is the awaiting PR for him https://github.com/bisqwit/adlmidi/pull/7 that he should review soon. That changeset is a solution for his condition that allows me LGPL licensing.
-- To have LGPL, it needs to use the Nuked OPL3 emulator which has this license. For the DosBox emulator, I need to ask the DosBox team for LGPL permission, otherwise, this code is GPL. Alternatively, I have the Opal emulator which is in the public domain (I asked its creator for the license, and they replied to me that all source codes include this Opal emulator, are in the public domain). Its limitation is that it doesn't support rhythm-mode drums at all, and it can work in OPL3 mode only.
- libOPNMIDI's base will also get an LGPL license with libADLMIDI because I had to use some skeleton code from libADLMIDI to build an OPN2 synthesizer on it.
-- There are some emulators with non-GPL licenses: Nuked OPN2 as the most accurate and CPU hungry emulator has LGPL license. Neko Project II Kai OPNA emulator has an MIT license. PMDWin OPNA emulator has a modified BSD license (without an advertising term). Faulty but old and well known GENS has LGPL, I took it from GME project originally.

The only condition when I can get libADLMIDI and libOPNMIDI cores being MIT licensed, I need to rewrite the whole skeleton of those libs. I had to rewrite only the next part:
- MIDI sequencer, I made it support seek ability and other features like nested and count-limited loops
- Chipset overlay that I use to unify the use of emulators
- At libADLMIDI, the whole embedded banks' database, now it majorly different from the original look
- And some other small parts...
User avatar
Wohlstand
lib[ADL&OPN]MIDI Developer
 
Joined: 17 Dec 2017
Location: Moscow, Russia
Discord: Wohlstand#4881
Github ID: Wohlstand
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: nVidia with Vulkan support

Re: OPL emulation?

Postby Graf Zahl » Fri Oct 16, 2020 11:44 pm

LGPL would be fine, but there's still one gotcha. Nuke.YKT put both NBlood and PCExhumed under the GPLv2 without an upgrade clause. But the GPLv2 is not compatible with the LGPLv3, and I have no idea how applicable the license is in the combined package, which is still governed by the Build license. My guess is, not at all, because it's the GPL code which needs to have a licensing exception, but not even my employer's lawyer could give me a good answer, especiallly because so much of this "GPL"ed code is reverse engineered, meaning that the license is most likely invalid to begin with (i.e. one cannot relicense the translation of other people's code.)

The only "real" (i.e. non-reverse engineered) GPLv2 code - EDuke32 and RedNukem - is gone anyway so I guess it'd be ok - but it's still a guess. Sadly, nobody in the Build community seems to truly care about properly licensing their code so that the compiled packages are governed by clear rules - BuildGDX isn't really any better licensing-wise.

As a result I only put code that's LGPLv2 or less into the 'lite' version of ZMusic.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: OPL emulation?

Postby mjr4077au » Sat Oct 17, 2020 12:42 am

If Duke 3D originally had the "or later" clause, is it within the EDuke32's rights to have taken it out?
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: OPL emulation?

Postby Graf Zahl » Sat Oct 17, 2020 1:04 am

Unfortunately, yes. They cannot retroactively change the original code's license but they can put their own code under whatever license they want, as long as it is compatible.

Although it must be said that this license change was most likely an accident - it happened before the GPL v3 came to be - but I think it tells a lot that this was never corrected and that two derivate ports copied the license verbatim, despite not using any code from EDuke32 itself. And yes, this may become a problem later, should we ever manage to get rid of the original Build code, and the licensing status of the reverse engineered code gets cleared, as unlikely as it may be. Should the latter ever happen there may be no alternative to swapping out the NBlood/PCExhumed code for GDX, which is nominally licensed as GPLv3 (but with the same strings for reverse engineering attached to it, of course.)
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: OPL emulation?

Postby mjr4077au » Sat Oct 17, 2020 1:44 am

I've been doing some reading and it looks like a fucking mess. However, Nuked OPL3 is LGPLv2.1 according to his GitHub repo which is compatible with GPL2 and doesn't need the or later clause, only LGPLv3 needs it.
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: OPL emulation?

Postby Graf Zahl » Sat Oct 17, 2020 2:08 am

I know, but what LGPL are we actually talking about?
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: OPL emulation?

Postby mjr4077au » Sat Oct 17, 2020 2:10 am

I thought there was concern about including Nuked OPL3 because of licensing woes but from what I've read there shouldn't be an issue?
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: OPL emulation?

Postby Graf Zahl » Sat Oct 17, 2020 2:18 am

Both libADL and libOPN are GPL v3 right now, so it depends on what LGPL they can use.
User avatar
Graf Zahl
Lead GZDoom+Raze Developer
Lead GZDoom+Raze Developer
 
Joined: 19 Jul 2003
Location: Germany

Re: OPL emulation?

Postby mjr4077au » Sat Oct 17, 2020 2:20 am

But Nuked OPL3 is LGPLv2.1 and can be used without any compatibility concerns with GPLv2. It's considered a very good OPL3 emulator and of course is what's in EDuke32 at the moment (unless it has dependencies I'm am unaware of).
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: OPL emulation?

Postby mjr4077au » Sat Oct 17, 2020 2:23 am

Ah hang on, I guess there's co-existence issues? I was only thinking of the Build game code and not much else I guess.
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Re: OPL emulation?

Postby Wohlstand » Sat Oct 17, 2020 3:10 am

Graf Zahl wrote:Both libADL and libOPN are GPL v3 right now, so it depends on what LGPL they can use.

I want to get LGPL2.1+, that because this license is most.often and most compatible with things around.
User avatar
Wohlstand
lib[ADL&OPN]MIDI Developer
 
Joined: 17 Dec 2017
Location: Moscow, Russia
Discord: Wohlstand#4881
Github ID: Wohlstand
Operating System: Debian-like Linux (Debian, Ubuntu, Mint, etc) 64-bit
OS Test Version: Yes (Using Development/Testing Version)
Graphics Processor: nVidia with Vulkan support

Re: OPL emulation?

Postby mjr4077au » Sat Oct 17, 2020 3:16 am

I've been reading more on libADL believe it's using Nuked OPL3 as LGPLv3 as Nuke has the upgrade clause in the licence. However that isn't helping Raze. What I was proposing in my discussion above was just using Nuked OPL3 without libADL to escape the issue of GPLv2 and V3 compatibility since Nuked OPL3s code being LGPLv2.1 can be directly used.
User avatar
mjr4077au
 
Joined: 16 Jun 2019
Location: Gosford NSW, Australia
Discord: mjr4077au#1027
Github ID: mjr4077au
Operating System: Windows 10/8.1/8/201x 64-bit
OS Test Version: No (Using Stable Public Version)
Graphics Processor: nVidia with Vulkan support

Next

Return to Feature Suggestions

Who is online

Users browsing this forum: No registered users and 0 guests