Establishing relationships between music note relationships

Hey everyone! I am trying to put together a doc that will allow a user to enter a music note and have the doc return all possible scales and chords etc. The issue I am encountering is that notes are letters (A-G) and then start the naming convention over after you reach the end. For example, A B C D E F G A B C etc.

Is there a way to set the “distance” or relationship for something like this? Any ideas on approach? Happy to put together a quick example doc if it would be helpful!

The first thing that comes would be to build a table for each “note” that has columns that reference the relationship. Would that be an efficient way to do it?

1 Like

Hi @Thomas_Baucom
and welcome to Coda Community! :handshake:

The “circularity” of the notes is not a big deal per se: you can reach it by dividing by the number of notes and take the reminder (via the Reminder() function).

Have a look at this very basic example:

However, having an idea of your actual use-cases would help to better understand how to model data and functions (e.g. selecting the actual corrected altered note is not that trivial)…



I think you’ll have to add more than just the note. You can make filters interactive to filter all records that are in line with the NOTE you need to search on the NOTE field or fields to ensure you don’t get any old a b c d e f g


This is actually very helpful as a jumping off point and I now see how you did the chord function. Very clever! Let me expand this and see where I get. Thanks!


I was able to play around with it some last night. I am running into the same error as your demo doc on a note like C#. It is giving me the {3} and not returning a value. Not sure how to edit that as it returns correct values for others. I’ll keep playing!

I have some ideas for handling the enharmonic G#/Ab stuff so thanks for the alternative note column idea. I can then couple that with an formula to reference the original and pick the appropriate one.

1 Like

Sorry, my fault: modulo lists should be 0-indexed. You should shift back 1-12 by 1 (0-11) in the number reference.

Curious to see your final solution!


AHHHHHH…That makes a ton of sense! I’ll share the demo doc here when I get my idea down. Thanks for the help, good sir!

1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.