A Swift library for implementing MIDI 2.0 — UMP, MIDI-CI, and Property Exchange — in macOS and iOS applications.
Everything you need to implement the next generation of MIDI
Complete UMP support with type-safe builders, parsers, and value scaling utilities for MIDI 1.0 ↔ 2.0 conversion.
Automatic MIDI-CI device discovery with capability negotiation and lifecycle management via CIManager.
High-level async/await API for GET, SET, and Subscribe operations with automatic chunking and timeout handling.
Clean separation from CoreMIDI with MockTransport for testing. Production and test code share the same interface.
Get up and running in minutes
dependencies: [
.package(url: "https://github.com/midi2kit/midi2kit-core.git", from: "1.0.0")
]
import MIDI2Kit
// Create transport and CI manager
let transport = try CoreMIDITransport(clientName: "MyApp")
let ciManager = CIManager(transport: transport)
// Start discovery
try await ciManager.start()
// Listen for devices
for await event in ciManager.events {
switch event {
case .deviceDiscovered(let device):
print("Found: \(device.displayName)")
if device.supportsPropertyExchange {
print(" → Supports Property Exchange!")
}
case .deviceLost(let muid):
print("Lost device: \(muid)")
default:
break
}
}
Modular architecture for flexibility
UMP types, MUID, DeviceIdentity, value scaling, and Mcoded7 encoding. The foundation for all MIDI 2.0 operations.
Protocol abstraction for MIDI I/O. Includes CoreMIDITransport for production and MockMIDITransport for testing.
MIDI-CI device discovery and capability inquiry. Automatic device lifecycle management with CIManager.
Property Exchange operations: GET, SET, Subscribe. High-level async/await API with automatic chunking.
Everything you need to build with MIDI2Kit