Note that there are some explanatory texts on larger screens.

plurals
  1. POHow to resolve chord when given three notes in any order. Mathematics
    primarykey
    data
    text
    <p>I have an arduino attached to a Stradella system Piano Accordion. I have optical sensors on each of the 12 notes of the chords on the left hand. When I play a chord it triggers three sensors. That's ok if I want the synthesiser to play the chord but sometimes I want it to just play the root note; so if I play C major I want it to play just the note C.</p> <p>In the table below you can see that the triggered sensors for the chord C major is sensors 0,4 and 7. But because they are all triggered at the same time they may not arrive in that order, i.e. they could arrive as 4,0,7 or any combination.</p> <p>Finding the root note for C major is easy, find the two notes whose difference is 7 and the root is the lower of the two. Same for D and E Major etc. But the higher chords like F major have a high note that wraps round to the bottom again so the numerical difference is not 7 anymore.</p> <pre><code> 0 1 2 3 4 5 6 7 8 9 10 11 C Major X X X C# Major X X X D Major X X X D# Major X X X E Major X X X F Major X X X F# Major X X X G Major X X X G# Major X X X A Major X X X A# Major X X X B Major X X X </code></pre> <p>Does anyone have any ideas of how I could determine the root notes of these chords fairly cheaply (It's running in a loop at 600 times a second and the arduino is doing a LOT of other stuff).</p> <p>I'm completely stumped, I've experimented with looping up incrementally until 11 is reached and then starting again from 0 and doing this three times for every chord but it seems messy.</p> <p>I would also like to be able to resolve the other two rows of buttons on the accordion, the dominant and diminished 7th</p> <p>These are the four shapes for C, the other 11 notes will be the same shape but shifted to the right until it wraps back to 0 again.</p> <pre><code> 0 1 2 3 4 5 6 7 8 9 10 11 C Major X X X C Minor X X X C 7th X X X C Dim7th X X X </code></pre> <p>Any suggestions much apprecciated!.</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload