Copyright © 2011-2023 MultiMedia Soft

TracksBoard.ItemDurationStretch method

Previous pageReturn to chapter overviewNext page

Remarks

 

Stretches the duration of the sound item by modifying its tempo and without changing the original pitch. After the time stretch, the updated duration can be obtained through the TracksBoard.ItemDurationGet method.

 

The tempo change algorithm is always applied to the full sound file and, once the item duration has been stretched, the following capabilities are automatically disabled:

modifying the loading range of a sound item through the mouse
adding new volume points through the TracksBoard.ItemVolumePointAdd method.

 

This setting is automatically reset when the sound loading range is modified through the TracksBoard.ItemSoundFileLoadRangeSet method.

 

This setting doesn't apply to speech items created through the TracksBoard.ItemSpeechFromStringAdd and TracksBoard.ItemSpeechFromFileAdd methods.

 

 

Important note about items overlapping

 

Overlapping of two items on the same track is now allowed so, in case the new stretched duration of the item should cause an overlapping and upon space availability, the item will be automatically moved to the next track or to the previous track; if both previous and next tracks should in any case suffer an overlapping, a new track will be automatically inserted on the nearest position.

 

 

For details about the use of the TracksBoard refer to the How to use the TracksBoard to visually compose songs tutorial.

For further details about methods of the TracksBoard refer to the TracksBoard object section.

 

 

Syntax

 

[Visual Basic]

Public Function ItemDurationStretch (

nUniqueId as Int32,

nDurationMs as Int32

) as enumErrorCodes


 

[C#]

public enumErrorCodes ItemDurationStretch (

Int32 nUniqueId,

Int32 nDurationMs

);


 

[C++]

public: enumErrorCodes ItemDurationStretch (

Int32 nUniqueId,

Int32 nDurationMs

);


 

Parameter

Description

 

 

nUniqueId

Unique identification number assigned to the sound item after being generated by one of the following methods:

TracksBoard.ItemClone when an existing item has been cloned

nDurationMs

The modified duration expressed in milliseconds: the duration stretch can be removed by setting this value to 0.

 

 

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.