|
RhythmGame 1.4.3
|
Metadata and basic stats of a chart. More...
#include <ChartData.h>


Classes | |
| struct | DTO |
| struct | PreparedData |
Public Types | |
| enum class | Keymode { K5 = 5 , K7 = 7 , K10 = 10 , K14 = 14 } |
| enum class | HistogramNoteType { Normal , Scratch , LongNote , BssNote , Landmine , Invisible } |
Public Member Functions | |
| auto | clone (QObject *parent=nullptr) const -> std::unique_ptr< ChartData > |
| ChartData (QString title, QString artist, QString subtitle, QString subartist, QString genre, QString stageFile, QString banner, QString backBmp, double rank, double total, int playLevel, int difficulty, bool isRandom, QList< qint64 > randomSequence, int normalNoteCount, int scratchCount, int lnCount, int bssCount, int mineCount, int64_t length, double initialBpm, double maxBpm, double minBpm, double mainBpm, double avgBpm, double peakDensity, double avgDensity, double endDensity, QString path, int64_t directory, QString sha256, QString md5, Keymode keymode, QList< QList< qint64 > > histogramData, QList< BpmChange > bpmChanges, quint64 gameVersion, QObject *parent=nullptr) | |
| auto | getTitle () const -> const QString & |
| auto | getArtist () const -> const QString & |
| auto | getSubtitle () const -> const QString & |
| auto | getSubartist () const -> const QString & |
| auto | getGenre () const -> const QString & |
| auto | getStageFile () const -> const QString & |
| auto | getBanner () const -> const QString & |
| auto | getBackBmp () const -> const QString & |
| auto | getStageFileSource () const -> QString |
| auto | getBannerSource () const -> QString |
| auto | getBackBmpSource () const -> QString |
| Q_INVOKABLE QString | assetSource (const QString &relativePath) const |
| auto | getNormalNoteCount () const -> int |
| auto | getScratchCount () const -> int |
| auto | getLnCount () const -> int |
| auto | getBssCount () const -> int |
| auto | getMineCount () const -> int |
| auto | getLength () const -> int64_t |
| auto | getInitialBpm () const -> double |
| auto | getMaxBpm () const -> double |
| auto | getMinBpm () const -> double |
| auto | getMainBpm () const -> double |
| auto | getAvgBpm () const -> double |
| auto | getPeakDensity () const -> double |
| auto | getAvgDensity () const -> double |
| auto | getEndDensity () const -> double |
| auto | getPath () const -> QString |
| auto | getRank () const -> double |
| auto | getTotal () const -> double |
| auto | getPlayLevel () const -> int |
| auto | getDifficulty () const -> int |
| auto | getSha256 () const -> const QString & |
| auto | getMd5 () const -> const QString & |
| auto | getIsRandom () const -> bool |
| auto | getRandomSequence () const -> const QList< qint64 > & |
| auto | getKeymode () const -> Keymode |
| auto | getDirectory () const -> QString |
| auto | getChartDirectory () const -> QString |
| auto | getHistogramData () -> QList< QList< qint64 > > & |
| auto | getBpmChanges () -> QList< BpmChange > & |
| auto | getGameVersion () const -> quint64 |
| auto | getTimingWindows () const -> QVariantList |
| auto | getTimingWindowsHash () const -> QHash< Judgement, QPair< qint64, qint64 > > |
| auto | hasNotes () const -> bool |
| auto | prepareSave () const -> PreparedData |
| auto | save (db::SqliteCppDb &db) const -> void |
| auto | save (db::SqliteCppDb &db, int64_t directory) const -> void |
| void | save (db::SqliteCppDb &db, int64_t directory, const PreparedData &prepared) const |
| auto | toJson () const -> QJsonObject |
Static Public Member Functions | |
| static auto | load (const DTO &chartDataDto) -> std::unique_ptr< ChartData > |
Properties | |
| QString | title |
| The title of the chart. | |
| QString | artist |
| The artist of the chart. | |
| QString | subtitle |
| The subtitle of the chart. | |
| QString | subartist |
| The subartist of the chart. | |
| QString | genre |
| The genre of the chart. | |
| QString | stageFile |
| The path to the chart's stagefile. | |
| QString | banner |
| The path to the chart's banner. | |
| QString | backBmp |
| The path to the chart's backbmp. | |
| QString | stageFileSource |
| A directly usable Image source for the chart's stagefile. | |
| QString | bannerSource |
| A directly usable Image source for the chart's banner. | |
| QString | backBmpSource |
| A directly usable Image source for the chart's backbmp. | |
| double | rank |
| The rank of the chart, converted to defexrank format. | |
| double | total |
| The total value of the chart. | |
| int | playLevel |
| The play level of the chart. | |
| int | difficulty |
| The difficulty of the chart. | |
| int | normalNoteCount |
| The number of normal notes in the chart. | |
| int | scratchCount |
| The number of scratch notes in the chart. | |
| int | lnCount |
| The number of long notes in the chart excluding BSS (scratch lns). | |
| int | bssCount |
| The number of BSS (scratch long notes) in the chart. | |
| int | mineCount |
| The number of mines (landmines) in the chart. | |
| int64_t | length |
| The length of the chart in nanoseconds. | |
| QString | path |
| The path to the chart file. | |
| QString | directory |
| The parent directory of the directory containing the chart file. | |
| QString | chartDirectory |
| The directory containing the chart file. | |
| QString | sha256 |
| The SHA-256 hash of the chart file, in hexadecimal upper-case format. | |
| QString | md5 |
| The MD5 hash of the chart file, in hexadecimal upper-case format. | |
| bool | isRandom |
| Whether the chart uses #RANDOM. | |
| QList< qint64 > | randomSequence |
| The random sequence used for parsing the chart. | |
| Keymode | keymode |
| The keymode of the chart, i.e. how many keys/columns it has. If the DP option "Battle" is enabled, an SP chart will have 14 keys regardless, so pay attention to that. | |
| double | initialBpm |
| The initial BPM of the chart. | |
| double | maxBpm |
| The maximum BPM of the chart. | |
| double | minBpm |
| The minimum BPM of the chart. | |
| double | mainBpm |
| The main BPM of the chart. | |
| double | avgBpm |
| The average BPM of the chart. | |
| double | peakDensity |
| The peak density of the chart. | |
| double | avgDensity |
| The average density of the chart. | |
| double | endDensity |
| The ending density of the chart. | |
| QListQList< qint64 > | histogramData |
| The histogram data representing the distribution of notes, grouped by note type. | |
| QList< BpmChange > | bpmChanges |
| The list of BPM changes in the chart. | |
| quint64 | gameVersion |
| The game version where the chart was parsed. | |
| QVariantList | timingWindows |
| The timing windows for the chart based on its rank. | |
Metadata and basic stats of a chart.
When loading a chart, the ChartData might be different than what was cached in the database, because the chart file might have changed or it contained #RANDOM, which generates a different chart each time the chart is parsed. In the latter case you can use the randomSequence property to recreate the same chart.
|
strong |
|
strong |
| gameplay_logic::ChartData::ChartData | ( | QString | title, |
| QString | artist, | ||
| QString | subtitle, | ||
| QString | subartist, | ||
| QString | genre, | ||
| QString | stageFile, | ||
| QString | banner, | ||
| QString | backBmp, | ||
| double | rank, | ||
| double | total, | ||
| int | playLevel, | ||
| int | difficulty, | ||
| bool | isRandom, | ||
| QList< qint64 > | randomSequence, | ||
| int | normalNoteCount, | ||
| int | scratchCount, | ||
| int | lnCount, | ||
| int | bssCount, | ||
| int | mineCount, | ||
| int64_t | length, | ||
| double | initialBpm, | ||
| double | maxBpm, | ||
| double | minBpm, | ||
| double | mainBpm, | ||
| double | avgBpm, | ||
| double | peakDensity, | ||
| double | avgDensity, | ||
| double | endDensity, | ||
| QString | path, | ||
| int64_t | directory, | ||
| QString | sha256, | ||
| QString | md5, | ||
| Keymode | keymode, | ||
| QList< QList< qint64 > > | histogramData, | ||
| QList< BpmChange > | bpmChanges, | ||
| quint64 | gameVersion, | ||
| QObject * | parent = nullptr |
||
| ) |
| auto gameplay_logic::ChartData::assetSource | ( | const QString & | relativePath | ) | const |
| auto gameplay_logic::ChartData::clone | ( | QObject * | parent = nullptr | ) | const -> std::unique_ptr<ChartData> |
| auto gameplay_logic::ChartData::getArtist | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getAvgBpm | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getAvgDensity | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getBackBmp | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getBackBmpSource | ( | ) | const -> QString |
| auto gameplay_logic::ChartData::getBanner | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getBannerSource | ( | ) | const -> QString |
| auto gameplay_logic::ChartData::getBpmChanges | ( | ) | -> QList<BpmChange>& |
| auto gameplay_logic::ChartData::getBssCount | ( | ) | const -> int |
| auto gameplay_logic::ChartData::getChartDirectory | ( | ) | const -> QString |
| auto gameplay_logic::ChartData::getDifficulty | ( | ) | const -> int |
| auto gameplay_logic::ChartData::getDirectory | ( | ) | const -> QString |
| auto gameplay_logic::ChartData::getEndDensity | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getGameVersion | ( | ) | const -> quint64 |
| auto gameplay_logic::ChartData::getGenre | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getHistogramData | ( | ) | -> QList<QList<qint64>>& |
| auto gameplay_logic::ChartData::getInitialBpm | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getIsRandom | ( | ) | const -> bool |
| auto gameplay_logic::ChartData::getKeymode | ( | ) | const -> Keymode |
| auto gameplay_logic::ChartData::getLength | ( | ) | const -> int64_t |
| auto gameplay_logic::ChartData::getLnCount | ( | ) | const -> int |
| auto gameplay_logic::ChartData::getMainBpm | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getMaxBpm | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getMd5 | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getMinBpm | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getMineCount | ( | ) | const -> int |
| auto gameplay_logic::ChartData::getNormalNoteCount | ( | ) | const -> int |
| auto gameplay_logic::ChartData::getPath | ( | ) | const -> QString |
| auto gameplay_logic::ChartData::getPeakDensity | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getPlayLevel | ( | ) | const -> int |
| auto gameplay_logic::ChartData::getRandomSequence | ( | ) | const -> const QList<qint64>& |
| auto gameplay_logic::ChartData::getRank | ( | ) | const -> double |
| auto gameplay_logic::ChartData::getScratchCount | ( | ) | const -> int |
| auto gameplay_logic::ChartData::getSha256 | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getStageFile | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getStageFileSource | ( | ) | const -> QString |
| auto gameplay_logic::ChartData::getSubartist | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getSubtitle | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getTimingWindows | ( | ) | const -> QVariantList |
| auto gameplay_logic::ChartData::getTimingWindowsHash | ( | ) | const -> QHash<Judgement, QPair<qint64, qint64>> |
| auto gameplay_logic::ChartData::getTitle | ( | ) | const -> const QString& |
| auto gameplay_logic::ChartData::getTotal | ( | ) | const -> double |
| auto gameplay_logic::ChartData::hasNotes | ( | ) | const -> bool |
|
static |
| auto gameplay_logic::ChartData::prepareSave | ( | ) | const -> PreparedData |
| auto gameplay_logic::ChartData::save | ( | db::SqliteCppDb & | db | ) | const -> void |
| auto gameplay_logic::ChartData::save | ( | db::SqliteCppDb & | db, |
| int64_t | directory | ||
| ) | const -> void |
| void gameplay_logic::ChartData::save | ( | db::SqliteCppDb & | db, |
| int64_t | directory, | ||
| const PreparedData & | prepared | ||
| ) | const |
| auto gameplay_logic::ChartData::toJson | ( | ) | const -> QJsonObject |
|
read |
The artist of the chart.
|
read |
The average BPM of the chart.
The average BPM is the time-weighted average BPM of the chart.
|
read |
The average density of the chart.
The average note density throughout the chart.
|
read |
The path to the chart's backbmp.
|
read |
A directly usable Image source for the chart's backbmp.
|
read |
The path to the chart's banner.
|
read |
A directly usable Image source for the chart's banner.
|
read |
The list of BPM changes in the chart.
|
read |
The number of BSS (scratch long notes) in the chart.
A BSS consists of an ln start and ln end. Such a pair counts as one BSS.
|
read |
The directory containing the chart file.
This is an absolute path.
|
read |
The difficulty of the chart.
This is purely visual. How you display it is up to you.
|
read |
The parent directory of the directory containing the chart file.
This is an absolute path.
|
read |
The ending density of the chart.
The note density at the end of the chart.
|
read |
The game version where the chart was parsed.
|
read |
The genre of the chart.
|
read |
The histogram data representing the distribution of notes, grouped by note type.
Each sublist represents a different note type.
|
read |
The initial BPM of the chart.
This is the BPM at the start of the chart, before any BPM changes.
|
read |
Whether the chart uses #RANDOM.
If true, the randomSequence property can be used to recreate the same chart.
|
read |
The keymode of the chart, i.e. how many keys/columns it has. If the DP option "Battle" is enabled, an SP chart will have 14 keys regardless, so pay attention to that.
|
read |
The length of the chart in nanoseconds.
This property indicates the total duration of the chart from start to finish, measured in nanoseconds.
|
read |
The number of long notes in the chart excluding BSS (scratch lns).
A long note consists of an LN start and LN end. Such a pair counts as one long note.
|
read |
The main BPM of the chart.
The main BPM is the BPM that is active for the longest time during the chart.
|
read |
The maximum BPM of the chart.
|
read |
The MD5 hash of the chart file, in hexadecimal upper-case format.
This can be used to uniquely identify a chart file.
|
read |
The minimum BPM of the chart.
|
read |
The number of mines (landmines) in the chart.
|
read |
The number of normal notes in the chart.
Normal means not long notes, not mines, not invisible notes, not scratches
|
read |
The path to the chart file.
This is an absolute path.
|
read |
The peak density of the chart.
The maximum note density within any time window.
|
read |
The play level of the chart.
This is purely visual. How you display it is up to you.
|
read |
The random sequence used for parsing the chart.
If the chart uses #RANDOM, this property provides the sequence of random values used to determine the contents of the chart. If the chart does not use randomization, this list will be empty.
|
read |
The rank of the chart, converted to defexrank format.
Determines the timing windows for judgements. 25=veryhard, 50=hard, 75=normal, 100=easy, like in lr2oraja. Interpolated linearly.
|
read |
The number of scratch notes in the chart.
Scratch notes are normal notes on scratch columns.
|
read |
The SHA-256 hash of the chart file, in hexadecimal upper-case format.
This can be used to uniquely identify a chart file.
|
read |
The path to the chart's stagefile.
|
read |
A directly usable Image source for the chart's stagefile.
|
read |
The subartist of the chart.
|
read |
The subtitle of the chart.
|
read |
The timing windows for the chart based on its rank.
Returns a list of maps, each with "judgement" (string) and "earlyNs"/"lateNs" (qint64) keys. The list is ordered from widest window (Bad) to narrowest (Perfect). Window values are symmetric half-widths in nanoseconds. Based on LR2 timing window specification.
|
read |
The title of the chart.
|
read |
The total value of the chart.
RhythmGame's gauges use the same total value system as LR2.