this repo has no description
1#include "tic.h"
2#include <string.h>
3
4bool parse_note(const char* noteStr, s32* note, s32* octave)
5{
6 if(noteStr && strlen(noteStr) == 3)
7 {
8 static const char* Notes[] = SFX_NOTES;
9
10 for(s32 i = 0; i < COUNT_OF(Notes); i++)
11 {
12 if(memcmp(Notes[i], noteStr, 2) == 0)
13 {
14 *note = i;
15 *octave = noteStr[2] - '1';
16 break;
17 }
18 }
19
20 return true;
21 }
22
23 return false;
24}