New codebase for OmniMIDI, completely rewritten from scratch using code laid down through various tests in the Shakra branch.
Two reasons; the old code was too bloated, and I wanted to completely move the new release as far away from it as possible.
This code has been written completely in C++, instead of taping random code on top of the already unstable C code from OmniMIDI v1 (pre 15.0). This will get rid of all the issues that have been plaguing the old branch so far, while also making the code more readable by normal human beings. I became unable to read my own code in there...
I feel like I should probably get to know C++ more, before moving to Rust. A Rust rewrite is not out of the question though! Maybe someday.
Here are the main differences:
- v2 is pure C++ code. (Duh!)
- Written with modularity in mind, to allow other developers to take full advantage of it (Modules support!) and...
- ... support for more operating systems other than Windows, and more architectures other than i386 and AMD64.
Here's what available with OmniMIDI v2 so far.
- ✔️ Runtime
- 🔽 OS support
- ✔️ Windows
- ✔️ Linux
⚠️ BSD- ❌ macOS
- 🔽 Synth modules
- ✔️ BASSMIDI* (Requires extra config in xmake)
- ✔️ FluidSynth
- ✔️ XSynth
- ✔️ External plugin system
- 🔽 Features
- ✔️ Audio limiter (anti-clipping)
- ✔️ Hot reload of settings or SoundFont lists
- ❌ Events overrides (change note length, ignore events etc...)
- ❌ Events loopback
- ❓ App blacklist system
- ✔️ WinMMWRP support
- 🔽 OS support
⚠️ Configurator⚠️ Debug window- ❌ MIDI channel mixer
✔️ Implemented
❓ Untested
❌ Not implemented
This guide will help you set up your environment and compile OmniMIDI v2 from source.
- A computer
- Xmake
- A GCC C++ compiler (Mingw or Clang)
- Git
-
Install Xmake
You can install Xmake by following its online guide: https://xmake.io/guide/quick-start.html#installation
-
Download the compiler
For Windows: Download either Mingw or Clang, then extract and place it somewhere accessible (e.g.,
F:\Compilers\mingw64), then add it to thePATH.
Make sure to get both i686 and AMD64 versions of the compiler, and ARM64 too if you're planning on compiling for non-x86 CPUs.
OmniMIDIv2's Win32 compile process is tested against w64devkit by skeeto.
For Linux: Install GCC or Clang using the package manager for your distro. -
Clone the repo
Clone the repo somewhere on your device:
git clone https://github.com/KeppySoftware/OmniMIDIv2.git
-
Prepare the project
Open a terminal on the newly cloned repo, and navigate to the project's directory:
cd OmniMIDIThen prepare the project for the compile process, and compile it.
Set
--plat=<plat>tomingwfor Windows, otherwiselinuxfor Linux.
Set--arch=<arch>to one of the following supported platforms:i386,x86_64,arm64
To compile with BASS support, append--nonfree=yat the end:xmake f -m release --plat=<plat> --arch=<arch>
This should make xmake download all the required dependencies. Press
Ywhen prompted. -
Compile the project
After xmake is done downloading all the dependencies, you can begin compiling:
xmake -v
The compiled library will be in the
./buildfolder. -
(EXTRA) Winelib for Wine support
If you want to use OmniMIDIv2 Linux on a Win32 app, you'll need to compile the KDMAPI Winelib shim too.
Go to the winelib folder:
cd winelibThen run the compile process:
./compile.sh
You'll get a file called OmniMIDI.dll.
Put this file next to the Win32 app you want to run through Wine, together with libOmniMIDI.so and the required synth libraries. -
Test the build
Test the build against something that can use it (WinMM under Win32, ALSAMIDI/winelib under Linux, KDMAPI for both).
If you're under Linux, and you want to test the newly created build against a KDMAPI test app, remember to export the build's directory as a valid library loading path, by calling
export LD_LIBRARY_PATH=$PWDin the terminal.
Keppy's Direct MIDI API, introduced in OmniMIDI v1, will continue to be supported in OmniMIDI v2.
I will make sure old applications will still be able to communicate with v2, but it will definitely be deprecated in favor of a better API implementation with a better name. To be continued...