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]

MidiDevices.MidiDjConsole.ProfileLedMidiCommandSet (

strItemName as String,

nMidiCommandOn as Int16,

nMidiCommandOff as Int16,

nMidiCommandBlink as Int16,

nMidiChannel as Int16,

nMidiDataOn as Int16,

nMidiDataOff as Int16,

nMidiDataBlink as Int16

) as enumDjcErrorCodes


 

[C#]

public enumDjcErrorCodes MidiDjConsole.ProfileLedMidiCommandSet (

string strItemName,

Int16 nMidiCommandOn,

Int16 nMidiCommandOff,

Int16 nMidiCommandBlink,

Int16 nMidiChannel,

Int16 nMidiDataOn,

Int16 nMidiDataOff,

Int16 nMidiDataBlink

);


 

[C++]

public: enumDjcErrorCodes MidiDjConsole.ProfileLedMidiCommandSet (

string strItemName,

Int16 nMidiCommandOn,

Int16 nMidiCommandOff,

Int16 nMidiCommandBlink,

Int16 nMidiChannel,

Int16 nMidiDataOn,

Int16 nMidiDataOff,

Int16 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 see the last error.

enumDjcErrorCodes.ERR_DJC_NOERROR (0)

The method call was successful.