🎵 MIDI 2.0 Ready

MIDI2Kit

A Swift library for implementing MIDI 2.0 — UMP, MIDI-CI, and Property Exchange — in macOS and iOS applications.

Get Started Documentation

Built for MIDI 2.0

Everything you need to implement the next generation of MIDI

📦

Universal MIDI Packet

Complete UMP support with type-safe builders, parsers, and value scaling utilities for MIDI 1.0 ↔ 2.0 conversion.

🔍

Device Discovery

Automatic MIDI-CI device discovery with capability negotiation and lifecycle management via CIManager.

🔄

Property Exchange

High-level async/await API for GET, SET, and Subscribe operations with automatic chunking and timeout handling.

🔌

Transport Abstraction

Clean separation from CoreMIDI with MockTransport for testing. Production and test code share the same interface.

Quick Start

Get up and running in minutes

Package.swift
dependencies: [
    .package(url: "https://github.com/midi2kit/midi2kit-core.git", from: "1.0.0")
]
DeviceDiscovery.swift
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
    }
}

Modules

Modular architecture for flexibility

Documentation

Everything you need to build with MIDI2Kit