Wohlstand / libADLMIDI

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

Nuked OPL3 Source code? #219

Closed no-more-secrets closed 5 years ago

no-more-secrets commented 5 years ago

Hello, Where does the Nuked OPL3 source code come from? Does the author have his/her own repository or website where I can get it? Where did this libADLMIDI project get it from?

Also, the Nuked OPL3 source code in this repo states that it is released under the LGPL, but I have seen other instances of it online that say GPL. Where is the source of truth for the license and source code itself? Thanks

jpcima commented 5 years ago

Hi @dpacbach. There is not a dedicated repository for Nuked OPL. I believe GZdoom is the home of the sofware source code. The author Nuke.YKT has accepted to provide the software as LGPL. See discussion https://github.com/adplug/adplug/pull/35

Wohlstand commented 5 years ago

My copy of Nuked OPL3 I have got from the Chocolate Doom's source code. Yeah, I also have asked @nukeykt for LGPL permission via PM and he has granted that.

The code of Nuked is here: https://github.com/Wohlstand/libADLMIDI/tree/master/src/chips/nuked There are two of its versions: 1.8 which is latest, and older 1.7 which was patched by @troosh to increase the performance. My copy is also a bit modded without of sounding change: added some extra functions, added support for a full-panning stereo (controlled separately), added various ways to generate the PCM output, ported some optimizations from 1.7, etc.

It's now a part of OPL chipset sub-library (it's also used in OPL3-BE as replica): https://github.com/Wohlstand/libADLMIDI/tree/master/src/chips All non-emulator files here are MIT-licensed.

Anyway, why libADLMIDI itself is GPL, here is a related discussion: https://github.com/bisqwit/adlmidi/issues/3

Because the original code was a console tool that was licensed under GPL, I made a library which inherits that license. The condition that was given by a creator of original ADLMIDI to license libADLMIDI as LGPL is re-making the work I have done in a 2014'th year to split the old adlmidi code into library+tool and send as a patch to the original repo. I didn't work on this as I was busy on another thing.

no-more-secrets commented 5 years ago

Ok thanks a lot!

no-more-secrets commented 5 years ago

The condition that was given by a creator of original ADLMIDI to license libADLMIDI as LGPL is re-making the work I have done in a 2014'th year to split the old adlmidi code into library+tool and send as a patch to the original repo

@Wohlstand Can you describe in more detail what is required for this? If it is not overly complicated then I could potentially contribute and take that project on myself, since I would like to be able to use libADLMIDI as LGPL ideally.

Wohlstand commented 5 years ago

@Wohlstand Can you describe in more detail what is required for this? If it is not overly complicated then I could potentially contribute and take that project on myself, since I would like to be able to use libADLMIDI as LGPL ideally.

Yeah, look: you have original ADLMIDI which is a monolithic console tool which is not a library. In the 2015'th year, I began the work to make this tool to be a library. I.e. I made the basic C API that allows to use ADLMIDI as library: initialize it, load music file, proceed playing and pull the generated PCM output from that.

So, the goal is making the gradual patch to original ADLMIDI that will split console tool into two parts: library, and utility that uses it.

Note: the new API must NOT be equal to libADLMIDI to avoid conflicts in future, and let new library will be called as libadl or different, to also, avoid conflict with libADLMIDI which is now different and has over 4 years of work, refactorings, improvements, etc.

The working branch where I have tried to re-librarize it again: https://github.com/Wohlstand/ADLMIDI/tree/library-2

Addional discussion: https://github.com/bisqwit/adlmidi/issues/4

no-more-secrets commented 5 years ago

I see, thanks... after reading that thread, it looks like a big job, maybe best for an expert to work on. I hope that it can get prioritized though because, for me, if libADLMIDI is GPL then I cannot use it unfortunately.

jpcima commented 5 years ago

The more I think of the entire LGPL discussion, the more I think:

It's probably the simpler route to remake the MIDI core, considering of accumulated experience over years of dev, and converges with a long term goal of extending our work. (about the discussion of refactoring for different channel kind handling, OPN, and such)

When the code no longer contain the ADLMIDI parts, we are more free to relicense as we prefer. It can open an even nicer option than LGPL, because there is some legal trouble between mobile platform especially iOS, for closed programs which use this license. https://wiki.qt.io/Licensing-talk-about-mobile-platforms

no-more-secrets commented 5 years ago

Perhaps that rewrite you mention could be accompanied by a name change, to libOPLMIDI?

Wohlstand commented 5 years ago

@dpacbach , yeah, the name change is also the option, and yeah, I have the related issue...

It's here: https://github.com/Wohlstand/libADLMIDI/issues/187