new DHCmsg( source, cmd [, type [, xtNum [, velocity [, ctrlNum [, piper [, panic [, tsnap ] ] ] ] ] ] ] )

Description

DHC Message class

Parameters
Name Type Attributes Default Description
source string

Name of the App component that generated the message

cmd 'init' | 'panic' | 'update' | 'tone-on' | 'tone-off'

Command code of the message

type tonetype <optional>
false

The tone typeto which the message is directed; FT or HT

xtNum xtnum <optional>
false

The FT or HT number

velocity velocity <optional>
false

The intensity of the sound to be generated in MIDI velocity format.

If the cmd is 'tone-on' , the values must be from 1 to 127.

If the cmd is 'tone-off' , the values must be from 0 to 127.

ctrlNum midinnum <optional>
false

The MIDI Note Number corresponding to the FT or HT on the keymap (if present).

If it is not provided, the Apps that need this information should ignore the message.

piper boolean <optional>
false

If the message is generated by the Piper feature

panic boolean <optional>
false

Only in case of cmd 'note-off', it tells that the message has been generated by a "hard" All-Notes-Off request.

tsnap boolean <optional>
false

If the message has been converted by the Tone-Snap receiving mode.

If true, the ctrlNum may not be the same as the MIDI Note Number pressed on the controller.

Properties
Name Type Description
#source string

Name of the App component that generated the message

#cmd 'init' | 'panic' | 'update' | 'tone-on' | 'tone-off'

Command code of the message

#type tonetype

The tone typeto which the message is directed; FT or HT

#xtNum xtnum

The FT or HT number

#velocity velocity

The intensity of the sound to be generated in MIDI velocity format

#ctrlNum midinnum

The MIDI Note Number corresponding to the FT or HT on the keymap (if present)

#piper boolean

If the message is generated by the Piper feature

#panic boolean

Only in case of cmd 'note-off', it tells that the message has been generated by a "hard" All-Notes-Off request

#tsnap boolean

If the message has been converted by the Tone-Snap receiving mode

Details

Methods


<static> init( source ) → {Array.<number>}

Description

Create a new 'init' DHCmsg

Parameters
Name Type Description
source string

Name of the App component that generated the message

Returns
  • A new instance of DHCmsg
Details

<static> allNotesOff( source ) → {Array.<number>}

Description

Create a new 'panic' DHCmsg

Parameters
Name Type Description
source string

Name of the App component that generated the message

Returns
  • A new instance of DHCmsg
Details

<static> ftUpd( source ) → {Array.<number>}

Description

Create a new 'update FT' DHCmsg

Parameters
Name Type Description
source string

Name of the App component that generated the message

Returns
  • A new instance of DHCmsg
Details

<static> htUpd( source ) → {Array.<number>}

Description

Create a new 'update HT' DHCmsg

Parameters
Name Type Description
source string

Name of the App component that generated the message

Returns
  • A new instance of DHCmsg
Details

<static> ctrlmapUpd( source ) → {Array.<number>}

Description

Create a new 'update Controller Keymap' DHCmsg

Parameters
Name Type Description
source string

Name of the App component that generated the message

Returns
  • A new instance of DHCmsg
Details

<static> ftON( source, xtNum, velocity [, ctrlNum [, tsnap ] ] ) → {Array.<number>}

Description

Create a new 'FT Note-ON' DHCmsg

Parameters
Name Type Attributes Default Description
source string

Name of the App component that generated the message

xtNum xtnum

The FT number

velocity velocity

The intensity of the sound to be generated in MIDI velocity format, from 1 to 127.

ctrlNum midinnum <optional>
false

The MIDI Note Number corresponding to the FT on the keymap (if present)

tsnap boolean <optional>
false

If the message has been converted by the Tone-Snap receiving mode

Returns
  • A new instance of DHCmsg
Details

<static> htON( source, xtNum, velocity [, ctrlNum [, piper [, tsnap ] ] ] ) → {Array.<number>}

Description

Create a new 'HT Note-ON' DHCmsg

Parameters
Name Type Attributes Default Description
source string

Name of the App component that generated the message

xtNum xtnum

The HT number

velocity velocity

The intensity of the sound to be generated in MIDI velocity format, from 1 to 127.

ctrlNum midinnum <optional>
false

The MIDI Note Number corresponding to the HT on the keymap (if present)

piper boolean <optional>
false

If the message is generated by the Piper feature

tsnap boolean <optional>
false

If the message has been converted by the Tone-Snap receiving mode

Returns
  • A new instance of DHCmsg
Details

<static> ftOFF( source, xtNum [, velocity [, ctrlNum [, panic ] ] ] ) → {Array.<number>}

Description

Create a new 'FT Note-OFF' DHCmsg

Parameters
Name Type Attributes Default Description
source string

Name of the App component that generated the message

xtNum xtnum

The FT number

velocity velocity <optional>
false

The intensity of the sound to be generated in MIDI velocity format, from 1 to 127.

ctrlNum midinnum <optional>
false

The MIDI Note Number corresponding to the FT on the keymap (if present)

panic boolean <optional>
false

If true, it tells that the message has been generated by a "hard" All-Notes-Off request.

Returns
  • A new instance of DHCmsg
Details

<static> htOFF( source, xtNum [, velocity [, ctrlNum [, panic ] ] ] ) → {Array.<number>}

Description

Create a new 'HT Note-OFF' DHCmsg

Parameters
Name Type Attributes Default Description
source string

Name of the App component that generated the message

xtNum xtnum

The HT number

velocity velocity <optional>
false

The intensity of the sound to be generated in MIDI velocity format, from 1 to 127.

ctrlNum midinnum <optional>
false

The MIDI Note Number corresponding to the HT on the keymap (if present)

panic boolean <optional>
false

If true, it tells that the message has been generated by a "hard" All-Notes-Off request.

Returns
  • A new instance of DHCmsg
Details

<static> copyOFF( dhcMsg ) → {Array.<number>}

Description

Create a copy of a 'Note-OFF' DHCmsg

Parameters
Name Type Description
dhcMsg HUM.DHCmsg

The original DHCmsg to be copied

Returns
  • A copy of the original DHCmsg
Details