hammerspoon2-docs
    Preparing search index...

    Function deviceNamed

    • Creates an hs.midi object for a physical device.

      For a device with several ports, the callback receives messages from the device's first source, and sendCommand() sends to its first destination. sendSysex() and identityRequest() send to every destination on the device. To use a specific port, open it by name with virtualSourceNamed().

      new/alloc/copy-prefixed method names, which have special meaning under Objective-C's ARC ownership conventions.

      Parameters

      • deviceName: string

        The name of the device, as returned by devices()

      Returns HSMIDIDevice | null

      An HSMIDIDevice object, or nil if no device has that name