Repository Public
1// =============================================================================2// SP BOUCHER | SOFTWARE & RESEARCH3// ARTIFICIAL INTELLIGENCE • FINANCE • ENGINEERING4// =============================================================================5//6// PROJECT METADATA7// -----------------------------------------------------------------------------8// Project : ORIX DJ9// File : Packages/ORIXDJCore/Sources/ORIXMIDI/MIDIDeviceInfo.swift10// Description : Value description of a CoreMIDI endpoint (source or11// destination) for device lists and mappings.12// Module : ORIXMIDI13// Repository : https://git.spboucher.ai/orix-dj14// Created : 2026-11-2115// Last Modified : 2026-11-2116//17// =============================================================================18// AUTHOR & PROFESSIONAL AFFILIATION19// =============================================================================20//21// Author : Simon-Pierre Boucher22// Position : Professor of Finance23// Institution : Université du Québec en Outaouais (UQO)24// Department : Département des sciences administratives25// Organization : SP Boucher26//27// Website : https://spboucher.ai28// Git : https://git.spboucher.ai29//30// =============================================================================31// OFFICIAL CONTACT DIRECTORY32// =============================================================================33//34// General : info@spboucher.ai35// Professional : contact@spboucher.ai36// Direct : simon@spboucher.ai37// Research : research@spboucher.ai38// Development : dev@spboucher.ai39// Support : support@spboucher.ai40// Security/Admin : admin@spboucher.ai41// Notifications : notifications@spboucher.ai42//43// Preferred Contact: support@spboucher.ai44//45// =============================================================================46// COPYRIGHT & INTELLECTUAL PROPERTY47// =============================================================================48//49// Copyright (c) 202650// Simon-Pierre Boucher51//52// All rights reserved where applicable.53//54// This file is governed by the applicable project license,55// copyright notices, institutional agreements and relevant law.56//57// Unless expressly authorized by the applicable license or58// rights holder, copying, redistribution, sublicensing,59// publication and commercial exploitation are not permitted.60//61// Existing third-party rights and notices remain unaffected.62//63// =============================================================================64// CONFIDENTIALITY & SECURITY65// =============================================================================66//67// Classification : Public68// Distribution : Public repository; use is governed by the project license69// Security Contact : admin@spboucher.ai70//71// Access to this source does not independently grant permission72// to redistribute or disclose confidential materials.73//74// Do not embed credentials, private keys, access tokens,75// certificates or confidential personal information.76//77// =============================================================================78// LICENSE & MAINTENANCE79// =============================================================================80//81// License : None specified (no license file in this repository)82// Maintainer : Simon-Pierre Boucher83// Technical Contact: dev@spboucher.ai84//85// =============================================================================86// END OF SP BOUCHER SOURCE HEADER87// =============================================================================8889import Foundation9091/// A snapshot of one CoreMIDI endpoint. Pure value type: safe to keep, compare and persist.92public struct MIDIDeviceInfo: Sendable, Identifiable, Equatable, Codable, Hashable {93 public enum Kind: String, Sendable, Codable {94 /// An endpoint the app receives from (a controller's output).95 case source96 /// An endpoint the app sends to (a controller's input, e.g. for LEDs).97 case destination98 }99100 /// CoreMIDI `kMIDIPropertyUniqueID`. Persistent across re-plugs for hardware devices;101 /// regenerated each time a virtual endpoint is created.102 public var uniqueID: Int32103 public var name: String104 public var manufacturer: String105 public var model: String106 public var isOnline: Bool107 /// True when the endpoint is not owned by a driver entity (created by an application).108 public var isVirtual: Bool109 public var kind: Kind110111 public var id: Int32 { uniqueID }112113 public init(114 uniqueID: Int32,115 name: String,116 manufacturer: String = "",117 model: String = "",118 isOnline: Bool = true,119 isVirtual: Bool = false,120 kind: Kind121 ) {122 self.uniqueID = uniqueID123 self.name = name124 self.manufacturer = manufacturer125 self.model = model126 self.isOnline = isOnline127 self.isVirtual = isVirtual128 self.kind = kind129 }130}131