Is there a place within this site to talk about music theory? If not, could we make one?

I’m still a fairly new sonic pi user (and just took two weeks off while my laptop was down) so just getting back into it. Also, I’m using sonic pi more as a platform to explore music making, than as a platform in which to learn how to code. I do like learning more about Ruby and SP… but that isn’t my primary reason for using SP.

As I scan through some of the SP examples and docs and things I find on youtube and google – I’m realizing that others know a lot more about music theory than I do. I took one music theory course in college 20+ years ago but have forgotten most of it.

So… is anybody else in this situation? Would it be useful to have a section of in-thread that is for people to talk about music theory? …or is there a section already for that? (I haven’t seen it)

As an example, as I read about chord theory in western music (I’m reading wiki at the moment) I find myself wondering… who came up with the chords? Is it just math in terms of finding the notes that are a 3rd and 5th above the root note?

Can math be used to find a note that sounds nice with another note, even if those notes aren’t in the same chord?

The lang guide says that chord_names “returns all of the chords that sonic pi knows about”… does this mean there are other chords? Is there a master list somewhere else? …is the list growing with time?

Hi @gl3nn206,

I recommend that you check out the music theory subreddit:
Try to read through some posts and replies each day, or whatever is convenient for your schedule. Over time you’ll get exposure to all kinds of theory - both Western and beyond - and perspectives and philosophies from musicians of all genres and walks of life. There are some regular and knowledgeable contributors who will provide incredibly cogent and detailed answers to some topics. I’ve bookmarked a few dozen responses over the last several months that made a lightbulb go on for me or inspired me with my relationship to music in some way.

Yes. It’s liberating when you discover that you can do whatever you want. There are no rules. There are often strong suggestions and shared cultural expectations, but those don’t need to matter. When you start looking around globally and realize many people don’t know about or care about 12 tone equal temperament, that can be a cue to make your own path.

That’s subjective, and can even change for an individual at different times depending on their mood and environment. So go ahead and compose an entire piece using only pitches between 440Hz and 441Hz if you’d like. If the process and/or end result brings meaning to you, you’ve got some music!

You might be interested in as a way to explore generative approaches to music

1 Like

Hi @gl3nn206,

in addition to Brian’s recommendations here are some links I collected about music theory for students of a Sonic Pi course:

  • Music Theory for Musicians and Normal People: That’s fun to read and look at: small bits, only the most important facts, easy to digest. I like this a lot.
  • How Music Works: Videos to watch. You can do that while riding the hometrainer.
  • Another How Music Works, but this time interactive. Haven’t checked this one out in depth but seems not to be bad for the beginning.
  • See the list above, you might find something else you like …

Thanks @perpetual_monday,

That reddit site looks very interesting.

The ziffers also looks interesting.


edit : it’'s more a reply to @gl3nn206
Never forget that a little band named the Beatles could’t read music. So theory is ttheory.

you can let your ears speak ! It sounds great ? ok cool :slight_smile:
if you want to know what chords are fine, let’s have a look at your prefered songs tabs and you will notice the “good” chords and show the recurrent chords.

good luck

Thanks @Martin,

I’ll scan through those links. I’ve found a few youtube sites that focus on theory (chords, scales, keys, etc) using piano – but also thought it might be interesting to have a place here where people talked about it and used SP code in the threads.

Perhaps I won’t feel the need as strongly after I get a bit more theory under my belt.


Yeah, @nlb is definitely right. The first and last authority is and will always be your ear.

Actually most musical theory is descriptive and more or less codifies what musicians (professionals and also non-professionals) found to be interesting or aesthetically pleasing (which is, no doubt, in the ‘ear’ of the beholder, but also a matter of genre, history, social and technical influences). Any prescriptive theory in music makes me somehow suspicious and is also what quite regularly composers opposed to and transcended.

Here are some elements of musical theory coded in Sonic PI (#1 and #2); maybe this is also of interest to you.

And of course, at least IMHO, this is the right place also to ask questions concerning musical theory or questions of musical aesthetics. If not here, where else…:wink:

1 Like

if you look for a strange method to be creative :

Yes. There’s even an app :wink:

1 Like

… who came up with the chords? Is it just math in terms of finding the notes that are a 3rd and 5th above the root note?

From my understanding, pairs of sound nicer when the ratio of their frequencies is close to a small integer ratio. The ratio of the frequencies of the 3rd, 4th, 5th and 7th note above the root note are approximately (6/5), (5/4), (4/3) and (3/2) respectively, which sound generally pleasing. In the other direction, taking the ratio of the frequency of the 1st note above root is approximately (17/16), which sounds dissonant.

Stepping back, I believe this is one of the reasons why the 12 note chromatic scale has been successful as it offers a good compromise of note choice and ratios of frequency combinations whose reduced fraction have small integer ratios.

There’s a paper to this effect called “Measures of Consonances in a Goodness-of-fit Model for
Equal-tempered Scales” by Aline Honingh (link) which talks about the scale choice.

Considering that the approximate frequency ratio of the 4th note above root is (5/4) and the approximate frequency ratio of the 3rd note above root is (6/5), this might give us insight why they’re called “major” and “minor” as the 3rd note above root has a higher integer ratio and so sounds just a little bit more ‘sour’ than the (5/4) ratio of the 4th note.


Thanks @abetusk, I’ll check that out.