         assert(port.state == .connected)
         self[port.id] = nil
         return port
+    }
+
+    //
+    fileprivate init(client: MIDIClient, ports: [Value]) {
+        self._client = client
+        self._content = [:]
+        ports.forEach {
+            self[$0.id] = $0
+        }
     }
 
     //

        return dump(_content).description
    }


    public func port(with name: String) -> Value? {
        return _content.index { $1.displayName == name }.map { self[$0] }?.1
    }

        return ports[safe: choice]
    }

    internal final func add(_ port: Value) -> Value? {
        assert(self[port.id] == nil)
        self[port.id] = port
