summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas White <taw@bitwiz.org.uk>2011-11-12 21:30:08 +0100
committerThomas White <taw@bitwiz.org.uk>2011-11-12 21:30:08 +0100
commit6bb9c7c400a928afb541d18818a05eb8139f6532 (patch)
treea9aaaccc95b2c22fc87def9f27c18950632bd88c
parent0327cf8217900174041d4f14a19aace4098dd8a6 (diff)
Convert tempo to BPM
-rw-r--r--maestropond.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/maestropond.c b/maestropond.c
index 0ac0de6..bfe3a44 100644
--- a/maestropond.c
+++ b/maestropond.c
@@ -21,6 +21,12 @@
#include <sys/types.h>
#include <sys/stat.h>
+
+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;
}