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

Track of a remixed song whose gems players place, each gem playing the riff of its gem button. More...

#include <pitchtrack.h>

Inheritance diagram for PitchTrack:
Collaboration diagram for PitchTrack:

Public Member Functions

 PitchTrack (int nTrack, int nLeadInBars, int nNumBars, int nTicksPerBar, PitchTrackRiffData *pRiffData, const std::vector< std::unique_ptr< PitchTrackGems > > *pPatterns, PlayMap *pPlayMap, SectionBoundaries *pSections, SlotGrid *pPatternGrid, bool bDisplayed)
 Construct the track for one song track.
 ~PitchTrack () override
 Release the track.
void Start () override
 Start the track with the song.
void Stop () override
 Stop the track with the song.
void SetPlayer (Player *pPlayer) override
 Give the track to the player it plays for.
void HandleInput (Player *pPlayer, const PlayNoteEvent &event) override
 Place or remove the gem of a pressed gem button at the nearest sixteenth of a bar.
void HandleInput (Player *pPlayer, const BtnEvent< 8 > &event) override
 Erase the bar at the nearest sixteenth of a bar, or its section on a second press within half a second.
void HandleInput (Player *pPlayer, const StickEvent< 2 > &event) override
 Ignore a stick event.
void HandleInput (Player *pPlayer, const StickEvent< 6 > &event) override
 Ignore a stick event.
void HandleInput (Player *pPlayer, const BtnEvent< 10 > &event) override
 Ignore a button event.
void SetMuteRemote (bool bMuteRemote) override
 Set whether the track is silent while a player on another console is on it.
bool GetMuteRemote () const override
 Report whether the track is silent while a player on another console is on it.
void SkipBars (int nStartBar, int nEndBar) override
 Show a range of bars empty, and start the phrases at the end of the range.
void RebuildGems () override
 Copy the gems of each section's pattern into the section.
void SetActive (bool bActive) override
 Set whether the track is the one the song's player plays, which silences its own riffs.
bool IsActive () const override
 Report whether the track is the one the song's player plays.
void Redraw (int nStartBar) override
 Show the gems again from a bar on.
void Save (BinStream &stream) override
 Write the gems.
void Load (BinStream &stream) override
 Read the gems and show them again from the current bar on.
void SelectPattern (int nPattern, int nStartBar, int nEndBar)
 Copy the gems of a pattern over a range of bars, and play them.
void SetRepeat (bool bRepeat)
 Set whether gem edits repeat on every other bar of the section.
void SetEditing (bool bEditing)
 Set whether the remix editor is open, which hides the phrase from the player.
bool ToggleGem (signed char nSlot, int nTick, bool bRepeat, signed char nOwner)
 Place or remove the gem at a tick, and show the change.
void EraseBar (int nBar)
 Remove the gems of a bar, and of every other bar of the section while edits repeat.
void EraseSection (int nBar)
 Remove the gems of the section a bar lies in.
PitchTrackGems * GetGems ()
Public Member Functions inherited from RemixTrack
 RemixTrack (int nIndex)
 Construct a track with no player.
Public Member Functions inherited from Track
 Track (int nIndex)
 Construct a track with no player.
virtual ~Track ()
 Release the track.
int GetIndex () const
Player * GetPlayer () const

Additional Inherited Members

Protected Attributes inherited from Track
int mIndex
Player * mPlayer

Detailed Description

Track of a remixed song whose gems players place, each gem playing the riff of its gem button.

The RTTI records the class as deriving from RemixTrack. A player edits the bars of the phrase the track shows, two bars from an even bar of the section on, and the first player to place a gem in a section owns the section until its last gem goes. The names of the members other than the Track overrides are inferred.

Constructor & Destructor Documentation

◆ PitchTrack()

PitchTrack::PitchTrack ( int nTrack,
int nLeadInBars,
int nNumBars,
int nTicksPerBar,
PitchTrackRiffData * pRiffData,
const std::vector< std::unique_ptr< PitchTrackGems > > * pPatterns,
PlayMap * pPlayMap,
SectionBoundaries * pSections,
SlotGrid * pPatternGrid,
bool bDisplayed )

Construct the track for one song track.

