stew

a monorepo of some sort
Log | Files | Refs

commit 513a920f614d38381fc1733aef5f9f7885d53aaa
parent e2232599bef203dff421d7e3b93cf9b5da5da4c7
Author: glenda <glenda@kobeni>
Date:   Tue, 23 Jan 2024 17:19:32 +0000

src/wave: poke at piano

Diffstat:
Msrc/wave/piano.c | 2+-
Msrc/wave/util.c | 2+-
Msrc/wave/util.h | 2+-
3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/src/wave/piano.c b/src/wave/piano.c @@ -50,7 +50,7 @@ main(int argc, char **argv) last = r[runestrlen(r) - 1]; rp = runestrchr(keys, last); if (rp != nil) { - fprint(1, "%f\n", freq[rp-keys]); + fprint(1, "%f\n", note2freq(rp-keys)); } else last = 0; break; case 'K': diff --git a/src/wave/util.c b/src/wave/util.c @@ -14,7 +14,7 @@ rune2note(Rune r) return -1; } -int note2freq(int n) +double note2freq(int n) { // TODO: convert to proper caclucations diff --git a/src/wave/util.h b/src/wave/util.h @@ -23,4 +23,4 @@ struct Aud{ }; int rune2note(Rune); -int note2freq(int n); +double note2freq(int n);