summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chordNote.cpp2
-rw-r--r--chordNote.h2
-rw-r--r--main.cpp18
3 files changed, 11 insertions, 11 deletions
diff --git a/chordNote.cpp b/chordNote.cpp
index cea7ae5..e912a97 100644
--- a/chordNote.cpp
+++ b/chordNote.cpp
@@ -11,7 +11,7 @@ ChordNote::ChordNote(int btn, int startTime, int endTime) {
ChordNote::~ChordNote() {};
-void ChordNote::change(int button) {
+void ChordNote::toggle(int button) {
notes[button] = !notes[button];
};
diff --git a/chordNote.h b/chordNote.h
index c6b833a..315bf24 100644
--- a/chordNote.h
+++ b/chordNote.h
@@ -27,7 +27,7 @@ class ChordNote {
// that the chord is held for longer than the default 1/16th note.
ChordNote(int btn, int startTime, int endTime);
~ChordNote();
- void change(int button); // change note in existing chord
+ void toggle(int button); // change note in existing chord
void setRenderStart(int renderTime); // sets when to start rendering
bool* getNotes(); // get the notes in the chord
int getStart(); // get the start time of the chord
diff --git a/main.cpp b/main.cpp
index b53a772..9c8c1b7 100644
--- a/main.cpp
+++ b/main.cpp
@@ -76,7 +76,7 @@ int main()
ChordNote note9(3, 8600, 8600);
ChordNote note10(4, 9000, 9000);*/
- note2.change(0);
+ note2.toggle(0);
const int FRAMERATE = 100;
int renderStart = FRAMERATE * (NB_SQUARES);
@@ -90,7 +90,7 @@ int main()
note8.setRenderStart(renderStart);
note9.setRenderStart(renderStart);
note10.setRenderStart(renderStart);*/
-
+
string displayArray[NB_SQUARES + 1][5];
for (int i = 0; i < NB_SQUARES + 1; i++)
{
@@ -99,7 +99,7 @@ int main()
displayArray[i][j] = " ";
}
}
-
+
const int NB_NOTES = 5;
ChordNote song[NB_NOTES] = {note1, note2, note3, note4, note5};
@@ -110,8 +110,8 @@ int main()
cerr << "Impossible de se connecter au port "<< string(com.c_str()) <<". Fermeture du programme!" <<endl;
exit(1);
}
-
- // Structure de donnees JSON pour envoie et reception
+
+ // Structure de donnees JSON pour envoie et reception
json j_msg_send, j_msg_rcv;
auto startTime = chrono::steady_clock::now();
@@ -211,7 +211,7 @@ int main()
}
- //Gestion affichage
+ //Gestion affichage
if(diffSinceBeginning % FRAMERATE == 0)
{
//system("cls");
@@ -272,7 +272,7 @@ int main()
}
displayString += "|\n";
}
-
+
//Reordering
int reorderingIndex = NB_SQUARES;
@@ -333,7 +333,7 @@ int main()
// Read serialport until '\n' character (Blocking)
// Version fonctionnel dans VScode, mais non fonctionnel avec Visual Studio
- /*
+ /*
while(msg.back()!='\n'){
if(msg.size()>MSG_MAX_SIZE){
return false;
@@ -463,7 +463,7 @@ int main()
{
bool compDown = CompareIndividualButton(true, StrumDown);
bool compUp = CompareIndividualButton(true, StrumUp);
-
+
if (compDown || compUp)
{
correctlyPlayed = true;