2022-01-28 (F) Weekly Summary

I got part of the way to sending notes. I had to be careful about stopping previous messages, including any played as part of a chord. I also accounted for the channel, octave, and melody I played. I had trouble referencing the crucial array called melodies[][], which always wanted to return unusable data. I got as far as playing through the arrangement by pressing a button for each turn.
Manually advancing note

I finally got a taste of pseudo-random notes played in a loop, and it was leagues better than a neverending series. I didn't resolve all the issues, but I made my debugging contingencies stronger by adding a boolean that switches from human-readable output to MIDI messages.
DEBUGGING

I spent a whole day reverting things to a working state. It wasn't a loss, but I went back to Adafruit's OLED library and fixed a broken wire. With the Adafruit code reinstalled, I converted my wonky instrument list to a switch() case, which improved my memory issues until I tried to generate a melody. This microcontroller is too small for the project.
Rearranged layout and the old library

I still had memory issues preventing the screen from working. I eliminated functions until the culprit was gone and the system booted. The problem was with the melodies[][] array, which was too large, even though the Arduino diagnostics says my memory usage is low. I also fixed a bug that started an infinite loop when I played a chord.
Serial port view of MIDI

I tuned up some of my functions. When I change things like chords, octave, channel, melody, length, or generate a prandom melody, I need to stop the existing notes, so they don't "hang." When I change instruments, my synth recognizes that and displays the corresponding number.
Instrument recognition

I made a new copy of the button layout sticker with the final arrangement, then programmatically remapped the inputs. I tried to put lesser-used buttons off the side and feature common ones. Lastly, I made the melodies[][] array as big as possible until it froze up. This first instrument panel is done!
(0:26) Instrument V1.0 demo

The rest of the summary posts 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.

Comments