MidiDjConsole.ProfileButtonMidiCommandSet method |
|
Remarks
Sets parameters of the short MIDI command specific for a button item stored inside the profile. Current parameters of the short MIDI command can be obtained through the MidiDjConsole.ProfileButtonMidiCommandGet method.
A short command is sent to the instance of the component by the DJ Console when a physical push button is pressed or released 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), 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 button of the DJ console and, in some case, its pressed/released 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.ProfileButtonMidiCommandSet ( strItemName as String, nMidiCommandPressed as Integer, nMidiCommandReleased as Integer, nMidiChannel as Integer, nMidiDataPressed as Integer, nMidiDataReleased as Integer ) as enumDjcErrorCodes |
[C++] short control.MidiDjConsole.ProfileButtonMidiCommandSet ( BSTR strItemName, short nMidiCommandPressed, short nMidiCommandReleased, short nMidiChannel, short nMidiDataPressed, short nMidiDataReleased ); |
Parameter |
Description |
|
|
strItemName |
String containing the name of the push button item. If no push button item with this specific name should be available inside the profile, the method would fail and would return an error code. |
nMidiCommandPressed |
The number representing the MIDI command issued when the physical button is pressed. |
nMidiCommandReleased |
The number representing the MIDI command issued when the physical button is released: in some case this value could be identical to the value of the nMidiCommandPressed parameter in which case the pressed/released status would be identified by different values of the nMidiDataPressed and nMidiDataReleased parameters below. |
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. |
nMidiDataPressed |
The number representing the "Data" parameter of the MIDI command issued when the physical button is pressed. The "Data" parameter is a 16 bits integer value which combines 2 bytes ("Data1" and "Data2") which usually indicate the code of the pressed button and its status (pressed/released). Separate values of the "Data1" and "Data2" bytes can be extracted from this parameter using custom functions and/or macros. |
nMidiDataReleased |
The number representing the "Data" parameter of the MIDI command issued when the physical button is released. As mentioned above, the "Data" parameter is a 16 bits integer value which combines 2 bytes ("Data1" and "Data2") which usually indicate the code of the pressed button and its status (pressed/released): in some case this value could be identical to the value of the nMidiDataPressed parameter in which case the pressed/released status would be identified by different values of the nMidiCommandPressed and nMidiCommandReleased 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. |
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 |