From: Jérémie Astor Date: Thu, 12 May 2022 20:12:25 +0000 (+0200) Subject: :bug: Add # and b to locales X-Git-Url: http://10.10.0.4:5575/?a=commitdiff_plain;h=13857cef34584c99850385529ed7dfae5c915330;p=gwion.git :bug: Add # and b to locales --- diff --git a/src/lib/locale.c b/src/lib/locale.c index f5f76746..6b7afcdc 100644 --- a/src/lib/locale.c +++ b/src/lib/locale.c @@ -21,9 +21,12 @@ static int basic_note(const char c) { } ANN static m_float basic_locale(m_str str) { - const int base = basic_note(str[0]); + int base = basic_note(str[0]); if(base == -1) return -1; str++; + const char mod = *str; + if(mod == '#') { base++; str++; } + else if(mod == 'b') { base--; str++; } char *remainder; const long octave = strtol(str, &remainder, 10); if(*remainder != '\0') return -1;