MidiDjConsole.ProfileRangeMidiCommandSet method |
|
Remarks
Sets parameters of the short MIDI command specific for a range control item (slider, rotary knob or Jog wheel) stored inside the profile. Current parameters of the short MIDI command can be obtained through the MidiDjConsole.ProfileRangeMidiCommandGet method.
A short command is sent to the instance of the component by the DJ Console when a physical range control is moved 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 "Control change" (hex B0) on the more significant 4 bits and by the MIDI channel on the less significant 4 bits. |
• | One first byte of MIDI "Data", usually indicated as "Data1", representing the code of the physical control which was moved. |
• | One second byte of MIDI "Data", usually indicated as "Data2", representing the value reported by the moved physical control. |
When setting the short MIDI command specific for a control range item, only the Data1 field is important while the Data2 field, being variable, can be ignored.
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.ProfileRangeMidiCommandSet ( strItemName as String, nMidiCommand as Int16, nMidiChannel as Int16, nMidiControlCode as Int16 ) as enumDjcErrorCodes |
[C#] public enumDjcErrorCodes MidiDjConsole.ProfileRangeMidiCommandSet ( string strItemName, Int16 nMidiCommand, Int16 nMidiChannel, Int16 nMidiControlCode ); |
[C++] public: enumDjcErrorCodes MidiDjConsole.ProfileRangeMidiCommandSet ( string strItemName, Int16 nMidiCommand, Int16 nMidiChannel, Int16 nMidiControlCode ); |
Parameter |
Description |
|
|
strItemName |
String containing the name of the range control item. If no range control item with this specific name should be available inside the profile, the method would fail and would return an error code. |
nMidiCommand |
The MIDI command issued when the range control is moved. In many cases the value of this parameter is 176 (hex B0) which indicates a "Control change" MIDI command. |
nMidiChannel |
The number representing the MIDI channel. |
nMidiControlCode |
The number representing the code (Data1 field described above) of the physical range control item (slider, rotary knob or Jog wheel). |
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. |