2021-12-20 (M) EWC_Panel Best tempo reading possible on drum machine

I started rewriting code to identify the incoming tempo now that I wasn't skipping messages. Since I limited the finest adjust to 5bpm, I added a function to calculate the nearest five-divisible number. Despite the coarse nature, I saw the tempo jump from 60 to 70, and when I looked at the recorded times, it would jump from 57 to 67. These times might average out, so I researched averaging the incoming values and saw an elegant snippet. When I pumped my readings through the function, the result was very stable, as shown in the image below when transmitting 50bpm. As I turned up the frequency, my output became skewed. Even though it was proportional, I didn't feel like subtracting fractions each time. Instead of interpreting the reading and playing based on the calculated rate, I will rely on the presence of the timing signal and advance the melody every sixth clock command.
Reliably reading 50bpm

The rest of the posts for this project have been arranged by date.
First time here?

Completed projects from year 1
Completed projects from year 2
Completed projects from year 3
Completed projects from year 4
Completed projects from year 5
Completed projects from year 6
Completed projects from year 7
Completed projects from year 8

Disclaimer for http://24hourengineer.blogspot.com and 24HourEngineer.com

This disclaimer must be intact and whole. This disclaimer must be included if a project is distributed.

All information on this blog, or linked by this blog, is not to be taken as advice or solicitation. Anyone attempting to replicate, in whole or in part, is responsible for the outcome and procedure. Any loss of functionality, money, property, or similar, is the responsibility of those involved in the replication.

All digital communication regarding the email address 24hourengineer@gmail.com becomes the intellectual property of Brian McEvoy. Any information contained within these messages may be distributed or retained at the discretion of Brian McEvoy. Any email sent to this address, or any email account owned by  Brian McEvoy, cannot be used to claim property or assets.

Comments to the blog may be utilized or erased at the discretion of the owner. No one posting may claim property or assets based on their post.

This blog, including pictures and text, is copyright to Brian McEvoy.