Giter Site home page Giter Site logo

dmxopl's Introduction

DMXOPL3


New and improved DMX GENMIDI for Doom and sourceports, taking full advantage of the OPL3 waveforms. This takes things up a notch in terms of timbre.

Summary

This is a GENMIDI patch for DMX for OPL3 FM synthesis. This patch aims to remedy the "weak" default instruments to better match the Roland Sound Canvas, most notably the SC-55 and SC-88. Recommended minimum setup for no note-cuts is ZDoom 2.8.1 with DOSBOX OPL3 emulator core, with 6 chips emulated.

How To Use in DOOM (Vanilla, DOS)

NOTE: I'm assuming you use a Sound Blaster Pro 2, or SB16/AWE32/AWE64. The original Sound Blaster Pro won't work!

  1. Download GENMIDI - Vanilla.op2, rename it to GENMIDI.op2, and put that in your doom directory. Do not name it anything else!!
  2. Set up and save a batch file like this:
    @ECHO OFF
    SET DMXOPTION=-opl3
    doom -file GENMIDI.op2
    PAUSE
    Feel free to add any additional files like PWADs if you want. It's just a file, after all.
  3. In SETUP.EXE, make sure the correct Sound Blaster is selected for your music card. I've been told Pro Audio Spectrum also works if OPL3 can't be detected properly.
  4. Run your batch file. That's it!

FAQ


Why OPL3 only?

OPL3 has four additional waveforms - Alternating Sine, Camel Sine, Square, and Logarithmic Square (Sawtooth). The most interesting of these is the Square wave, for obvious reasons! This will benefit percussion instruments immensely.

What did you use for this project?

Hex Editors, OPL3 Bank Editor, Fraggle's Python scripts, Adlib Tracker II, Edlib, ADLMidi. I also used the following keyboards and devices:

  • Yamaha PSR-3 for basic voice ideas
  • Yamaha PSS-50 for layered voice ideas
  • Yamaha DX-7
  • Commodore 64 Music Module
  • VRC7 and related chips
  • Sound Blaster 16
  • Yamaha PCI cards
  • Sounds from various SEGA MegaDrive games

Will this run on Vanilla?

Yes, but your DMXOPTION variables must be set. There also may be note cuts on certain music selections, although this is very rare in the IWADs.

YOU MISSED (X) SOUND!

Pretty much every single sound has been replaced at this point. If there are any that haven't been changed, it's likely due to me not getting around to it, or not knowing about it. Since GENMIDI is a binary format, getting diffs on it is a pain, so I don't know which instruments are changed and what isn't. If you know a way to check for this, let me know!

What IWAD works best?

All IWADs work.

Is this compatible with (X)?

As far as I know, anything that supports DMX patches and OPL3 emulation would be supported. If you want this included in your favorite OPL3 plugins, please let the authors know. I would be more than happy to see this patch included.

Will any instruments use 4-op?

In the OPL3 sense, No, at least for GM sounds. XG and GS sounds (WOPL only) may be a different story. We'll just have to see.

Why not just use a soundfont?

Because all soundfonts I've heard stink compared to the SC55, and to this day i'm not satisfied with the state of Sound Canvas soundfonts, or the software midi sequencers that claim to use them.

Something doesn't sound quite right.

All DMX implementations seem to differ from port to port and player to player. My patches are tested in Vanilla Doom, Chocolate Doom, and ZDoom 2.8.1. If you hear something different that you don't hear in those three ports, it is a bug that should be reported to the respective authors. However, some sounds may sound louder than others. This is due to the way DMX handles velocity on voices with maxed out volume, which has largely been addressed by now.

I'd like to use this in my project.

Go ahead, just give credit. My recommended string for plugins is "DMXOPL3", or "DMXOPL3 v2.x". "DMXOPL3 by Sneakernets" is also acceptable. Also, don't erase the original DMXOPL preset for this one - I'd love to see both included if possible!

How can I help?

Send a pull request. Submit your instrument as a OPLI format instrument in the "Contributions" directory.

