summaryrefslogtreecommitdiff
path: root/song.cpp
diff options
context:
space:
mode:
authorBenjamin Chausse <benjamin@chausse.xyz>2023-03-21 00:37:04 -0400
committerBenjamin Chausse <benjamin@chausse.xyz>2023-03-21 00:37:04 -0400
commit141fd9b9b5b02257521e41e71562bed6da2523dc (patch)
treea936aebc4a98a31ffbd60f926d49eeb0017cb388 /song.cpp
parent5c0108edb4efaa19a1198905718ef0d7db2a4635 (diff)
Purification par le feu
Diffstat (limited to 'song.cpp')
-rw-r--r--song.cpp54
1 files changed, 0 insertions, 54 deletions
diff --git a/song.cpp b/song.cpp
deleted file mode 100644
index 24d0b67..0000000
--- a/song.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-#include "song.h"
-
-Song::Song(std::string chartFile) {
- // TODO: import and parse chartFile
-}
-
-Song::~Song() {};
-
-void Song::consolidate() {
- int totalSize = chords.size();
- // Check each chord against every other chord
- for (int i=0; i<totalSize; i++) {
- // Get the start and end times of the current chord
- int start = chords[i].getStart();
- int end = chords[i].getEnd();
- // Check the current chord against every following chord
- for (int j=i+1; j<totalSize; j++) {
- // If the start and end times match:
- if (chords[j].getStart() == start && chords[j].getEnd() == end) {
- // Append those notes to the first encountered chord (i)
- for (int k=0; k<5; k++) {
- // If this note is set in the second chord, change it in the first
- if (chords[j].getNotes()[k]) {
- chords[i].change(k);
- }
- }
- // Remove the second chord from the vector
- chords.erase(chords.begin()+j);
- // Decrement the total size of the vector
- totalSize--;
- }
- }
- }
-}
-
-std::string Song::getTitle() {
- return title;
-}
-
-std::string Song::getArtist() {
- return artist;
-}
-
-int Song::getDuration() {
- return duration;
-}
-
-std::string Song::getAudioFile() {
- return audioFile;
-}
-
-std::vector<ChordNote> Song::getChords() {
- return chords;
-}