Parameters
nTrackThe index of the song track.
nLeadInBarsThe bars the song plays before bar 0.
nNumBarsThe length of the song in bars.
nTicksPerBarThe song ticks in one bar.
pRiffDataThe riffs of the song track.
pPatternsThe patterns of gems the track can select.
pPlayMapThe map of the song positions.
pSectionsThe sections of the song.
pPatternGridThe pattern each section repeats, or null.
bDisplayedWhether the track shows its bars and gems on the play field.
Ghidra address:
NTSC-U/C: 0x00128880
Ghidra address:
PAL: 0x0012a078

◆ ~PitchTrack()

PitchTrack::~PitchTrack ( )
override

Release the track.

Ghidra address:
NTSC-U/C: 0x00128ba0
Ghidra address:
PAL: 0x0012a398

Member Function Documentation

◆ Start()

void PitchTrack::Start ( )
overridevirtual

Start the track with the song.

Ghidra address:
NTSC-U/C: 0x00128d40
Ghidra address:
PAL: 0x0012a538

Implements Track.

◆ Stop()

void PitchTrack::Stop ( )
overridevirtual

Stop the track with the song.

Ghidra address:
NTSC-U/C: 0x00128d88
Ghidra address:
PAL: 0x0012a580

Implements Track.

◆ SetPlayer()

void PitchTrack::SetPlayer ( Player * pPlayer)
overridevirtual

Give the track to the player it plays for.

A track a player departs hides its phrase and shows its own gems again.

Parameters
pPlayerThe player, or null.
Ghidra address:
NTSC-U/C: 0x00128cb0
Ghidra address:
PAL: 0x0012a4a8

Reimplemented from Track.

◆ HandleInput() [1/5]

void PitchTrack::HandleInput ( Player * pPlayer,
const PlayNoteEvent & event )
overridevirtual

Place or remove the gem of a pressed gem button at the nearest sixteenth of a bar.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x001290f8
Ghidra address:
PAL: 0x0012a8f0

Implements Track.

◆ HandleInput() [2/5]

void PitchTrack::HandleInput ( Player * pPlayer,
const BtnEvent< 8 > & event )
overridevirtual

Erase the bar at the nearest sixteenth of a bar, or its section on a second press within half a second.

Parameters
pPlayerThe player.
eventThe event. It is unused.
Ghidra address:
NTSC-U/C: 0x00129330
Ghidra address:
PAL: 0x0012ab28

Implements Track.

◆ HandleInput() [3/5]

void PitchTrack::HandleInput ( Player * pPlayer,
const StickEvent< 2 > & event )
inlineoverridevirtual

Ignore a stick event.

The body is empty.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0033c9d8
Ghidra address:
PAL: 0x003a9f10

Implements Track.

◆ HandleInput() [4/5]

void PitchTrack::HandleInput ( Player * pPlayer,
const StickEvent< 6 > & event )
inlineoverridevirtual

Ignore a stick event.

The body is empty.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0033c9e0
Ghidra address:
PAL: 0x003a9f18

Implements Track.

◆ HandleInput() [5/5]

void PitchTrack::HandleInput ( Player * pPlayer,
const BtnEvent< 10 > & event )
inlineoverridevirtual

Ignore a button event.

The body is empty.

Parameters
pPlayerThe player.
eventThe event.
Ghidra address:
NTSC-U/C: 0x0033c9e8
Ghidra address:
PAL: 0x003a9f20

Implements Track.

◆ SetMuteRemote()

void PitchTrack::SetMuteRemote ( bool bMuteRemote)
overridevirtual

Set whether the track is silent while a player on another console is on it.

Parameters
bMuteRemoteWhether the track is silent.
Ghidra address:
NTSC-U/C: 0x00128ef0
Ghidra address:
PAL: 0x0012a6e8

Implements RemixTrack.

◆ GetMuteRemote()

bool PitchTrack::GetMuteRemote ( ) const
overridevirtual

Report whether the track is silent while a player on another console is on it.

Returns
mMuteRemote.
Ghidra address:
NTSC-U/C: 0x00128f10
Ghidra address:
PAL: 0x0012a708

Implements RemixTrack.

◆ SkipBars()

void PitchTrack::SkipBars ( int nStartBar,
int nEndBar )
overridevirtual

Show a range of bars empty, and start the phrases at the end of the range.

