wavelength 1.0.0
Loading...
Searching...
No Matches
FXMgr Class Reference

The effect sets a song applies to the synthesiser channels at given bars. More...

#include <fxmgr.h>

Classes

struct  FX
 The effects of one channel in a set. More...
struct  FXSet
 One set of effects and the bar it applies at. More...

Public Member Functions

 FXMgr (int nNumChannels, int nChorusDepth)
 Construct the manager with one set, at bar 0, of no effects.
 ~FXMgr ()
 Release the sets.
void Activate ()
 Start applying the effects, beginning with the current set.
void Reset ()
 Stop applying the effects and remove them from every channel.
void AddSet (int nBar)
 Append a set of no effects.
void ApplySet (int nSet)
 Make a set current, and apply it to the channels while the manager is active.
int GetNumSets () const
 Report the number of sets.
int GetCurrentSet () const
 Report the current set.
void CopySet (int nFrom, int nTo)
 Copy the effects of one set to another.
int GetSetBar (int nSet) const
 Report the bar a set applies at.
void SetStutter (int nSet, int nChannel, int nStutter)
 Set the stutter of a channel in a set, and apply it at once when the set is current.
void SetFilter (int nSet, int nChannel, int nFilter)
 Set the filter of a channel in a set, and apply it at once when the set is current.
void SetChorus (int nSet, int nChannel, int nChorus)
 Set the chorus of a channel in a set, and apply it at once when the set is current.
int GetStutter (int nSet, int nChannel) const
 Report the stutter of a channel in a set.
int GetFilter (int nSet, int nChannel) const
 Report the filter of a channel in a set.
int GetChorus (int nSet, int nChannel) const
 Report the chorus of a channel in a set.
void Load (BinStream &stream)
 Replace the sets with the sets Save() writes, and make the first set current.
void Save (BinStream &stream) const
 Write the number of sets in one byte, then for each set the bar in four bytes of the console's byte order and one byte for each effect of each channel.

Detailed Description

The effect sets a song applies to the synthesiser channels at given bars.

The RTTI includes the nested FXMgr::FX and FXMgr::FXSet. The class is not polymorphic. Each set has one FX for each channel. While the manager is active, the current set drives the stutter gate, the filter controllers, and the chorus controllers of every channel.

Constructor & Destructor Documentation

◆ FXMgr()

FXMgr::FXMgr ( int nNumChannels,
int nChorusDepth )

Construct the manager with one set, at bar 0, of no effects.

The name is inferred.

Parameters
nNumChannelsThe channels.
nChorusDepthThe value of the second chorus controller while the chorus is on.
Ghidra address:
NTSC-U/C: 0x0014fcf0
Ghidra address:
PAL: 0x00151650

◆ ~FXMgr()

FXMgr::~FXMgr ( )

Release the sets.

Ghidra address:
NTSC-U/C: 0x0014fd40
Ghidra address:
PAL: 0x001516a0

Member Function Documentation

◆ Activate()

void FXMgr::Activate ( )

Start applying the effects, beginning with the current set.

Ghidra address:
NTSC-U/C: 0x0014fe70
Ghidra address:
PAL: 0x001517d0

◆ Reset()

void FXMgr::Reset ( )

Stop applying the effects and remove them from every channel.

Ghidra address:
NTSC-U/C: 0x0014fe98
Ghidra address:
PAL: 0x001517f8

◆ AddSet()

void FXMgr::AddSet ( int nBar)

Append a set of no effects.

The name is inferred.

Parameters
nBarThe bar the set applies at.
Ghidra address:
NTSC-U/C: 0x0014ff18
Ghidra address:
PAL: 0x00151878

◆ ApplySet()

void FXMgr::ApplySet ( int nSet)

Make a set current, and apply it to the channels while the manager is active.

Parameters
nSetThe set.
Ghidra address:
NTSC-U/C: 0x00150270
Ghidra address:
PAL: 0x00151bd0

◆ GetNumSets()

int FXMgr::GetNumSets ( ) const

Report the number of sets.

