docs » plugins.core.midi.manager


MIDI Manager Plugin.

Submodules

API Overview

API Documentation

Constants

DEFAULT_MIDI_CONTROLS

Signature plugins.core.midi.manager.DEFAULT_MIDI_CONTROLS -> table
Type Constant
Description The default MIDI controls, so that the user has a starting point.

MMC_COMMAND_TYPE

Signature plugins.core.midi.manager.MMC_COMMAND_TYPE -> table
Type Constant
Description MMC Command Types

MMC_TIMECODE_TYPE

Signature plugins.core.midi.manager.MMC_TIMECODE_TYPE -> table
Type Constant
Description MMC Timecode Type

MTC_COMMAND_TYPE

Signature plugins.core.midi.manager.MTC_COMMAND_TYPE -> table
Type Constant
Description MTC Command Type

MTC_MESSAGE_TYPE

Signature plugins.core.midi.manager.MTC_MESSAGE_TYPE -> table
Type Constant
Description MTC Message Types

MTC_TIMECODE_TYPE

Signature plugins.core.midi.manager.MTC_TIMECODE_TYPE -> table
Type Constant
Description MTC Timecode Type

Variables

defaultGroup

Signature plugins.core.midi.manager.defaultGroup -> string
Type Variable
Description The default group.

learningMode

Signature plugins.core.midi.manager.learningMode -> boolean
Type Variable
Description Whether or not the MIDI Manager is in learning mode.

maxItems

Signature plugins.core.midi.manager.maxItems -> number
Type Variable
Description The maximum number of MIDI items per group.

numberOfSubGroups

Signature plugins.core.midi.manager.numberOfSubGroups -> number
Type Variable
Description The number of Sub Groups per Touch Bar Group.

Functions

activeGroup

Signature plugins.core.midi.manager.activeGroup() -> string
Type Function
Description Returns the active group.
Parameters
  • None
Returns
  • Returns the active group or `manager.defaultGroup` as a string.

activeSubGroup

Signature plugins.core.midi.manager.activeSubGroup() -> string
Type Function
Description Returns the active sub-group.
Parameters
  • None
Returns
  • Returns the active sub group as string

clear

Signature plugins.core.midi.manager.clear() -> none
Type Function
Description Clears the MIDI items.
Parameters
  • None
Returns
  • None

devices

Signature plugins.core.midi.manager.devices() -> table
Type Function
Description Gets a table of Physical MIDI Device Names.
Parameters
  • None
Returns
  • A table of Physical MIDI Device Names.

forcefullyWatchMIDIDevices

Signature plugins.core.midi.manager.forcefullyWatchMIDIDevices(devices) -> none
Type Function
Description Forces CommandPost to watch a table of MIDI devices.
Parameters
  • devices - A table containing all the device names you want to always watch.
Returns
  • A table of Virtual MIDI Source Names.

forceGroupChange

Signature plugins.core.midi.manager.forceGroupChange(combinedGroupAndSubGroupID) -> none
Type Function
Description Loads a specific sub-group.
Parameters
  • combinedGroupAndSubGroupID - The group and subgroup as a single string.
Returns
  • None

getDevice

Signature `plugins.core.midi.manager.getDevice(deviceName, virtual) -> hs.midi object nil` </span>
Type Function
Description Gets a MIDI Device.
Parameters
  • deviceName - The device name.
  • virtual - A boolean that defines whether or not the device is virtual.
Returns
  • A `hs.midi` object or nil if no MIDI device by that name exists.

getItem

Signature plugins.core.midi.manager.getItem(item, button, group) -> table
Type Function
Description Gets a MIDI item from Preferences.
Parameters
  • item - The item you want to get.
  • button - Button ID as string
  • group - Group ID as string
Returns
  • A table otherwise `nil`

getItems

Signature plugins.core.midi.manager.getItems() -> tables
Type Function
Description Gets all the MIDI items in a table.
Parameters
  • None
Returns
  • A table

gotoSubGroup

Signature plugins.core.midi.manager.gotoSubGroup() -> none
Type Function
Description Loads a specific sub-group.
Parameters
  • id - The ID of the sub-group.
Returns
  • None

groupStatus

Signature plugins.core.midi.manager.groupStatus(groupID, status) -> none
Type Function
Description Updates a group's visibility status.
Parameters
  • groupID - the group you want to update as a string.
  • status - the status of the group as a boolean.
Returns
  • None

init

Signature plugins.core.midi.manager.init(deps, env) -> none
Type Function
Description Initialises the MIDI Plugin
Parameters
  • deps - Dependencies Table
  • env - Environment Table
Returns
  • None

midiCallback

Signature plugins.core.midi.manager.midiCallback(object, deviceName, commandType, description, metadata) -> none
Type Function
Description MIDI Callback
Parameters
  • object - The `hs.midi` userdata object
  • deviceName - Device name as string
  • commandType - Command Type as string
  • description - Description as string
  • metadata - A table containing metadata for the MIDI command
Returns
  • None

nextSubGroup

Signature plugins.core.midi.manager.nextSubGroup() -> none
Type Function
Description Goes to the next sub-group for the active group.
Parameters
  • None
Returns
  • None

previousSubGroup

Signature plugins.core.midi.manager.previousSubGroup() -> none
Type Function
Description Goes to the previous sub-group for the active group.
Parameters
  • None
Returns
  • None

processMMC

Signature plugins.core.midi.manager.processMMC(sysexData) -> string, ...
Type Function
Description Process MMC Data
Parameters
  • sysexData - Sysex Data as Hex String
Returns
  • A string with the MMC command, and any additional parameters as per below notes.
