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

The front-end music: the tracks of the current menu song and the mixes that switch them on and off on the bar. More...

#include <mix.h>

Public Member Functions

 Mix ()
 Build the music with no tracks and no mix.
 ~Mix ()
 Stop the tracks and release them.
void AddTrack (Muse *pMuse, unsigned char nChannel, const String &name)
 Add a track under a name.
void SetMixTracks (int nMix, const std::vector< String > &names)
 Set the names of the tracks of a mix.
void ChangeMix (int nMix)
 Switch to a mix with a fade of music_fade_ticks.
void SwitchMix (int nMix, int nFadeTicks)
 Switch to a mix unless it already plays, fading out the tracks of the current mix.
void EnterTube ()
 Start the sound effect of the tube the camera flies through.
void ExitTube (bool bSpeedingUp)
 Stop the sound effect of the tube.
void Start (int nMix)
 Start the music at the last bar of the front-end clock with a mix, at full volume.
void StopTracks ()
 Withdraw the scheduled stop and stop every track at once.
void FadeOutMix (int nMix, int nFadeTicks)
 Fade out the tracks of a mix.
void FadeInMix (int nMix, int nFadeTicks)
 Fade in the tracks of a mix at the current position of the loop.
void Stop ()
 Fade every track out over one bar and stop the music after it.

Static Public Attributes

static constexpr int kNumMixes = 10
 The number of mixes of a menu song.
static constexpr int kNoMix = -1
 The value of mMix before any mix plays.

Detailed Description

The front-end music: the tracks of the current menu song and the mixes that switch them on and off on the bar.

The RTTI includes the class name in the command MemFunCommand that calls StopTracks(). The class is not polymorphic. The object is 0x34 bytes. Metagame builds one for each visit to the front end, and MetaMusicSong adds the tracks. A mix is a set of track names, and switching mixes fades out the tracks of the old mix and fades in the tracks of the new one, in step with the loop.

Constructor & Destructor Documentation

◆ Mix()

Mix::Mix ( )

Build the music with no tracks and no mix.

The music_bars and music_fade_ticks entries of the metagame configuration give the length of the loop and of a fade.

Ghidra address:
NTSC-U/C: 0x00169380
Ghidra address:
PAL: 0x0016c508

◆ ~Mix()

Mix::~Mix ( )

Stop the tracks and release them.

Ghidra address:
NTSC-U/C: 0x00169698
Ghidra address:
PAL: 0x0016c820

Member Function Documentation

◆ AddTrack()

void Mix::AddTrack ( Muse * pMuse,
unsigned char nChannel,
const String & name )

Add a track under a name.

Parameters
pMuseThe music of the track.
nChannelThe MIDI channel of the music.
nameThe name the mixes use.
Ghidra address:
NTSC-U/C: 0x00169868
Ghidra address:
PAL: 0x0016c9f0

◆ SetMixTracks()

void Mix::SetMixTracks ( int nMix,
const std::vector< String > & names )

Set the names of the tracks of a mix.

Parameters
nMixThe mix.
namesThe names.
Ghidra address:
NTSC-U/C: 0x00169998
Ghidra address:
PAL: 0x0016cb20

◆ ChangeMix()

void Mix::ChangeMix ( int nMix)

Switch to a mix with a fade of music_fade_ticks.

Parameters
nMixThe mix, an index of the mix entry of the menu song.
Ghidra address:
NTSC-U/C: 0x001699c0
Ghidra address:
PAL: 0x0016cb48

◆ SwitchMix()

void Mix::SwitchMix ( int nMix,
int nFadeTicks )

Switch to a mix unless it already plays, fading out the tracks of the current mix.

Parameters
nMixThe mix, an index of the mix entry of the menu song.
nFadeTicksThe ticks the fades last.
Ghidra address:
NTSC-U/C: 0x001699e0
Ghidra address:
PAL: 0x0016cb68

◆ EnterTube()

void Mix::EnterTube ( )

Start the sound effect of the tube the camera flies through.

Ghidra address:
NTSC-U/C: 0x00169a48
Ghidra address:
PAL: 0x0016cbd0

◆ ExitTube()

void Mix::ExitTube ( bool bSpeedingUp)

Stop the sound effect of the tube.

Parameters
bSpeedingUpWhether the front end runs faster than real time. The body does not read it.
Ghidra address:
NTSC-U/C: 0x00169af0
Ghidra address:
PAL: 0x0016cc78

◆ Start()

void Mix::Start ( int nMix)

Start the music at the last bar of the front-end clock with a mix, at full volume.

Parameters
nMixThe mix, an index of the mix entry of the menu song.
Ghidra address:
NTSC-U/C: 0x00169b98
Ghidra address:
PAL: 0x0016cd20

◆ StopTracks()

void Mix::StopTracks ( )

Withdraw the scheduled stop and stop every track at once.

Ghidra address:
NTSC-U/C: 0x00169c48
Ghidra address:
PAL: 0x0016cdd0

◆ FadeOutMix()

void Mix::FadeOutMix ( int nMix,
int nFadeTicks )

Fade out the tracks of a mix.

Parameters
nMixThe mix.
nFadeTicksThe ticks the fades last.
Ghidra address:
NTSC-U/C: 0x00169ce0
Ghidra address:
PAL: 0x0016ce68

◆ FadeInMix()

void Mix::FadeInMix ( int nMix,
int nFadeTicks )

Fade in the tracks of a mix at the current position of the loop.

Parameters
nMixThe mix.
nFadeTicksThe ticks the fades last.
Ghidra address:
NTSC-U/C: 0x00169e68
Ghidra address:
PAL: 0x0016cff0

◆ Stop()

void Mix::Stop ( )

Fade every track out over one bar and stop the music after it.

Ghidra address:
NTSC-U/C: 0x0016a028
Ghidra address:
PAL: 0x0016d1b0

Member Data Documentation

◆ kNumMixes

int Mix::kNumMixes = 10
staticconstexpr

The number of mixes of a menu song.

◆ kNoMix

int Mix::kNoMix = -1
staticconstexpr

The value of mMix before any mix plays.


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