How to display updating text/image, melodychecker

Hey! I’m building a simple GUI app to tell me about what chords have a melody note in the top, based on a slider/combo box and hardcoded information. How do I create an output efficiently so I don’t overcomplicate this?

not sure if i understood you correctly, especially “note in the top”, but i think you want to know how to detect what chord is being played from midi (which are integers) from a melody. let’s pretend you don’t want it to be from a melody but just from 3 notes being played at the same time. then your note % 12 gives you the number that represents the pitchclass, like C, D, Eb etc, and note / 12 gives you the octave it’s on (if that’s even important)… i think. that’s how i’d imagine it to be. if not like this probably similiar. but if you want to detect a chord from a melody that’s harder because melodies can also contain notes that don’t fit to the chord but only to the scale, and in case of jazz even out of scale. what would your programm do then? i would probably consider just counting the amounts of each of the notes and the ratio of them to each other is the likelyness that it’s part of the chord. also maybe give notes a higher weight if they have a long duration or come at the end of a motive

I’m not doing any calculations. The chords are hardcoded for the melody note that rings out in the top. So if I select C then Am/E, C/E, F, F/A would tell me the options for arranging cthe harmony.