Here Comes the Sun
The Tap Tempo project was born in February 2018, as the first C++ version was posted by François Mazen on the famous LinuxFr.org website, alias Da Linux French Page, created in 1998. It follows KISS, not the band, but the Keep It Simple Stupid principle: you hit the Enter key at each beat of the song, and taptempo computes the beats per minute (BPM). For the greatest benefit of mankind, it was published under the GNU GPLv3+ license and is even available as a Debian package.
It soon became a game to adapt taptempo in as many languages as possible, as it is more interesting than the boring classical Hello World: Ada, Avanced Brainfuck, APL, Arduino Uno, Awk, Bash, basic Amstrad CPC, brainfuck, C, C#, C++, Chisel3, Clojure, Clojure (v2), CMake, COBOL, Crystal-Lang, Elixir, emacs lisp, Forth, Golang, GOTO++, Haskell, Java, Javascript, Kotlin, Linotte, OCaml, Perl, Perl6, PHP, PWA, Python 2.7, Python 3, Python web, Python WUY, Reason, Rust, Scala, Scratch, STM32F469i-Discovery, Tcl, VBA, Verilog, VHDL, Wren, ZX81⊠Following that planetary success, a TapTempo-Federation was founded on GitHub, with the glorious goal of âpromoting the use and adoption of Taptempo, and defines related standards.â
A T. Rex version
As I found no Fortran version, I decided to write my own: an obvious reason for that enterprise, apart the admirable science behind the computation of the tempo, is that, like Elvis Presley, Fortran began its career in 1954. But before announcing to the world that major event, I decided of course to submit my work to the Fortran-lang community as an fpm project:
Any comments and ideas to improve the quality of that 0.9.0 version are welcome, as I would like it still runs when I am sixty-four.
What I learned
Interestingly, my first idea was to use cpu_time()
but I soon realised that the process was idle while the read(*, '(a1)') key
was waiting for an input! Thatâs why I finally used system_clock()
.