OPNMIDI support

Moderator: GZDoom Developers

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: OPNMIDI support

Post by Graf Zahl »

I haven't done Android for ages but that surprises me a bit. Software increasingly migrates to C++11 so not having proper support for it is a ticking time bomb. Or is it that Google actually wants to shut down native development and force everybody to use their Java shit?
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: OPNMIDI support

Post by Wohlstand »

Graf Zahl wrote:I haven't done Android for ages but that surprises me a bit. Software increasingly migrates to C++11 so not having proper support for it is a ticking time bomb.
NDK supports C++11, but it is disabled by default and has limited support. Also, exceptions are disabled by default too. In my projects, there are using in various places, so, I need to turn them on.
Graf Zahl wrote:Or is it that Google actually wants to shut down native development and force everybody to use their Java shit?
Rather to use Java shit, CrystaX NDK was introduced as alternative to official NDK.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: OPNMIDI support

Post by Wohlstand »

Chris wrote: That's simply

Code: Select all

nn1 = std::abs(num1);
nn2 = std::abs(num2);
One - the logic is not to pass absolute, it's some different formula.
Two - there are WAS abs-s originally and I had even worse warnings everywhere:
https://github.com/Wohlstand/libADLMIDI ... .h#L86-L90

Later I replaced that with smarter logic, however, CLang on macOS began to offend me, then I fought with it to fix that warning. Finally, I got a warnings-free code on macOS, or CLang with newer versions became much smarter. So, MSVC is still to offend with this.
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: OPNMIDI support

Post by Graf Zahl »

I guess if more developers knew that an alternative Android NDK existed it'd make them extremely happy. I guess I tell the Android dev in the company I work for next week. He's also quite wary of the various quirks the original NDK employs.

In any case, in such situations it may actually be counterproductive to cater to the lowest common denominator. I wonder if it'd increase adoption of such an alternative NDK if devs were just told to use it, or else...

Still, that's good about Open Source. If the official provider delivers shit, someone else can fill the gap.
No such luck with Apple. They once decided that they do not want to update OpenGL anymore and now the developers are stuck with the mess.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: OPNMIDI support

Post by Wohlstand »

Graf Zahl wrote:They once decided that they do not want to update OpenGL anymore and now the developers are stuck with the mess.
Their OpenGL implementation on macOS is weird, however, in my engine, I have multiple modules for various graphical engines: software fallback through SDL2, OpenGL 2.1 (also, with auto-pow-of-2 to support very old video cards like ATI Radeon 9200 I have on my second old hardware computer for experiments) and OpenGL 3.1 without usage of shaders (same also OpenGL ES). OpenGL 3 module is disabled for build on macOS as it is useless on it.
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: OPNMIDI support

Post by Graf Zahl »

Is that because Apple only implements a Core Profile for GL 3 and 4?
And regarding the Radeon 9200, do people really still use such old hardware? That thing is what? 15 years old?
User avatar
Chris
Posts: 2940
Joined: Thu Jul 17, 2003 12:07 am
Graphics Processor: ATI/AMD with Vulkan/Metal Support

Re: OPNMIDI support

Post by Chris »

FWIW, I wasn't suggesting to move to C++17, just noting that its constexpr conditionals can be used to suppress evaluating bad code generated from certain template types. I can almost guarantee there's a more C++11 friendly way to avoid those warnings, if maybe with a bit more obtuse code (don't know about C++98; it is a 20-year-old standard, so there's bound to be harsher limitations).
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: OPNMIDI support

Post by Wohlstand »

Graf Zahl wrote:Is that because Apple only implements a Core Profile for GL 3 and 4?
And regarding the Radeon 9200, do people really still use such old hardware? That thing is what? 15 years old?
I remembering how one guy tried to run my game engine and he got most of the textures be blank/white because there are non-power-of-two. The only thing 'power-of-two' provided in a case when OpenGL doesn't return the `ARB_texture_non_power_of_two` thing. And I think, there are some other but newer video cards still have this crap...
Regarding modern video cards, I have nothing to worry as there are (even cheap) all support non-power-of-two textures.
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: OPNMIDI support

