Skip to content

A command line taptempo written in modern Fortran, to compute Beats Per Minute.

License

Notifications You must be signed in to change notification settings

vmagnin/TapTempo-Fortran

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

TapTempo Fortran

A command line taptempo written in modern Fortran and under GPL-3.0-or-later license. Listen to a song and hit enter key with style and you'll get the corresponding number of beats per minute (BPM). This tool is very useful to quickly find the tempo of a song. You can also use it to measure your heart rate: (gently) put one hand around your throat and tap the enter key at each beat.

The original TapTempo was written in C++, but lots of porting in other languages have been developed via the LinuxFr website. There is even a TapTempo Federation.

Compilation and execution

You need a modern Fortran compiler.

You can easily build and run the project using the Fortran Package Manager fpm (https://github.com/fortran-lang/fpm) at the root of the project directory:

$ fpm build
$ fpm run
 Hit Enter key for each beat (q to quit).

 [Hit enter key one more time to start BPM computation...]

Tempo:      85. BPM
Tempo:      83. BPM
Tempo:      84. BPM
Tempo:      84. BPM
Tempo:      81. BPM q

To add options, put them after --:

$ fpm run -- -r 3 -s 8 -p 2

Or you can also use the build.sh script if you don't have fpm installed, or just simply type:

$ gfortran -o taptempo src/taptempo.f90 app/main.f90
$ ./taptempo

Options

Usage: taptempo [options]

Options :
  -h, --help            display this help message
  -o, --output          save the results in the taptempo.txt file
  -p, --precision       change the number of decimals for the tempo,
                        the default is 0 decimal places, the max is 5 decimals
  -r, --reset-time      change the time in seconds to reset the calculation,
                        the default is 5 seconds
  -s, --sample-size     change the number of samples needed to calculate the tempo,
                        the default is 5 samples, the minimum is 2
  -v, --version         print the version number

Contributing

Technical information

About

A command line taptempo written in modern Fortran, to compute Beats Per Minute.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published