<commit_before>#pragma once
#include <string>
#include <vector>
#include <map>
#include <spdlog/spdlog.h>

#include "smf.hpp"

namespace ORGame
{

    enum class Difficulty
    {
        NONE,
        Easy,
        Medium,
        Hard,
        Expert
    };

    enum class TrackType
    {
        NONE,
        Guitar,
        Bass,
        Drums,
        Vocals,
        // Non-player track types
        Events
    };

    enum class NoteType
    {
        NONE,
        Green,
        Red,
        Yellow,
        Blue,
        Orange,
    };

    enum class EventType
    {
        Note,
        Tempo,
        TimeSignature,
        Bar,
        Lyric,
        Other,
    };

    struct MidiNoteDefinition
    {
        int green;
        int red;
        int yellow;
        int blue;
        int orange;
        int power;
    };

    struct TrackNote
    {
        NoteType type;
        double time;
        double length;
        int objNoteID;
        int objTailID;
        bool played;
    };

    struct TempoEvent
    {
        int qnLength;
        double time;
    };

    struct TimeSigEvent
    {
        int numerator;
        int denominator;
        int qnScaleFactor;
        double time;
    };

    enum class BarType
    {
        measure,
        beat,
        upbeat, // This isn't always half of a beat one example of this is: 6/8 compound time
    };

    struct BarEvent
    {
        BarType type;
        double time;
    };

    union TempoTrackEvent
    {
        TempoEvent *tempo;
        TimeSigEvent *ts;
        BarEvent *bar;

        TempoTrackEvent(TempoEvent *tmpo):
        tempo(tmpo)
        {
        }

        TempoTrackEvent(TimeSigEvent *tsEvent):
        ts(tsEvent)
        {
        }

        TempoTrackEvent(BarEvent *brEvent):
        bar(brEvent)
        {
        }

    };

    struct SoloEvent
    {
        double time;
        double length;
    };


    struct TrackInfo
    {
        TrackType type;
        Difficulty difficulty;
    };

    class TempoTrack
    {
    public:
        void add_tempo_event(int ppqn, double time);
        void add_time_sig_event(int numerator, int denominator, int compoundFactor, double time);
        void mark_bars();
        std::vector<TempoTrackEvent> get_events(double start, double end, EventType type);
        std::vector<TempoTrackEvent> get_events(EventType type);

    private:
    	std::vector<TempoEvent> m_tempo;
        std::vector<TimeSigEvent> m_ts;
        std::vector<BarEvent> m_bars;
    };


    class Track
    {
    public:

        Track(TrackInfo info);

        TrackInfo info();

        void add_note(NoteType type, double time, bool on);
        void Track::set_solo(double time, bool on);
        std::vector<SoloEvent> *get_solos();
        std::vector<TrackNote*> get_notes_in_frame(double start, double end);
        std::vector<TrackNote*> get_notes();

    private:
        TrackInfo m_info;
        std::vector<TrackNote> m_notes;
        std::vector<SoloEvent> m_solos;
    };

    class Song
    {
    public:
        Song(std::string songpath);
        void add(TrackType type, Difficulty difficulty);
        bool load();
        void load_track(TrackInfo& trackInfo);
        void load_tracks();
        std::vector<Track> *get_tracks();
        std::vector<TrackInfo> *get_track_info();
        TempoTrack *get_tempo_track();
<commit_msg>Fix typo in Song track code declaration.<commit_after>#pragma once
#include <string>
#include <vector>
#include <map>
#include <spdlog/spdlog.h>

#include "smf.hpp"

namespace ORGame
{

    enum class Difficulty
    {
        NONE,
        Easy,
        Medium,
        Hard,
        Expert
    };

    enum class TrackType
    {
        NONE,
        Guitar,
        Bass,
        Drums,
        Vocals,
        // Non-player track types
        Events
    };

    enum class NoteType
    {
        NONE,
        Green,
        Red,
        Yellow,
        Blue,
        Orange,
    };

    enum class EventType
    {
        Note,
        Tempo,
        TimeSignature,
        Bar,
        Lyric,
        Other,
    };

    struct MidiNoteDefinition
    {
        int green;
        int red;
        int yellow;
        int blue;
        int orange;
        int power;
    };

    struct TrackNote
    {
        NoteType type;
        double time;
        double length;
        int objNoteID;
        int objTailID;
        bool played;
    };

    struct TempoEvent
    {
        int qnLength;
        double time;
    };

    struct TimeSigEvent
    {
        int numerator;
        int denominator;
        int qnScaleFactor;
        double time;
    };

    enum class BarType
    {
        measure,
        beat,
        upbeat, // This isn't always half of a beat one example of this is: 6/8 compound time
    };

    struct BarEvent
    {
        BarType type;
        double time;
    };

    union TempoTrackEvent
    {
        TempoEvent *tempo;
        TimeSigEvent *ts;
        BarEvent *bar;

        TempoTrackEvent(TempoEvent *tmpo):
        tempo(tmpo)
        {
        }

        TempoTrackEvent(TimeSigEvent *tsEvent):
        ts(tsEvent)
        {
        }

        TempoTrackEvent(BarEvent *brEvent):
        bar(brEvent)
        {
        }

    };

    struct SoloEvent
    {
        double time;
        double length;
    };


    struct TrackInfo
    {
        TrackType type;
        Difficulty difficulty;
    };

    class TempoTrack
    {
    public:
        void add_tempo_event(int ppqn, double time);
        void add_time_sig_event(int numerator, int denominator, int compoundFactor, double time);
        void mark_bars();
        std::vector<TempoTrackEvent> get_events(double start, double end, EventType type);
        std::vector<TempoTrackEvent> get_events(EventType type);

    private:
    	std::vector<TempoEvent> m_tempo;
        std::vector<TimeSigEvent> m_ts;
        std::vector<BarEvent> m_bars;
    };


    class Track
    {
    public:

        Track(TrackInfo info);

        TrackInfo info();

        void add_note(NoteType type, double time, bool on);
        void set_solo(double time, bool on);
        std::vector<SoloEvent> *get_solos();
        std::vector<TrackNote*> get_notes_in_frame(double start, double end);
        std::vector<TrackNote*> get_notes();

    private:
        TrackInfo m_info;
        std::vector<TrackNote> m_notes;
        std::vector<SoloEvent> m_solos;
    };

    class Song
    {
    public:
        Song(std::string songpath);
        void add(TrackType type, Difficulty difficulty);
        bool load();
        void load_track(TrackInfo& trackInfo);
        void load_tracks();
        std::vector<Track> *get_tracks();
        std::vector<TrackInfo> *get_track_info();
        TempoTrack *get_tempo_track();

{'fraction_non_alphanumeric': 0.08703976435935198, 'fraction_numerical': 0.000589101620029455, 'mean_word_length': 1.6757289204097714, 'pattern_counts': {'":': 0, '<': 35, '<?xml version=': 0, '>': 35, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5350239', 'n_tokens_mistral': 2104, 'n_tokens_neox': 2025, 'n_words': 498}