Notes
  • The possible MMC commands are:
  • STOP
  • PLAY
  • DEFERRED_PLAY
  • FAST_FORWARD
  • REWIND
  • RECORD_STROBE
  • RECORD_EXIT
  • RECORD_PAUSE
  • PAUSE
  • EJECT
  • CHASE
  • MMC_RESET
  • WRITE
  • GOTO
  • timecode - Timecode as string, in the following format: "hh:mm:ss:fr" (i.e. "12:03:03:13").
  • frameRate - Frame Rate as string, possible options include: "24", "25", "30 DF" or "30 NDF".
  • subframe - Subframe as string.
  • ERROR
  • SHUTTLE

processMTC

Signature plugins.core.midi.manager.processMTC(mtcData) -> string, ...
Type Function
Description Process MTC Data
Parameters
  • mtcData - MTC Data as Hex String
Returns
  • A string with the MTC command, and any additional parameters.

registerCallback

Signature plugins.core.midi.manager.registerCallback(id, fn) -> none
Type Function
Description Registers a MIDI Callback.
Parameters
  • id - The ID as a string.
  • fn - The function you want to trigger.
Returns
  • None

registerListenMMCFunction

Signature plugins.core.midi.manager.registerListenMMCFunction(id, fn) -> none
Type Function
Description Registers a MMC Listening Function
Parameters
  • id - The group ID as a string.
  • fn - The function you want to trigger.
Returns
  • None

registerListenMTCFunction

Signature plugins.core.midi.manager.registerListenMTCFunction(id, fn) -> none
Type Function
Description Registers a MTC Listening Function
Parameters
  • id - The group ID as a string.
  • fn - The function you want to trigger.
Returns
  • None

sendMMC

Signature plugins.core.midi.manager.sendMMC(deviceName, virtual, commandType, parameters) -> boolean
Type Function
Description Sends MMC Data to a MIDI Device.
Parameters
  • deviceName - The MIDI Device name.
  • virtual - Is this MIDI Device virtual as boolean?
  • channelNumber - "00" to "7F", where "7F" is all devices.
  • commandType - Command Type as string (see possible options in Notes below)
  • parameters - Optional parameters in a table.
Returns
  • `true` if successfully sent otherwise `false`.
Notes
  • The possible MMC commands are:
  • STOP
  • PLAY
  • DEFERRED_PLAY
  • FAST_FORWARD
  • REWIND
  • RECORD_STROBE
  • RECORD_EXIT
  • RECORD_PAUSE
  • PAUSE
  • EJECT
  • CHASE
  • MMC_RESET
  • WRITE
  • GOTO
  • timecode - Timecode as string, in the following format: "hh:mm:ss:fr" (i.e. "12:03:03:13").
  • frameRate - Frame Rate as string, possible options include: "24", "25", "30 DF" or "30 NDF".
  • subFrame - Subframe as string.
  • ERROR
  • SHUTTLE
  • * Example Usage:
  • ```lua
  • _plugins("core.midi.manager").sendMMC("CommandPost", false, "7F", "GOTO", {timecode="01:02:03:04", frameRate="25", subFrame="00"})
  • ```

setItem

Signature plugins.core.midi.manager.setItem(item, button, group, value) -> none
Type Function
Description Stores a MIDI item in Preferences.
Parameters
  • item - The item you want to set.
  • button - Button ID as string
  • group - Group ID as string
  • value - The value of the item you want to set.
Returns
  • None

start

Signature plugins.core.midi.manager.start() -> boolean
Type Function
Description Stops the MIDI Plugin
Parameters
  • None
Returns
  • None

update

Signature plugins.core.midi.manager.update() -> none
Type Function
Description Updates the MIDI Watchers.
Parameters
  • None
Returns
  • None

updateAction

Signature plugins.core.midi.manager.updateAction(button, group, actionTitle, handlerID, action) -> none
Type Function
Description Updates a MIDI action.
Parameters
  • button - Button ID as string
  • group - Group ID as string
  • actionTitle - Action Title as string
  • handlerID - Handler ID as string
  • action - Action in a table
Returns
  • None

virtualDevices

Signature plugins.core.midi.manager.virtualDevices() -> table
Type Function
Description Gets a table of Virtual MIDI Source Names.
Parameters
  • None
Returns
  • A table of Virtual MIDI Source Names.

Fields

buttons

Signature plugins.core.midi.manager.buttons <cp.prop: table>
Type Field
Description Contains all the saved MIDI items

enabled

Signature plugins.core.midi.manager.enabled <cp.prop: boolean>
Type Field
Description Enable or disable MIDI Support.

listenMMC

Signature plugins.core.midi.manager.listenMMC <cp.prop: boolean>
Type Field
Description Enable or disable Listen MMC Support.

listenMMCDevice

Signature plugins.core.midi.manager.listenMMCDevice <cp.prop: string>
Type Field
Description MIDI Device

listenMTC

Signature plugins.core.midi.manager.listenMTC <cp.prop: boolean>
Type Field
Description Enable or disable Listen MTC Support.

listenMTCDevice

Signature plugins.core.midi.manager.listenMTCDevice <cp.prop: string>
Type Field
Description MIDI Device

transmitMMC

Signature plugins.core.midi.manager.transmitMMC <cp.prop: boolean>
Type Field
Description Enable or disable Transmit MMC Support.

transmitMMCDevice

Signature plugins.core.midi.manager.transmitMMCDevice <cp.prop: string>
Type Field
Description MIDI Device

transmitMTC

Signature plugins.core.midi.manager.transmitMTC <cp.prop: boolean>
Type Field
Description Enable or disable Transmit MTC Support.

transmitMTCDevice

Signature plugins.core.midi.manager.transmitMTCDevice <cp.prop: string>
Type Field
Description MIDI Device

results matching ""

    No results matching ""