From 6bb9c7c400a928afb541d18818a05eb8139f6532 Mon Sep 17 00:00:00 2001 From: Thomas White Date: Sat, 12 Nov 2011 21:30:08 +0100 Subject: Convert tempo to BPM --- maestropond.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/maestropond.c b/maestropond.c index 0ac0de6..bfe3a44 100644 --- a/maestropond.c +++ b/maestropond.c @@ -21,6 +21,12 @@ #include #include + +static const int bpm[] = { + 40, 50, 60, 65, 70, 80, 90, 100, 115, + 130, 145, 160, 175, 190, 210 +}; + static void show_syntax(const char *s) { printf("Syntax: %s [options]\n", s); @@ -155,7 +161,7 @@ static size_t process_tempo_data(unsigned char *f, size_t ptr) int tempo; tempo = f[ptr++]; - printf("Tempo = %i\n", tempo); + printf("Tempo = %i bpm\n", bpm[tempo]); return ptr; } -- cgit v1.2.3