Parameters
nStartBarThe first bar of the range.
nEndBarThe bar after the range.
Ghidra address:
NTSC-U/C: 0x00128f40
Ghidra address:
PAL: 0x0012a738

Implements RemixTrack.

◆ RebuildGems()

void PitchTrack::RebuildGems ( )
overridevirtual

Copy the gems of each section's pattern into the section.

Ghidra address:
NTSC-U/C: 0x00128ed0
Ghidra address:
PAL: 0x0012a6c8

Implements RemixTrack.

◆ SetActive()

void PitchTrack::SetActive ( bool bActive)
overridevirtual

Set whether the track is the one the song's player plays, which silences its own riffs.

Parameters
bActiveWhether the track is active.
Ghidra address:
NTSC-U/C: 0x00128f18
Ghidra address:
PAL: 0x0012a710

Implements RemixTrack.

◆ IsActive()

bool PitchTrack::IsActive ( ) const
overridevirtual

Report whether the track is the one the song's player plays.

Returns
mActive.
Ghidra address:
NTSC-U/C: 0x00128f38
Ghidra address:
PAL: 0x0012a730

Implements RemixTrack.

◆ Redraw()

void PitchTrack::Redraw ( int nStartBar)
overridevirtual

Show the gems again from a bar on.

Parameters
nStartBarThe first bar.
Ghidra address:
NTSC-U/C: 0x00128f90
Ghidra address:
PAL: 0x0012a788

Implements RemixTrack.

◆ Save()

void PitchTrack::Save ( BinStream & stream)
overridevirtual

Write the gems.

Parameters
streamThe stream.
Ghidra address:
NTSC-U/C: 0x001295f8
Ghidra address:
PAL: 0x0012adf0

Implements RemixTrack.

◆ Load()

void PitchTrack::Load ( BinStream & stream)
overridevirtual

Read the gems and show them again from the current bar on.

Parameters
streamThe stream.
Ghidra address:
NTSC-U/C: 0x00129618
Ghidra address:
PAL: 0x0012ae10

Implements RemixTrack.

◆ SelectPattern()

void PitchTrack::SelectPattern ( int nPattern,
int nStartBar,
int nEndBar )

Copy the gems of a pattern over a range of bars, and play them.

Parameters
nPatternThe pattern.
nStartBarThe first bar of the range.
nEndBarThe bar after the range.
Ghidra address:
NTSC-U/C: 0x00128e38
Ghidra address:
PAL: 0x0012a630

◆ SetRepeat()

void PitchTrack::SetRepeat ( bool bRepeat)

Set whether gem edits repeat on every other bar of the section.

Parameters
bRepeatWhether edits repeat.
Ghidra address:
NTSC-U/C: 0x00128e88
Ghidra address:
PAL: 0x0012a680

◆ SetEditing()

void PitchTrack::SetEditing ( bool bEditing)

Set whether the remix editor is open, which hides the phrase from the player.

Parameters
bEditingWhether the editor is open.
Ghidra address:
NTSC-U/C: 0x00128ea8
Ghidra address:
PAL: 0x0012a6a0

◆ ToggleGem()

bool PitchTrack::ToggleGem ( signed char nSlot,
int nTick,
bool bRepeat,
signed char nOwner )

Place or remove the gem at a tick, and show the change.

Parameters
nSlotThe gem button.
nTickThe tick.
bRepeatWhether the edit repeats on every other bar of the section.
nOwnerThe player who edits the gem.
Returns
Whether a gem lies at the tick afterwards.
Ghidra address:
NTSC-U/C: 0x00128fb8
Ghidra address:
PAL: 0x0012a7b0

◆ EraseBar()

void PitchTrack::EraseBar ( int nBar)

Remove the gems of a bar, and of every other bar of the section while edits repeat.

Parameters
nBarThe bar.
Ghidra address:
NTSC-U/C: 0x00129060
Ghidra address:
PAL: 0x0012a858

◆ EraseSection()

void PitchTrack::EraseSection ( int nBar)

Remove the gems of the section a bar lies in.

Parameters
nBarThe bar.
Ghidra address:
NTSC-U/C: 0x001290b0
Ghidra address:
PAL: 0x0012a8a8

◆ GetGems()

PitchTrackGems * PitchTrack::GetGems ( )
inline
Returns
The gems the players placed.

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