Copyright © 2005-2018 MultiMedia Soft

Effects.PhaserApply method

Previous pageReturn to chapter overviewNext page

Remarks

 

Applies a phaser effect on the playing song. This DSP effect can be reset through the Effects.PhaserReset method.

 

Phasers use an internal low frequency oscillator to automatically move notches in the frequency response up and down the frequency spectrum. An important difference between phasing and flanging is that phasers space these notches evenly across the frequency spectrum, while the notches in flanging and chorus are harmonically (musically) related. You don't hear the notches as such (because they are the frequencies that are removed). What you hear is the resulting frequency peaks between these notches. Phasing works by mixing the original signal with one that is phase shifted over the frequency spectrum. For example, a four stage phaser signal (such as this) could be from 0 degrees at 100Hz, shifted to 720 degrees at 5Khz (these extremes are not quite possible practically, but are near enough to explain the effect). This is how the term phase shifter comes about. A 4 stage phaser has 2 notches with bass response, a central peak, and treble response. By using resonance to enhance the central peak, you can get a sound similar to an automatic wah. Using a phaser with lots of stages and setting the resonance high can give a sound similar to flanging, although they are really quite different.

 

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

 

 

Syntax

 

[Visual Basic]

Public Function PhaserApply (

nPlayerIndex as Int16,

nAffectedChannel as enumChannelMasks,

fDryMix as Single,

fWetMix as Single,

fFeedback as Single,

fRate as Single,

fRange as Single,

fFrequency as Single,

nPriority as Int16

) as enumErrorCodes


 

[C#]

public enumErrorCodes PhaserApply (

Int16 nPlayerIndex,

enumChannelMasks nAffectedChannel,

float fDryMix,

float fWetMix,

float fFeedback,

float fRate,

float fRange,

float fFrequency,

Int16 nPriority

);


 

[C++]

public: enumErrorCodes PhaserApply (

Int16 nPlayerIndex,

enumChannelMasks nAffectedChannel,

float fDryMix,

float fWetMix,

float fFeedback,

float fRate,

float fRange,

float fFrequency,

Int16 nPriority

);


 

 

Parameter

Description

 

 

nPlayer

Number representing the zero-based index of the involved player

nAffectedChannel

Numeric value that determines the combination of affected channels.

Supported values are the following:

Mnemonic constant

Value

Meaning

CHANNEL_MASK_0

1 (0x01)

Channel 0 or left channel

CHANNEL_MASK_1

2 (0x02)

Channel 1 or right channel

CHANNEL_MASK_2

4 (0x04)

Channel 2

CHANNEL_MASK_3

8 (0x08)

Channel 3

CHANNEL_MASK_4

16 (0x10)

Channel 4

CHANNEL_MASK_5

32 (0x20)

Channel 5

CHANNEL_MASK_6

64 (0x40)

Channel 6

CHANNEL_MASK_7

128 (0x80)

Channel 7

CHANNEL_MASK_LEFTS

85 (0x55)

All left channels

CHANNEL_MASK_RIGHTS

170 (0xAA)

All right channels

CHANNEL_MASK_ALL

255 (0xFF)

All available channels

fDryMix

Numeric value representing the Dry (unaffected) signal mix.

Supported values are in the range from -2 to +2.

fWetMix

Numeric value representing the Wet (affected) signal mix.

Supported values are in the range from -2 to +2.

fFeedback

Numeric value representing the output signal to feed back into input.

Supported values are in the range from -1 to +1.

fRate

Numeric value representing the rate of sweep expressed in cycles per second.

Supported values are in the range from 0 to 10.

fRange

Numeric value representing the sweep range expressed in octaves.

Supported values are in the range from 0 to 10.

fFrequency

Numeric value representing the base frequency of sweep range.

Supported values are in the range from 0 to 1000.

nPriority

Effect's priority level inside the chain of DirectX effects, custom DSP effects and VST effects. Effects with higher priority are applied before effects with lower priority; in case more effects should have the same priority, they would be invoked in the same order that they were added.

 

The fDryMix is the volume of input signal and the fWetMix is the volume of delayed signal. The fFeedback sets feedback of phaser. The fRate and fRange parameters control how fast and far the frequency notches move. The fRate is the rate of sweep in cycles per second, fRange is the width of sweep in octaves. And the the fFrequency is the base frequency of sweep.

Below some sample:

 

Effect type

fDryMix

fWetMix

fFeedback

fRate

fRange

fFrequency


 

 

 

 

 

 

Phase shift

0.999

0.999

0.0

1.0

4.0

100.0

Slow invert phase shift with feedback

0.999

-0.999

-0.6

0.2

6.0

100.0

Basic phase

0.999

0.999

0.0

1.0

4.3

50.0

Phase w/ FB

0.999

0.999

0.6

1.0

4.0

40.0

Med. phase

0.999

0.999

0.0

1.0

7.0

100.0

Fast phase

0.999

0.999

0.0

1.0

7.0

400.0

Invert w/ invert FB

0.999

-0.999

-0.2

1.0

7.0

200.0

Tremolo Wah

0.999

0.999

0.6

1.0

4.0

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