Copyright © 2001-2011 MultiMedia Soft

SetPitch method

Previous pageReturn to chapter overviewNext page

Remarks

 

Changes the sound pitch or key, without affecting the sound tempo or playback rate: after a successful call to this method the duration of the song is not altered.

This method doesn't work with sounds with more than 2 channels (5.1 or 7.1) or if the EnableMixingFeatures property has been set to BOOL_FALSE.

 

When dealing with video clips, calls to this method will have no effect if the video clip has not been loaded with the VideoPlayer.LoadForTempoChange, VideoPlayer.LoadFromMemoryForTempoChange, VideoPlayer.LoadFromMemorySyncForTempoChange or VideoPlayer.LoadSyncForTempoChange methods.

 

Further details about songs mixing can be found inside the How to mix your songs section.

 

 

Syntax

 

[Visual Basic]

control.SetPitch (

nPlayer as Integer,

nPitch as Integer

) as enumErrorCodes


 

[C++]

short control.SetPicth (

short nPlayer,

short nPitch

);


 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nPitch

The Pitch variation expressed in semitones; supported values are from -50 to 50.

Setting this parameter to 0 will set the original sound pitch value.

 

 

Return value

 

Value

Meaning

 

 

Negative value

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

enumErrorCodes.ERR_NOERROR (0)

The call was successful.