Copyright © 2001-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]

control.TracksBoard.ItemDurationStretch (

nUniqueId as Long,

nDurationMs as Long

) as enumErrorCodes


 

[C++]

short control.TracksBoard.ItemDurationStretch (

long nUniqueId,

long 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, check the LastError property value in order to get the error code

enumErrorCodes.ERR_NOERROR (0)

The method call was successful