Linking Chord Names and Lists of Notes

I would like to create a reporter that would enable a user to enter the name of any chord for the ukulele and return a list of the four notes associated with that chord. In other words, if the user enters the text “C Chord” as an input, the reporter would return the four notes “G4 E5 C5 G5”.

Image

What is the most elegant and efficient way of doing this? (This could be done with a series of If … Then statements, for example, but I’m sure there must be a more elegant way to do this in Snap!)

Association list? (ASSOC in the List Utilities library.)

Perfect! Knew there had to be a more efficient method.

We're gradually making progress in developing music extensions using the Snap! API. Hope to have something to share in the near future.