Copyright © 2005-2023 MultiMedia Soft

TracksBoard.ItemVolumeFadingSetEx method

Previous pageReturn to chapter overviewNext page

Remarks

 

Modifies parameters of the requested volume fading that will be applied to the given item.

The volume fading implemented by this method applies to the beginning (fade-in) or to the end (fade-out) of the sound file's audio stream and only for sound files items (doesn't apply to Text-To-Speech items).

 

Current parameters of a specific volume fading can be obtained through the TracksBoard.ItemVolumeFadingGet method.

A specific volume fading can be removed through the TracksBoard.ItemVolumeFadingRemove method.

 

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

 

 

Syntax

 

[Visual Basic]

Public Function ItemVolumeFadingSetEx (

nUniqueId as Int32,

bFadeIn as Boolean,

nFadeLengthMs as Int32,

nCurveType as enumVolumeCurves,

nLeftX as Int32,

nLeftY as Int32,

nRightX as Int32,

nRightY as Int32,

bAutoRefresh as Boolean

) as enumErrorCodes


 

[C#]

public enumErrorCodes ItemVolumeFadingSetEx (

Int32 nUniqueId,

bool bFadeIn,

Int32 nFadeLengthMs,

enumVolumeCurves nCurveType,

Int32 nLeftX,

Int32 nLeftY,

Int32 nRightX,

Int32 nRightY,

bool bAutoRefresh

);


 

[C++]

public: enumErrorCodes ItemVolumeFadingSetEx (

Int32 nUniqueId,

bool bFadeIn,

Int32 nFadeLengthMs,

enumVolumeCurves nCurveType,

Int32 nLeftX,

Int32 nLeftY,

Int32 nRightX,

Int32 nRightY,

bool bAutoRefresh

);


 

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 sound file item has been cloned

bFadeIn

Boolean value specifying if the fading is a fade-in or a fade-out.

Supported values are the following:

Mnemonic Value

Meaning

false

This is a fade-out

true

This is a fade-in

nFadeLengthMs

Length of the fade expressed in milliseconds

nCurveType

Type of curve applied to perform the volume fading..

Supported values are the following:

Mnemonic constant

Value

Meaning

 

 

 

VOLUME_CURVE_NONE

0

No curve is applied: volume will be changed immediately and will be kept till next volume point.

VOLUME_CURVE_LINEAR

1

Linear curve

VOLUME_CURVE_EXPONENTIAL

2

Exponential curve

VOLUME_CURVE_COSINE

3

Cosine curve

VOLUME_CURVE_SMOOTH

4

Smooth curve

VOLUME_CURVE_CUSTOM

5

Custom Bézier curve.

 

The custom curve designer manages a windowed control, whose visual aspect can be defined programmatically, which allows designing volume curves based upon Bézier curves whose shape is defined through the manual positioning of 2 control points (displayed in cyan color on the graphic below). For further information about the use of the embedded CurveDesigner refer to the tutorial How to create custom volume curves.

 

nLeftX

Horizontal position, expressed in percentage, of the left control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

nLeftY

Vertical position, expressed in percentage, of the left control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

nRightX

Horizontal position, expressed in percentage, of the right control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

nRightY

Vertical position, expressed in percentage, of the right control point of the Bézier curve.

This parameter is ignored when the nCurveType parameter is set to a value different from VOLUME_CURVE_CUSTOM.

bAutoRefresh

Boolean value indicating if the modification should be applied immediately.

Supported values are the following:

Value

Meaning

false

The modification is not applied immediately and waits for the call to the TracksBoard.ItemCompose method

true

The modification is applied immediately

 

 

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.