From 6983e53daae8cab25ff113c7b5ccd3b31f39fcbb Mon Sep 17 00:00:00 2001 From: Benjamin Chausse Date: Tue, 14 Feb 2023 16:34:40 -0500 Subject: Basic Song and chord structure --- song.h | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 song.h (limited to 'song.h') diff --git a/song.h b/song.h new file mode 100644 index 0000000..e4b2389 --- /dev/null +++ b/song.h @@ -0,0 +1,32 @@ +#ifndef __SONG_H__ +#define __SONG_H__ + +#include "chord.h" +#include + +// Contains a song for a guitar hero clone +class Song { + private: + std::string title; + std::string artist; + int duration; // in ms + std::string audioFile; // path to audio file + std::vector chords; + public: + Song(std::string chartFile); + ~Song(); + void consolidate(); // merges chords with the same start/end times + // into a single chord + Chord operator[](int index); + int size(); + + std::string getTitle(); + std::string getArtist(); + int getDuration(); + std::string getAudioFile(); + std::vector getChords(); +}; + +#include "song.cpp" +#endif // __SONG_H__ + -- cgit v1.2.3