*** MUS171 #12 02 10
Miller: @0000 So this is now Chapter 5 of the book. Oh, let's get the book out while we're at it.
es:@0000
@0015 What happens now will correspond pretty closely to the material in Chapter 5, so that you theoretically can actually find out by looking in the book, what's going on. Which has not always been true up until now because I have been operating in a exploratory,
es:@0015
@0030 make-patches-as-you-go mode.
es:@0030
But, now that the basic notions of how to make patches and figure out what they're doing have been covered. I'm going to try to be a little bit more, whatever you call it ... a little bit closer @0045 to the written thing in the book, because that way it'll be much easier for you to make correlations between the book and what's going on in the class. So nothing in the book is actually wrong. Nothing in class has been terribly wrong, as far as I know, either. But there haven't
es:@0045
@0060 been perfect correspondences.
es:@0060
In fact, people who have been writing, have been making looping samplers for today's homework have been looking in the book to figure out how to do the enveloping. The book does it differently from how I did it in class, so that you now know two different ways of doing enveloping @0075 and you might not know how they're different -- which I'm not going to try to clear up right now because it's too weird.
es:@0075
But what I do want to do is start referring to stuff in the book as I go through the next few patches, because it's just going to make the next thing @0090 a little easier than it would have been otherwise, I think. Book ...
es:@0090
So the place we're at is this chapter on modulation, and @0105 I'll get to this in a second. But to talk about modulation, you have to talk, or be ready to talk, about spectra. So think about things as having spectra and I'll tell you more about the words that one uses to describe spectra in a moment.
es:@0105
But first @0120 I will go back to the patch that I was working just in the last 15 minutes of the class on Tuesday, and go into somewhat more detail about what patch is actually doing and why the sounds that it makes sound the way they do -- in a very hand-waving kind of way, before I show you
es:@0120
@0135 more quantitatively what's going on.
es:@0135
So here's the patch up. This is the fourth patch from last class, and I just realized this morning I haven't put these patches up on the web. I'm sorry, I haven't done that comment-@0150 and-put-it-up-on-the-web thing. So you haven't seen these patches except in class so far.
es:@0150
Basically, what happened in class was... The first thing was take a microphone and multiply the microphone signal @0165 by an oscillator to mess up its periodicity. And then it was time to go back and explain a little bit more carefully what was going on. And so, to do that, I had to make a thing that had some kind of waveform so that I could then multiply that by a sinusoid and mess it up and show you how you can think about that.
es:@0165
@0180 There are many ways of thinking about it.
es:@0180
So here's the patch again, cleaned up. Basically, the patch on the left is something that you saw in week one or two, which is about clipping @0195 and what it does to waveforms. So if I show you that, this is a nice, clipped sinusoid. Oh why don't I fix it so I can clip as I please, so that you can see how that's going. ...
es:@0195
@0210 So, for instance, if I tell it the top of the clip is going to be 1, then we're, what we're doing is we're allowing the thing to go down to -0.2... Oh, that's just for, just to be clear, I'll put it in the -0.2.
es:@0210
@0225 Now the value's going down to -.2, but all the way up to 1. And if I made this thing be -1, then you would see the original sinusoid that didn't get clipped.
es:@0225
And this is an example of waveshaping. @0240 It's taking a perfectly good sinusoid, or in fact, some other thing, but the first thing to think about what happens to a sinusoid when you do this to it and putting it through some function or other.
es:@0240
If the function were linear, @0255 or a Y=M*X + B kind of function, then you would just get a sinusoid out. It would have a different offset and a different amplitude. But if you give it some kind of nonlinear function -- in particular, the function that is represented by clip~ -- then out
es:@0255
@0270 comes something that's quite different. The function that clip~ is giving us right now, if you graphed it ... OK, so clip~ ... right now it's clipping from 0 to 1. ...
es:@0270
@0285 If you clip from 0 to 1, you can think of that as a function with a graph. The graph looks horizontal. For negative inputs, it's zero.
es:@0285
@0300 From zero to one, it follows the input, so it looks like Y = X, and then, starting at 1 again, it's flat again, at 1. And so it looks like a sloppy step function.
es:@0300
@0315 So it's not linear. And if you -- you'll see this in gory detail later, but the basic deal is that -- when you put a sinusoid through a nonlinear transfer function, as we call it, then what comes out not
es:@0315
@0330 a sinusoid. And when it's not a sinusoid, then it has a spectrum, it doesn't have just one partial in it. I guess that's almost a tautology.
es:@0330
@0345 What comes out of the oscillator here is repeating itself every 110th of a second. In other words, it's repeating 110 times a second. So, since this is just a function, it doesn't have any memory in it, what comes out is doomed to repeat at exactly
es:@0345
@0360 the same period, if not even less. In other words, when the oscillator gives you the same value at two different moments in time, the function has to give out two similar values, too.
es:@0360
So if you put a periodic function in to clip~, you're going to get a periodic function out, @0375 with the same period. So, what that means is that if you listen to the original sound, it has a pitch: [tone] Low A.
es:@0375
Miller: And when you listen to @0390 the result of clipping, it's got the same pitch. [tone]
es:@0390
Miller: But it's got partials. This is a special case, actually. ... @0405 I showed this because it's simple, but it's got a very strong octave just because of the way it, happened to be set up. And if I do something like that, then you'll hear... [tones]
es:@0405
Miller: Just basically what you heard before, except it has a different timbre, @0420 which is to say it has different partials. [tones]
es:@0420
Miller: And this is basic, this is how in electronic music, you make... Well, this is one, this is the most generally used thing in electronic music @0435 that I'm aware of, for making things that have partials that have strengths that you try to control in one way or another. But in order to control them, you have to do math. In order to do it, you just throw something into a nonlinear function at will and you get it out.
es:@0435
@0450 The history of this is sort of that guitarists in the '40s and '50s started actually not over driving their amps, but messing up their speakers. I believe the first example of distortion guitar was some jazz guitarist
es:@0450
@0465 who decided to take a knife or a pencil maybe, and just bash the cone of his amplifier speakers, so that it would sound fuzzy. [laughs] And it works!
es:@0465
In a very loose way of speaking, what that's doing is making the amplifier @0480 no longer be a linear thing and start being a nonlinear thing. In other words, it's a thing where you put two signals in and what comes out is not the sum of what it would have been for the two signals separately. And anything that has that kind of property has the ability to infuse new frequencies
es:@0480
@0495 into the sound that might not have been present there before. OK, now, it's time probably to start talking about spectra and more graph-y, graph-y/comprehensible way,
es:@0495
@0510 so that I can now show you something about what's actually happening. -- Before I do that, I have to finish showing you, we've just finished reviewing, or bringing back out the patch from last time,
es:@0510
@0525 because I didn't show you the other thing that you can do. So here's the... [tone starts, stops] Miller: ...thing that has partials. And here's a thing that has partials... [tone] Miller: ...that is also being ring modulated. [tone stops] Miller: And what I did was, what I played you before was, sounds like this: [tone]
es:@0525
Miller: @0540 Well, not quite like that. More like that. [tones stop] Miller: Sounds where you would take some sound in and just destroy its periodicity by... [tones start, stop]
es:@0540
Miller: Basically multiplying it by the wrong sinusoid. Well, "wrong" -- @0555 a sinusoid that has a different period from the sound of the original, from the original waveform that's getting graphed. But of course... So here's the waveforms that we're putting in. Here's this: [tone]
es:@0555
Miller: @0570 What this is doing is taking this nice waveform and sometimes sending it through positively, sometimes sending it through negatively, and sometimes going through zero when it's doing its main work. And you just get
es:@0570
@0585 a funky sound, a funky waveform like that. All right? It's artistic. OK?
es:@0585
Now, of course, it would be true that if this sound happened to be periodic, with the same period @0600 that we started with: Miller: Now, it's still an interesting waveform, but now the waveform looks periodic. And in fact, it has the same period as the sound that we just modulated. Way different waveform, but the same
es:@0600
period. @0615 Or to listen to them, here's what we just modulated: [tone] Miller: Sorry, that's the signal that was that sinusoid clipped. Miller: And here's the same thing, ring modulated: [tones alternating]
es:@0615
Miller: @0630 So now you can imagine taking... Oh, I didn't tell you the rest... OK, so now let's try 660. [tones] Miller: Let's leave it on .. try different multiples of 110. [varying tones]
es:@0630
Miller: @0645 Oops. Sorry. Can't type that well. So let's leave it here, and I'll show you that... turn it off for a second.
es:@0645
Miller: @0660 OK, now we've got something that... Hmm, still got the same period. It can't help but have the same period because both of these things -- although this thing has six cycles within the same period of time, which is 1/110th of a second,
es:@0660
@0675 it's still true that after a 110th of a second, it's come back to where it was. It just happens to be the sixth time it's done that.
es:@0675
So, it's still true that every 110th of a second, which is about this length, both the clipped oscillator here and this oscillator, @0690 which I'm multiplying by -- that's the ring modulating oscillator -- both of those have, have come back to where they were before. And so we still have no choice but to have a signal which is periodic... Well, a signal which repeats every 110th of a second -- which,
es:@0690
@0705 except for in special cases, will have... [tones start, stop] Miller: Will have the same pitch as the original that we started with. [tones] Miller: So there's the sinusoid. Here's the clipped sinusoid. Oops [tones start, stop]
es:@0705
Miller: And here's @0720 the clipped sinusoid times ring modulation:[tones start, stop]
es:@0720
Miller: OK? When you learn how to do this, or when you learn how to think about this, you can make literally almost anything that you want. There are all sorts of @0735 tricks to, well, mental tricks to try and figure out what you do, in terms of what kinds of functions and what kinds of things to multiply to get specific kinds of effects. And so, first off, I want to show you more theoretical aspects of just, what's
es:@0735
@0750 happened to the sound from the point of view of the spectrum. And then I'll go through and start working on actually building spectra, according to desiderata out of this tool box.
es:@0750
44] Those are the subjects of Chapters 5 and 6 of the book. @0765 Probably, this will take a couple weeks. So, the first thing that we need in order to be able to discuss this intelligently, is to be able to look at spectra of signals.
es:@0765
@0780 I'm going to just ask you to take a certain thing for granted, which is that you can measure the spectrum of a signal and graph it. What I can do is make a sort of definition of what the spectrum of a signal is. Let's see where is my ...
es:@0780
@0795 I'm going to ride roughshod over some of the details here. This patch is in
es:@0795
@0810 "Audio Examples." This is the first patch in Chapter 5. This is a patch that says, "Sorry, but we have to do these spectra."
es:@0810
When it's time to actually measure the spectra of things using a patch and understand how that thing @0825 is being done, that's in Chapter 9 of the book. So, what we're doing is we're borrowing results from the future, in order just to be able to see spectra. And, what do spectra look like?
es:@0825
OK, so, signals have waveforms and signals have spectra. What I've done here is just made a very simple @0840 additive synthesis instrument that does this: [tones]
es:@0840
Miller: ... There's a @0855 frequency coming in here -- it's just a standard receive. And we're multiplying this frequency by the numbers 0 through 5. Why 0 ? -- For
es:@0855
@0870 completeness sake, and in order to explain a very strange thing about the spectra of sinusoids that I can't hide from you. I just have to explain it.
es:@0870
So, I'm going to come out with it, right at the beginning. And, so, the ones that you can hear are @0885 fundamental, octave and so on, like that, right?[tones]
es:@0885
Miller: Now what we can do, in this patch anyway, is we can start graphing the spectra and the waveforms of these things. So, here's the fundamental. It has a waveform, which is just a sinusoid of the appropriate frequency, @0900 and it has a spectrum which, one graphs. There are various ways that you can do this, but one can graph it in terms of the partial numbers, that's to say, the multiple of whatever the fundamental frequency is that we're playing at.[tones]
es:@0900
Miller: @0915 Yeah, I don't know what order to tell you this in ... So, let me just make another spectrum
es:@0915
@0930 and play it for you, or, show it to you. [tones] Miller: Here, now, I've turned the first, second, and third and fourth harmonics on, and so on like that. Now here's the funny part. I can turn this partial on that doesn't have any sound, because it's just constant, because it has a frequency of zero.
es:@0930
@0945 It adds something to the spectrum, too. (By the way, my computer's gagging right now; but just let it gag.) Now, there's a weird thing that will basically
es:@0945
@0960 just kind of bite you once in a while when you're trying to do something and something comes out wrong:
es:@0960
A sinusoid that happens to have a frequency of zero, you can assign it a strength in the spectrum, but @0975 the most correct way to assign it strength is to give it a strength of 1 as opposed to 1/2 for the other sinusoids,
es:@0975
that's to say sinusoids of nonzero frequency. @0990 Chapter 8 will explain why, for the first time. I'll tell you what it is for those of you who like mathematics or know about mathematics: Sinusoids actually have two frequencies in them; one positive and one negative.
es:@0990
@1005 They don't act like quantum theory, where all the frequencies are positive. They can be real-valued and the only way you can have a real-valued sinusoid is to have positive and negative frequencies of equal strengths and negative ... equal strengths --
es:@1005
@1020 talk about the phases later -- and negative frequencies.
es:@1020
So, really, although I don't show it on this table, this oscillator has a peak at frequency 1, relative frequency 1, and a peak at relative frequency -1. @1035 You can't perceive it but it's there.
es:@1035
And, the reason this is double is because here, those two peaks coincide. @1050 All right? For those of you who've gone as far as, maybe, second-semester calculus, sin(omega t) = [( e^(i omega t) + e^(-i omega t) )
es:@1050
@1065 / 2] -- In other words, a sinusoid has two complex exponentials and each of them has an amplitude of one-half. <<The formula given is actually for cos(omega t). The expression for sin(omega t) is the _difference_ of the exponential terms rather than their sum, as stated. (However, sin and cos are the same waveform, simply phase-shifted; so the principle of the strength being double is correct/identical, whether the waveform is thought of as a sin or cos function.) >>
es:@1065
So, if you don't want to know the equation, here's what it looks like. @1080 This is the truth. And there's no possible way that ... well, you can sort of pretend it's not true by saying, "Oh, it's just frequency zero and we'll just make it the same height."
es:@1080
But, all of the stuff that we try to do later will be wrong if we do that, because @1095 DC does come crawling into signals and if you don't account for it correctly you will get wrong answers.
es:@1095
That's the thing about the spectra of sinusoids. Oh, yeah and while we're here, this is worth looking at: @1110 When you turn all the partials on, you get a wonderful thing which is called a "pulse train". Or I believe this is the Dirichlet kernel. It's a collection of sinusoids, all of which have
es:@1110
@1125 equal strengths -- except that this one is double because of funny stuff.
es:@1125
But, anyway, this is just DC, which I was just talking about, the height of the thing, the DC amount of the thing, which we could make arguments about. The more partials we put in, @1140 the more closely this will become to a perfect pulse train.
es:@1140
Engineers will actually talk about infinitely thin pulses, which consist of all the possible harmonics. You wouldn't do that in @1155 computer music, because some of them would have higher frequencies than the Nyquist frequency, and they would fold over and you would have trouble.
es:@1155
So, you don't make pure pulse trains in computer music. You try to make band-limited pulse trains, that's to say, pulse trains that only go out to @1170 a certain number of partials, in order to have your computer be able to deal with it. And this is what those pulse trains look like.
es:@1170
I'LL turn a couple off so that you could see the progression. @1185 Here's a pulse train with three partials, actually, 0, 1 and 2. And then the more partials that you throw on of equal strength, the skinnier and taller the peak gets, and the more wiggles --
es:@1185
@1200 "ripples" the engineers would call that -- you will see between pulses.
es:@1200
So, that's a pulse train. That's just a qualitative thing to know about, because you will see pulse trains again in the future. Now, the reason I'm telling you this is to be able to tell you @1215 what happens when you do things like apply a non-linear function to a sinusoid or multiply some complicated spectrum by a sinusoid.
es:@1215
Now, the next thing I'm going to do is... @1230 I'll stick to these, and then I'll start telling you more of the whole truth later. (I'm going to save this, you probably can't do this, but, if you're actually writing the thing, you can save your own help files.
es:@1230
@1245 Let's see. Help. Browse. ...)
es:@1245
Now we're going to look at "E02.ring.modulation" ... Ring modulation; @1260 now what I'm going to do is make a nice "spectrum-knowledgeable" -- is that the right word -- pep speech about ring modulation.
es:@1260
@1275 So here, now, what's happening is the following: We're going to go back, and we're going to look at our nice bunch of sinusoids that has a nice spectrum,like this.
es:@1275
Oh, yeah. I can actually ask this one to graph repeatedly on @1290 a metronome so that I can change things live. OK. This is idiot's delight now. I can make funny spectra and look at their waveforms in spectrum.
es:@1290
Now, what we're going to do, gee whiz, we're going to multiply this thing by an oscillator. @1305 The oscillator is going to have a frequency, and - I'm cheating a little bit about the frequencies here. Because, to make it very easy to analyze, I'm choosing a frequency that's a simple multiple of the sample rate.
es:@1305
So, I'm not going to talk about exactly @1320 what the frequency's values are, just relatively. So, if I say in "f/16" -- if this is the frequency f, if I say (- Oh, can we hear this? Let's listen to it. Yeah.)[tones]
es:@1320
Miller: @1335 OK, now we're hearing it, and now, if I say, "Well, let's make this thing be eight." OK. Oh no wait, let me get this:
es:@1335
@1350 Now we have a sinusoid, and now we're going to start multiplying it by an oscillator. And, as you know, what that does is that splits the sound up into two frequencies,because that's what
es:@1350
@1365 ring modulation does to sinusoids, as described last time. One way of thinking of that is, beating is the same thing as having two neighboring sinusoids. It's a mathematical formula. But, it also means that, if someone gives you
es:@1365
@1380 this: [changes a tone] , and says, "Give me two of those, and make them be split in frequency," -- you just multiply by a sinusoid that has non-zero frequency and you get that: [new tone playing]
es:@1380
Oh, and by the way, @1395 now you see why it starts to make sense to talk about negative and positive frequencies. Because, in fact, this thing has negative and positive frequencies in it and that is why this peak that you saw split into two peaks.
es:@1395
@1410 It's because the negative-frequency one, by multiplying with it, drops the frequency, and the positive one added to the frequency. And, furthermore, when I set that frequency to zero, The two collide and then I get that.[original tone but louder]
es:@1410
@1425 Now, I'm playing tricks with phase here. If I do something like make these two beat against each other. I just asked this thing to do one-hundredth, one one hundredth. Now, we have
es:@1425
@1440 the two things beating very slowly.
es:@1440
And, what you have is, from one point of view, two sidebands that are separated, but, from another point of view, you have an amplitude that's changing. In fact, now, I can say, "@1455 Multiply it by an oscillator frequency zero." But, I no longer have the good situation where these two add up. They add up wrong. Why did that happen?
es:@1455
@1470 Actually, there are two reasons why that happened. This is sometimes called "interference." This is an interference effect, from one point of view. These two things
es:@1470
@1485 have phases, such that, when we combine them, depending on when you do it, depending on exactly when you combine them
es:@1485
@1500 they might have different relative phases. And then, when they add up, they won't add up to twice the amplitude. They'll add up just to some amplitude or other, which might be anywhere from zero to twice, depending on whether they interfere constructively or destructively.
es:@1500
Student: @1515 You said the multiplying oscillator will have frequency f/16? Miller: That's just my pedagogical choice of decent step to use. Student: How do you set it?
es:@1515
Miller: @1530 The patch is computing this thing called "frequency step," and it's actually setting that to a fundamental over 16,and that's hidden in some sub-patch. Probably in here. And the only reason
es:@1530
@1545 I did that was just so that when you go into the patch and start mousing on it, you get decent range. There's nothing special about 16. -- Now how could I actually make this thing behave itself?
es:@1545
@1560 Maybe I just can't now. [tones] Miller: OK. Good. So I just tried again and got a better match. So we can now pretend that the thing's in phase again.
es:@1560
@1575 So then, it follows that if you had a few other sinusoids, [tone changes].. (Here's why I used 16 so that you can see the original spectrum and you could also see the splitting and they would appear on the same picture
es:@1575
@1590 and with reasonable spacings.) Now I'll say, let's make the frequency step be 1/16 again ... or rather 2/16. And now what we've done is we've taken each one of those three peaks and split them separately into side bands.
es:@1590
@1605 Let me shut this up for a second and talk about that.
es:@1605
This process, if you think of this as a function of what goes in -- so a signal goes in @1620 and a signal goes out, and so what's happening is it's some kind of function. That's in a loose way of speaking. It's a linear function. In fact, it's nothing but times tilde. But it's times tilde times a signal not times
es:@1620
@1635 a scalar; times a thing that's changing in time. That's a linear operation. What that implies -- It implies many things, but for right now what that implies is that
es:@1635
@1650 if you took two signals in or here three signals in and added them up...(oh, yeah. I didn't tell you this did I? If you hook a bunch of signals into a single inlet, they are added automatically. I think I mentioned that at one point,
es:@1650
@1665 but maybe it's a good moment to say it again.) So this is now multiplying the sum of these things by this original oscillator.
es:@1665
OK. Now I'm talking about linearity. One good thing about linearity is that, in this case, @1680 given to us by the distributive principle. If you call this thing, I don't know what, call these things A, B, C, and F here, then F x (A + B + C) is the same thing as (F x A) +
es:@1680
@1695 (F x B) + (F x C); and that's the distributive rule. And what that is saying here is that if you take two or three signals and you superpose them, that's to say add them, and then multiply them by this modulating oscillator, you get as a result
es:@1695
@1710 the sum of what you would have got putting them in individually. This was not to be taken for granted. So here what you saw was that we had (-- oh, I turned it off) [tones]
es:@1710
@1725 We had originally this signal going in and if you multiply by an oscillator of frequency zero we see at least a multiple of that coming out. And it turns out that although I didn't have to be true, the result of ring modulating this is the sum of the result of ring modulating
es:@1725
@1740 the individual ones. [tones] OK. All right. Is that clear?
es:@1740
@1755 Examples of things that are linear in this way, obviously, multiplication although here we're multiplying by something that's not constant in time.
es:@1755
@1770 And the other example that you'll see later is filters. Well, I introduced a filter quickly but I haven't told you about filters in detail. But filters also are, at least in their usual form, are things
es:@1770
@1785 that are linear in the sense that you put two signals in and you will get out the sum of what you put in individually.
es:@1785
@1800 As a detail also, any kind of linear function like this, you can multiply the input by some constant. For instance, double the input or multiply the input by i or anything else that you want and what comes out will be that many times
es:@1800
@1815 stronger or weaker than the signal went in too. In other words, linear things respect changes in amplitude and will give you the same relative changes in amplitudes on output.
es:@1815
@1830 In general, that's not true of nonlinear things. What's a nonlinear thing you've seen very recently? Student: Wave shaping is it?
es:@1830
Miller: fYeah, the wave shaping example. This clip @1845 (oh, where did I put it?) This clip tilde operation was not linear -- and as a result, let's see...well
es:@1845
@1860 one thing that happened about that was the oscillator that you put in (I haven't said enough to explain this well yet)... The oscillator that you put in, if you change it's amplitude you will not just change the amplitude of the output and give you the same thing
es:@1860
@1875 louder. It will give you a different signal altogether. OK. So I'll go back and belabor that point with you in a few minutes.
es:@1875
@1890 So, this is ring modulation and oh, right, special case again: What happens if we pull the zero frequency signal in? [tones] So now we have the same thing as we had before except I threw in
es:@1890
@1905 frequency zero which has double amplitude. And now when I start modulating that, it does the correct thing which is again, it gives me two side bands [tones] each of which has half the strength but, of course, the original was twice as high.
es:@1905
@1920 And also, this one we only see one of because the other one is negative frequency.
es:@1920
All right. And it's even worse than that because, @1935 and this is hard to see very well, but as I start pushing the frequency of modulation up ... [tone changes] oops, oh yes. A funny thing happens when you hit a half -- so 8:
es:@1935
@1950 Now what's happening is the original signal had peaks here, here, here and here. So, (oops,
es:@1950
@1965 I pulled the table over but I didn't pull the labels over. They might be useful later. Like that, OK.[tones]
es:@1965
Miller: So, if I modulate it, that is to say, multiply by an oscillator of half the frequency, this thing @1980 gets a side band up here and this one gets a side band that is halfway down and those two will collide. And when they do, they will superpose. And furthermore, depending on the phase,
es:@1980
@1995 they will sometimes superpose into something stronger and sometimes superpose into something weaker. And now
es:@1995
@2010 the next funny thing is... let me turn the DC off. Actually, let me just have one of them again. OK, so here's the nice original signal. ...[tones]
es:@2010
Miller: @2025 OK, so now we'll start pushing the frequency up. Then we'll split it into two partials again. And as we keep going up,
es:@2025
@2040 what's going to happen when we hit zero? Well, we're going to keep going, but we have a doppelganger who is going to come back the other way.
es:@2040
@2055 So what you saw, if you just sort of think of things in terms of characters, is this peak just bounced off of the vertical axis. What happened
es:@2055
@2070 mathematically might better be described as you don't see the negative frequencies, but there is also a peak here and a peak there.
es:@2070
And this peak kept on charging towards the negative as they were getting split further and further. But the one that was already negative charged back the other way and turned to positive. @2085 And there is a special case right when I ask the thing to modulate it so that it goes to zero frequency. ... Oh, I didn't do it right. Oh yes, that is 32:
es:@2085
@2100 Then we get a different strength again because now we have two peaks. Again, the negative and the positive frequency peaks coincide. And now we get another situation where the phase is controlling how the two act.
es:@2100
@2115 So here again, depending on the phase, we'll get one or another strength. Oh dig! I almost got it turned off. And that's just what that is.
es:@2115
@2130 If you want to control that exactly, you have to control exactly the relative phases of the two things that you're multiplying. ... Questions about that?
es:@2130
@2145 So in general, ring modulation, sometimes people use to mean multiplication by any old thing. But ring modulation in the simplest sense is "multiplying by an
es:@2145
@2160 oscillator that's putting out a sinusoid."
es:@2160
What it does: if you give it a spectrum that just can be described as a bunch of peaks, is it takes each peak and splits them. And furthermore, as the peaks go further and further away from the original, sometimes they bounce off of @2175 the zero frequency. And meanwhile, when any two peaks coincide, they coincide but they don't necessarily add amplitudes. They do something -- bound only by the triangle inequality.
es:@2175
@2190 So, to make you the nice full picture ... [tones] there's kind of a typical
es:@2190
@2205 ring modulation output spectrum. And if you wanted to really go into it, this is several, this is two and change times the fundamental frequency.
es:@2205
And so the DC peak got thrown all the way out here and meanwhile all the other peaks @2220 got sort of scattered around in that particular way. OK. ... Yes? Student: Can you say something more about negative frequencies?
es:@2220
Miller: @2235 Well yes, negative frequencies... In general, what ends up happening -- Everything, for technical reasons, ends up being symmetrical about the frequency zero.
es:@2235
@2250 So that anytime you make a negative frequency you hear it as a positive frequency.
es:@2250
So the general rule is that the frequencies you hear here are the frequencies that went in plus this frequency and minus this frequency. Except that when @2265 you compute the frequency minus that frequency, if that is a negative result, flip it around to positive, take the absolute value of it, take what you would get. OK? Now I want to talk taxonomically about spectra a little bit more so that I can
es:@2265
@2280 have more terms to tell you more qualitatively what sorts of things you can get out of this. Now this is all still just what happens when you multiply a signal by a sinusoid.
es:@2280
So one thing that your ears @2295 told you was that here, when we multiplied by this sinusoid ... (oh, I think I have to just turn this all off. I'm not sure I'm going to be able to get
es:@2295
@2310 rid of this all together. Let's see...)
es:@2310
OK, so what happened here was when I told it to multiply by a decently low frequency sinusoid, and by the way, I chose the same frequency as @2325 the frequency of the thing I'm modulating by, then I get something like that in the waveform and I get something that ... I can't show you the spectrum of this in this patch right now, but it sounds not
es:@2325
@2340 terribly different from the original sound, which is something like this.[tones]
es:@2340
Miller: But as the frequency goes up, the sidebands are being pushed further and further out. Furthermore the sidebands @2355 that are negative are getting pushed further and further out, furthermore, the sidebands that are negative are getting pushed further and further out because they're wrapping around. And that becomes more and more true as you go up, so that you get sort of a knot of frequencies that gets higher and higher.
es:@2355
@2370 Unfortunately, you can't just use this in its current state to make a nice sweeping filter kind of effect. Because if I slide this from 660 down to 550,
es:@2370
@2385 it was harmonic at the outset and it's harmonic at the end, but it goes through a whole bunch of inharmonic results intermediate. You have to do something smarter if you want then to be able to make continuous changes between these.
es:@2385
@2400 Now, to show you something about how you can predict that. You have to go make more pictures. But now, it's better to show pictures, that are just dead pictures in the photo, as opposed to this live demonstration.
es:@2400
@2415 So, here, first off, talking about spectra. I've been using some terms without defining them, and other terms I want to define right now. In general, a spectrum ... a spectrum,
es:@2415
@2430 at least for our purposes, is going to be a description of how strong the frequency content, or how strong a sound is at all the possible frequencies.
es:@2430
This is what a ... this is something that you could @2445 talk about it, for a sound or for light. This is a representation that ignores time. So, right now, we're just going to sort of pussyfoot over the fact that time is changing and this spectrum could be changing in time, which is
es:@2445
@2460 not a mathematically correct thing to talk about, but which is in fact the thing that you have to talk about when you're talking about sounds, because they do change in time.
es:@2460
So, we're just going to forget about that, for now, and we'll deal with that a little bit later. Or maybe we'll let Tom Erbe deal with that in Music 172, I'm not sure. @2475 So, the basic deal is that spectra consist of a description of how loud the various frequencies are that make up a sound, but there's a more fundamental distinction, which is, is the sound to be regarded
es:@2475
@2490 as being made up of a discrete set of frequencies, or in fact is it a continuous frequency thing like white light, or like noise.
es:@2490
So, in sound land, @2505 you can make ... you can -- by either playing a string instrument or whacking a bell -- you can make things that have, perhaps an infinite but at least a countable collection of frequencies
es:@2505
@2520 in them, and if you restrict yourself to the Nyquist frequency, there will be a finite set of them. Or, you can have something like noise, which I haven't told you much about yet, but noise could be better described as consisting of a solid mass of
es:@2520
@2535 sound at all frequencies. And, the distinction there, is between a discrete spectrum, like these two, and a continuous spectrum, like this. This looks like
es:@2535
@2550 a dense discrete one, but I'm trying to describe a continuous one there. I haven't even shown you how to make noise yet, but just type noise~ into an object and you'll get noise, but you won't be able to do much with it yet.
es:@2550
So, noise is available. Noisy sounds -- which are also sounds that you @2565 would get just by regular operations like this -- are sounds that you can't describe as being objects that have a fixed set of vibrational modes that sit there and vibrate and you can listen to them. For
es:@2565
@2580 some deep reason, your ear loves things that vibrate in modes, and is built to be able to separate sounds that are distinguished by the fact that they have different modes of vibration in them.
es:@2580
You can argue about why that @2595 would be, but it might have something to do with being able to hear people speak. Because there are modes of vibration that you set up in your throat, and your throat makes noise, and you can use that modality to hear someone speaking over background noise. Your ear has been very well-developed to do that,
es:@2595
@2610 and that hearing facility, but I think was probably originally for listening to voices, turns out to be what makes music possible as well.
es:@2610
Music in the sense of things that have pitches. So, continuous noisy spectra are @2625 things that aren't described that way -- aren't described as things that just have modes that vibrate, but rather things that generate sound because of heat or whatever, some kind of random motion, as opposed to a vibrational motion.
es:@2625
@2640 I'm waving my hands pretty much -- both metaphorically and physically here.
es:@2640
So, that's the difference between a discrete spectrum and a continuous spectrum. And those two terms are not exactly accurate uses of mathematical terms. @2655 If you happen to have a discrete spectrum like this, oh, whether you have a discrete or a continuous spectrum, you always have ... you can always pretend that you have a thing which is called a spectral envelope. Which is an imaginary
es:@2655
@2670 curve that you draw over the spectrum to describe what the spectrum looks like as a shape, as opposed to ... as opposed to what? ...
es:@2670
Well, OK, so the spectral envelope is this line here, or this ... what do we say, this curve here that I drew. @2685 Which actually is the same curve for all three of these examples. The envelope is in some sense, an idealized description of what the spectrum looks like shape-ishly, as opposed to in
es:@2685
@2700 the details of where the frequencies are. So, to speak very loosely, the spectral envelope is in some ways related to the timbre of the sound in a way that's independent of the positioning of the frequency
es:@2700
@2715 components which make the sound up, which could be discrete or continuous. So, this would sound noisy, and this would sound pitched. And this would sound -- oh, yeah, right. Next thing:
es:@2715
If you have a discrete spectrum - that's to say a spectrum @2730 that can be said to be consisting of a bunch of different frequencies that you can just write out, so that they'd be finite, up to a finite frequency - then you can say, "Is it a harmonic or an inharmonic spectrum?"
es:@2730
What that is saying is, "@2745 Are the frequencies that we see multiples of a fundamental frequency?" OK. These terms are loose because we're talking psychoacoustics here, in some ways. But, for something to be harmonic, it's frequencies should
es:@2745
@2760 be multiples of a thing that you can hear as a pitch, which means maybe above 50-ish Hertz and below 4000-ish Hertz.
es:@2760
That's hand-wavey, too, because you can hear pitches down to 25 or 30 Hertz, @2775 but it gets harder . If it is true that all the frequencies that you see are multiples of some fundamental that looks somewhere between 50-ish and 4000-ish Hertz, then, multiples, then you can say this is a harmonic spectrum.
es:@2775
@2790 And, if you took such a sound and looked at it as a signal in time, you would see a repeating waveform. So, there's this great fact about repeating waveforms, which is if you look at their spectrum, you will see
es:@2790
@2805 a harmonic spectrum. And the frequencies present in the spectrum will all be multiples of a frequency which is the fundamental frequency, which is [1 /(period of the repeating waveform)]. OK? And that's acoustics.
es:@2805
@2820 Oh, and for interesting reasons, both a cylindrical air column and a string stuck between two things, turns out to make harmonic spectra, because
es:@2820
@2835 miraculously enough, the various modes of vibration of either an air column or a string are all multiples of the fundamental frequency. Student: It's integer multiples, right?
es:@2835
Miller: Oh, thank you. Integer multiples, not just multiples. -- @2850 Yeah. I probably have been saying "multiples," meaning "integer multiples" all day. [laughs] This is why you need two mathematicians in a room.
es:@2850
The mathematician's worst enemy is unstated assumptions. ... @2865 Inharmonic spectra are spectra whose component frequencies are not describable as integer multiples of a good fundamental. And that would be typical of, say, a metal object that you whack and vibrate it. A metal
es:@2865
@2880 bar, or a bell, or that sort of thing. Solid, vibrating objects that aren't strings I guess tend to have this effect.
es:@2880
OK. So, we saw a patch that imitates a bell, @2895 the Risset bell patch. And, if you look at those frequencies, the .56 and the 1.4, I think, those are not all integer multiples for one good candidate for a pitch, and so, as a result, you hear an inharmonic sound. You can ascribe
es:@2895
@2910 a pitch to it, but it's a different thing from a harmonic sound. And, if you look at it in time, you wouldn't see a repeating waveform.
es:@2910
OK. So, the spectral envelope @2925 is a handy way to determine, or just describe the shape of the thing. Then in the shape, you can color it in with either a harmonic or inharmonic discrete spectrum or with a continuous spectrum.
es:@2925
And, that's not a complete description of sound, by any means, but that's a working description of @2940 sort of a first layer of distinctions that you could make between different large classes of sound for making brutal distinctions. ... Questions about this? Yeah.
es:@2940
Student: You know ...we aren't not talking about enharmonic, right? @2955 Because last week we talked about inharmonic. "Inharmonic" means it's not harmonic, right? Miller: Yeah, and anharmonic, I don't know what it means. I ought to. I mean, etymologically, it means ...
es:@2955
Student: @2970 It's like techno transposition in notes. It's like C-sharp to D-flat. Miller: Those are enharmonics? Student: "En." Enharomonic's, E-N.
es:@2970
Miller: Oh, E-N. Oh, oh, oh, oh, oh, yeah. OK, I'm from Tennessee, where we don't make differences in pronunciation between @2985 E-N and I-N. [laughter] Miller: Yeah, sorry. So, yeah, I don't know about that term at all. That's a music term, and I don't have a license for talking about that kind of stuff. Student: So inharmonic just means it's not harmonic right? It's a different term.
es:@2985
Miller: Yeah, yeah, it just means "not harmonic." @3000 And then there's "anharmonic," which means, "doesn't know about harmonicity," but I'm not sure how you're supposed to use that term, so I stay away from it.
es:@3000
Yeah. OK. So there's that. @3015 Now to go... actually, let me stay here. Now, using that language, I think I have to go to the next thing ... I'm going to skip the equations, and reach for the picture. ...
es:@3015
@3030 This is stuff that I just described to you being shown in a good text-y way as opposed to a demonstrate-y way. This is non-moving pictures that just show peak-splitting because of multiplication
es:@3030
@3045 by sinusoids, in all of the cases.
es:@3045
But, what I really want to do is get down to this picture, yeah. Here, now, is a way of thinking about what happens to both the frequency @3060 content and the spectral envelope of a sound when you ring-modulate it.
es:@3060
OK. So, we're taking a sound here, and for the sake of argument, I'm starting with a harmonic sound, and I'm not @3075 assuming that the sound doesn't have a zero frequency component, because that might be a useful thing to have in the sound.
es:@3075
And, anyways, some things will get it, regardless of whether we wanted it there or not, for reasons that will show up later. OK? @3090 Now, we will take that and multiply it by a nice sinusoid with a low frequency -- a frequency that's small compared to the fundamental frequency of this harmonic sound. And, this is now showing the spectrum of an imaginary harmonic sound, right?
es:@3090
@3105 So, then what's going to happen is, oh, let's see. So, all right.
es:@3105
@3120 This peak turned into that peak. This peak turned into these two peaks here. There and there. This one turned into these two peaks here and here.
es:@3120
@3135 This one turned into these two peaks here and here, this one turned into these two peaks and this one turned into these two peaks.
es:@3135
And then, either to clarify or to obfuscate the matter, I'm not sure which, I tried to draw a spectral envelope through all the peaks that wraps @3150 around through zero frequency. In other words, the peaks that were going down, I drew one part of the curve through, and the peaks that are moving up, I drew the other part of the curve through. In order to describe really, in order to try to represent really the fact that what we're
es:@3150
@3165 looking at is just the positive frequency portion of a thing, which has negative frequencies as well, but happens to have symmetry about the zero frequency axis.
es:@3165
But we can see that, although we lost amplitude here, @3180 well, we lost amplitude, but we also got extra peaks. And you could talk about the power, and blah-blah -- That will come. But by and large, the spectral envelope of this is something like
es:@3180
@3195 a constant times the spectral envelope of that, and we could argue about whether this spectral envelope should be regarded as a half of this one, or just equal to it, because there are more peaks here.
es:@3195
And nobody will ever tell you whether throwing a whole bunch more peaks into something should mean that you should make the @3210 spectral envelope look higher or not. No one knows how to talk about that. Spectral envelope is a completely imaginary concept, only useful for trying to make descriptions like this. And
es:@3210
@3225 the good thing about this way of representing it is that it works when you start talking about modulating by, or making the modulating frequency be very high.
es:@3225
So, the thought experiment here is that we're taking this signal and multiplying it by a sinusoid, @3240 exactly as in the working patch that I showed you, and now we'll make the sinusoid we were multiplying by be so high that it's actually higher than most of the peaks in the original signal. So here is the modulating frequency here.
es:@3240
@3255 This is the thing that DC turned into. And this first partial turned into these two. Now, that was these two, but as we pushed this thing further up, this one got pulled into zero and bounced off it, and now
es:@3255
@3270 became two positive frequencies.
es:@3270
And furthermore, this thing pulled most of the spectrum with it, except for this very last peak, which is still ... this peak here still hasn't "wrapped around through zero," as some people say, but it's still positive. @3285 So now what we have is a radical change in the spectral envelope. We took the spectral envelope, but thinking of the spectral envelope as being a ... as extending into negative frequencies as well as positive frequencies, we're taking the entire spectrum envelope and
es:@3285
@3300 hauling it out into some different place.
es:@3300
Furthermore, if this modulating frequency happened to be chosen to be a multiple of this fundamental, then all of these peaks @3315 would land on multiples of the fundamental too. And again, we would get something that had this as a fundamental. It just would have a radically different spectral envelope. Which would be the spectral envelope
es:@3315
@3330 unfolded and then pulled out. All right? And that is why that thing sounded the way it sounded ... that thing being over on the separate page. That's what's happening
es:@3330
@3345 when we're doing this.[tone] Miller: Oops. That's this: [tone]
es:@3345
Miller: What we're doing now, is we're taking this signal, which has whatever spectrum it has, and we're @3360 multiplying it by something whose fundamental frequency is seven times the original fundamental, that's pulling it way out into high frequency land, and meanwhile, now we're hearing it and its mirror image.
es:@3360
@3375 All right. And you can do this with anything. ... Questions? --- Oh, right. The other thing about that is, here is the waveform, if you want to see that.
es:@3375
@3390 This waveform also does the right thing as you multiply by ... here's a low one, and here's a very high one:
es:@3390
As you multiply by a faster and faster sinusoid, our original thing which looked @3405 like this, turns into a more and more wiggly waveform, which is also consonant, or in agreement with, the fact that we're hearing progressively higher and higher frequency content, even though we're not really hearing this pitch
es:@3405
@3420 as such, the pitch of this frequency. Student: If you're supposedly clipping at negative 0.2 then how come you can see frequencies below? Isn't it clipping everything below negative 0.2? Miller: That's not a frequency. That's ...
es:@3420
Student: @3435 Amplitude.
es:@3435
Miller: Yeah. That's an amplitude. So, oh right. So here, why do you see things below there? It's because we're multiplying by this oscillator, that ranges in value from +1 to -1. And so, these large negative @3450 values are when the original waveform was up high, but then got multiplied by -1. So this is minus 0.2, which is getting multiplied by this sinusoid, so it's ranging from minus two to positive two, because this
es:@3450
@3465 is ranging from 1 to -1.
es:@3465
... This is stiff medicine, I know. @3480 OK, but if you get your head around this stuff then you can make all kinds of cool sounds, so it's good to be able to do. ... As a, not quite a "slight aside" ... OK, here's
es:@3480
@3495 a sound.[tone] Miller: If I happen to choose not... Oh, let me go back to, let me go back to 110. [change tone]
es:@3495
Miller: All right, here's this sound. What would happen if I said not 110 and not 220, but halfway between them, @3510 which would be 165? [change tone]
es:@3510
Miller: It goes down an octave which, let me graph it for you. What now is going to happen is that every other waveform @3525 of this is going to catch this, being negative what it was before. And as a result, it'll be whatever it is followed by itself upside down, followed by itself right side up, and so on. And one way to think of that is that it then has twice the period,
es:@3525
@3540 because you have to wait for the right side up one to repeat, which takes twice as long. So that would explain why the pitch went down by an octave. [tone] Miller: See, here's the original: [change tone] Miller: And here's that: [alternating tones]
es:@3540
Miller: @3555 And furthermore, over here, one can explain that by... [tones] Miller: Come on, that was kind of cool. So, let's make this 8. [tone]
es:@3555
Miller: So here's @3570 the original sound. [tone] Miller: And here's the sound being ring-modulated by something an octave below, - that's to say half the frequency. [tone]
es:@3570
Miller: And now we've got... Not only did we get the thing down an octave. But we've got a thing that only @3585 has odd harmonics. We have 1/2 and 3/2 and 5/2 and so on -- times the original frequency. Because each peak, the peak that was 1 times the original frequency -- became
es:@3585
@3600 0.5 and 1.5. The next one became 1.5 and 2.5, and so on. And all the side bands crashed into each other to give you, again, the same number... Well, the same number +1 of partials as we had originally.
es:@3600
Roughly the same spectral envelope, @3615 because we're ring modulating by a relatively low frequency and so, because of this picture, we didn't change the spectral envelope very much. But we changed the placement of the partials. And in particular,
es:@3615
@3630 as a special case, we replaced the partials with ones that are placed at an octave below but odd harmonics.
es:@3630
Miller: All right? So that's a thing that you can do with ring modulation. If you only knew what @3645 the pitch of someone's voice was, or the frequency of someone's voice was -- the fundamental frequency -- then you could divide that by 2 and multiply it by their voice and you would drop their voice down an octave, and you would roughly be respecting the spectral
es:@3645
@3660 envelope of the original voice. ... So, since that's a good thing to be able to do, let's do it. That actually shows up in another one of these examples.
es:@3660
Miller: ... @3675 Yeah, this is the example right here. So, with apologies, here is our favorite radio announcer:[tone] Miller: Oops. Let me get rid of this. Shut up. Let's get rid of this now. [tone stops]
es:@3675
Miller: @3690 OK. [...]
es:@3690
@3705 All right, now "Continuous soft and relaxing..." can come back. OK, I haven't told you about this ... but there are objects in Pd that will try to determine the pitch of sounds.
es:@3705
Miller: One is called fiddle. @3720 Oh, "looper", yeah. This is just a sample looper, just like you know about. There's the sample, we've got a phasor. Not even doing anything special, I'm just multiplying the phasor by 44,100 and then reading the table.
es:@3720
@3735 Very sloppy. And then we're hearing this: Recording: "continuous soft ... continuous soft ..."
es:@3735
Miller: And then if we take that and figure out what its pitch is, using the wonderful fiddle object... And by the way, maybe we should... This is pitch and amplitude pair, @3750 there's stuff to do here that I would have to describe fiddle to tell you how to do in detail, but you get the help window for fiddle and see it.
es:@3750
But anyway, it's pitch and amplitude pairs that we'll unpack to just get the pitch. Then we use moses to get rid of pitch estimates that are 0, because that meant it just failed @3765 to find the pitch altogether. And then we have a nice number, which we can convert from MIDI to frequency and then we can multiply it by a half. So that's...
es:@3765
So you take the fundamental frequency of something and multiply it by a half, you're an octave down. @3780 And then, that can be the frequency of an oscillator that we will multiply by the radio announcer. And then I, just to make it louder, I multiply by two, and then you get this. Recording: "continuous soft ... continuous soft" Miller: See, here's the original. [recording starts, stops]
es:@3780
Miller: And here is @3795 the octave down, but only odd harmonics: [recording] Miller: And then if you want the whole thing, you add them together. [recording] Miller: This is, the funny thing about this example was... [recording]
es:@3795
Miller: The fellow's voice @3810 actually goes all the way out 50 Hertz anyway. So first off, we're giving fiddle a real workout. But second, the frequencies that you hear coming out, could be going down to 25-ish Hertz, which are just monstrously low, even
es:@3810
@3825 for this guy. [recording]
es:@3825
Miller: The other thing to know... OK, so the general rule is "Multiply by oscillators with relatively low frequencies, you maintain roughly the spectral envelope, but change the @3840 the component frequencies." And as a result, you heard... [recording] Miller: ...the same vowels coming out as the original. You can... [recording]
es:@3840
Miller: It's intelligible speech still ... @3855 I don't know how you, I'd have to give you some real speech so that you'd, so you could decide whether it's intelligible or not, because we've heard that so much that, who knows what it is now in your ears?
es:@3855
But at any rate, it would be intelligible speech if you put intelligible speech in, because the spectral envelope is @3870 roughly speaking preserved by multiplying, or ring modulating, by a relatively low frequency sinusoid. It didn't move things around very much in distance, but it changes the component frequencies.
es:@3870
The other thing, or an other thing that you can do @3885 is say, "OK, let's just multiply him by an oscillator that is 15 times the fundamental frequency." Now, what that'll do is that'll take whatever he's got and throw it up into, well... So, if he's going, he's ranging from 50 to 80 Hertz, so that
es:@3885
@3900 times 15 is... Something like a kilohertz to 1500 Hertz.
es:@3900
That's taking all the nice, those nice low frequencies in his voice and turning into things that aren't low frequencies, right? And then you get this. @3915 Let me turn the original off.[recording]
es:@3915
Miller: So now you can get, not exactly chipmunking but aliasing ... And still, you can sort of persuade yourself you hear the same pitches. And actually, this is also good @3930 to add to the original. Then you get... [recording] Miller: This is sort of monstrous. [recording] Miller: Something that, I don't know, the sound of someone talking through a paper plate, or something like that. OK, so that's... Yeah?
es:@3930
Student: @3945 So is this how the octave dividers from the '60s, the pedals they had back then worked? Or is it different altogether?
es:@3945
Miller: I'm not dead sure about this, but I think what they did was something@3960 simpler, which was, they assumed the incoming sound was a sinusoid and they put it through a triggered flip-flop, a D flip-flop. Student: OK.
es:@3960
Miller: And that would be electronics. It doesn't work as well when you do that. @3975 But on the other hand, if the guitarist is very careful, he can get it to behave, OK? And there's a wonderful solo in Led Zeppelin to prove it. This is much easier to get to work
es:@3975
@3990 than that ... and if you've tried any of those old pedals, you'll know what I'm talking about.
es:@3990
Miller: Oh, and another thing about it is that this only works with a monophonic signal. If I gave this a signal that had two different pitches in it, as if, for instance, if you played two strings @4005 on an instrument together, this wouldn't be good for dropping that by an octave. For this to work, we're assuming that the signal coming in is periodic, or almost periodic. Otherwise, it'll do something else.
es:@4005
@4020 Put another way, it's a perfectly linear process, so to two strings it will do exactly
es:@4020
@4035 what it does to the individual strings, added up. Except that -- you've got to choose one pitch to modulate it by: Which of the two pitches of the strings you're going to choose? So you can get one of the strings to go down an octave, and the other string turns into something else.
es:@4035
@4050 So that's just a sort of a cheap thrill with ring modulation.
es:@4050
OK. ... @4065 So are there any questions about this before I go back to the original example? ... Yeah? Student: Can you explain how the modulation makes the frequencies co-incide?
es:@4065
Miller: ... OK. So that's, yeah. I can show you that @4080 happening here, I hope. [tones]
es:@4080
Miller: Oh, wait, let me turn this off now. So now what's happening is, as I increase the frequency of the oscillator that modulates by, each of these things... @4095 each of these things turns into two side bands.
es:@4095
If I want this side band to crash into this side band to superpose with it as one frequency, I would make this thing be exactly half of the fundamental, so that @4110 each one of them would come halfway over and then they would meet. And that, we do this way: Oh, there: Student: So if you put in 24, would that all sound similar?
es:@4110
Miller: @4125 Yeah, you're right. Except, again, now, OK, so 24, let's see. We're doing half integers times 16, right? So 8, 24, 40,
es:@4125
@4140 56. I can't do, oh, 72? Yeah, there we go. Now 88, right? As opposed to the multiples of 16...
es:@4140
@4155 Turn it off. [tones stop]
es:@4155
Miller: @4170 OK, so again... Oh, actually, changing this by a multiple of the fundamental even, of the fundamental frequency will give you another spectrum that, which lies down on the same
es:@4170
@4185 frequencies in some sense as the other.
es:@4185
In other words, if I start adding or subtracting multiples of the fundamentals of this, I'll make other spectra which will line up with the spectrum I just got. And that could be @4200 the original frequency if these are actually integers, or it could be half the original frequency if those are half-integers or something else inharmonic, if they were something else, like three.[tone]
es:@4200
Miller: Now I can @4215 make more spectra with these frequencies by adding 16 again, which is... [tone] Miller: Which is being normalized to one. So one to 35... [tone]
es:@4215
Miller: 35 plus 16, anyone? 41? ... @4230 Oh, 51. Thanks. Ooh, sounds better. 41 was wrong, right? 51's good. And so on, like that.[tones stop]
es:@4230
Miller: Are there questions about that? ... @4245 OK, next matter. This will go on until we're done, I guess. This is going to go on for,
es:@4245
@4260 probably about four lectures' worth. I should say, there aren't very many things to do; there's just lots of ramifications of a very small number of things.
es:@4260
So really, all we're doing for @4275 the nonce is taking oscillators, running them through non-linear functions, and then multiplying things together, sometimes adding things together. It's now perhaps time to go back to this original clip example.[tones]
es:@4275
Miller: @4290 [...]
es:@4290
@4305 This is a clipped sinusoid, and, by the way, you know this already, you can now get timbres by changing what you clip by. That's these waveforms here.
es:@4305
@4320 If you were smart, you could harness that to give yourself a collection of timbres, all of which are harmonic.
es:@4320
If you do it right, you can start talking about things like, "What's the @4335 relative concentration of energy in low versus high harmonics in a sound like that?" That might give you ways of making qualitative changes that you'd want in spectra.
es:@4335
What happens when you do this? The only way @4350 of describing what happens when you do this that is easy to understand-- well, there are two things that are easy to understand; one is that clipping is distortion. That people understood perfectly well in the 50's and 60's.
es:@4350
The other thing is that you @4365 can also think mathematically about what happens when you apply non-linear functions to oscillators. The simplest non-linear function that you might want to apply would be simply squaring.
es:@4365
Where we're going now is @4380 we're going to work ourselves up into functions by just talking about polynomials-- that's to say, the original signal, which is itself, it squared, it cubed, it to the fourth power, and so on. It turns out that it's very easy to analyze what that does to
es:@4380
@4395 the frequency content of things.
es:@4395
Then, if you get a more complicated function-- if you can approximate it with a polynomial-- then you can come up with a description of what the non-linear function does. Furthermore, if you're smart, @4410 if you want to do something, you can dream up a polynomial that might do that for you -- or make a function that it approximates -- Apply that function, and get a desired effect. We'll start out inductively
es:@4410
@4425 by saying, "Here's an oscillator..." ...
es:@4425
Miller: "Save-as" now <<saving "2.10/3.morewaveshaping.pd">> @4440 So, now we're just going to try the simplest possible thing, which is to take the original signal and square it.
es:@4440
@4455 Let's see if we can get rid of this, so I can show you this and the clipped one, and give you these for comparison.
es:@4455
@4470 To square something, all you have to do is multiply it by itself.
es:@4470
@4485 Now, squaring things does funny things to their amplitudes. If I took this thing and doubled it in amplitude,
es:@4485
@4500 then, after I squared it, it would quadruple in the amplitude. This is a thing which does not respect changes in amplitude. Well, it respects it in the sense of getting louder when it gets louder in some sense, but other than that, it doesn't do the thing
es:@4500
@4515 that you might wish. It does something better.
es:@4515
Here's the original oscillator, which I want to graph for you: Here's that oscillator squared. @4530 Here the period is about a half of the table, and here, if I show the thing squared, it changed.
es:@4530
@4545 It's still a sinusoid-- I can prove that it's still a sinusoid - I can play it for you. Here's the original: [tones] And here's that signal squared [tones] . Isn't that interesting?
es:@4545
@4560 Furthermore, that agrees with what we see. Here's the sin of omega t, where omega is the angular frequency, and here is
es:@4560
@4575 the [sin of omega t]^2 Actually, let's say [cos(omega t)]^2 There's a relation which says that the cosine squared of theta
es:@4575
@4590 is half of the quantity (one plus the cosine of two theta.) That was Algebra II, I think, right? So, everyone's forgotten it.
es:@4590
It's a special case of the master @4605 trigonometric identity for computer music, which is cos(A) times cos(B) is a 1/2 [cos(A + B) + cos(A-B)] That's the thing that describes ring modulation, and it also describes what's happening here.
es:@4605
You see that the half @4620 is the fact that it now ranges in value from zero to one. It's now one-half plus a sinusoid of amplitude of one-half, and that sinusoid has twice the frequency of the original sinusoid.
es:@4620
@4635 The reason it sounds just as strong is psychoacoustics; it's because your ears are much more sensitive to this frequency than to that one. At some other frequency range, it might sound a little quieter.
es:@4635