WOPL FAQ

What's the difference between the WOPL version and the DMX version?

The main difference is with a few instruments that had to be tweaked to work with DMX. Most of these changes are negligible for General MIDI stuff. To hear what I intended DMXOPL to sound like in Doom, you'll have to wait for Eternity Engine's ADLMIDI support to be finalized.

Any plans for GS/XG support?

Yes. This will take considerable time, and voices will be added as I come across them in my MIDI files. You can check the progress on those through the XG and GS branches that I will make (or have already made). As I think the GM set is solid enough now, save for just a handful of instruments, I can start work on the other banks.

Will the WOPL version be usable on any other FM chips?

Depends on the chip, but more than likely the answer is no. YMF262 (and the OPL* family for that matter) operate differently than most of the other FM chips, and wouldn't likely transfer over to DX-7 or other instruments without considerable work, if they would work at all.

Is the best way to listen to this really through an emulator?

Yes, unfortunately. Unless someone makes an FM chip that can handle 128+ channels, this is likely never to change. If you're using this in your music projects and you still want to use the real thing, I recommend recording one track at a time and throwing the result in your favorite DAW - just be sure to put a highpass filter set to a really low value (I recommend 5 Hz) to get rid of the offset garbage, lest your mix splatter like crazy.

Credits


  • Wohlstand, for the OPL3BankEditor
  • Bisqwuit, for ADLMidi
  • Fraggle, for Chocolate Doom and GENMIDI research, as well as the Python scripts
  • SubZ3ro, for AdLib Tracker II
  • Esselfortium, for the encouragement and support
  • Jimmy, who will include this in the next Adventures of Square release
  • The Fat Man, who created the famous 2-op and 4-op patches everyone knows
  • Diode Milliampere, who made FM synth popular again
  • Patchouli, for keeping my spirits up
  • Graf Zahl, for continuing ZDoom as GZDoom
  • Randi, for implementing the OPL Emulation in ZDoom
  • Fisk, for miscellaneous feedback and MIDIs to test
  • Stewboy, for the Ancient Aliens MIDIs to test
  • Xaser, who said this patch passes the "Angry Scientist test"
  • Minigunner, just because
  • Altazimuth, who claims it'll be in Eternity someday (this is now true)
  • MTrop
  • Quasar, for Eternity Engine
  • Glaice, for patch advice
  • BlastFrog, for patch advice
  • Vogons Forums, for the OPL-3 Research and tools
  • AtariAge, for C64 Sound module preset banks
  • NintendoAge
  • John Chowning, the father of FM synthesis. I hope he can hear this someday.

Extra Thanks to:

  • Doomworld Forums and the respective IRC/DISCORD channels
  • The 4th Modulator DISCORD channels
  • Giest118, who installed Doom again to listen to this
  • Nuke.YKT, for testing this in Raptor, and for the Nuked OPL core
  • kode54, who added this to Cog and FB2K, thank you!
  • Patch93, who contributed various patches
  • OlPainless, who contributed various patches
  • Papiezak, who contributed various of patches
  • Infurnus, for support
  • Leileilol, for support
  • MaliceX, for support
  • Kuschelmonster, for support
  • Anyone who makes music with this thing!

YMF262 forever.

dmxopl's People

Contributors

freq-mod avatar olpainless avatar sneakernets avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

dmxopl's Issues

Move all instruments that use high notes to 0 voice offset (if possible)

Thanks to a friend that noticed some of his midi files broke on some xylophone parts, sure enough, the top range that one would expect to play does not play. culprit? the one octave offset.

On some voices this is unavoidable. however, on those that can be fixed, let's fix it. Voices that are expected to play high ranges shouldn't be limited at all.

Fix Slap Bass patches

Slap Bass patches need to be updated to a) be less loud, and b) match SC55/SC88 patches.

Ideas:

  • Get Fourier graph of SC55 Slap Bass 1 and Slap Bass 2 sample (within usual range)
  • Match patch output with sample on the first few harmonics
  • Use a double voice to match even more harmonics (yet another double voice)

