# Visualization of Tones being played together

Recently I found this video showing the "visual representation" of sound waves.

I was trying to figure out how these shapes were being generated. I am interested in the parts where there is a stable shape.

At this point in the video they reference a perfect fifth - based on this diagram a perfect 5th (7 semitones) would make a ratio of 3:2

I was able to generate this same image by plotting the following functions on desmos

So far for two different tones at once, everything is making sense since I can map one part of the ratio to the y axis and the other part to the x axis.

For one more example at this point, they are making a major triad, and so for first part of that, I was able to use the ratio 5:4, which generates this (almost the same as the video but upside down)

But then they add in the 3rd note. Now I have no idea what they are drawing. Initially I thought they might have been combining the two ratios into one.

• That is the major 3rd is a 5:4 in relation to C, the perfect 5th is in 3:2 (6:4) in relation to C, therefore their sum would be 5:6 in relation to C (not sure if that's true, just an idea I had), but drawing that ratio didn't give the same result they have in the video...
• The closest I've gotten to what they have is by summing more of the trigonometric functions together (I was trying things out and this looks the closest):

Questions

• Could someone help identify how they are animating more than 2 tones together?
• Why do the visualizations still have slight movement to them even though they are in just intonation?

How does this look?

The visualization shown is plotting two signals against each other. When you hear three tones, that just means one of the two signals is actually two of the tones combined.

The form is:

f(x) = sin(ax+i) + sin(bx+j)

g(x) = sin(cx+k) + sin(dx+l)

plot (g(t),f(t)) on 0<t<2π

a,b control the frequency of tones in signal 1.

c,d control the frequency of tones in signal 2.

i, j, k, l are phase offsets for the oscillators. The oscillators in the video are not synced, so the starting phases are random. If you want to get the same shape, you need to measure or guess the appropriate phase offsets.

The slight movement of the figures is just measurement error.

• Hi Edward, it looks great - thanks for the equations and explanation as to why it moves. Now I am just wondering about how you got chose the constants a b c d in your equations, let me know if my guess is right. For the first diagram, we are dealing with a major triad. Based on the table that involves the ratios 3:2 and 5:4, then you make the ratios have a common second part, so then they become 6:4 and 5:4, so then a = 4, b = 6, c = 5, d = 0 is that right? And in the second one, you change the octave 2:1 to 8:4 and set d = 8? Commented Mar 30, 2021 at 14:20
• Also I'm guessing their choice for the order to set a b c d is some arbitrary choice and choosing a different order yields a different animation right? Also when I watched the video they said "this is and the sound and visual image of ...." They are just showing one possible visual representation here right? This is not some canonical way of showing chords I'm assuming? Commented Mar 30, 2021 at 14:23
• Also one last question, do you know if it would be possible to create such images from someone playing live music through a speaker? Commented Mar 30, 2021 at 14:24
• d=8. I started with 4, and I need a third, fifth, and octave above that. So, 5:4, 3:2 (=6:4), and 2:1 (=8:4). The way they chose which oscillator goes where is not really canonical but it is sensible. Osc 1 goes to channel 1, osc 2 goes to channel 2, osc 3 goes to channel 1, osc 4 goes to channel 2. The tool you're looking for to do it in real time is called a vectorscope. You will need two separate audio sources, however, so live music might not give you much information on the scope. Commented Mar 30, 2021 at 14:46