https://github.com/squiddy/godot-ios-midi
MIDI plugin for Godot on iOS
https://github.com/squiddy/godot-ios-midi
godot godot-plugin ios midi
Last synced: about 1 month ago
JSON representation
MIDI plugin for Godot on iOS
- Host: GitHub
- URL: https://github.com/squiddy/godot-ios-midi
- Owner: squiddy
- License: mit
- Created: 2025-03-19T19:05:38.000Z (over 1 year ago)
- Default Branch: main
- Last Pushed: 2025-04-05T08:35:22.000Z (about 1 year ago)
- Last Synced: 2026-04-30T14:29:14.261Z (about 2 months ago)
- Topics: godot, godot-plugin, ios, midi
- Language: Python
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# MIDI plugin for Godot on iOS
I hacked this together after discovering that the MIDI support in Godot is not
available on iOS. This plugin uses the CoreMIDI framework to receive MIDI
events.
## Build
1. Install `uv` from https://docs.astral.sh/uv/
2. Install `xcode` and command line tools
3. Build godot headers by running `make godot-headers`
3. Run `make`
4. Copy `bin/godot_ios_midi.a` and `src/godot_ios_midi.gdip` to your Godot project's `ios/plugins` directory
5. Enable plugin on export
## Usage
```csharp
public override void _Ready()
{
if (Engine.HasSingleton("MidiIOS"))
{
var plugin = Engine.GetSingleton("MidiIOS");
plugin.Connect(
"midi_event",
Callable.From(
(Godot.Collections.Dictionary eventData) => OnMidiEvent(eventData)
)
);
}
}
public void OnMidiEvent(Godot.Collections.Dictionary eventData)
{
byte[] midiBytes = (byte[])eventData["data"];
var timestamp = (double)eventData["timestamp"];
GD.Print(
$"MIDI Event Received - Timestamp: {timestamp}, Data: {BitConverter.ToString(midiBytes)}
);
}
```