Returns
The number of sets.
Ghidra address:
NTSC-U/C: 0x00150330
Ghidra address:
PAL: 0x00151c90

◆ GetCurrentSet()

int FXMgr::GetCurrentSet ( ) const

Report the current set.

The name is inferred.

Returns
The set.
Ghidra address:
NTSC-U/C: 0x00150350
Ghidra address:
PAL: 0x00151cb0

◆ CopySet()

void FXMgr::CopySet ( int nFrom,
int nTo )

Copy the effects of one set to another.

The name is inferred.

Parameters
nFromThe set to copy.
nToThe set to replace.
Ghidra address:
NTSC-U/C: 0x00150358
Ghidra address:
PAL: 0x00151cb8

◆ GetSetBar()

int FXMgr::GetSetBar ( int nSet) const

Report the bar a set applies at.

Parameters
nSetThe set.
Returns
The bar.
Ghidra address:
NTSC-U/C: 0x00150390
Ghidra address:
PAL: 0x00151cf0

◆ SetStutter()

void FXMgr::SetStutter ( int nSet,
int nChannel,
int nStutter )

Set the stutter of a channel in a set, and apply it at once when the set is current.

The name is inferred.

Parameters
nSetThe set.
nChannelThe channel.
nStutterWhether the stutter gate holds the channel.
Ghidra address:
NTSC-U/C: 0x001503a8
Ghidra address:
PAL: 0x00151d08

◆ SetFilter()

void FXMgr::SetFilter ( int nSet,
int nChannel,
int nFilter )

Set the filter of a channel in a set, and apply it at once when the set is current.

The name is inferred.

Parameters
nSetThe set.
nChannelThe channel.
nFilterThe value of the filter controllers.
Ghidra address:
NTSC-U/C: 0x00150408
Ghidra address:
PAL: 0x00151d68

◆ SetChorus()

void FXMgr::SetChorus ( int nSet,
int nChannel,
int nChorus )

Set the chorus of a channel in a set, and apply it at once when the set is current.

The name is inferred.

Parameters
nSetThe set.
nChannelThe channel.
nChorusWhether the chorus controllers are on.
Ghidra address:
NTSC-U/C: 0x00150468
Ghidra address:
PAL: 0x00151dc8

◆ GetStutter()

int FXMgr::GetStutter ( int nSet,
int nChannel ) const

Report the stutter of a channel in a set.

The name is inferred.

Parameters
nSetThe set.
nChannelThe channel.
Returns
Whether the stutter gate holds the channel.
Ghidra address:
NTSC-U/C: 0x001504c8
Ghidra address:
PAL: 0x00151e28

◆ GetFilter()

int FXMgr::GetFilter ( int nSet,
int nChannel ) const

Report the filter of a channel in a set.

The name is inferred.

Parameters
nSetThe set.
nChannelThe channel.
Returns
The value of the filter controllers.
Ghidra address:
NTSC-U/C: 0x001504f0
Ghidra address:
PAL: 0x00151e50

◆ GetChorus()

int FXMgr::GetChorus ( int nSet,
int nChannel ) const

Report the chorus of a channel in a set.

The name is inferred.

Parameters
nSetThe set.
nChannelThe channel.
Returns
Whether the chorus controllers are on.
Ghidra address:
NTSC-U/C: 0x00150518
Ghidra address:
PAL: 0x00151e78

◆ Load()

void FXMgr::Load ( BinStream & stream)

Replace the sets with the sets Save() writes, and make the first set current.

Each effect reads back as 1 when its byte is not zero.

Parameters
streamThe stream to read from.
Ghidra address:
NTSC-U/C: 0x00150540
Ghidra address:
PAL: 0x00151ea0

◆ Save()

void FXMgr::Save ( BinStream & stream) const

Write the number of sets in one byte, then for each set the bar in four bytes of the console's byte order and one byte for each effect of each channel.

Parameters
streamThe stream to write to.
Ghidra address:
NTSC-U/C: 0x00150a80
Ghidra address:
PAL: 0x00152398

The documentation for this class was generated from the following file: