|
wavelength 1.0.0
|
One song: its configuration from the song text file and the tracks its MIDI file builds. More...
#include <song.h>
Classes | |
| class | PatternFile |
| One pattern file of a remix or a duel while it is read. More... | |
Public Types | |
| enum | TrackType { kTrackTypeAxe = 1 , kTrackTypePitch = 2 , kTrackTypeScratch = 3 , kTrackTypeVox = 4 , kTrackTypeCatch = 5 } |
| Types of an instrument track. More... | |
| enum | LoadState { kLoadStateParse = 0 , kLoadStateSetup = 1 , kLoadStatePatterns = 2 , kLoadStateDone = 3 } |
| Values of mState. More... | |
Public Member Functions | |
| Song (DataArray *pSongConfig, int nSkillLevel, int nRuleSet) | |
| Read the configuration of a song for a difficulty and a rule set. | |
| ~Song () | |
| Release the song and its tracks. | |
| void | Load () |
| Start loading the song without checking it for authoring errors. | |
| void | PollLoad () |
| Advance the load Load() started. | |
| bool | IsLoaded () |
| Report whether the load Load() started is complete. | |
| void | ApplySavedRemix () |
| Replace the tracks with the saved remix the game database selects. | |
| void | ApplySynthSettings () |
| Apply the effects buses of the song, and set controller 16 of every MIDI channel to the level of the channel's instrument. | |
| int | GetNumTracks () const |
| Report the number of instrument tracks. | |
| int | GetTrackType (int nTrack) const |
| Report the type of an instrument track. | |
| int | GetTrackInstrument (int nTrack) const |
| Report the instrument of a track. | |
| DuelPatternTable * | GetDuelPatterns () |
| Report the duel patterns of the song. | |
| CatchTrackData * | GetCatchTrackData (int nTrack) const |
| Report the gems of a catch track. | |
| ScratchTrackData * | GetScratchData (int nTrack) const |
| Report the patterns of a turntable track. | |
| AxeTrackData * | GetAxeData (int nTrack) const |
| Report the notes of a guitar track. | |
| PitchTrackRiffData * | GetTrackRiffData (int nTrack) const |
| Report the riffs of a track. | |
| CatchTrackData * | GetVoxData (int nTrack) const |
| Report the gems of a vocal track. | |
| int | GetTrackFlags (int nTrack) const |
| Report the flags of a track. | |
| int | GetNumBackMusic () const |
| Report the number of background music tracks. | |
| BackMusic * | GetBackMusic (int nIndex) const |
| Report one background music track. | |
| int | GetBackMusicMaster (int nIndex) const |
| Report the catch track a background music track plays along with. | |
| int | GetNumIntroMuses () const |
| Report the number of performances of the tracks named "INTRO". | |
| Muse * | GetIntroMuse (int nIndex) const |
| Report the performance of one track named "INTRO". | |
| ScriptTrackData * | GetScriptTrack (const char *pszName) const |
| Find a track named "SCRIPT" of the MIDI file by the name of its commands. | |
| SectionBoundaries * | GetSections () const |
| Report the sections. | |
| float * | GetMsPerTick () const |
| Report the duration of one tick. | |
| PlayMap * | GetPlayMap () const |
| Report the map of the song positions. | |
| BankLoader * | GetBankTrack () const |
| Report the track named "BANK". | |
| WorldTrack * | GetWorldTrack () const |
| Report the events of the track named "WORLD". | |
| Lyric * | GetLyric () const |
| Report the lyrics. | |
| FXMgr * | GetFXMgr () const |
| Report the effect sets. | |
| float | GetSpeed () const |
| Report the speed of the song. | |
| SlotGrid * | GetSlotGrid () const |
| Report the slot grid of the song. | |
| std::vector< std::unique_ptr< PitchTrackGems > > * | GetTrackPitchData (int nTrack) |
| Report the gem patterns of a pitch track. | |
| const std::vector< std::vector< int > > & | GetEnableOrder () const |
| Report the steps of the catch tracks to enable, each a list of track indices. | |
| bool | HasLowVolumes (int nChannel) const |
| Report whether the song sets the low volumes of a mixer channel. | |
| const std::vector< unsigned char > * | GetLowVolumes (int nChannel) const |
| Report the low volumes of a mixer channel. | |
| bool | HasTrackVolumes (int nTrack) const |
| Report whether a track has a volume list. | |
| const std::vector< unsigned char > & | GetTrackVolumes (int nTrack) const |
| Report the volumes of a track. | |
| bool | HasFreestyleLowVolumes () const |
| Report whether the song sets the low volumes of the freestyle track. | |
| const std::vector< unsigned char > * | GetFreestyleLowVolumes () const |
| Report the low volumes of the freestyle track. | |
| int | GetRemixEffectsBus () const |
| Report the effects bus of a remix. | |
| const char * | GetRemixEffectsName () const |
| Report the localised name of the effects of a remix. | |
| const char * | GetSectionLabel (int nIndex) const |
| Report the label of a remix section. | |
| int | GetDifficulty () const |
| LevelMidiBuilder * | GetBuilder () const |
| int | GetTicksPerBar () const |
| int | GetNumBars () const |
| int | GetIntroBars () const |
| const std::vector< int > & | GetSkippedBars () const |
| const std::vector< int > & | GetDuelTrackOrder () const |
Static Public Attributes | |
| static constexpr int | kNumMixerChannels = 16 |
| Number of mixer channels the song can set the low volumes of. | |
| static constexpr int | kNumPatternFiles = 3 |
| Number of pattern files a remix or a duel reads, and of gem patterns of a pitch track. | |
One song: its configuration from the song text file and the tracks its MIDI file builds.
The class is not polymorphic and has no RTTI. The name is inferred from the song text file it reads. The object is 0x370 bytes. Load() reads the configuration and starts the MIDI file, and PollLoad() advances the load through the states of LoadState until IsLoaded() reports it done. A remix or a duel also reads the gem patterns of its sections from three pattern files.
| enum Song::TrackType |
| enum Song::LoadState |
| Song::Song | ( | DataArray * | pSongConfig, |
| int | nSkillLevel, | ||
| int | nRuleSet ) |
Read the configuration of a song for a difficulty and a rule set.
| pSongConfig | The entry of the song in the "songs" section. |
| nSkillLevel | The difficulty. |
| nRuleSet | The rule set the song is played under, one of GameDb::RuleSet. |
| Song::~Song | ( | ) |
Release the song and its tracks.
| void Song::Load | ( | ) |
Start loading the song without checking it for authoring errors.
The name is inferred.
| void Song::PollLoad | ( | ) |
Advance the load Load() started.
The name is inferred.
| bool Song::IsLoaded | ( | ) |
Report whether the load Load() started is complete.
The name is inferred.
| void Song::ApplySavedRemix | ( | ) |
Replace the tracks with the saved remix the game database selects.
The name is inferred. The pitch tracks lose their pattern gems, every instrument track is enabled in one step, and the song splits into four sections at the quarter points.
| void Song::ApplySynthSettings | ( | ) |
Apply the effects buses of the song, and set controller 16 of every MIDI channel to the level of the channel's instrument.
The name is inferred. A guitar or turntable track gets 50, a channel without a track the level of the channel before it, and channel 16 gets 70.
| int Song::GetNumTracks | ( | ) | const |
Report the number of instrument tracks.
| int Song::GetTrackType | ( | int | nTrack | ) | const |
Report the type of an instrument track.
| nTrack | The track. |
| int Song::GetTrackInstrument | ( | int | nTrack | ) | const |
Report the instrument of a track.
| nTrack | The track. |
| DuelPatternTable * Song::GetDuelPatterns | ( | ) |
Report the duel patterns of the song.
The name is inferred.
| CatchTrackData * Song::GetCatchTrackData | ( | int | nTrack | ) | const |
Report the gems of a catch track.
| nTrack | The track. |
| ScratchTrackData * Song::GetScratchData | ( | int | nTrack | ) | const |
Report the patterns of a turntable track.
| nTrack | The track. |
| AxeTrackData * Song::GetAxeData | ( | int | nTrack | ) | const |
Report the notes of a guitar track.
| nTrack | The track. |
| PitchTrackRiffData * Song::GetTrackRiffData | ( | int | nTrack | ) | const |
Report the riffs of a track.
| nTrack | The track. |
| CatchTrackData * Song::GetVoxData | ( | int | nTrack | ) | const |
Report the gems of a vocal track.
| nTrack | The track. |
| int Song::GetTrackFlags | ( | int | nTrack | ) | const |
Report the flags of a track.
| nTrack | The track. |
| int Song::GetNumBackMusic | ( | ) | const |
Report the number of background music tracks.
| BackMusic * Song::GetBackMusic | ( | int | nIndex | ) | const |
Report one background music track.
| nIndex | The index. |
| int Song::GetBackMusicMaster | ( | int | nIndex | ) | const |
Report the catch track a background music track plays along with.
| nIndex | The index of the background music track. |
| int Song::GetNumIntroMuses | ( | ) | const |
Report the number of performances of the tracks named "INTRO".
| Muse * Song::GetIntroMuse | ( | int | nIndex | ) | const |
Report the performance of one track named "INTRO".
| nIndex | The index. |
| ScriptTrackData * Song::GetScriptTrack | ( | const char * | pszName | ) | const |
Find a track named "SCRIPT" of the MIDI file by the name of its commands.
| pszName | The name. |
| SectionBoundaries * Song::GetSections | ( | ) | const |
Report the sections.
| float * Song::GetMsPerTick | ( | ) | const |
Report the duration of one tick.
| PlayMap * Song::GetPlayMap | ( | ) | const |
Report the map of the song positions.
| BankLoader * Song::GetBankTrack | ( | ) | const |
Report the track named "BANK".
| WorldTrack * Song::GetWorldTrack | ( | ) | const |
Report the events of the track named "WORLD".
| Lyric * Song::GetLyric | ( | ) | const |
Report the lyrics.
| FXMgr * Song::GetFXMgr | ( | ) | const |
Report the effect sets.
| float Song::GetSpeed | ( | ) | const |
Report the speed of the song.
| SlotGrid * Song::GetSlotGrid | ( | ) | const |
Report the slot grid of the song.
| std::vector< std::unique_ptr< PitchTrackGems > > * Song::GetTrackPitchData | ( | int | nTrack | ) |
Report the gem patterns of a pitch track.
The body also calls GetTrackType() and discards the result.
| nTrack | The track. |
| const std::vector< std::vector< int > > & Song::GetEnableOrder | ( | ) | const |
Report the steps of the catch tracks to enable, each a list of track indices.
| bool Song::HasLowVolumes | ( | int | nChannel | ) | const |
Report whether the song sets the low volumes of a mixer channel.
| nChannel | The channel. |
| const std::vector< unsigned char > * Song::GetLowVolumes | ( | int | nChannel | ) | const |
Report the low volumes of a mixer channel.
The body also calls HasLowVolumes() and discards the result.
| nChannel | The channel. |
| bool Song::HasTrackVolumes | ( | int | nTrack | ) | const |
Report whether a track has a volume list.
| nTrack | The track. |
| const std::vector< unsigned char > & Song::GetTrackVolumes | ( | int | nTrack | ) | const |
Report the volumes of a track.
The body also calls HasTrackVolumes() and discards the result.
| nTrack | The track. |
| bool Song::HasFreestyleLowVolumes | ( | ) | const |
Report whether the song sets the low volumes of the freestyle track.
| const std::vector< unsigned char > * Song::GetFreestyleLowVolumes | ( | ) | const |
Report the low volumes of the freestyle track.
The body also calls HasFreestyleLowVolumes() and discards the result.
| int Song::GetRemixEffectsBus | ( | ) | const |
Report the effects bus of a remix.
| const char * Song::GetRemixEffectsName | ( | ) | const |
Report the localised name of the effects of a remix.
| const char * Song::GetSectionLabel | ( | int | nIndex | ) | const |
Report the label of a remix section.
| nIndex | The index of the label. |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
staticconstexpr |
Number of mixer channels the song can set the low volumes of.
|
staticconstexpr |
Number of pattern files a remix or a duel reads, and of gem patterns of a pitch track.