MIDI.TriggerSetPos method |
|
oveRemarks
Modifies the current position for the given trigger.
Triggers positioning is always referred to the original sound duration, meaning that it won't keep count of eventual tempo and/or playback rate changes and will always refer to the position of the song as it should be played at its original speed.
This method is mostly identical to the basic TriggerSetPos method but allows specifying the position in MIDI ticks also and can only be used with MIDI streams.
For further details about the use of MIDI protocol see the MIDI object section and the How to deal with MIDI protocol tutorial.
See the How to add Triggers and Cue Points to a player section for further details about triggers.
Syntax
[Visual Basic] control.MIDI.TriggerSetPos ( nPlayer as Integer, nTriggerID as Integer, fPosition as Double, nPositionUnit as enumMidiPositionUnits ) as enumErrorCodes |
[C++] short control.MIDI.TriggerSetPos ( short nPlayer, short nTriggerID, double fPosition, short nPositionUnit ); |
Parameter |
Description |
||||||||||||
|
|
||||||||||||
nPlayer |
Number representing the zero-based index of the involved player |
||||||||||||
nTriggerID |
Number representing the identifier of the trigger to modify. |
||||||||||||
fPosition |
Number representing the position to reach; its value depends upon the value of the nPositionUnit parameter below. |
||||||||||||
nPositionUnit |
The unit of measure used for the position value stored inside fPosition parameter above. Supported values are the following:
|
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 |