Tying up loose ends

The project has been dormant for a while, being pretty much "done" for the most part, save for some drum kits and some GS/XG instruments that are being done "when I get around to it". But there are some instruments that I think need some work now that I've heard them enough:

  • Pizzicato Strings: Sound too much like a steel drum somehow, needs some more timbre (but how?)
  • Brass Section needs to have detune applied on attack, this once worked, but somehow got changed. This only affects a few midis.
  • Shakuhachi needs a lot of work. It sounds pretty scratchy and bad in high ranges.
  • Tubular Bells ADSR needs some cleaning up. Sometimes the bell gets cut off (ADLMIDI issue? who knows)
  • Timbales need to be redone completely. There has to be a way to pull that sound off!
  • Clean up toms on other drum kits.
  • Finish the drum kits.
  • Make Rhodes Piano a little better. This has been tweaked a lot since I started, and it may have gotten worse.
  • Mayyybe tweak choirs a bit?
  • Orchestra Hit needs redoing. It's too fuzzy. I had a better sounding one before. Find it maybe?
  • Clarinet needs a little tweaking. It's much too "honk".

Start work on Single Voice implementation for DMX compatibility

DMX cuts the second voice of double voiced instruments when channel pressure is maxed out. Make sure that all double voices sound reasonably good with the second voice disabled.

