Tempo Tapper  1.0.0
A simple library to implement a tempo tapper
Functions
term_tt_posix.cxx File Reference

Example of a terminal based tempo tapper on POSIX compliant systems. More...

#include <unistd.h>
#include <stdlib.h>
#include <stdio.h>
#include <curses.h>
#include <tempo_tapper.h>
Include dependency graph for term_tt_posix.cxx:

Go to the source code of this file.

Functions

int main ()
 

Detailed Description

Example of a terminal based tempo tapper on POSIX compliant systems.

Author
Patrick Pedersen
Date
2021-08-05

The following file provides an example of a terminal based tempo tapper on POSIX compliant systems (ex. Linux, MacOS, etc.). Once the program is started, the user will be prompted to tap in the tempo using the enter key. The terminal displays the detected tempo in BPM, restricted to the 2nd decimal, and the tempo period in ms, restricted to the 2nd decimal. The tempo tapper can be reset by pressing the r key and quit by pressing the q key.

Dependencies:

To compile, execute the following command from the projects root directory:

$ gcc -D TT_TARGET_PLATFORM_POSIX -I include/ examples/posix/term_tt_posix.cxx src/tempo_tapper_common.cxx src/tempo_tapper_posix.cxx -lncurses -o examples/posix/term_tt

The resulting executable will be located in examples/posix/. To execute it from the project root directory, run:

$ ./examples/posix/term_tt

Definition in file term_tt_posix.cxx.