2020-01-06 (M) MIDIGlocken

I modified the code so that incoming MIDI signals would work in all the places where the physical buttons were recognized. This change allowed me to set tempo and group sizes directly from a keyboard. Another instrument, or even a computer, could have served this purpose.

Both of the white buttons attached to analog input pins, and they behaved erratically, which I dealt with before. They were still not responding well, so I did some experiments where I tested them with another program to look directly at the incoming signal. All of the analog inputs were prone to interference until I reinstated INPUT_PULLUP when assigning pinMode(). This overcorrected, and instead of unwanted button presses, I could not read the 2UP button. Since this was more stable, I left it alone and programmed five of the keyboard buttons to change modes. I had five modes; three single-player and two multi-player, which coincidently aligned with the gray switches.

Two of the inputs were twisted, and I had done this intentionally earlier to compensate for a backward output. All the reversing was unnecessary, and I don't remember why it started in the first place, so I straightened it out, which also fixed a problem where I would assign a tempo. Still, two of the buttons would not align with their neighbors, and the speed would act unpredictably.

Another issue with the tempo was that it scaled up exponentially. In my old calculation, I mapped the time between notes, but I printed the BPM. The algorithm took 60000 and divided by the millisecond delay to get the beats per minute value. I switched this around to map the BPM and infer the delay.

After all the changes, I uploaded my code, models, and 2D drafting documents to GitHub, and a link is available below. I should make a narrated video describing and demonstrating the MIDIGlocken before I close this project.
Physical keys and MIDI keyboard

GitHub for MIDIGlocken

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

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 in 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.