Native Network MIDI 2.0 libraries + C# wrapper for integration with Unity projects.
Network MIDI 2.0 is the transport layer used by this template to discover compatible endpoints and exchange MIDI messages over a local network.
This makes it possible to support workflows such as:
- Sending local MIDI data to a remote endpoint.
- Receiving remote MIDI into a local application.
- Building hybrid local + remote performance setups.
- Experimenting with distributed MIDI systems.
This project provides native shared libraries to be used as plugins inside Unity. The native code resides in the native_netump folder.
- The script generates build files using CMake with the specified platform and build type.
- It compiles the native library as a shared object or DLL.
- The resulting native plugin library is copied automatically into the appropriate folder inside this project under:
NetUMP_Unity/unity/Assets/Plugins/NetUMP/{Platform}/{Architecture}/where {Platform} is one of Android, Windows, Linux, or Apple.
- Android NDK installed and
ANDROID_NDKenvironment variable set (for Android). - CMake and Ninja installed and available in your system PATH.
- MSBuild installed and available in your system PATH (for Windows).
- C/C++ compiler/toolchain installed and available in your system (for Linux/Apple).
Build-script target selection does not, by itself, provide a cross-compilation toolchain. When building for a platform different from your host operating system, ensure that the required toolchain is installed and supported by the build configuration.
On Windows, use Command Prompt (cmd), not PowerShell for running batch scripts.
- Open a Command Prompt (cmd).
- Navigate to the
native_netumpfolder. - Run the build script with desired platform and build type:
platform(optional):android,linux,windows,apple, orall(default:all)build_type(optional):DebugorRelease(default:Release)
Example: Build the Linux plugin in Release mode.
build_native.bat linux Release- Open a terminal.
- Navigate to the
native_netumpfolder. - Run the build script with desired platform and build type.
Example: Build the Android plugin in Debug mode.
./build_native.sh android DebugAfter a successful build, locate the generated libraries under:
NetUMP_Unity/unity/Assets/Plugins/NetUMP/
In your destination Unity project, create the following directory if it does not already exist:
Assets/Plugins/
Copy the generated NetUMP folder into it, preserving the platform and architecture subfolders:
<Your_Unity_Project>/
└── Assets/
└── Plugins/
└── NetUMP/
└── {Platform}/
└── {Architecture}/
└── <generated native plugin files>
You can copy only the platform and architecture folders needed by your project.
- Create a
Scriptsfolder inside your Unity project'sAssetsdirectory, unless it already exists. - Locate
NetUMPWrapper.csin this repository. - Copy it into:
<Your_Unity_Project>/Assets/Scripts/NetUMPWrapper.cs
Your project should now contain:
YourUnityProject/
└── Assets/
├── Plugins/
│ └── NetUMP/
│ └── {Platform}/
│ └── {Architecture}/
│ └── <generated native plugin files>
└── Scripts/
└── NetUMPWrapper.cs
Use the API exposed by NetUMPWrapper.cs from your Unity C# code to interact with the native NetUMP library.