Copyright © 2005-2019 MultiMedia Soft

Effects.PlaybackPitchSet 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. The current pitch can be obtained through the Effects.PlaybackPitchGet method.

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 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.

See the How to apply special effects to a playing sound section for further details.

 

 

Syntax

 

[Visual Basic]

Public Function PlaybackPitchSet (

nPlayerIndex as Int16,

fPitch as Single

) as enumErrorCodes


 

[C#]

public enumErrorCodes PlaybackPitchSet (

Int16 nPlayerIndex,

float fPitch

);


 

[C++]

public: enumErrorCodes PlaybackPitchSet (

Int16 nPlayerIndex,

float fPitch

);


 

 

Parameter

Description

 

 

nPlayerIndex

Number representing the zero-based index of the involved player

fPitch

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.NOERROR (0)

The method call was successful.