2 or more notes played at the same time that doesn't sound awful?
May 5, 2013 6:14 PM   Subscribe

I've been toying with a goofy little data-mashing project. Here's the rub: I take some text, break it down into characters, give each character a musical note and then spawn an object in a 3D world with that note/letter attached. You then wander the landscape, playing sounds and 'reading' the world. Goofy. It sounds like a hot mess. More inside.

But here's my music theory Q: Often, more than one of these objects is "playing" at a time. The result is a painful, disturbing noise. Is there a musical scale or some phenomenon in which multiple notes playing at the same time compliment each other? Obviously, a chord is such a concept, but I can't control what objects are near each other, only what notes they could possibly be attached to.
posted by GilloD to Media & Arts (10 answers total) 7 users marked this as a favorite
 
Any two or more notes played together is a chord. Some are dissonant and some are consonant.

The most pleasant and harmonious notes (as well as largest number) played at the same time that will be easy for you to implement will be a pentatonic scale, which uses 5 notes out of the octave. As you move around from area to area, you can change keys! And make music!
posted by bensherman at 6:23 PM on May 5, 2013 [1 favorite]


You can learn some great basics from musictheory.net.
posted by scose at 6:36 PM on May 5, 2013 [1 favorite]


Do you have a sample of the sound? When you said "more than one at a time" I thought of clipping.
posted by RobotVoodooPower at 7:51 PM on May 5, 2013


Multiple notes together make a chord, which sounds great (if it's a nice-sounding chord!) I don't know much about music theory, but there are all different kinds of chords and you can figure out how to use a group of notes to make a chord. For instance, a Major G chord contains a triad of the notes G, B and D. You could try to group your notes or attach them in that way.

You can use a scale -- the notes in that scale should compliment each other. That's the idea behind using a scale to solo over a song -- as long as you hit notes in that scale, it should sound fine, even if you don't really know what you're doing. (It will sound better if you use some other musical techniques, but you won't hit a "bad" note.) I'd do some reading up on scales and keys and then you could assign notes within a scale or something. But someone with more music theory knowledge could say if that would eliminate or reduce your odds of having notes playing together that don't work.
posted by AppleTurnover at 8:02 PM on May 5, 2013


Response by poster: The most pleasant and harmonious notes (as well as largest number) played at the same time that will be easy for you to implement will be a pentatonic scale, which uses 5 notes out of the octave. As you move around from area to area, you can change keys! And make music!

5 Notes of any octave? In any key? WHich 5?

Multiple notes together make a chord, which sounds great (if it's a nice-sounding chord!) I don't know much about music theory, but there are all different kinds of chords and you can figure out how to use a group of notes to make a chord. For instance, a Major G chord contains a triad of the notes G, B and D. You could try to group your notes or attach them in that way.

Yeah, that's the sensible idea, but the whole core idea behind the project is that if you were insane enough, you could "hear" the news by walking through the area. Forcing them into a grouping would be like rearranging the letters in a sentence.
posted by GilloD at 8:24 PM on May 5, 2013


Response by poster: What method are you using to assign musical notes to characters right now?

I am entirely winging this. Basically, I recorded 26 notes off a synth program on my iPad, then assigned a to 1, b to 2 etc etc.

Do you have any suggestions for generating musical notes/tones? Programs, apps, whatever? If I got serious about this I'd obviously like to do my own recording, but this is kind of a weekend prototype.
posted by GilloD at 9:03 PM on May 5, 2013


What language are you writing in? There's probably a computer music toolkit that someone can suggest. It's really easy to generate a synthesizer-sounding piano/organ/plucked string note, you can swap in more sophisticated sounds later.

In general, notes whose frequencies are small integer multiples of each other (1:2, 2:3, 4:5) sound like they go together, larger ratios (10:12:15 eg) more often sound stressful or dissonant. In a musical scale, that corresponds to a certain number of steps between notes (e.g., the 1:2 ratio is an octave).

If you arrange neighboring objects to be a pleasing number of steps between them, then the overlaps will probably sound more musical. I don't know if you can simultaneously satisfy that constraint and the constraint that each letter has a specific note though.

What about finding the most common digraphs in your source text, and assigning notes to letters starting with the most frequent digraphs getting nice intervals? You'll eventually not be able to assign pleasing notes because of conflicting paths through the graph, but at least most of the intervals a user walking through a story hears would be pleasing.
posted by hattifattener at 9:23 PM on May 5, 2013 [1 favorite]


I don't quite understand. If each object was a letter instead of a note, you would only sometimes get a recognizable word. The way you have it set up is extremely random, and the you're going to have to impose some sort of order for it to sound/read well.

I used this page: http://www.pianochord.com/list-of-C-chords

Here is what is going to happen. Pick a nearby note at random. Let's say a "C" was nearby. "C" is now the root. In the C major scale, the only note groupings that would sound good are "CDEGB", "CEGA", "CDEA", or "CGF". So if I walk by an "F" while the "C" is the root, it is allowed to play. If I then walk by an "E" while the other two are still playing, it is muted and does not play until the "F" stops playing or a new root is chosen.

You could hard code this for every possible chord. You could also code it generically, but you would have to eliminate some possible chords for simplicity's sake.

Any note can be the root of the chord. Each note has a particular relationship to all the other notes, and select groupings sound acceptable as major or minor chords. (As you walk through the environment, the current root can be picked randomly from the available nearby objects. As it changes, the acceptable groupings change.)

Let the notes be defined as C, Csharp, D, Dsharp, E, F, Fsharp, G, Gsharp, A, Asharp, and B (then it starts over with C again, but an octave higher). They are each a half step away from each other. Don't worry about what that means, because we're just going to number them based on the root we pick.

If our root is C, it is assigned the number 1, Csharp is number 2, D is number 3, etc.
If our root is B, it is assigned the number 1, C is number 2, Csharp is number 3, etc.

For any randomly chosen root, the major scale is notes numbered 1, 3, 5, 6, 8, 10, 12. We don't care about that really. What we DO care about is the chord groupings that sound good.

notes 1, 3, 5, 8, 12
or
notes 1, 3, 5, 10
or
notes 1, 5, 8, 10
or
notes 1, 6, 8

For the most major chords with minimal coding, the easiest thing is to only play the notes numbered 1, 3, 5, 8, and 12 (where 1 is the randomly chosen root from the nearby objects, and all other notes are assigned a number based off that).

The minor scale is notes 1, 3, 4, 6, 8, 9, and 11. The easiest thing to do is to allow notes 1, 4, and 11 to always play, and then 3, 8, or 9 may play (but only one of those three could play at any one time).

There are also other chords that I'm not sure how to categorize (I'm not really a musician, I just play one on TV). For those chords, notes 1, 5, and 11 always play, and then 2, 7, 8 or 9 may play (but only one of those four notes at any one time).


