| 381 | } |
| 382 | |
| 383 | void setLearnedNote(const int id, const int8_t note) { |
| 384 | // Unset IDs of similar note |
| 385 | if (note >= 0) |
| 386 | { |
| 387 | for (int idx = 0; idx < 18; ++idx) |
| 388 | { |
| 389 | if (learnedNotes[idx] == note) |
| 390 | learnedNotes[idx] = -1; |
| 391 | } |
| 392 | } |
| 393 | learnedNotes[id] = note; |
| 394 | } |
| 395 | |
| 396 | json_t* dataToJson() override |
| 397 | { |