Skip to content

song_parser

anthony.samms edited this page May 28, 2026 · 1 revision

This exists as a wrapper for the various chart parsing libraries, and exposes all publicly needed functions for all.

SongParser(const fs::path& path, int start_delay, PlayerNum player_num)

Initializes a parser object. This will grab all of the metadata for the chart by default. The start_delay parameter is used to add delay before the song starts.

get_difficulty_name();

This is only used for osu charts to get the name of the difficulty that has been parsed.

std::tuple<NoteList, std::deque<NoteList>, std::deque<NoteList>, std::deque<NoteList>>
    notes_to_position(int diff);

Parses the note data of a specific difficulty. Returns a tuple of 1 NoteList and 3 std::deques. the first NoteList is the notes that will be used in the gameplay. This is returned from all 3 parsers. The 3 std::deques are branches, in the order of Normal, Expert, Master.

std::string get_song_hash();

Returns the string hash for the parsed song. This will run the hashing function.

std::string get_diff_hash(int difficulty);

Returns the string hash for the difficulty of the parsed song. This will run the hashing function.

Clone this wiki locally