Basically any double voices that use the extra channel to add more harmonics to the sound (but aren't 100% needed) need to be the second voice. It'd be embarrassing if the harmonics were the primary voice and the fundamentals are placed on the second voice.

Ride Cymbals need work

Since DMX isn't really a target anymore, Let's fix the cymbals. The hats are alright, it's the ride cymbals that are in trouble. I started work on the ride cymbal 1:
image

This sounds much better but it's still not "perfect" in matching the SC-55. Ugh.

Investigate D_DOOM issue

D_DOOM intro is not playing properly, with very loud square waves playing in the bass. I think this might be an SC-55 sampling trick.

Fix snares

Lee Jackson strikes again, abusing snares. Fix snares for now until libADLMIDI handles it.

Replace Trumpet

While I like the patch we have, it breaks in DMX due to DMX failing so hard with AM mode (Why??!)

Likely reverting to the old patch, but maybe I don't have to (Tyrian?)

Current State of the DMXOPL Project

I realize that this project has been dormant for over a year, mostly due to Real Life ™️ getting in the way. Now that Eternity Engine has ADLMIDI support and life has calmed down considerably, I can begin working on this project again.

A list of things I want to address:

  • Credit - DMXOPL currently is a mishmash of contributions. Given the binary nature of the format we use, it's not really easy to track. I tried to keep tabs on this in my commits and release notes, but some uncredited stuff still slipped through.
  • Bloat - There are a lot of files in the repo that are out of date and too large, including MP3 files. I'm not sure if there is a good way to remove these without breaking the repo, but these files will not be updated and may be removed in future.
  • DMX support - This was dropped due to constant issues with exporting the WOPL file to the DMX format, which meant that several file formats had to be maintained separately. I want to investigate why these issues cropped up and hopefully fix them.
  • Everything in #48 if possible.

Revisit cymbals for WOPL

Cymbals need some cleaning up if possible. The current version is a compromise for DMX, the WOPL version wouldn't need to worry about this. Crashes could be better, ride bell too.

New Toms

I may have to replace the toms with the older ones, as the new ones I just can't figure out how to make louder....

But I would like to salvage the idea, somehow, and make it work -- somehow.

Debugging GS instruments with ADLMidiPlay

A little trick I found with GS instruments (to knock it out of XG mode)

Line 989 of adlmidi_midiplay.cpp:

        bank = (uint16_t(Ch[channel].bank_msb) * 256) + uint16_t(Ch[channel].bank_lsb);

Should be

        bank = (uint16_t(Ch[channel].bank_msb)) + uint16_t(Ch[channel].bank_lsb);

This allows GS to work for now.

Music Box and Glockenspiel need improvement

Compared to SC-55 (or even that damned Microsoft GS Synth) they are totally different and hardly resemble what they're supposed to be, ESPECIALLY at lower octaves.

While I experimented with these two, I doubt I reached the optimum. Maybe I was going in the totally wrong direction ( ͡° ͜ʖ ͡°)

P.S. If you need more midis for testing purposed, I can "donate" some of mine. Downloaded them a goood while ago from an ancient japanese site, interestingly they're so good I listen to them UNIRONICALLY. Since japanese VN music from 90's was so damn complex, it's a good opportunity to test less used instruments. such as Tinkle Bell ;)

UPDATE: Msx box is done.

Fix Piano for good

I cannot stay satisfied with the current Piano, even if it's a Yamaha preset. What I want to use aliases on Emulators. Now what?

Fix DMX issues

Sigh. DMX bugs came out of the woodwork when I made my new hats. Figure out a way to fix this.

Flute Attack too low

FF6 and FF7 soundtrack exposed these issues:

  • Make sure flute trill works in FF6 Prelude: Attack of some wind instruments are too low, rendering trills too quiet to hear in the mix. Other offenders include the Flute, Ocarina, and Piccolo patches.

The XG/GS "Issue"

I've noticed that splitting up the XG/GS sets into distinct wopl files is a good way to start a massive headache. The only real problems between the two formats are related to the drumkits, so perhaps a software drum remapping (as BASSMIDI does) is the way to go here. Unfortunately, that's out of my hands.

The main issue is having GZDoom's LIBADL implementation follow these rules, as that is where my bank will have the most play - if GZDoom's LIBADL even sees GS/XG instruments at this point, which I don't think it does. I may be wrong though...

Better Hats

Since I'm not targeting DMX exclusively anymore, I can finally have some hi-hats that aren't awful. If you feel like helping out let me know. they need to blend well with everything else, obviously.

Replace some instruments I may have botched

I had a discussion with one of the contributors, I may be going a little too ambitious on some instruments. Not sure what to do here. We're at this point, which I guess is good...

Possible "OPL" GENMIDI

To get myself back into things, I've decided to make a OPL/OPLL style General MIDI set. Nothing fancy here, just using the Sine Wave. I'm going to be working on DMXOPN2 again soon, so perhaps it's a form of "practice".

Contributing process

Hi,

I have some patches I'd like to contribute, but I am unsure of what process is in place. That is, how should individual patches be delivered to the repo?

Br.
Andreas

How do I use this with gzdoom?

How do I use this with gzdoom? Maybe I'm missing something, but I haven't been able to find clear instructions anywhere.

I'm using gzdoom 3.1.0

Document DMX quirk

Finally found out what was breaking all my patches, you know, the ones that sounded like crap on DMX? Yeah... The carrier Level of the second voice is always the carrier level of the first voice. Let me explain.

When a Double Voice instrument is played, both voices' carrier waves will play as if they have the same volume level - which is determined by the first voice. So, if you have 63 for the first voice, and 45 for the second - well, too bad, you get 63 for both.

The reason I never ran into this is that I started only recently doing that kind of voice setup, while the others matched carrier wave volumes.

I don't know what other properties DMX reads from the first voice, but this is definitely one of them. This hasn't been documented anywhere, as far as I know. In fact, none of DMX has been documented, even though the source code is available.

Rock organ sounds like strings section sometimes

Somewhat similar to #18 - rock organ patch is so "harsh" that it sounds like some kind of french horn or even tremolo strings ensemble (I even made an experiment swapping strings patch with rock "organ" one, it didn't sound that bad o.O)

There might be no way to solve this (at least I can't), but maybe...

P.S. If it helps a little - here is how I made rock organ in my OPN2 bank. Sounds rather hollow, though.
zrzut ekranu z 2018-02-22 19-50-24

Any plan for SC8820 GS set?

One my friend is interested for SC8820 set as he using some instruments in his MIDI files on the SCVA thing.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.