Copyright © 2005-2019 MultiMedia Soft

MIDI.TempoPercSet method

Previous pageReturn to chapter overviewNext page

Remarks

 

Modifies the tempo of the playing MIDI stream. The current tempo can be obtained through the MIDI.TempoPercGet method. By modifying the tempo of the playing MIDI stream, the number of Beats Per Minute (BPM) will be affected accordingly.

 

For further details about the use of MIDI protocol see the MIDIMan class section and the How to deal with MIDI protocol tutorial.

 

 

Syntax

 

[Visual Basic]

Public Function TempoPercSet (

nPlayerIndex as Int16,

fPercentage as Single

) as enumErrorCodes


 

[C#]

public enumErrorCodes TempoPercSet (

Int16 nPlayerIndex,

float fPercentage

);


 

[C++]

public: enumErrorCodes TempoPercSet (

Int16 nPlayerIndex,

float fPercentage

);


 

 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

fPercentage

The tempo variation expressed in percentage.

Can assume negative values to slow down the playback tempo or positive values to accelerate the playback tempo.

Setting this parameter to 0 will set the original tempo of the loaded MIDI stream.

 

 

Return value

 

Value

Meaning

 

 

Negative value

An error occurred (see the LastError property for further error details)

enumErrorCodes.NOERROR (0)

The method call was successful.