MIDI Extension for Hammerspoon.
This extension supports listening, transmitting and synthesizing MIDI commands.
This extension was thrown together by Chris Hocking for CommandPost.
This extension uses MIKMIDI, an easy-to-use Objective-C MIDI library created by Andrew Madsen and developed by him and Chris Flesner of Mixed In Key.
MIKMIDI LICENSE: Copyright (c) 2013 Mixed In Key, LLC. Original author: Andrew R. Madsen (andrew@mixedinkey.com)
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
Signature | hs.midi.commandTypes[] |
---|---|
Type | Constant |
Description | A table containing the numeric value for the possible flags returned by the Defined keys are:
|
Signature | hs.midi.deviceCallback(callbackFn) -> none |
---|---|
Type | Function |
Description | A callback that's triggered when a physical or virtual MIDI device is added or removed from the system. Parameters:
Returns:
Notes:
|
Signature | hs.midi.devices() -> table |
---|---|
Type | Function |
Description | Returns a table of currently connected physical MIDI devices. Parameters:
Returns:
|
Signature | hs.midi.virtualSources() -> table |
---|---|
Type | Function |
Description | Returns a table of currently available Virtual MIDI sources. This includes devices, such as Native Instruments controllers which present as virtual endpoints rather than physical devices. Parameters:
Returns:
|
Signature | hs.midi.new(deviceName) -> |
---|---|
Type | Constructor |
Description | Creates a new Parameters:
Returns:
Notes:
|
Signature | hs.midi.newVirtualSource(virtualSource) -> |
---|---|
Type | Constructor |
Description | Creates a new Parameters:
Returns:
Notes:
|
Signature | hs.midi:callback(callbackFn | nil) |
---|---|
Type | Method |
Description | Sets or removes a callback function for the Parameters:
Returns:
Notes:
|
Signature | hs.midi:displayName() -> string |
---|---|
Type | Method |
Description | Returns the display name of a Parameters:
Returns:
|
Signature | hs.midi:identityRequest() -> none |
---|---|
Type | Method |
Description | Sends an Identity Request message to the Parameters:
Returns:
Notes:
|
Signature | hs.midi:isOnline() -> boolean |
---|---|
Type | Method |
Description | Returns the online status of a Parameters:
Returns:
|
Signature | hs.midi:isVirtual() -> boolean |
---|---|
Type | Method |
Description | Returns Parameters:
Returns:
|
Signature | hs.midi:manufacturer() -> string |
---|---|
Type | Method |
Description | Returns the manufacturer name of a Parameters:
Returns:
|
Signature | hs.midi:model() -> string |
---|---|
Type | Method |
Description | Returns the model name of a Parameters:
Returns:
|
Signature | hs.midi:name() -> string |
---|---|
Type | Method |
Description | Returns the name of a Parameters:
Returns:
|
Signature | hs.midi:sendCommand(commandType, metadata) -> boolean |
---|---|
Type | Method |
Description | Sends a command to the Parameters:
Returns:
Notes:
|
Signature | hs.midi:sendSysex(command) -> none |
---|---|
Type | Method |
Description | Sends a System Exclusive Command to the Parameters:
Returns:
Notes:
|
Signature | hs.midi:synthesize([value]) -> boolean |
---|---|
Type | Method |
Description | Set or display whether or not the MIDI device should synthesize audio on your computer. Parameters:
Returns:
|