Copyright © 2013-2015 MultiMedia Soft

MidiDjConsole.ProfileLedMidiCommandSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Sets parameters of the short MIDI command specific for a led item stored inside the profile. Current parameters of the short MIDI command can be obtained through the MidiDjConsole.ProfileLedMidiCommandGet method.

 

A short command is sent by the instance of the component to the DJ Console when there is the need to switch a physical led on or off on the DJ Console.

The short MIDI command is composed of 3 bytes combining 4 elements:

 

One byte composed by the code of the MIDI Command, typically a "Note On" (hex 90) or a "Note off" (hex 80) or a "Control change" (hex B0), on the more significant 4 bits and by the MIDI channel on the less significant 4 bits.
Two bytes of MIDI "Data": the combinations of these 2 bytes usually indicates the physical led of the DJ console and, in some case, its on/off status.

 

The combination of MIDI command parameters is usually defined inside the technical specifications of the physical DJ Console and may vary a lot depending upon the DJ Console in use.

 

For further details about interfacing with MIDI DJ Consoles see the MidiDjConsole object section and the How to manage MIDI DJ consoles tutorial.

 

 

Syntax

 

[Visual Basic]

control.MidiDjConsole.ProfileLedMidiCommandSet (

strItemName as String,

nMidiCommandOn as Integer,

nMidiCommandOff as Integer,

nMidiCommandBlink as Integer,

nMidiChannel as Integer,

nMidiDataOn as Integer,

nMidiDataOff as Integer,

nMidiDataBlink as Integer

) as enumDjcErrorCodes


 

[C++]

short control.MidiDjConsole.ProfileLedMidiCommandSet (

BSTR strItemName,

short nMidiCommandOn,

short nMidiCommandOff,

short nMidiCommandBlink,

short nMidiChannel,

short nMidiDataOn,

short nMidiDataOff,

short nMidiDataBlink

);


 

Parameter

Description

 

 

strItemName

String containing the name of the led item.

If no led item with this specific name should be available inside the profile, the method would fail and would return an error code.

nMidiCommandOn

The number representing the MIDI command issued when the physical led needs to be switched on.

nMidiCommandOff

The number representing the MIDI command issued when the physical led needs to be switched off: in some case this value could be identical to the value  of the nMidiCommandOn parameter in which case the on/off status would be identified by different values of the nMidiDataOn and nMidiDataOff parameters below.

nMidiCommandBlink

The number representing the MIDI command issued when the physical led needs to blink.

Only intended for usage with DJ Consoles supporting blink natively, set this parameter to 0 for other DJ Consoles.

nMidiChannel

The number representing the MIDI channel.

Some DJ Console makes use of this parameter in order to discriminate between the DJ Console's decks, in other cases it's simply left to 0.

nMidiDataOn

The number representing the "Data" parameter of the MIDI command issued when the physical led needs to be switched on.

The "Data" parameter is a 16 bits integer value which combines 2 bytes ("Data1" and "Data2") which usually indicates the code of the led and its status (on/off).

Separate values of the "Data1" and "Data2" bytes can be extracted from this parameter using custom functions and/or macros.

nMidiDataOff

The number representing the "Data" parameter of the MIDI command issued when the physical led needs to be switched off.

As mentioned above, the "Data" parameter is a 16 bits integer value which combines 2 bytes ("Data1" and "Data2") which usually indicates the code of the led and its status (on/off): in some case this value could be identical to the value of the nMidiDataOn parameter in which case the on/off status would be identified by different values of the nMidiCommandOn and nMidiCommandOff parameters above.

Separate values of the "Data1" and "Data2" bytes can be combined in one single 16 bits integer value using custom functions and/or macros.

nMidiDataBlink

The number representing the "Data" parameter of the MIDI command issued when the physical led needs to be blinked.

Only intended for usage with DJ Consoles supporting blink natively, set this parameter to 0 for other DJ Consoles.

As mentioned above, the "Data" parameter is a 16 bits integer value which combines 2 bytes ("Data1" and "Data2") which usually indicates the code of the led and its status (on/off/blink).

Separate values of the "Data1" and "Data2" bytes can be combined in one single 16 bits integer value using custom functions and/or macros.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful