Enable real-time MIDI API (adl_rt_* methods)#2
Merged
Conversation
This was referenced Apr 12, 2026
Owner
|
Thanks for the contribution! There's some warnings about missing XML comments on the new methods, you can make another PR to add some, or I'll do it at some point, either way is fine. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
RealTime*wrapper methods for theadl_rt_*real-time API were wrapped in#if false— the native entry points already existed inAdlMidiImports, but no public API surfaced them. This PR removes the preprocessor guard so consumers can drive the synth with MIDI events in real time (e.g. for live XMI playback or streaming audio synthesis).Also fixed the
RealTimeSystemExclusivesignature to use abyte*pointer (matching the underlyingadl_rt_systemExclusiveimport), wrapped in anunsafecontext. The previousIntPtrpass-through didn't match the native declaration.Motivation
Building a real-time music system for UnderworldGodot on top of AdlMidi.NET — feeding individual MIDI events from an XMI sequencer into the synth, then pulling rendered PCM into Godot's audio callback. This required the
adl_rt_*API, which was implemented but inaccessible.Test plan
dotnet buildsucceeds