[go: up one dir, main page]

Skip to content

Commit

Permalink
agregar nombres a parametros
Browse files Browse the repository at this point in the history
  • Loading branch information
montoyamoraga committed May 22, 2024
1 parent 6d60c76 commit f6c1b56
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 17 deletions.
7 changes: 3 additions & 4 deletions src/NotasMIDI.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3,19 +3,18 @@
// constructor
NotasMIDI::NotasMIDI() {


}

// destructor
NotasMIDI::~NotasMIDI() {}

String NotasMIDI::numeroToSolfeo(int numero) {
if (numero < 0) {
if (numero < NotasMIDI::minMIDINota) {
return "outOfRange";
} else if (numero > 127) {
} else if (numero > maxMIDINota) {
return "outOfRange";
} else {
// number inside of range, normallize to numbers between 0 and 11
// numero no esta fuera de rango
numero = numero % 12;
return NotasMIDI::notasSolfeo[numero];
}
Expand Down
31 changes: 18 additions & 13 deletions src/NotasMIDI.h
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,24 @@ class NotasMIDI {
String letraToSolfeo(int letra);

protected:
char *notasSolfeo[12] = {
"do",
"^do",
"re",
"^re",
"mi",
"fa",
"^fa",
"sol",
"^sol",
"la",
"^la",
"si"

int minMIDINota = 0;
int maxMIDINota = 127;


char *notasSolfeo[12] = {
"do",
"^do",
"re",
"^re",
"mi",
"fa",
"^fa",
"sol",
"^sol",
"la",
"^la",
"si"
};

};
Expand Down

0 comments on commit f6c1b56

Please sign in to comment.