Post by Graf Zahl »

Wohlstand wrote:And I think, there are some other but newer video cards still have this crap...
From NVidia the last series to require power of two was 5xxx, for ATI 9xxx, if I remember correctly. I also remember that ATI nearly went apeshit when it was announced that OpenGL 2.0 required NPOT support and it may be that the Radeon X 1xxx series had some issues here because they had to rush proper support. But those cards were OpenGL 2.x compliant so they must have supported NPOT textures already.

GZDoom has dropped support for these a few years ago and so far I have received zero complaints. For all intents and purposes these things have long left the market and to my knowledge do not even have working drivers for anything newer than Windows XP.

In general, when such problems surface the most likely cause is use of outdated drivers.
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: OPNMIDI support

Post by Wohlstand »

For the worse case, the software rendering fallback (provided by SDL2's API) is always a choice rather support of clunky OpenGL implementations inside of old or faulty drivers.
SLON
Posts: 139
Joined: Fri Feb 10, 2017 2:09 pm
Graphics Processor: nVidia (Modern GZDoom)

Re: OPNMIDI support

Post by SLON »

Just tested it, and damn it, it's amazing. It sounds very similar to the OPNA / OPN3 version of Doom music on the PC-98.

I have a few questions:
1. Is there/will there be support for GS/XG (at least GS) formats?
2. Is there any hope for the VSTi version in order to use, for example, with DosBox?
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: OPNMIDI support

Post by Wohlstand »

SLON wrote: Just tested it, and damn it, it's amazing. It sounds very similar to the OPNA / OPN3 version of Doom music on the PC-98.
I'm glad you like this synth :3
Having a MIDI synthesizer over YM2612 chip was my dream until I did it!

EDIT: Yeah, OPNA / OPN3 is a very similar to OPN2 chip with a difference it has ADPCM output, but FM stuff is same :)
On a quick run, I have found this video: https://www.youtube.com/watch?v=Fj0-KvV0SC0
and I'll say the music quality of this is not so good, because devs are looks was lazy to make a proper bank for this... But, OPNMIDI fixes this :D
SLON wrote:1. Is there/will there be support for GS/XG (at least GS) formats?
The default bank (xg.wopn) is already supporting XG, but partially. The engine does support of many GS/XG things include various controllers and SysEx (for example, CC74-Brightness which is made on both libADLMIDI and on libOPNMIDI), the XG way of additional drum kits is supported, the GS-way of additional drum kits via SysEx also supported. For GS set, I have added a bank made by papiezek and sneakernets, it was designed for GS, but has different instruments set than my xg.wopn. The original xg.wopn bank I have made by importing-from-VGM-files / modding-them / manual-porting-from-OPL3-banks, and the result is a full GM bank which I have extended later into some XG set.
SLON wrote: 2. Is there any hope for the VSTi version in order to use, for example, with DosBox?
Say "Merci beaucoup!" to my friend: https://github.com/jpcima/ADLplug
There are VSTi plugins made for both my libADLMIDI and libOPNMIDI engines you are free to play around! ;3

For myself I use this thing:
https://github.com/jpcima/adljack

Which runs a MIDI daemon on a virtual port which I using from musical software and games, out of Wine usage.


Note: If you'll ask me for DAC support, it's WIP: https://github.com/Wohlstand/libOPNMIDI/issues/5
User avatar
Wohlstand
Posts: 73
Joined: Sun Dec 17, 2017 3:22 am
Graphics Processor: nVidia with Vulkan support
Location: Moscow, Russia
Contact:

Re: OPNMIDI support

Post by Wohlstand »

P.S. Some weeks ago I have recorded this video with libOPNMIDI in action: https://www.youtube.com/watch?v=MMVKCnX96JI
Post Reply

Return to “Closed Feature Suggestions [GZDoom]”