TL;DR

- Let the notes be defined as C, Csharp, D, Dsharp, E, F, Fsharp, G, Gsharp, A, Asharp, and B (then it starts over with C again, but an octave higher).
- Pick a nearby note to be the root.
- Give each note a number, starting with the root as 1.
- Set the root note to ON.
- Notes 6 and 10 are never played, so they are set to OFF.
- Search nearby for a 3, 4, or 5.
If 3, set it automatically to a major scale: 1, 3, 5, 8, and 12 are ON, all others OFF.
If 4, set it automatically to a minor scale: 1, 4, and 11 are ON, pick either 3, 8, or 9 to be ON, all others off.
If 5, set it automatically to this scale: 1, 5, and 11 are ON, pick 2, 7, 8, or 9 to be ON, all others off.
- Choose a new root, renumber the notes, and start again.
- To smooth the transition, you could maybe only choose a root from the notes that are currently ON.
- Once that is working you could add variation using octaves.

I worked out a longer version, but I couldn't optimize it, and it ended up being too long for what I think you are looking for. This is already long enough, but hopefully something will help. In any case, it was a fun diversion. Thanks!
posted by rakaidan at 12:19 AM on May 6, 2013 [3 favorites]


Programming languages sometimes let you specify the note wavelength. If you can do this then you can create harmonies by playing two sets of wavelengths at the same time where one has a small-integer relationship to the other (1:2, 2:3, 3:4 etc).

If you are instead indexing notes from a synth by pitch, then presumably each note is a semitone apart. Taking the base note to be 1, the next note up (whether black or white) will be 2 and so on. There will be 12 unique pitch classes, by the time you reach 13 you are at the same pitch as 1 but an octave higher.

Playing 1 and 13 together will sound like an octave - that's the most harmonious pair that there is (because one is double the frequency of the other).

Then in approximately descending order of harmonious-ness:

1 and 8 gets you a 'perfect fifth'; nice.

1 and 6 gets you a 'perfect fourth'; nice.

1 and 5 gets you a 'major third'

1 and 10 gets you a 'major sixth'

1 and 4 gets you a 'minor third'

1 and 9 gets you a minor 'sixth'

1 and 3 gets you a 'major second'

1 and 11 gets you a 'minor seventh'

1 and 2 gets you a 'minor second'; not nice

1 and 12 gets you a 'major seventh'; not nice

1 and 7 gets you 'the tritone'; ugly

You can combine these, eg 1 and 5 and 8 will get you a major triad.
posted by moorooka at 1:16 AM on May 6, 2013 [2 favorites]


A simple approach might be to stick with the pentatonic scale but assign each letter two notes. So considering two octaves the letter A might be the notes c and E, or D and G, where lowercase is the lower octave. That way you only need 10 notes but can assign 10 choose 2, or 45, note pairs. When two sounds play at the same time you get at least three notes in the pentatonic scale.
posted by monkeymadness at 4:27 AM on May 6, 2013


« Older Low-maintenance lazy girl w/ thick curly hair...   |   Day rooms in Honolulu Newer »
This thread is closed to new comments.