*** MUS171 #02 01 06
L 2.0001 |
#02[0:01]Miller: This is the stuff that's in store for today. |
|
L 2.0001 |
es |
... |
L 2.0002 |
(Indicating the Pd patch on the screen.) |
|
L 2.0002 |
es |
... |
L 2.0003 |
What I want to do is several things at once. |
|
L 2.0003 |
es |
... |
L 2.0004 |
I need you to just look at the practical aspects of running and surviving Pd. |
|
L 2.0004 |
es |
... |
L 2.0005 |
How many of you are trying to run Pd and not succeeding? Three. OK. |
|
L 2.0005 |
es |
... |
L 2.0006 |
One of you emailed me, I forgot who, and didn't have - four - didn't have sound coming out. |
|
L 2.0006 |
es |
... |
L 2.0007 |
#02[0:29]Student: I figured that out. |
|
L 2.0007 |
es |
... |
L 2.0008 |
#02[0:30]Miller: Oh. OK. |
|
L 2.0008 |
es |
... |
L 2.0009 |
#02[0:32]Student: It was kind of strange. |
|
L 2.0009 |
es |
... |
L 2.0010 |
It didn't show me any numbers though with the outputs. |
|
L 2.0010 |
es |
... |
L 2.0011 |
But when I did the test tone after a little bit of a restart on the computer, it came up. |
|
L 2.0011 |
es |
... |
L 2.0012 |
It was kind of strange. |
|
L 2.0012 |
es |
... |
L 2.0013 |
#02[0:43]Miller: Something like that's been happening to me today, it hasn't happened before, |
|
L 2.0013 |
es |
... |
L 2.0014 |
which is that I had to try twice to get it to run. |
|
L 2.0014 |
es |
... |
L 2.0015 |
#02[0:53]Student: I use the version 43 instead of 42 |
|
L 2.0015 |
es |
... |
L 2.0016 |
because that looks more familiar from the one we looked at in class. |
|
L 2.0016 |
es |
... |
L 2.0017 |
#02[1:01]Miller: I think I'm running 42 right now. |
|
L 2.0017 |
es |
... |
L 2.0018 |
I'll tell you one thing that doesn't work in 43 in case you were running 43. |
|
L 2.0018 |
es |
... |
L 2.0019 |
This is something I still can't figure out how to fix. |
|
L 2.0019 |
es |
... |
L 2.0020 |
Anyone else for whom it's not working, |
|
L 2.0020 |
es |
... |
L 2.0021 |
can you tell me what symptoms you're getting? |
|
L 2.0021 |
es |
... |
L 2.0022 |
#02[1:23]Student: It wouldn't allow me to put in objects. |
|
L 2.0022 |
es |
... |
L 2.0023 |
#02[1:25]Miller: It wouldn't allow you to put in objects? |
|
L 2.0023 |
es |
... |
L 2.0024 |
#02[1:27]Student: On the clip menu everything was greyed out. |
|
L 2.0024 |
es |
... |
L 2.0025 |
#02[1:35]Miller: Maybe you're looking at |
|
L 2.0025 |
es |
... |
L 2.0026 |
pd's window here and trying to do put, |
|
L 2.0026 |
es |
... |
L 2.0027 |
and for that you need to be actually talking to a real document. |
|
L 2.0027 |
es |
... |
L 2.0028 |
I didn't actually say this but |
|
L 2.0028 |
es |
... |
L 2.0029 |
this is Pd's print-out window (which exists mostly when Pd is actually running.) |
|
L 2.0029 |
es |
... |
L 2.0030 |
You can have this but it won't be doing anything |
|
L 2.0030 |
es |
... |
L 2.0031 |
until you have some number of patches open, |
|
L 2.0031 |
es |
... |
L 2.0032 |
and you can have one or more patches open |
|
L 2.0032 |
es |
... |
L 2.0033 |
and they're all running, all at the same time. |
|
L 2.0033 |
es |
... |
L 2.0034 |
Furthermore, they can talk to each other, |
|
L 2.0034 |
es |
... |
L 2.0035 |
so you should be aware of that possibility. |
|
L 2.0035 |
es |
... |
L 2.0036 |
Other problems? |
|
L 2.0036 |
es |
... |
L 2.0037 |
#02[2:13]Student: I can get single sin-wave to play. |
|
L 2.0037 |
es |
... |
L 2.0038 |
When I try to put in another oscillator I have to get crazy. |
|
L 2.0038 |
es |
... |
L 2.0039 |
I can clip and then it's just gone. |
|
L 2.0039 |
es |
... |
L 2.0040 |
#02[2:28]Miller: I think I might know what happened to you |
|
L 2.0040 |
es |
... |
L 2.0041 |
and that's something that I'm going to try and address today. |
|
L 2.0041 |
es |
... |
L 2.0042 |
It could be that what they're doing was numerically outside of the range |
|
L 2.0042 |
es |
... |
L 2.0043 |
of the possible values that you can convert, |
|
L 2.0043 |
es |
... |
L 2.0044 |
and there were ways that you could do that |
|
L 2.0044 |
es |
... |
L 2.0045 |
that would cause it to make silence. |
|
L 2.0045 |
es |
... |
L 2.0046 |
#02[2:46]"And that's a ""gotcha""" |
|
L 2.0046 |
es |
... |
L 2.0047 |
that I want to try to help you avoid today if I can succeed. |
|
L 2.0047 |
es |
... |
L 2.0048 |
Other issues? |
|
L 2.0048 |
es |
... |
L 2.0049 |
#02[2:54]Student: I'm just having problems downloading Pd on my computer. |
|
L 2.0049 |
es |
... |
L 2.0050 |
#02[2:58]Miller: PC? |
|
L 2.0050 |
es |
... |
L 2.0051 |
#02[2:59]Student: Yeah. PC. |
|
L 2.0051 |
es |
... |
L 2.0052 |
#02[3:01]Miller: I've got a PC today and I'm not sure |
|
L 2.0052 |
es |
... |
L 2.0053 |
if I'll have the same problems as you, |
|
L 2.0053 |
es |
... |
L 2.0054 |
but if you see me doing something that you're not doing, that might help. |
|
L 2.0054 |
es |
... |
L 2.0055 |
Otherwise, see me after class today. |
|
L 2.0055 |
es |
... |
L 2.0056 |
#02[3:15]Student: Do you know if a 64-bit version of Pd is compiled for Ubuntu? |
|
L 2.0056 |
es |
... |
L 2.0057 |
#02[3:32]Miller: Ubuntu? The last I heard, someone had a machine and |
|
L 2.0057 |
es |
... |
L 2.0058 |
they were going to compile it on but no one knew |
|
L 2.0058 |
es |
... |
L 2.0059 |
when it was really going to work. |
|
L 2.0059 |
es |
... |
L 2.0060 |
You might have to compile it yourself. |
|
L 2.0060 |
es |
... |
L 2.0061 |
OK, so, next matter. |
|
L 2.0061 |
es |
... |
L 2.0062 |
I have another thing to sort of just check off which is, |
|
L 2.0062 |
es |
... |
L 2.0063 |
The class didn't exist as far as WebCT was concerned on Tuesday, |
|
L 2.0063 |
es |
... |
L 2.0064 |
but that should be fixed now. |
|
L 2.0064 |
es |
... |
L 2.0065 |
Is it decently clear how you would upload assignments? |
|
L 2.0065 |
es |
... |
L 2.0066 |
#02[4:12]I have one slight comment to make which is that |
|
L 2.0066 |
es |
... |
L 2.0067 |
it's possible to get confused downloading patches on the web. |
|
L 2.0067 |
es |
... |
L 2.0068 |
#02[4:23]I actually don't know if I'm on the network, |
|
L 2.0068 |
es |
... |
L 2.0069 |
so I don't know if I can show you this, but I can tell you this: |
|
L 2.0069 |
es |
... |
L 2.0070 |
If you see a patch on the web such as, for instance, the patch |
|
L 2.0070 |
es |
... |
L 2.0071 |
that I saved from Tuesday which is on the website for the course. |
|
L 2.0071 |
es |
... |
L 2.0072 |
You could click it and it will download you a nice patch, |
|
L 2.0072 |
es |
... |
L 2.0073 |
or you can click it and you will see this bizarre text in your browser. |
|
L 2.0073 |
es |
... |
L 2.0074 |
#02[4:49]If you click and see the text in your browser |
|
L 2.0074 |
es |
... |
L 2.0075 |
that's because Pd patches are, in fact, text files, |
|
L 2.0075 |
es |
... |
L 2.0076 |
and if your browser sees that it's text, it might just |
|
L 2.0076 |
es |
... |
L 2.0077 |
decide to show you the text instead of saving it to another file. |
|
L 2.0077 |
es |
... |
L 2.0078 |
This is not a problem. |
|
L 2.0078 |
es |
... |
L 2.0079 |
Just save it as a file anyway and make sure it ends in ".pd" |
|
L 2.0079 |
es |
... |
L 2.0080 |
and then tell your computer the ".pd" things are puredata documents |
|
L 2.0080 |
es |
... |
L 2.0081 |
-- and then you're happy again. |
|
L 2.0081 |
es |
... |
L 2.0082 |
I regularly get e-mail "I tried to download this patch |
|
L 2.0082 |
es |
... |
L 2.0083 |
and I just saw gibberish on my screen." |
|
L 2.0083 |
es |
... |
L 2.0084 |
OK; patches are gibberish and you just saw your patch. |
|
L 2.0084 |
es |
... |
L 2.0085 |
If you're curious, by the way, you get to look and see what patches are. |
|
L 2.0085 |
es |
... |
L 2.0086 |
They're just text files and they just have |
|
L 2.0086 |
es |
... |
L 2.0087 |
gibberish in them that describes how you can make a patch. |
|
L 2.0087 |
es |
... |
L 2.0088 |
#02[5:33]And, furthermore, those of you who get too excitable too late at night, |
|
L 2.0088 |
es |
... |
L 2.0089 |
if you learn what those messages are you can |
|
L 2.0089 |
es |
... |
L 2.0090 |
generate those messages from Pd and you can make patches that build themselves. |
|
L 2.0090 |
es |
... |
L 2.0091 |
I'm not going to show you how to do that, though. |
|
L 2.0091 |
es |
... |
L 2.0092 |
You'll have to figure that out, or, everyone on the web is doing it. |
|
L 2.0092 |
es |
... |
L 2.0093 |
Just so I can shut this window down, |
|
L 2.0093 |
es |
... |
L 2.0094 |
I'm going to put this up as a sort of review for today. |
|
L 2.0094 |
es |
... |
L 2.0095 |
What I want to show you now are two other objects ... |
|
L 2.0095 |
es |
... |
L 2.0096 |
Wait, I forgot something. |
|
L 2.0096 |
es |
... |
L 2.0097 |
I actually gave you six objects last time |
|
L 2.0097 |
es |
... |
L 2.0098 |
because there was also the push-button. |
|
L 2.0098 |
es |
... |
L 2.0099 |
#02[6:24]This is my resume from last time and |
|
L 2.0099 |
es |
... |
L 2.0100 |
what we're doing this time is another control, which is a number box. |
|
L 2.0100 |
es |
... |
L 2.0101 |
It suddenly means now that |
|
L 2.0101 |
es |
... |
L 2.0102 |
you can make wonderful analog synthesis type sounds. |
|
L 2.0102 |
es |
... |
L 2.0103 |
Arrays, which are graphs which you can do this with. |
|
L 2.0103 |
es |
... |
L 2.0104 |
These things are functional objects which I will grab |
|
L 2.0104 |
es |
... |
L 2.0105 |
and use as needed as we get through today's stuff. |
|
L 2.0105 |
es |
... |
L 2.0106 |
Today's stuff is mostly going to be figuring out |
|
L 2.0106 |
es |
... |
L 2.0107 |
what went wrong with the last time. |
|
L 2.0107 |
es |
... |
L 2.0108 |
Although I'll also show you how to make FM, too |
|
L 2.0108 |
es |
... |
L 2.0109 |
which takes one minute. |
|
L 2.0109 |
es |
... |
L 2.0110 |
So now what I'm going to do is, watch this: |
|
L 2.0110 |
es |
... |
L 2.0111 |
Say "ctl-alt-backspace," that is equivalent of, "save as." |
|
L 2.0111 |
es |
... |
L 2.0112 |
I am going to give myself a new file name |
|
L 2.0112 |
es |
... |
L 2.0113 |
so that I can make a new check point. |
|
L 2.0113 |
es |
... |
L 2.0114 |
#02[7:27]This will be built and I will try it, |
|
L 2.0114 |
es |
... |
L 2.0115 |
I will try to save these things |
|
L 2.0115 |
es |
... |
L 2.0116 |
before I erase major portions |
|
L 2.0116 |
es |
... |
L 2.0117 |
so that you can see, in a progression, |
|
L 2.0117 |
es |
... |
L 2.0118 |
what happened as we went through a day. |
|
L 2.0118 |
es |
... |
L 2.0119 |
#02[7:41]Now review: let me just make |
|
L 2.0119 |
es |
... |
L 2.0120 |
the patches from last time very quickly |
|
L 2.0120 |
es |
... |
L 2.0121 |
and show you how you can see |
|
L 2.0121 |
es |
... |
L 2.0122 |
what they're doing and then go on from there. |
|
L 2.0122 |
es |
... |
L 2.0123 |
So oscillator 440 Hertz please, and then I will say, oh ... |
|
L 2.0123 |
es |
... |
L 2.0124 |
#02[8:09]If you have an object selected and |
|
L 2.0124 |
es |
... |
L 2.0125 |
if you hit the key accelerator for making a new object, |
|
L 2.0125 |
es |
... |
L 2.0126 |
it doesn't just make a new object but it makes |
|
L 2.0126 |
es |
... |
L 2.0127 |
a new object and connects it the previous one. |
|
L 2.0127 |
es |
... |
L 2.0128 |
It doesn't matter to you now, but late at night |
|
L 2.0128 |
es |
... |
L 2.0129 |
when you make hundreds, and hundreds of objects. |
|
L 2.0129 |
es |
... |
L 2.0130 |
You will get to like this feature, most people like it. |
|
L 2.0130 |
es |
... |
L 2.0131 |
We're going to multiply by 0.1, a tenth, and then |
|
L 2.0131 |
es |
... |
L 2.0132 |
I am going to send this out to the digital analog converter.[tone] |
|
L 2.0132 |
es |
... |
L 2.0133 |
#02[8:44]Miller: I am going to turn the beep off, |
|
L 2.0133 |
es |
... |
L 2.0134 |
This is the puredata "hello world" patch. |
|
L 2.0134 |
es |
... |
L 2.0135 |
Now, what I am going to do, is show you |
|
L 2.0135 |
es |
... |
L 2.0136 |
not just how to print stuff but how to graph it. |
|
L 2.0136 |
es |
... |
L 2.0137 |
To print stuff, which is from last time is |
|
L 2.0137 |
es |
... |
L 2.0138 |
a print object, which is a print-tilde by the way, |
|
L 2.0138 |
es |
... |
L 2.0139 |
because it prints with a signal input. |
|
L 2.0139 |
es |
... |
L 2.0140 |
Now, I am going to talk to this 0.1 thing |
|
L 2.0140 |
es |
... |
L 2.0141 |
and then I am going to make it push button. |
|
L 2.0141 |
es |
... |
L 2.0142 |
#02[9:23]This is the thing that I forgot to tell you |
|
L 2.0142 |
es |
... |
L 2.0143 |
for the first seventy minutes of the other class. |
|
L 2.0143 |
es |
... |
L 2.0144 |
It is, you're not going to get very far just |
|
L 2.0144 |
es |
... |
L 2.0145 |
trying to click this button like this |
|
L 2.0145 |
es |
... |
L 2.0146 |
because I am in edit mode |
|
L 2.0146 |
es |
... |
L 2.0147 |
and I want to get into run mode, |
|
L 2.0147 |
es |
... |
L 2.0148 |
and then I can click it and have stuff happen. |
|
L 2.0148 |
es |
... |
L 2.0149 |
#02[9:38]Except, nothing happens because DSP is off. |
|
L 2.0149 |
es |
... |
L 2.0150 |
[tone] These are the numbers that correspond to |
|
L 2.0150 |
es |
... |
L 2.0151 |
one 64-sample buffer of digital sound |
|
L 2.0151 |
es |
... |
L 2.0152 |
and my apology about the horrible format. |
|
L 2.0152 |
es |
... |
L 2.0153 |
#02[9:53]Now, another thing |
|
L 2.0153 |
es |
... |
L 2.0154 |
that you might wish to be able to do |
|
L 2.0154 |
es |
... |
L 2.0155 |
is see it, as in a oscilloscope |
|
L 2.0155 |
es |
... |
L 2.0156 |
or as in a sound editor. |
|
L 2.0156 |
es |
... |
L 2.0157 |
I am going to introduce that because |
|
L 2.0157 |
es |
... |
L 2.0158 |
I am going to be using it to go back |
|
L 2.0158 |
es |
... |
L 2.0159 |
and make sure everyone understands about |
|
L 2.0159 |
es |
... |
L 2.0160 |
amplitudes, frequencies and modulation again. |
|
L 2.0160 |
es |
... |
L 2.0161 |
Even what the word "modulation" means, so to do that ... |
|
L 2.0161 |
es |
... |
L 2.0162 |
New material starts now. |
|
L 2.0162 |
es |
... |
L 2.0163 |
#02[10:18]"There is a wonderful object, called an ""array""" |
|
L 2.0163 |
es |
... |
L 2.0164 |
which you can get down here. (on the menu). |
|
L 2.0164 |
es |
... |
L 2.0165 |
This is unfortunate, there is a thing |
|
L 2.0165 |
es |
... |
L 2.0166 |
(also on the menu) called "graph" which is |
|
L 2.0166 |
es |
... |
L 2.0167 |
a rectangle that you can throw arrays inside. |
|
L 2.0167 |
es |
... |
L 2.0168 |
This is an array which is the thing |
|
L 2.0168 |
es |
... |
L 2.0169 |
you throw inside the rectangle, |
|
L 2.0169 |
es |
... |
L 2.0170 |
which more likely to the thing that you want, |
|
L 2.0170 |
es |
... |
L 2.0171 |
because "graph" will just give you an empty rectangle |
|
L 2.0171 |
es |
... |
L 2.0172 |
and no idea how to stick an array inside it. |
|
L 2.0172 |
es |
... |
L 2.0173 |
(Well, there are ways; I am not going to tell you yet.) |
|
L 2.0173 |
es |
... |
L 2.0174 |
) So ... get an array like this. |
|
L 2.0174 |
es |
... |
L 2.0175 |
||
L 2.0175 |
es |
... |
L 2.0176 |
I want to know all this nonsense about the array. |
|
L 2.0176 |
es |
... |
L 2.0177 |
The important nonsense is, "What is its name going to be?" |
|
L 2.0177 |
es |
... |
L 2.0178 |
#02[11:05]I am not going to tell you yet |
|
L 2.0178 |
es |
... |
L 2.0179 |
all about Pd's naming -- |
|
L 2.0179 |
es |
... |
L 2.0180 |
how Pd treats names is a subject all to itself. |
|
L 2.0180 |
es |
... |
L 2.0181 |
But, I am just going to use a name for now. |
|
L 2.0181 |
es |
... |
L 2.0182 |
In fact "array1" sounds good to me right now. |
|
L 2.0182 |
es |
... |
L 2.0183 |
And a size: this is the number of points |
|
L 2.0183 |
es |
... |
L 2.0184 |
that the array is going to have, |
|
L 2.0184 |
es |
... |
L 2.0185 |
so that number would be, for instance, |
|
L 2.0185 |
es |
... |
L 2.0186 |
at our sample rate if I want a whole second of sound |
|
L 2.0186 |
es |
... |
L 2.0187 |
I would have to ask for 44,100 points here. |
|
L 2.0187 |
es |
... |
L 2.0188 |
#02[11:35]As a general thing, Pd doesn't know much about sound. |
|
L 2.0188 |
es |
... |
L 2.0189 |
It does know that a second of sound requires |
|
L 2.0189 |
es |
... |
L 2.0190 |
say 44K.1 points == anyway that number might change |
|
L 2.0190 |
es |
... |
L 2.0191 |
because the sample rate of the computer |
|
L 2.0191 |
es |
... |
L 2.0192 |
might change while Pd is running. |
|
L 2.0192 |
es |
... |
L 2.0193 |
It doesn't make sense to ask for |
|
L 2.0193 |
es |
... |
L 2.0194 |
an array to hold a second of sound. |
|
L 2.0194 |
es |
... |
L 2.0195 |
#02[11:52]So, you have to go on and |
|
L 2.0195 |
es |
... |
L 2.0196 |
tell it numerically how much sound |
|
L 2.0196 |
es |
... |
L 2.0197 |
you want in the array. |
|
L 2.0197 |
es |
... |
L 2.0198 |
In the same spirit, that you had to tell |
|
L 2.0198 |
es |
... |
L 2.0199 |
the oscillator how many cycles per second |
|
L 2.0199 |
es |
... |
L 2.0200 |
it had to vibrate in order to make you a nice A440. |
|
L 2.0200 |
es |
... |
L 2.0201 |
Well, what I call A440, which concert A4. |
|
L 2.0201 |
es |
... |
L 2.0202 |
#02[12:10]So here I don't want 44,100 points, |
|
L 2.0202 |
es |
... |
L 2.0203 |
I want a 1,000 points just for now. |
|
L 2.0203 |
es |
... |
L 2.0204 |
This is aesthetics but I prefer points to polygons. |
|
L 2.0204 |
es |
... |
L 2.0205 |
Polygons means it draws little segments between the points, |
|
L 2.0205 |
es |
... |
L 2.0206 |
and points means it just draws the points. |
|
L 2.0206 |
es |
... |
L 2.0207 |
So I am going to choose "points" |
|
L 2.0207 |
es |
... |
L 2.0208 |
because it's me and that is my preference. |
|
L 2.0208 |
es |
... |
L 2.0209 |
And I am going to say "OK." |
|
L 2.0209 |
es |
... |
L 2.0210 |
And it says OK and it draws me a thing. |
|
L 2.0210 |
es |
... |
L 2.0211 |
So, I am not in edit mode, |
|
L 2.0211 |
es |
... |
L 2.0212 |
so let's get in edit mode and look around. |
|
L 2.0212 |
es |
... |
L 2.0213 |
It says "Hi my name is array one |
|
L 2.0213 |
es |
... |
L 2.0214 |
and my values are all zero" |
|
L 2.0214 |
es |
... |
L 2.0215 |
#02[12:49]By default these values range from -1 to 1, |
|
L 2.0215 |
es |
... |
L 2.0216 |
which the same range as audio is, which is a good thing. |
|
L 2.0216 |
es |
... |
L 2.0217 |
For instance it is a good thing |
|
L 2.0217 |
es |
... |
L 2.0218 |
because I can now use that to graph what's coming out |
|
L 2.0218 |
es |
... |
L 2.0219 |
of this network and show you |
|
L 2.0219 |
es |
... |
L 2.0220 |
what it looks like as an audio signal. |
|
L 2.0220 |
es |
... |
L 2.0221 |
#02[13:10]Let me do it wrong again, in the same way |
|
L 2.0221 |
es |
... |
L 2.0222 |
as I did the other thing wrong. |
|
L 2.0222 |
es |
... |
L 2.0223 |
I am going to need another push button and |
|
L 2.0223 |
es |
... |
L 2.0224 |
I am going to need an object whose name is "tabwrite~". |
|
L 2.0224 |
es |
... |
L 2.0225 |
That's an ugly name but it fits in a series |
|
L 2.0225 |
es |
... |
L 2.0226 |
with a bunch of other names so it has to be named the way it is. |
|
L 2.0226 |
es |
... |
L 2.0227 |
Then I am going to say "What table," |
|
L 2.0227 |
es |
... |
L 2.0228 |
that's to say array we are going to write to. |
|
L 2.0228 |
es |
... |
L 2.0229 |
#02[13:39]Nomenclature: in computer music, |
|
L 2.0229 |
es |
... |
L 2.0230 |
arrays were called tables, this has been true since 1958 |
|
L 2.0230 |
es |
... |
L 2.0231 |
and there is confusion in Pd as to whether something should be |
|
L 2.0231 |
es |
... |
L 2.0232 |
called a table to be true to its computer music roots |
|
L 2.0232 |
es |
... |
L 2.0233 |
or to be called array which is what the thing really is, |
|
L 2.0233 |
es |
... |
L 2.0234 |
which is just a bunch of things all the same type. |
|
L 2.0234 |
es |
... |
L 2.0235 |
The name sort of flops, back and forth, between things |
|
L 2.0235 |
es |
... |
L 2.0236 |
that say table or tabwrite~ and a things that say "array." |
|
L 2.0236 |
es |
... |
L 2.0237 |
I apologize -- You never know what's going to happen |
|
L 2.0237 |
es |
... |
L 2.0238 |
if you develop something for 20 years. |
|
L 2.0238 |
es |
... |
L 2.0239 |
#02[14:15]Now, I am going to listen to this thing by connecting it here. |
|
L 2.0239 |
es |
... |
L 2.0240 |
Notice again, as I mentioned last time: |
|
L 2.0240 |
es |
... |
L 2.0241 |
These are skinny wires that carry messages |
|
L 2.0241 |
es |
... |
L 2.0242 |
and these are fat wires which carry signals -- |
|
L 2.0242 |
es |
... |
L 2.0243 |
and those are different animals: |
|
L 2.0243 |
es |
... |
L 2.0244 |
Signals are happening all the time, and |
|
L 2.0244 |
es |
... |
L 2.0245 |
messages are happening only sporadically. |
|
L 2.0245 |
es |
... |
L 2.0246 |
Now I'm going to click this forgetting that |
|
L 2.0246 |
es |
... |
L 2.0247 |
I have to lock the patch. |
|
L 2.0247 |
es |
... |
L 2.0248 |
So I'll lock the patch, then I'll click it, |
|
L 2.0248 |
es |
... |
L 2.0249 |
and nothing happens. Why? |
|
L 2.0249 |
es |
... |
L 2.0250 |
#02[14:40]Student: DSP is off. |
|
L 2.0250 |
es |
... |
L 2.0251 |
#02[14:42]Miller: DSP is off! Go up here, turn on DSP. |
|
L 2.0251 |
es |
... |
L 2.0252 |
That's why I left this thing on the screen. |
|
L 2.0252 |
es |
... |
L 2.0253 |
Then, ta-da -- [tone] |
|
L 2.0253 |
es |
... |
L 2.0254 |
We are looking at the network output. |
|
L 2.0254 |
es |
... |
L 2.0255 |
OK, so now DSP is off but we just wrote it into the array. |
|
L 2.0255 |
es |
... |
L 2.0256 |
In the same spirit as for the print~ object, |
|
L 2.0256 |
es |
... |
L 2.0257 |
this thing has an audio input but what it does is |
|
L 2.0257 |
es |
... |
L 2.0258 |
something that it does sporadically, |
|
L 2.0258 |
es |
... |
L 2.0259 |
that's to say when you want it to do it. |
|
L 2.0259 |
es |
... |
L 2.0260 |
You have to send it a message ("trigger," if you like) |
|
L 2.0260 |
es |
... |
L 2.0261 |
to say "do your thing." |
|
L 2.0261 |
es |
... |
L 2.0262 |
#02[15:17]Doing your thing amounts to commencing to |
|
L 2.0262 |
es |
... |
L 2.0263 |
record the audio signal that is coming in and |
|
L 2.0263 |
es |
... |
L 2.0264 |
continuing to record until you reach the end of the array, |
|
L 2.0264 |
es |
... |
L 2.0265 |
at which point you stop. |
|
L 2.0265 |
es |
... |
L 2.0266 |
It doesn't loop around. |
|
L 2.0266 |
es |
... |
L 2.0267 |
You can make it loop around, but by default it just does it once. |
|
L 2.0267 |
es |
... |
L 2.0268 |
#02[15:39]Student: What was the shortcut for DSP again? |
|
L 2.0268 |
es |
... |
L 2.0269 |
#02[15:43]Student: What was the shortcut for turning it on? |
|
L 2.0269 |
es |
... |
L 2.0270 |
#02[15:44]Miller: Oh, the shortcut for DSP. |
|
L 2.0270 |
es |
... |
L 2.0271 |
I don't even know if this is documented. |
|
L 2.0271 |
es |
... |
L 2.0272 |
Ctrl-slash turns DSP on [tones] |
|
L 2.0272 |
es |
... |
L 2.0273 |
and Ctrl-. turns it off. |
|
L 2.0273 |
es |
... |
L 2.0274 |
ctrl-. is fairly standard Macintosh language, |
|
L 2.0274 |
es |
... |
L 2.0275 |
and the slash is just next to the dot. |
|
L 2.0275 |
es |
... |
L 2.0276 |
#02[15:57]Question? |
|
L 2.0276 |
es |
... |
L 2.0277 |
#02[15:58]Student: How did you get the array to look like that? |
|
L 2.0277 |
es |
... |
L 2.0278 |
#02[16:00]Miller: To look like that? |
|
L 2.0278 |
es |
... |
L 2.0279 |
#02[16:01]Student: Yeah, you did it by clicking the top. |
|
L 2.0279 |
es |
... |
L 2.0280 |
When I turn my DSP on it didn't do that. |
|
L 2.0280 |
es |
... |
L 2.0281 |
#02[16:07]Miller: Yes, OK. |
|
L 2.0281 |
es |
... |
L 2.0282 |
I did two things. |
|
L 2.0282 |
es |
... |
L 2.0283 |
One is, I clicked the tabwrite~, I clicked this button. |
|
L 2.0283 |
es |
... |
L 2.0284 |
I did that while I was out of edit mode. |
|
L 2.0284 |
es |
... |
L 2.0285 |
#02[16:15]Student: Oh, OK. |
|
L 2.0285 |
es |
... |
L 2.0286 |
#02[16:16]Miller: In fact if I do it again. -- |
|
L 2.0286 |
es |
... |
L 2.0287 |
Oh, nothing happened because DSP is still off. |
|
L 2.0287 |
es |
... |
L 2.0288 |
We'll turn DSP on. |
|
L 2.0288 |
es |
... |
L 2.0289 |
#02[16:23]Student: OK. |
|
L 2.0289 |
es |
... |
L 2.0290 |
So I was just in edit mode. [tone] |
|
L 2.0290 |
es |
... |
L 2.0291 |
#02[16:28]Miller: OK. |
|
L 2.0291 |
es |
... |
L 2.0292 |
With DSP on, each time I click it it'll make a new recording. |
|
L 2.0292 |
es |
... |
L 2.0293 |
You know what, I should really. |
|
L 2.0293 |
es |
... |
L 2.0294 |
It's all right. |
|
L 2.0294 |
es |
... |
L 2.0295 |
Do it the easy way. |
|
L 2.0295 |
es |
... |
L 2.0296 |
#02[16:42]Yeah? |
|
L 2.0296 |
es |
... |
L 2.0297 |
#02[16:43]Student: How do you edit array1? |
|
L 2.0297 |
es |
... |
L 2.0298 |
#02[16:45]Miller: How do you edit array1? |
|
L 2.0298 |
es |
... |
L 2.0299 |
#02[16:48]Student: if I want to change its size. |
|
L 2.0299 |
es |
... |
L 2.0300 |
#02[16:52]Miller: Oh, I see, if you want to change the size. |
|
L 2.0300 |
es |
... |
L 2.0301 |
Right. OK. |
|
L 2.0301 |
es |
... |
L 2.0302 |
I was going to forget to say this and, |
|
L 2.0302 |
es |
... |
L 2.0303 |
by the way, this is very confusing. |
|
L 2.0303 |
es |
... |
L 2.0304 |
If you have more than a one button mouse, left click. |
|
L 2.0304 |
es |
... |
L 2.0305 |
If you have a Macintosh that only gives you one button, |
|
L 2.0305 |
es |
... |
L 2.0306 |
I think you command-click, or option-click. |
|
L 2.0306 |
es |
... |
L 2.0307 |
I forget. |
|
L 2.0307 |
es |
... |
L 2.0308 |
It gives you properties or open or help and do properties. |
|
L 2.0308 |
es |
... |
L 2.0309 |
Open means, "hi, I'm a sub-patch and I only contain this." |
|
L 2.0309 |
es |
... |
L 2.0310 |
[student laughter] |
|
L 2.0310 |
es |
... |
L 2.0311 |
#02[17:27]Miller: That's good for other things. |
|
L 2.0311 |
es |
... |
L 2.0312 |
Properties is going to do this: |
|
L 2.0312 |
es |
... |
L 2.0313 |
It's going to give you (watch out) two windows |
|
L 2.0313 |
es |
... |
L 2.0314 |
because there really are two things here: |
|
L 2.0314 |
es |
... |
L 2.0315 |
There's the array, which is the squiggly line, |
|
L 2.0315 |
es |
... |
L 2.0316 |
and then there's the graph, which is the rectangle it's in. |
|
L 2.0316 |
es |
... |
L 2.0317 |
#02[17:42]So when I asked it to make an array, |
|
L 2.0317 |
es |
... |
L 2.0318 |
it made me an array and a graph |
|
L 2.0318 |
es |
... |
L 2.0319 |
and put the array in the graph. |
|
L 2.0319 |
es |
... |
L 2.0320 |
By the way, there's no intellectual content |
|
L 2.0320 |
es |
... |
L 2.0321 |
in any of this. |
|
L 2.0321 |
es |
... |
L 2.0322 |
This is just Pd lore. |
|
L 2.0322 |
es |
... |
L 2.0323 |
#02[17:58]So this is the array. |
|
L 2.0323 |
es |
... |
L 2.0324 |
This has to do with the points in there. |
|
L 2.0324 |
es |
... |
L 2.0325 |
Since there are thousands of them that I can ask it, oh, let's have 2,000 of them. |
|
L 2.0325 |
es |
... |
L 2.0326 |
Then I'll say "apply" here. |
|
L 2.0326 |
es |
... |
L 2.0327 |
It's going to be a little embarrassing |
|
L 2.0327 |
es |
... |
L 2.0328 |
because you can only have 1,000 good points |
|
L 2.0328 |
es |
... |
L 2.0329 |
and then the other 1,000 are now zeroed. |
|
L 2.0329 |
es |
... |
L 2.0330 |
It did have the decency to change the bounds of the graph |
|
L 2.0330 |
es |
... |
L 2.0331 |
so that the array still fits in it, |
|
L 2.0331 |
es |
... |
L 2.0332 |
but that's about all it did for us. |
|
L 2.0332 |
es |
... |
L 2.0333 |
Now I'll do back to 1,000, like that. |
|
L 2.0333 |
es |
... |
L 2.0334 |
OK means "apply then disappear." |
|
L 2.0334 |
es |
... |
L 2.0335 |
Then the other thing is-- |
|
L 2.0335 |
es |
... |
L 2.0336 |
what's that graph thing doing? |
|
L 2.0336 |
es |
... |
L 2.0337 |
Just left, so let's start over. |
|
L 2.0337 |
es |
... |
L 2.0338 |
Oh, and I'm drawing a polygon ... |
|
L 2.0338 |
es |
... |
L 2.0339 |
#02[18:25]OK, now let's get the properties back |
|
L 2.0339 |
es |
... |
L 2.0340 |
so we can see not just the arrays but the Canvas properties. |
|
L 2.0340 |
es |
... |
L 2.0341 |
Now, here we can say the X -- |
|
L 2.0341 |
es |
... |
L 2.0342 |
OK, X and Y really mean the horizontal and vertical axis. |
|
L 2.0342 |
es |
... |
L 2.0343 |
X is going to range from zero to 1,000. |
|
L 2.0343 |
es |
... |
L 2.0344 |
That means this point here is point zero and |
|
L 2.0344 |
es |
... |
L 2.0345 |
this point here is actually 999 because there are 1,000 points. |
|
L 2.0345 |
es |
... |
L 2.0346 |
If I change that -- you don't need to remember this-- |
|
L 2.0346 |
es |
... |
L 2.0347 |
you get the following embarrassing result-- |
|
L 2.0347 |
es |
... |
L 2.0348 |
Your graph wants 2,000 points but |
|
L 2.0348 |
es |
... |
L 2.0349 |
the array only has 1,000 so it looks stupid. |
|
L 2.0349 |
es |
... |
L 2.0350 |
#02[19:22]I could also say, oh, the range is only 700, say. |
|
L 2.0350 |
es |
... |
L 2.0351 |
Then we get... |
|
L 2.0351 |
es |
... |
L 2.0352 |
It doesn't do it. |
|
L 2.0352 |
es |
... |
L 2.0353 |
Oh, yes, because I'm running .43 |
|
L 2.0353 |
es |
... |
L 2.0354 |
and there's a bug, so we say "no." |
|
L 2.0354 |
es |
... |
L 2.0355 |
If the array doesn't fit in the graph -- |
|
L 2.0355 |
es |
... |
L 2.0356 |
In .43 it doesn't draw it. |
|
L 2.0356 |
es |
... |
L 2.0357 |
That's bad, and it's going to take me hours to fix it |
|
L 2.0357 |
es |
... |
L 2.0358 |
because there's something subtle wrong there. |
|
L 2.0358 |
es |
... |
L 2.0359 |
If your thing isn't drawing, it's because it doesn't fit in the graph. |
|
L 2.0359 |
es |
... |
L 2.0360 |
My apologies. |
|
L 2.0360 |
es |
... |
L 2.0361 |
Go back to .42 if you really need to see it. |
|
L 2.0361 |
es |
... |
L 2.0362 |
Somehow I didn't realize that I was running .43. |
|
L 2.0362 |
es |
... |
L 2.0363 |
#02[19:59]OK, we're going to cancel this. |
|
L 2.0363 |
es |
... |
L 2.0364 |
Oh, except I'm going to do this: The Y range goes from 1 to -1. |
|
L 2.0364 |
es |
... |
L 2.0365 |
Isn't that ugly? That's because |
|
L 2.0365 |
es |
... |
L 2.0366 |
computers think numbers go up that way, whereas |
|
L 2.0366 |
es |
... |
L 2.0367 |
mathematicians think numbers go up that way, |
|
L 2.0367 |
es |
... |
L 2.0368 |
or graphs think numbers go up that way. |
|
L 2.0368 |
es |
... |
L 2.0369 |
You have to say, yeah, I could say it goes |
|
L 2.0369 |
es |
... |
L 2.0370 |
from minus one to one but everything |
|
L 2.0370 |
es |
... |
L 2.0371 |
would be upside down and it would be confusing. |
|
L 2.0371 |
es |
... |
L 2.0372 |
For right now I'm going to say we'll go from 2 to -2 |
|
L 2.0372 |
es |
... |
L 2.0373 |
so that you can see the thing drops in size |
|
L 2.0373 |
es |
... |
L 2.0374 |
because now this is 2 and that's -2. |
|
L 2.0374 |
es |
... |
L 2.0375 |
There are ways of getting the thing to show you |
|
L 2.0375 |
es |
... |
L 2.0376 |
what its bounds are but, let's leave it that way. |
|
L 2.0376 |
es |
... |
L 2.0377 |
I'm going to just leave it like this. |
|
L 2.0377 |
es |
... |
L 2.0378 |
#02[20:50]Just to belabor a point, let me disconnect this |
|
L 2.0378 |
es |
... |
L 2.0379 |
so I can have DSP running and not listen to it. |
|
L 2.0379 |
es |
... |
L 2.0380 |
I just ask it to graph the output of the oscillator |
|
L 2.0380 |
es |
... |
L 2.0381 |
and not the output of the multiplier |
|
L 2.0381 |
es |
... |
L 2.0382 |
so you can see what a full blast oscillator looks like. |
|
L 2.0382 |
es |
... |
L 2.0383 |
Now recall, I have the graph -- that's the rectangle -- |
|
L 2.0383 |
es |
... |
L 2.0384 |
going from 2 to -2. |
|
L 2.0384 |
es |
... |
L 2.0385 |
The signal, the oscillator signal, ranges in value |
|
L 2.0385 |
es |
... |
L 2.0386 |
from -1 to 1, which is full blast |
|
L 2.0386 |
es |
... |
L 2.0387 |
as far as the computer is concerned. |
|
L 2.0387 |
es |
... |
L 2.0388 |
#02[21:30]You can make signals that are more than full blast. |
|
L 2.0388 |
es |
... |
L 2.0389 |
These numbers are all floating points, so you can have |
|
L 2.0389 |
es |
... |
L 2.0390 |
numbers that go up to 10^37 or something like that. |
|
L 2.0390 |
es |
... |
L 2.0391 |
Your speakers can't play those. |
|
L 2.0391 |
es |
... |
L 2.0392 |
And it's a good thing, because you |
|
L 2.0392 |
es |
... |
L 2.0393 |
would vaporize the planet if you could.[laughter] |
|
L 2.0393 |
es |
... |
L 2.0394 |
#02[21:50]Miller: But as long as what goes out is |
|
L 2.0394 |
es |
... |
L 2.0395 |
between minus one and plus one, then your computer |
|
L 2.0395 |
es |
... |
L 2.0396 |
will, I hope, faithfully turn that into voltages |
|
L 2.0396 |
es |
... |
L 2.0397 |
that your earphones or your stereo can deal with. |
|
L 2.0397 |
es |
... |
L 2.0398 |
#02[22:01]All right. Just for, pedagogy's sake ... |
|
L 2.0398 |
es |
... |
L 2.0399 |
OK, this is the moment I think perhaps, |
|
L 2.0399 |
es |
... |
L 2.0400 |
to save this patch and continue. |
|
L 2.0400 |
es |
... |
L 2.0401 |
Played it, and I'm going to save "3.signalrange.pd" |
|
L 2.0401 |
es |
... |
L 2.0402 |
#02[22:30]All right. |
|
L 2.0402 |
es |
... |
L 2.0403 |
I'm going to now show you what happens when you. |
|
L 2.0403 |
es |
... |
L 2.0404 |
Oh, I'm going to turn the volume down in the room before I do this. |
|
L 2.0404 |
es |
... |
L 2.0405 |
And I'm just going to play the oscillator full blast |
|
L 2.0405 |
es |
... |
L 2.0406 |
into the speaker, or into the mixer. |
|
L 2.0406 |
es |
... |
L 2.0407 |
But the mixer's volume is going to be down, |
|
L 2.0407 |
es |
... |
L 2.0408 |
so we won't lose our eardrums. |
|
L 2.0408 |
es |
... |
L 2.0409 |
#02[22:49]And then, I'll show you what happens when you |
|
L 2.0409 |
es |
... |
L 2.0410 |
add another one, which will cause things to malfunction |
|
L 2.0410 |
es |
... |
L 2.0411 |
in a novel way, which actually, |
|
L 2.0411 |
es |
... |
L 2.0412 |
you might have already heard a couple times. |
|
L 2.0412 |
es |
... |
L 2.0413 |
So, let's see. I don't want this anymore. |
|
L 2.0413 |
es |
... |
L 2.0414 |
Don't want this anymore. |
|
L 2.0414 |
es |
... |
L 2.0415 |
And I'm going to turn the volume down. |
|
L 2.0415 |
es |
... |
L 2.0416 |
OK, then I'm going to connect this to this. |
|
L 2.0416 |
es |
... |
L 2.0417 |
Actually, what I should do is turn them off. [tone] |
|
L 2.0417 |
es |
... |
L 2.0418 |
#02[23:32]Miller: It's too much for the mixer. |
|
L 2.0418 |
es |
... |
L 2.0419 |
You can hear already, there's not a clean sinusoid. |
|
L 2.0419 |
es |
... |
L 2.0420 |
But we'll pretend it's a clean sinusoid |
|
L 2.0420 |
es |
... |
L 2.0421 |
because I'm about to make it even worse. [laughter] |
|
L 2.0421 |
es |
... |
L 2.0422 |
#02[23:41]"Miller: I'm going to say, ""OK, that's good.""" |
|
L 2.0422 |
es |
... |
L 2.0423 |
And I also want to go and get 550, which is a perfect third above 440. |
|
L 2.0423 |
es |
... |
L 2.0424 |
First off, I'll get. [tone] |
|
L 2.0424 |
es |
... |
L 2.0425 |
#02[23:52]Miller: OK, hear that? Now, ready, set. [tone] |
|
L 2.0425 |
es |
... |
L 2.0426 |
#02[24:00]Miller: What happened? |
|
L 2.0426 |
es |
... |
L 2.0427 |
#02[24:03]Student: Clipping. |
|
L 2.0427 |
es |
... |
L 2.0428 |
#02[24:04]Miller: Clipped. |
|
L 2.0428 |
es |
... |
L 2.0429 |
Yeah, yeah, OK. There are some -- |
|
L 2.0429 |
es |
... |
L 2.0430 |
Those of you with digital audio experience |
|
L 2.0430 |
es |
... |
L 2.0431 |
know what's going on here. |
|
L 2.0431 |
es |
... |
L 2.0432 |
#02[24:10]But I'll graph it for you to show you |
|
L 2.0432 |
es |
... |
L 2.0433 |
what's really happening at the level of the signal, |
|
L 2.0433 |
es |
... |
L 2.0434 |
and to do that I have to introduce |
|
L 2.0434 |
es |
... |
L 2.0435 |
the final object for the day, which is clip~. |
|
L 2.0435 |
es |
... |
L 2.0436 |
And this is one of those minority objects which, |
|
L 2.0436 |
es |
... |
L 2.0437 |
sometimes you just need it. |
|
L 2.0437 |
es |
... |
L 2.0438 |
But those times are maybe only once a week or so. |
|
L 2.0438 |
es |
... |
L 2.0439 |
So here it is, clip. |
|
L 2.0439 |
es |
... |
L 2.0440 |
#02[24:36]This is the, clipping is, it's a term that -- |
|
L 2.0440 |
es |
... |
L 2.0441 |
I don't know how old it is, but it certainly dates back |
|
L 2.0441 |
es |
... |
L 2.0442 |
to the old analog electronic days. |
|
L 2.0442 |
es |
... |
L 2.0443 |
It simply means what happens when signal goes out of the range |
|
L 2.0443 |
es |
... |
L 2.0444 |
of the audio device that is receiving it. |
|
L 2.0444 |
es |
... |
L 2.0445 |
#02[24:49]So if the standard thing about clipping is |
|
L 2.0445 |
es |
... |
L 2.0446 |
you can hook an electric guitar up to an amplifier |
|
L 2.0446 |
es |
... |
L 2.0447 |
and overdrive the tubes. |
|
L 2.0447 |
es |
... |
L 2.0448 |
And if you overdrive the tube, well there is |
|
L 2.0448 |
es |
... |
L 2.0449 |
a maximum or minimum current the tube can put through. |
|
L 2.0449 |
es |
... |
L 2.0450 |
And beyond that, it just says, "Well, I'm clipped. |
|
L 2.0450 |
es |
... |
L 2.0451 |
I can't go any further, so I'm just going to stop right where I am." |
|
L 2.0451 |
es |
... |
L 2.0452 |
#02[25:08]So it's like in this building, if you ask for floor -1 |
|
L 2.0452 |
es |
... |
L 2.0453 |
or floor 4 on the elevator, you won't get it. |
|
L 2.0453 |
es |
... |
L 2.0454 |
You only get floors 1 through 3, because that's where the elevator goes. |
|
L 2.0454 |
es |
... |
L 2.0455 |
It's the same deal. |
|
L 2.0455 |
es |
... |
L 2.0456 |
#02[25:19]So for instance, I'm going to |
|
L 2.0456 |
es |
... |
L 2.0457 |
clip between -1 and 1, which is an exact imitation of what |
|
L 2.0457 |
es |
... |
L 2.0458 |
actually happens when the audio goes out of your computer, |
|
L 2.0458 |
es |
... |
L 2.0459 |
because the range of possibilities is minus one to one. |
|
L 2.0459 |
es |
... |
L 2.0460 |
And if it's out of the range, it is simply clipped to the range. |
|
L 2.0460 |
es |
... |
L 2.0461 |
And if I knew that, and if I for instance, |
|
L 2.0461 |
es |
... |
L 2.0462 |
add these two oscillators together. |
|
L 2.0462 |
es |
... |
L 2.0463 |
#02[25:43]Oh, before I do that, sorry. |
|
L 2.0463 |
es |
... |
L 2.0464 |
Before I do that, I'm going to do this: |
|
L 2.0464 |
es |
... |
L 2.0465 |
Push that one, here we go. |
|
L 2.0465 |
es |
... |
L 2.0466 |
So here's the first thing: [tone] |
|
L 2.0466 |
es |
... |
L 2.0467 |
#02[26:03]Miller: Oh, right. |
|
L 2.0467 |
es |
... |
L 2.0468 |
We're only listening to one of them, so let me play you |
|
L 2.0468 |
es |
... |
L 2.0469 |
both of them and show you both of them. [second tone] |
|
L 2.0469 |
es |
... |
L 2.0470 |
#02[26:09]Miller: So what's really happening is the periods of |
|
L 2.0470 |
es |
... |
L 2.0471 |
the two oscillators that we have are short. |
|
L 2.0471 |
es |
... |
L 2.0472 |
If each of them is fitting 20 or 25 cycles, in the thing. |
|
L 2.0472 |
es |
... |
L 2.0473 |
#02[26:20]What you can see is that the thing itself is repeating |
|
L 2.0473 |
es |
... |
L 2.0474 |
at a much lower rate, which is in fact the, what is it now? |
|
L 2.0474 |
es |
... |
L 2.0475 |
It's the greatest common factor of those two frequencies, if you like, |
|
L 2.0475 |
es |
... |
L 2.0476 |
or the least common multiple of those two periods. |
|
L 2.0476 |
es |
... |
L 2.0477 |
OK? Or, now, finally, I'll show you what the computer. |
|
L 2.0477 |
es |
... |
L 2.0478 |
Let me show you. [tones stop] |
|
L 2.0478 |
es |
... |
L 2.0479 |
#02[26:44]Miller: Or to show you what the computer really is playing, |
|
L 2.0479 |
es |
... |
L 2.0480 |
let's look at it this way. |
|
L 2.0480 |
es |
... |
L 2.0481 |
Rather than add it right into the tabwrite here |
|
L 2.0481 |
es |
... |
L 2.0482 |
I will add the clipped version and then tabwrite~, and then do that. Aha! |
|
L 2.0482 |
es |
... |
L 2.0483 |
Now, the signal that you saw before, even though, yeah. |
|
L 2.0483 |
es |
... |
L 2.0484 |
Even though the signal that you saw before was clearly |
|
L 2.0484 |
es |
... |
L 2.0485 |
periodic with this period, you didn't hear that period |
|
L 2.0485 |
es |
... |
L 2.0486 |
because in fact, in its internal structure, it really |
|
L 2.0486 |
es |
... |
L 2.0487 |
only had two components, each of which had a much shorter period, |
|
L 2.0487 |
es |
... |
L 2.0488 |
and your ear resolved those. |
|
L 2.0488 |
es |
... |
L 2.0489 |
It didn't hear; it didn't make a difference to them. |
|
L 2.0489 |
es |
... |
L 2.0490 |
It just heard the individual harmonics; it couldn't fuse them, right? |
|
L 2.0490 |
es |
... |
L 2.0491 |
#02[26:58]At least my ear couldn't. |
|
L 2.0491 |
es |
... |
L 2.0492 |
#02[27:30]But if you clip it, you'd make that be no longer true. |
|
L 2.0492 |
es |
... |
L 2.0493 |
There's simply no possible way you can hear the signals |
|
L 2.0493 |
es |
... |
L 2.0494 |
having any period other than the period in this that they've got. |
|
L 2.0494 |
es |
... |
L 2.0495 |
Yeah? |
|
L 2.0495 |
es |
... |
L 2.0496 |
#02[27:41]Student: How do you get the little toggle-light? |
|
L 2.0496 |
es |
... |
L 2.0497 |
#02[27:43]Miller: These? Oh, this is not a toggle. |
|
L 2.0497 |
es |
... |
L 2.0498 |
This is a, this is the button which is called "bang." |
|
L 2.0498 |
es |
... |
L 2.0499 |
Oh, and if you go to toggle, you'll get another rectangular thing. |
|
L 2.0499 |
es |
... |
L 2.0500 |
But it's a toggle switch which goes on and off when you press it. |
|
L 2.0500 |
es |
... |
L 2.0501 |
That's for later. |
|
L 2.0501 |
es |
... |
L 2.0502 |
All right? |
|
L 2.0502 |
es |
... |
L 2.0503 |
#02[28:00]So this is clipping, and this is |
|
L 2.0503 |
es |
... |
L 2.0504 |
what your audio hardware does to you. |
|
L 2.0504 |
es |
... |
L 2.0505 |
Now, let me show you how you can make your life even worse. [laughter] |
|
L 2.0505 |
es |
... |
L 2.0506 |
#02[28:10]Miller: I think this happened to one of you, but I'm not sure. |
|
L 2.0506 |
es |
... |
L 2.0507 |
I'm just operating on a guess now. |
|
L 2.0507 |
es |
... |
L 2.0508 |
So I'm going to say, "Hi! Be an oscillator like this." |
|
L 2.0508 |
es |
... |
L 2.0509 |
And now, I'm going to listen to my nice A440. [tone] |
|
L 2.0509 |
es |
... |
L 2.0510 |
#02[28:28]Miller: And then I'm going to add another oscillator here. |
|
L 2.0510 |
es |
... |
L 2.0511 |
Ready? [tone] |
|
L 2.0511 |
es |
... |
L 2.0512 |
#02[28:32]Miller: Oh, that's not what I wanted. |
|
L 2.0512 |
es |
... |
L 2.0513 |
Oh, yeah. I miscalculated. |
|
L 2.0513 |
es |
... |
L 2.0514 |
Add another one: Oops! |
|
L 2.0514 |
es |
... |
L 2.0515 |
What happened here -- |
|
L 2.0515 |
es |
... |
L 2.0516 |
is this: Let's see. |
|
L 2.0516 |
es |
... |
L 2.0517 |
OK, so let me put in the, let me do that so we're seeing ... |
|
L 2.0517 |
es |
... |
L 2.0518 |
yeah now we are clipping. |
|
L 2.0518 |
es |
... |
L 2.0519 |
Actually I can save some steps by just listening to the |
|
L 2.0519 |
es |
... |
L 2.0520 |
#02[28:40] clipped output. [tones] |
|
L 2.0520 |
es |
... |
L 2.0521 |
#02[29:06]Miller: Now we get this, and this a problem |
|
L 2.0521 |
es |
... |
L 2.0522 |
because it is the sum of a sinusoid and |
|
L 2.0522 |
es |
... |
L 2.0523 |
another sinusoid that has zero frequency and zero phase, |
|
L 2.0523 |
es |
... |
L 2.0524 |
which means output is one volt. |
|
L 2.0524 |
es |
... |
L 2.0525 |
Right? And the result is -- |
|
L 2.0525 |
es |
... |
L 2.0526 |
that half of the cycle is below 1 still -- |
|
L 2.0526 |
es |
... |
L 2.0527 |
the half that was from 0 to -1 is now going from 1 to 0, |
|
L 2.0527 |
es |
... |
L 2.0528 |
and the half that was going from 1 to 0 is now |
|
L 2.0528 |
es |
... |
L 2.0529 |
going from 2 to 1, and it's getting clipped. |
|
L 2.0529 |
es |
... |
L 2.0530 |
#02[29:46]OK. |
|
L 2.0530 |
es |
... |
L 2.0531 |
In fact, when you learn how to control this, |
|
L 2.0531 |
es |
... |
L 2.0532 |
you can have a lot of fun because you can |
|
L 2.0532 |
es |
... |
L 2.0533 |
do this controllably and you can change the timbre of sounds |
|
L 2.0533 |
es |
... |
L 2.0534 |
by selectively clipping more or less of it, and this, |
|
L 2.0534 |
es |
... |
L 2.0535 |
for you electric guitarists, is the bias knob |
|
L 2.0535 |
es |
... |
L 2.0536 |
on your Ampeg amplifier thing [laughter]. |
|
L 2.0536 |
es |
... |
L 2.0537 |
Fender doesn't give you the bias knob, but the other manufacturers do. |
|
L 2.0537 |
es |
... |
L 2.0538 |
OK. Now I'm going to add another one. |
|
L 2.0538 |
es |
... |
L 2.0539 |
And what do you know? [laughter] |
|
L 2.0539 |
es |
... |
L 2.0540 |
#02[30:17] Miller: The patient died. [tone] |
|
L 2.0540 |
es |
... |
L 2.0541 |
And the reason - worse - the reason why the patient dies is |
|
L 2.0541 |
es |
... |
L 2.0542 |
because now, the entire sinusoid here is above positive one, |
|
L 2.0542 |
es |
... |
L 2.0543 |
and so it got clipped to plus one, and so the result is a signal |
|
L 2.0543 |
es |
... |
L 2.0544 |
that you can't hear, you can only smell it, |
|
L 2.0544 |
es |
... |
L 2.0545 |
because it will melt your speaker. |
|
L 2.0545 |
es |
... |
L 2.0546 |
Speakers, theoretically will go down to zero ohms at DC |
|
L 2.0546 |
es |
... |
L 2.0547 |
and your stereo probably wouldn't do this to your speaker, |
|
L 2.0547 |
es |
... |
L 2.0548 |
but if it could, then you would have to |
|
L 2.0548 |
es |
... |
L 2.0549 |
call the fire department or something. |
|
L 2.0549 |
es |
... |
L 2.0550 |
#02[30:51] All right, so this is [tone], this is |
|
L 2.0550 |
es |
... |
L 2.0551 |
how to make your life hard by making signals that |
|
L 2.0551 |
es |
... |
L 2.0552 |
are out of range, and, oops, that's interesting. |
|
L 2.0552 |
es |
... |
L 2.0553 |
And so, the first thing you hear is funny distortion, |
|
L 2.0553 |
es |
... |
L 2.0554 |
but you don't know whether the funny distortion is your patch, |
|
L 2.0554 |
es |
... |
L 2.0555 |
or whether it's just because your earphones are bad or something like that, |
|
L 2.0555 |
es |
... |
L 2.0556 |
and then when the signal goes away all together, then |
|
L 2.0556 |
es |
... |
L 2.0557 |
you still don't know which it is, |
|
L 2.0557 |
es |
... |
L 2.0558 |
but it's very possible that it might be this. |
|
L 2.0558 |
es |
... |
L 2.0559 |
#02[31:22]It might be a good idea to equip yourself |
|
L 2.0559 |
es |
... |
L 2.0560 |
with one of these things at the same stage as you are making your output. |
|
L 2.0560 |
es |
... |
L 2.0561 |
So, for instance, one thing that might be a really good idea would be: |
|
L 2.0561 |
es |
... |
L 2.0562 |
Whatever we do, we'll just put a nice adder at the bottom. |
|
L 2.0562 |
es |
... |
L 2.0563 |
It doesn't matter whether you're adding more than one thing or not. |
|
L 2.0563 |
es |
... |
L 2.0564 |
This adder really is just here to remind me that |
|
L 2.0564 |
es |
... |
L 2.0565 |
whatever's going out the DAC, it's going to go out the tabwrite~ |
|
L 2.0565 |
es |
... |
L 2.0566 |
-- it's going to be graphical as well. |
|
L 2.0566 |
es |
... |
L 2.0567 |
So now if I for instance do this, then I can both see it and hear it. |
|
L 2.0567 |
es |
... |
L 2.0568 |
Now, when you're turning in homework. ... |
|
L 2.0568 |
es |
... |
L 2.0569 |
#02[32:25]Student: What's the adder for? Because I didn't see anything. |
|
L 2.0569 |
es |
... |
L 2.0570 |
What did it do? |
|
L 2.0570 |
es |
... |
L 2.0571 |
#02[32:28]Miller: Oh, what's the adder for? The adder is there |
|
L 2.0571 |
es |
... |
L 2.0572 |
because when I change, when I add or take out stuff, |
|
L 2.0572 |
es |
... |
L 2.0573 |
I'm going to hook it into the adder instead of hooking it |
|
L 2.0573 |
es |
... |
L 2.0574 |
into the DAC and into the tabwrite~. |
|
L 2.0574 |
es |
... |
L 2.0575 |
And then that way I'm not going to forget and add something |
|
L 2.0575 |
es |
... |
L 2.0576 |
into the DAC that I didn't add into the tabwrite~. |
|
L 2.0576 |
es |
... |
L 2.0577 |
So really I'm adding zero. |
|
L 2.0577 |
es |
... |
L 2.0578 |
#02[32:44]Student: OK. |
|
L 2.0578 |
es |
... |
L 2.0579 |
#02[32:47]Miller: I'm going to explain more about adders in a second, |
|
L 2.0579 |
es |
... |
L 2.0580 |
but all I'm doing really is adding zero onto the signal, |
|
L 2.0580 |
es |
... |
L 2.0581 |
so I'm just wasting operations really. |
|
L 2.0581 |
es |
... |
L 2.0582 |
The reason I'm doing that at all is so that I can do stuff like this. |
|
L 2.0582 |
es |
... |
L 2.0583 |
In fact it doesn't even matter which - you wouldn't need an adder |
|
L 2.0583 |
es |
... |
L 2.0584 |
in Pd at all because signals automatically add anyway. |
|
L 2.0584 |
es |
... |
L 2.0585 |
--Well OK, that's not quite true as I will tell you next. |
|
L 2.0585 |
es |
... |
L 2.0586 |
Any questions about that? Yeah? |
|
L 2.0586 |
es |
... |
L 2.0587 |
#02[33:18]Student: Wait, so, is the adder unnecessary? Like can you just. |
|
L 2.0587 |
es |
... |
L 2.0588 |
#02[33:23]Miller: The adder's unnecessary. |
|
L 2.0588 |
es |
... |
L 2.0589 |
It's only there so if I make a connection to it |
|
L 2.0589 |
es |
... |
L 2.0590 |
it makes the connection both to the dac~ and to the tabwrite~ too. |
|
L 2.0590 |
es |
... |
L 2.0591 |
And I could do that in a spiffier way, but I'd have to use another object. |
|
L 2.0591 |
es |
... |
L 2.0592 |
So what I'm going to do is I'm going to put this patch in a nice state |
|
L 2.0592 |
es |
... |
L 2.0593 |
so you might be able to remember what I was doing. |
|
L 2.0593 |
es |
... |
L 2.0594 |
This patch is going to get saved, and then I'm going to make |
|
L 2.0594 |
es |
... |
L 2.0595 |
a new thing (Starting patch "4.ampfrequency.pd") |
|
L 2.0595 |
es |
... |
L 2.0596 |
and do some other stuff. |
|
L 2.0596 |
es |
... |
L 2.0597 |
OK, so I'm going to insult your intelligence just for a few more moments |
|
L 2.0597 |
es |
... |
L 2.0598 |
and talk once again about amplitudes and frequencies and graph them, because -- |
|
L 2.0598 |
es |
... |
L 2.0599 |
I sense there is still confusion about this, and I don't know how to |
|
L 2.0599 |
es |
... |
L 2.0600 |
simulate this confusion in my own brain, so I'm just going to try to confuse you |
|
L 2.0600 |
es |
... |
L 2.0601 |
and hope that you stop me when things get confusing. |
|
L 2.0601 |
es |
... |
L 2.0602 |
So, here we go. |
|
L 2.0602 |
es |
... |
L 2.0603 |
Now we're going to take this away all the cruft. |
|
L 2.0603 |
es |
... |
L 2.0604 |
Oh, I didn't say this, but of course I didn't give this oscillator |
|
L 2.0604 |
es |
... |
L 2.0605 |
an argument so that means it's going at zero Hertz |
|
L 2.0605 |
es |
... |
L 2.0606 |
until I tell it otherwise, but |
|
L 2.0606 |
es |
... |
L 2.0607 |
#02[35:03]Oh, I didn't mention something else that's going to happen to you. |
|
L 2.0607 |
es |
... |
L 2.0608 |
If you open two or three of these patches at once, |
|
L 2.0608 |
es |
... |
L 2.0609 |
and if you have an array named "array1" in all of them, |
|
L 2.0609 |
es |
... |
L 2.0610 |
or in more than one of them, |
|
L 2.0610 |
es |
... |
L 2.0611 |
you're going to get complaints because Pd will have |
|
L 2.0611 |
es |
... |
L 2.0612 |
two things named array1 and the name is supposed to let it |
|
L 2.0612 |
es |
... |
L 2.0613 |
figure out which one you're talking about. |
|
L 2.0613 |
es |
... |
L 2.0614 |
So, if there are two of them, it's confusing, Pd will |
|
L 2.0614 |
es |
... |
L 2.0615 |
print you out a warning message and it will |
|
L 2.0615 |
es |
... |
L 2.0616 |
choose one of them for you, and it will probably not be |
|
L 2.0616 |
es |
... |
L 2.0617 |
the one you thought it was going to be. |
|
L 2.0617 |
es |
... |
L 2.0618 |
#02[35:34]So what I'm going to do for that is |
|
L 2.0618 |
es |
... |
L 2.0619 |
I'm going to now change -- |
|
L 2.0619 |
es |
... |
L 2.0620 |
I forgot to do one, so I am going to try to remember later. |
|
L 2.0620 |
es |
... |
L 2.0621 |
But I'm going to change the name of this one to array3. |
|
L 2.0621 |
es |
... |
L 2.0622 |
And bang there and see if it worked. [tone] |
|
L 2.0622 |
es |
... |
L 2.0623 |
#02[35:59]Miller: So now, we don't need clip~ anymore. |
|
L 2.0623 |
es |
... |
L 2.0624 |
What I'm going to do is I'm going to introduce the last thing |
|
L 2.0624 |
es |
... |
L 2.0625 |
that intend to do today; which is the number box. |
|
L 2.0625 |
es |
... |
L 2.0626 |
Oh, no. Second to last, sorry. |
|
L 2.0626 |
es |
... |
L 2.0627 |
I'm going to start; OK so there are two distinctions which |
|
L 2.0627 |
es |
... |
L 2.0628 |
are going to be important for the next half hour or so. |
|
L 2.0628 |
es |
... |
L 2.0629 |
One is frequencies versus amplitudes and inputs versus outputs. |
|
L 2.0629 |
es |
... |
L 2.0630 |
#02[36:33]In other words, how you change the amplitude or the frequency |
|
L 2.0630 |
es |
... |
L 2.0631 |
of the sound and what it looks like when you change those two things |
|
L 2.0631 |
es |
... |
L 2.0632 |
in terms of the graph - that's one thing. |
|
L 2.0632 |
es |
... |
L 2.0633 |
And the other thing is that I have to give you some more details |
|
L 2.0633 |
es |
... |
L 2.0634 |
or more information about distinctions between messages and signals. |
|
L 2.0634 |
es |
... |
L 2.0635 |
And these two things I don't see how to separate them very well, |
|
L 2.0635 |
es |
... |
L 2.0636 |
so I'm just going to fold them together into one discussion. |
|
L 2.0636 |
es |
... |
L 2.0637 |
The first thing I want to do is this: |
|
L 2.0637 |
es |
... |
L 2.0638 |
#02[36:57]go back and show you the oscillator, |
|
L 2.0638 |
es |
... |
L 2.0639 |
but give it a variety of frequencies. |
|
L 2.0639 |
es |
... |
L 2.0640 |
Let's see. [tones] This is my 440 Hertz. |
|
L 2.0640 |
es |
... |
L 2.0641 |
And if I start changing it I see this kind of change. |
|
L 2.0641 |
es |
... |
L 2.0642 |
All right? So now we got a nice theramin or something. |
|
L 2.0642 |
es |
... |
L 2.0643 |
#02[laughter] |
|
L 2.0643 |
es |
... |
L 2.0644 |
And we'll talk more about that later, perhaps. |
|
L 2.0644 |
es |
... |
L 2.0645 |
Now that is changing the frequency of the oscillator. |
|
L 2.0645 |
es |
... |
L 2.0646 |
That is the same thing in some way as telling the oscillator |
|
L 2.0646 |
es |
... |
L 2.0647 |
that its frequency should be some number like this. |
|
L 2.0647 |
es |
... |
L 2.0648 |
You could even do this: but we don't, but you could. |
|
L 2.0648 |
es |
... |
L 2.0649 |
You could say. ... |
|
L 2.0649 |
es |
... |
L 2.0650 |
#02[38:03]The oscillator is now 440 Hertz. [tone] |
|
L 2.0650 |
es |
... |
L 2.0651 |
But meanwhile I'm going to change it directly. |
|
L 2.0651 |
es |
... |
L 2.0652 |
#02 |
|
L 2.0652 |
es |
... |
L 2.0653 |
This is confusing in one of the two ways you could be confusing in Pd |
|
L 2.0653 |
es |
... |
L 2.0654 |
that I know of, that I'm going to cover now. |
|
L 2.0654 |
es |
... |
L 2.0655 |
Which is that I initialized the frequency to 440 but then |
|
L 2.0655 |
es |
... |
L 2.0656 |
I overrode it, or replaced it if you like, with the value 205. |
|
L 2.0656 |
es |
... |
L 2.0657 |
This is not good style. |
|
L 2.0657 |
es |
... |
L 2.0658 |
I'm doing it to show you how you can confuse yourselves. |
|
L 2.0658 |
es |
... |
L 2.0659 |
The reason you can confuse yourself now is that you can think |
|
L 2.0659 |
es |
... |
L 2.0660 |
that this number is still 440 because it says so right here. |
|
L 2.0660 |
es |
... |
L 2.0661 |
But it's not because I changed it. |
|
L 2.0661 |
es |
... |
L 2.0662 |
It would be smarter if I'm going to run something and it's going to change it, |
|
L 2.0662 |
es |
... |
L 2.0663 |
not to give it a value which is not going to be reality after I do something to it |
|
L 2.0663 |
es |
... |
L 2.0664 |
-- although it's perfectly legal to do it. |
|
L 2.0664 |
es |
... |
L 2.0665 |
So now, the other thing that I want to do is say ... |
|
L 2.0665 |
es |
... |
L 2.0666 |
So that's why I'm saying oscillator without an argument now. |
|
L 2.0666 |
es |
... |
L 2.0667 |
Because I have a number box hooked up to it now and I'm trying to be |
|
L 2.0667 |
es |
... |
L 2.0668 |
hygienic about the way I'm making this patch. |
|
L 2.0668 |
es |
... |
L 2.0669 |
So the next thing is going to be: |
|
L 2.0669 |
es |
... |
L 2.0670 |
#02[39:00]now I'm going to starting changing the amplitude. |
|
L 2.0670 |
es |
... |
L 2.0671 |
Which, if you recall, one does with a multiplier. |
|
L 2.0671 |
es |
... |
L 2.0672 |
What I showed you before is that we can multiply the thing |
|
L 2.0672 |
es |
... |
L 2.0673 |
by some number like a tenth. |
|
L 2.0673 |
es |
... |
L 2.0674 |
#02[39:32]And then we would get something that looks like this. |
|
L 2.0674 |
es |
... |
L 2.0675 |
What did I do wrong there? Oh, oh boy! |
|
L 2.0675 |
es |
... |
L 2.0676 |
This is the oldest mistake in the book. |
|
L 2.0676 |
es |
... |
L 2.0677 |
Now what I've done is made a new oscillator, so its frequency is zero. |
|
L 2.0677 |
es |
... |
L 2.0678 |
And I had this nice number box going into to it, so it thinks it's 205. |
|
L 2.0678 |
es |
... |
L 2.0679 |
But I haven't actually sent the oscillator the message 205, since I made it again. |
|
L 2.0679 |
es |
... |
L 2.0680 |
So let me fix it and then break it again and then fix it so you'll see this. |
|
L 2.0680 |
es |
... |
L 2.0681 |
Because this is a thing which could be confusing. |
|
L 2.0681 |
es |
... |
L 2.0682 |
#02[40:09]"So I'll say all right, ""go to 220 please.""" |
|
L 2.0682 |
es |
... |
L 2.0683 |
So you're at 220 Hertz.[tone] |
|
L 2.0683 |
es |
... |
L 2.0684 |
By the way it's quieter now since I'm doing this other thing. |
|
L 2.0684 |
es |
... |
L 2.0685 |
That's good. |
|
L 2.0685 |
es |
... |
L 2.0686 |
Now I'm going to say my oscillator: |
|
L 2.0686 |
es |
... |
L 2.0687 |
I want it to be something else. |
|
L 2.0687 |
es |
... |
L 2.0688 |
No actually, I just want it to be an oscillator, thanks. |
|
L 2.0688 |
es |
... |
L 2.0689 |
(I hit Control-Z there to do an undo.) |
|
L 2.0689 |
es |
... |
L 2.0690 |
And nothing, because it didn't really undo the change. |
|
L 2.0690 |
es |
... |
L 2.0691 |
It just made me a new oscillator and I told it to build me a clean one. |
|
L 2.0691 |
es |
... |
L 2.0692 |
It's clean in the sense that it hasn't received any messages |
|
L 2.0692 |
es |
... |
L 2.0693 |
that might change things like its frequency or its phase. |
|
L 2.0693 |
es |
... |
L 2.0694 |
So it's sitting there at the frequency zero, so it's putting out the value one. |
|
L 2.0694 |
es |
... |
L 2.0695 |
So I should be looking at the value 0.1 here, which we can't see. |
|
L 2.0695 |
es |
... |
L 2.0696 |
And that will be true until I do something like touch this. |
|
L 2.0696 |
es |
... |
L 2.0697 |
[tones]. And once I touch this the value of 220 is added. Yeah? |
|
L 2.0697 |
es |
... |
L 2.0698 |
#02[41:01]Student: Can you do that by taking out the input and re-connecting it now? |
|
L 2.0698 |
es |
... |
L 2.0699 |
#02[41:06]Miller: No. Yeah so this would not work. |
|
L 2.0699 |
es |
... |
L 2.0700 |
Actually another way to break it would be to type a space here. |
|
L 2.0700 |
es |
... |
L 2.0701 |
And then click outside and then remake the object. |
|
L 2.0701 |
es |
... |
L 2.0702 |
Just typing a space dirtied the text string so it says, |
|
L 2.0702 |
es |
... |
L 2.0703 |
Oh, I've got to make a new one. |
|
L 2.0703 |
es |
... |
L 2.0704 |
It makes a new one and it re-formats it so it's like the old one, |
|
L 2.0704 |
es |
... |
L 2.0705 |
but it's a new one now. Yeah. Taking this out. ... |
|
L 2.0705 |
es |
... |
L 2.0706 |
oops, taking this out and reconnecting it doesn't do a thing. |
|
L 2.0706 |
es |
... |
L 2.0707 |
You have to actually make the thing create an output. |
|
L 2.0707 |
es |
... |
L 2.0708 |
#02[41:40]This seems like a horrible bug. |
|
L 2.0708 |
es |
... |
L 2.0709 |
And it will seem like a bug for a year or two until |
|
L 2.0709 |
es |
... |
L 2.0710 |
you realize that it's actually a feature. [laughter] |
|
L 2.0710 |
es |
... |
L 2.0711 |
I'll show you how you can even confuse yourself worse. [tones] |
|
L 2.0711 |
es |
... |
L 2.0712 |
Now what I've done is set up and argument between two sources of control. |
|
L 2.0712 |
es |
... |
L 2.0713 |
Watch. [tones] Here's my low A, and here's my high A. |
|
L 2.0713 |
es |
... |
L 2.0714 |
Which is it? [tone modulates] Well you can't tell from looking at the patch. |
|
L 2.0714 |
es |
... |
L 2.0715 |
So maybe you shouldn't do it. [laughter] |
|
L 2.0715 |
es |
... |
L 2.0716 |
You're perfectly welcome to, and there's situation where you could want to. |
|
L 2.0716 |
es |
... |
L 2.0717 |
But it's not likely that you would want to display the value coming in from two ways. |
|
L 2.0717 |
es |
... |
L 2.0718 |
One of which is guaranteed to be wrong at any given time. |
|
L 2.0718 |
es |
... |
L 2.0719 |
#02[42:33]So you might indeed want to have two possible sources of frequency |
|
L 2.0719 |
es |
... |
L 2.0720 |
that are active at different times. |
|
L 2.0720 |
es |
... |
L 2.0721 |
In fact that's an important aspect of why Pd is designed the way it is: |
|
L 2.0721 |
es |
... |
L 2.0722 |
You can do things from different sources. |
|
L 2.0722 |
es |
... |
L 2.0723 |
But if you do that, then you might not want to see |
|
L 2.0723 |
es |
... |
L 2.0724 |
what each source is trying to tell the oscillator. |
|
L 2.0724 |
es |
... |
L 2.0725 |
You might want to see what the oscillator itself is doing in the patch. |
|
L 2.0725 |
es |
... |
L 2.0726 |
So I could do that by either clarifying or further confusing, |
|
L 2.0726 |
es |
... |
L 2.0727 |
depending on your point of view. |
|
L 2.0727 |
es |
... |
L 2.0728 |
Let's do this: |
|
L 2.0728 |
es |
... |
L 2.0729 |
#02[43:11]Now notice the oscillator is still going on at 447 Hertz. |
|
L 2.0729 |
es |
... |
L 2.0730 |
It doesn't care about any of this stuff that I've been reconnecting. |
|
L 2.0730 |
es |
... |
L 2.0731 |
Because these are messages, the messages are not flowing until I do something. |
|
L 2.0731 |
es |
... |
L 2.0732 |
I'm just making a patch. |
|
L 2.0732 |
es |
... |
L 2.0733 |
But, now, if I do something, like say, 440, please, |
|
L 2.0733 |
es |
... |
L 2.0734 |
then I've got 440 but at least I can see what it is. [tones] |
|
L 2.0734 |
es |
... |
L 2.0735 |
This is maybe a little bit better, and this will be OK |
|
L 2.0735 |
es |
... |
L 2.0736 |
until I confuse myself again by pouncing directly into here. |
|
L 2.0736 |
es |
... |
L 2.0737 |
This is not computer science. This is music. |
|
L 2.0737 |
es |
... |
L 2.0738 |
So, let's get rid of that because this is just confusing. |
|
L 2.0738 |
es |
... |
L 2.0739 |
I just did that to warn you how you can confuse yourselves. |
|
L 2.0739 |
es |
... |
L 2.0740 |
#02[44:00]So, this is frequency and, while I'm at it, of course |
|
L 2.0740 |
es |
... |
L 2.0741 |
I've already shown you, I think, that this makes these kinds of changes [tones]. |
|
L 2.0741 |
es |
... |
L 2.0742 |
And, the amplitude is a similar situation except that |
|
L 2.0742 |
es |
... |
L 2.0743 |
I wouldn't dare do something like put 440 in here. |
|
L 2.0743 |
es |
... |
L 2.0744 |
Would I? Now, remember, I have the mixer way, way down right now. |
|
L 2.0744 |
es |
... |
L 2.0745 |
If I had done that at home with my stereo at its usual setting |
|
L 2.0745 |
es |
... |
L 2.0746 |
I would have jumped out of my chair [laughter]. |
|
L 2.0746 |
es |
... |
L 2.0747 |
What that did ... well, I can't even graph it for you. |
|
L 2.0747 |
es |
... |
L 2.0748 |
Oh, I can clip it then graph it. |
|
L 2.0748 |
es |
... |
L 2.0749 |
#02[44:47]"So, I'm going to say ""clip -1 to 1"" so that, in fact," |
|
L 2.0749 |
es |
... |
L 2.0750 |
I'm simulating what my computer's really putting out. |
|
L 2.0750 |
es |
... |
L 2.0751 |
And now, as long as I'm between -1 and 1, everything is good. |
|
L 2.0751 |
es |
... |
L 2.0752 |
But when I say I want 440 volts, please. |
|
L 2.0752 |
es |
... |
L 2.0753 |
[tone] I see that. That didn't graph terribly well. |
|
L 2.0753 |
es |
... |
L 2.0754 |
It's trying to do polygons. |
|
L 2.0754 |
es |
... |
L 2.0755 |
This is what Jimi Hendrix got when he played a note on his guitar. |
|
L 2.0755 |
es |
... |
L 2.0756 |
Basically, the tube was always either saturated and then you got |
|
L 2.0756 |
es |
... |
L 2.0757 |
what is essentially a square wave. |
|
L 2.0757 |
es |
... |
L 2.0758 |
This is a computer music technique. |
|
L 2.0758 |
es |
... |
L 2.0759 |
It's been elevated by having a name; it's called "wave shaping". |
|
L 2.0759 |
es |
... |
L 2.0760 |
You will hear more about this or read more about this |
|
L 2.0760 |
es |
... |
L 2.0761 |
in chapter five of the book. |
|
L 2.0761 |
es |
... |
L 2.0762 |
We will hold off on all the gory details until later. |
|
L 2.0762 |
es |
... |
L 2.0763 |
#02[46:02]So, different ranges of numbers might be appropriate |
|
L 2.0763 |
es |
... |
L 2.0764 |
for selecting frequencies as opposed to selecting amplitudes. |
|
L 2.0764 |
es |
... |
L 2.0765 |
Now we're multiplying by zero. |
|
L 2.0765 |
es |
... |
L 2.0766 |
No matter what you multiply by zero you get zero and |
|
L 2.0766 |
es |
... |
L 2.0767 |
it looks like this and sounds like what you're listening to. |
|
L 2.0767 |
es |
... |
L 2.0768 |
I meant to say something and didn't finish saying it. |
|
L 2.0768 |
es |
... |
L 2.0769 |
You've seen me do this to number boxes and, of course, |
|
L 2.0769 |
es |
... |
L 2.0770 |
if you're in edit-mode you're doing that and getting frustrated. |
|
L 2.0770 |
es |
... |
L 2.0771 |
#02[46:40]But, you can also type the number in, and then |
|
L 2.0771 |
es |
... |
L 2.0772 |
if you hit carriage-return/"enter", the number is generated as output. |
|
L 2.0772 |
es |
... |
L 2.0773 |
So if I do this, the output isn't 4, it's is "going to be" four, |
|
L 2.0773 |
es |
... |
L 2.0774 |
it will be four in fact if I hit enter, but if I want 440 I'll do this. |
|
L 2.0774 |
es |
... |
L 2.0775 |
Now, I did that so I can do this. |
|
L 2.0775 |
es |
... |
L 2.0776 |
I'm going to go here and I'm going to type the number 0.1 and hit enter. |
|
L 2.0776 |
es |
... |
L 2.0777 |
Now we've got a complete computer music instrument |
|
L 2.0777 |
es |
... |
L 2.0778 |
with amplitude and frequency control. |
|
L 2.0778 |
es |
... |
L 2.0779 |
Now this is kind of stupid because if I reach for this number box -- |
|
L 2.0779 |
es |
... |
L 2.0780 |
of course if I just click on this and start scrolling |
|
L 2.0780 |
es |
... |
L 2.0781 |
or dragging up and down, [tones] |
|
L 2.0781 |
es |
... |
L 2.0782 |
It's impossible for me to get a nice sound with this. |
|
L 2.0782 |
es |
... |
L 2.0783 |
I can't get anything between 0 and 1, which is |
|
L 2.0783 |
es |
... |
L 2.0784 |
completely quiet and full blast. |
|
L 2.0784 |
es |
... |
L 2.0785 |
#02[47:49]It is true that you can hold the shift key down |
|
L 2.0785 |
es |
... |
L 2.0786 |
and ask this thing to go up and down in hundredths. |
|
L 2.0786 |
es |
... |
L 2.0787 |
But if I were designing this thing as a patch I'd want to |
|
L 2.0787 |
es |
... |
L 2.0788 |
do something a little bit more user friendly. |
|
L 2.0788 |
es |
... |
L 2.0789 |
I would take the thing and divide it by one-hundred |
|
L 2.0789 |
es |
... |
L 2.0790 |
or something reasonable like that before I started messing with it. |
|
L 2.0790 |
es |
... |
L 2.0791 |
That's going to take me outside of my budget of five object types, |
|
L 2.0791 |
es |
... |
L 2.0792 |
although it's nothing but time. |
|
L 2.0792 |
es |
... |
L 2.0793 |
What I'm going to do is, now, go back and show you a little bit more |
|
L 2.0793 |
es |
... |
L 2.0794 |
about manifestations and differences between signals and messages. |
|
L 2.0794 |
es |
... |
L 2.0795 |
#02[48:37]Student: I'm sorry. |
|
L 2.0795 |
es |
... |
L 2.0796 |
How do you actually type the number value into the number object? |
|
L 2.0796 |
es |
... |
L 2.0797 |
#02[48:41]Miller: Oh, I didn't tell you something important: |
|
L 2.0797 |
es |
... |
L 2.0798 |
You have to click on the thing. |
|
L 2.0798 |
es |
... |
L 2.0799 |
It doesn't give you any visual feedback, which is stupid. |
|
L 2.0799 |
es |
... |
L 2.0800 |
It should. |
|
L 2.0800 |
es |
... |
L 2.0801 |
Then you can start typing and then you hit enter to make it go in. |
|
L 2.0801 |
es |
... |
L 2.0802 |
#02[48:55]Student: And you're out of edit mode. |
|
L 2.0802 |
es |
... |
L 2.0803 |
#02[48:57]Miller: If you're in edit mode it won't do it for you. |
|
L 2.0803 |
es |
... |
L 2.0804 |
#02[49:01]Student: If you're in edit it won't. |
|
L 2.0804 |
es |
... |
L 2.0805 |
#02[49:02]Miller: Yeah. |
|
L 2.0805 |
es |
... |
L 2.0806 |
It has to be in "run mode" or "locked," if you'd like. |
|
L 2.0806 |
es |
... |
L 2.0807 |
So, the final object that I want to tell you about is "print". |
|
L 2.0807 |
es |
... |
L 2.0808 |
("Comments" I'm just using, |
|
L 2.0808 |
es |
... |
L 2.0809 |
but good for explaining -- comments are very good.) |
|
L 2.0809 |
es |
... |
L 2.0810 |
Let me do a quick review of something important: |
|
L 2.0810 |
es |
... |
L 2.0811 |
What I've been doing on the "Put" menu so far |
|
L 2.0811 |
es |
... |
L 2.0812 |
is mostly reaching for objects. |
|
L 2.0812 |
es |
... |
L 2.0813 |
There are three things that I still need to do |
|
L 2.0813 |
es |
... |
L 2.0814 |
that don't require just making an object and typing into it |
|
L 2.0814 |
es |
... |
L 2.0815 |
because these are user interface objects -- they're things that |
|
L 2.0815 |
es |
... |
L 2.0816 |
make the surface of the patch. |
|
L 2.0816 |
es |
... |
L 2.0817 |
They are the number box which is here, the bang, which is here, |
|
L 2.0817 |
es |
... |
L 2.0818 |
and the array, which is here. |
|
L 2.0818 |
es |
... |
L 2.0819 |
Everything else that you see here is just plain old objects. |
|
L 2.0819 |
es |
... |
L 2.0820 |
All right? |
|
L 2.0820 |
es |
... |
L 2.0821 |
#02[50:04]Now, what I want to do is save this. |
|
L 2.0821 |
es |
... |
L 2.0822 |
So, now we have this print object without a tilde. |
|
L 2.0822 |
es |
... |
L 2.0823 |
OK, so it expects not a signal, but a message, or messages. |
|
L 2.0823 |
es |
... |
L 2.0824 |
And now, if I change this value, we get to actually see what the thing is doing. |
|
L 2.0824 |
es |
... |
L 2.0825 |
#02[50:26]OK, this is how you debug patches. |
|
L 2.0825 |
es |
... |
L 2.0826 |
You want to know what your patch is doing. |
|
L 2.0826 |
es |
... |
L 2.0827 |
And the way you find out is if there are messages going through... |
|
L 2.0827 |
es |
... |
L 2.0828 |
You can sometimes help yourself with number boxes, but frequently, |
|
L 2.0828 |
es |
... |
L 2.0829 |
if you really want a complete record of what's going on, |
|
L 2.0829 |
es |
... |
L 2.0830 |
you just hook a "print" up to something. |
|
L 2.0830 |
es |
... |
L 2.0831 |
And then, if you want to know what's going on with a signal, |
|
L 2.0831 |
es |
... |
L 2.0832 |
you have things like this tabwrite~ , |
|
L 2.0832 |
es |
... |
L 2.0833 |
or print~ which prints the things out here. |
|
L 2.0833 |
es |
... |
L 2.0834 |
And those two things have signal inputs, so they are |
|
L 2.0834 |
es |
... |
L 2.0835 |
appropriate for talking to signal outputs, and they will show you |
|
L 2.0835 |
es |
... |
L 2.0836 |
how something is varying in time and you'll see that. |
|
L 2.0836 |
es |
... |
L 2.0837 |
#02[51:00]Is there something else I needed to tell you about that? |
|
L 2.0837 |
es |
... |
L 2.0838 |
Let it sit then. |
|
L 2.0838 |
es |
... |
L 2.0839 |
#02[51:23]So, back to frequencies and amplitudes. |
|
L 2.0839 |
es |
... |
L 2.0840 |
Questions about this? |
|
L 2.0840 |
es |
... |
L 2.0841 |
#02[51:29]Student: What was the keyboard shortcut for connecting two objects? |
|
L 2.0841 |
es |
... |
L 2.0842 |
#02[51:32]Miller: Oh, there's no keyboard shortcut. |
|
L 2.0842 |
es |
... |
L 2.0843 |
OK. There's one trick to that. |
|
L 2.0843 |
es |
... |
L 2.0844 |
There's only one way to make a connection that doesn't require |
|
L 2.0844 |
es |
... |
L 2.0845 |
that you actually do the drag thing, |
|
L 2.0845 |
es |
... |
L 2.0846 |
which by the way is horrible on a trackpad. |
|
L 2.0846 |
es |
... |
L 2.0847 |
And that is, we have an object, and we want to |
|
L 2.0847 |
es |
... |
L 2.0848 |
make a new object to be connected to it. |
|
L 2.0848 |
es |
... |
L 2.0849 |
So, while it's selected, you hit Control-1, |
|
L 2.0849 |
es |
... |
L 2.0850 |
Control-1 in general just makes a new object. |
|
L 2.0850 |
es |
... |
L 2.0851 |
But Control-1, if something ... one other object is selected, |
|
L 2.0851 |
es |
... |
L 2.0852 |
Control-1 means "make a new object and connect to it." |
|
L 2.0852 |
es |
... |
L 2.0853 |
#02[52:14]Other questions? OK? |
|
L 2.0853 |
es |
... |
L 2.0854 |
#02[52:19]Student: Does print run automatically when you turn on the DSP? |
|
L 2.0854 |
es |
... |
L 2.0855 |
#02[52:22]Miller: Yes. Right. |
|
L 2.0855 |
es |
... |
L 2.0856 |
So print-tilde, you have to click it. |
|
L 2.0856 |
es |
... |
L 2.0857 |
With print tilde, you have to send it a message |
|
L 2.0857 |
es |
... |
L 2.0858 |
to tell it to operate like this. |
|
L 2.0858 |
es |
... |
L 2.0859 |
Let's see, you can do this, it's starting to get messy now. |
|
L 2.0859 |
es |
... |
L 2.0860 |
Turn it on. |
|
L 2.0860 |
es |
... |
L 2.0861 |
Oh, right, I've got the input down to zero. |
|
L 2.0861 |
es |
... |
L 2.0862 |
Oh, cool. |
|
L 2.0862 |
es |
... |
L 2.0863 |
Now I've shown you how you can make a patch that shuts up, |
|
L 2.0863 |
es |
... |
L 2.0864 |
but it's still running, so you can debug it without listening to it. |
|
L 2.0864 |
es |
... |
L 2.0865 |
#02[52:59]Just make your patch have an amplitude of zero, |
|
L 2.0865 |
es |
... |
L 2.0866 |
make it be a control, the patch is going to be muted |
|
L 2.0866 |
es |
... |
L 2.0867 |
in the sense that everything I'm doing is initially |
|
L 2.0867 |
es |
... |
L 2.0868 |
getting multiplied by zero, so you don't hear it. |
|
L 2.0868 |
es |
... |
L 2.0869 |
But we can still go through things and do things like look at |
|
L 2.0869 |
es |
... |
L 2.0870 |
the oscillator numerically, or look at the oscillator graphically. |
|
L 2.0870 |
es |
... |
L 2.0871 |
No, we can't do that, but we can do this. Right. |
|
L 2.0871 |
es |
... |
L 2.0872 |
#02[53:32]We can do that without having to have everything come over our speakers. |
|
L 2.0872 |
es |
... |
L 2.0873 |
It's a good thing. |
|
L 2.0873 |
es |
... |
L 2.0874 |
#02[53:38]Student: Is there a way to graph in real time? |
|
L 2.0874 |
es |
... |
L 2.0875 |
#02[53:42]"Miller: Yeah. There's an object called ""metro,""" |
|
L 2.0875 |
es |
... |
L 2.0876 |
which is a metronome, which will send out a message repeatedly |
|
L 2.0876 |
es |
... |
L 2.0877 |
instead of just once when you click it, and then |
|
L 2.0877 |
es |
... |
L 2.0878 |
you can have it just grab 10 times a second or whatever you want. |
|
L 2.0878 |
es |
... |
L 2.0879 |
I'll get to that. It's out of my object budget right now. |
|
L 2.0879 |
es |
... |
L 2.0880 |
#02[54:00]Student: Can you put up a bang on an oscillator, |
|
L 2.0880 |
es |
... |
L 2.0881 |
and have it play it with it? |
|
L 2.0881 |
es |
... |
L 2.0882 |
#02[54:06]Miller: No. --- Oh, yeah. |
|
L 2.0882 |
es |
... |
L 2.0883 |
So how would you make something play when you click it? |
|
L 2.0883 |
es |
... |
L 2.0884 |
Yeah, I have to introduce more objects to do that. |
|
L 2.0884 |
es |
... |
L 2.0885 |
So, in fact, to make something start playing, |
|
L 2.0885 |
es |
... |
L 2.0886 |
you don't tell the oscillator to start playing, because it's always playing. |
|
L 2.0886 |
es |
... |
L 2.0887 |
You have to multiply it by something |
|
L 2.0887 |
es |
... |
L 2.0888 |
and make the thing that it's multiplied by quit being zero. |
|
L 2.0888 |
es |
... |
L 2.0889 |
And that in fact is kind of the crucial thing that |
|
L 2.0889 |
es |
... |
L 2.0890 |
I'm hoping to find about five different ways of saying today. |
|
L 2.0890 |
es |
... |
L 2.0891 |
Is: You turn things on and off not by turning them on and off |
|
L 2.0891 |
es |
... |
L 2.0892 |
in the sense of "computing" or "not computing," but |
|
L 2.0892 |
es |
... |
L 2.0893 |
by multiplying them by numbers that vary from "zero" to "not zero." |
|
L 2.0893 |
es |
... |
L 2.0894 |
#02[54:44]And the reason for that is -- |
|
L 2.0894 |
es |
... |
L 2.0895 |
obviously you would save computation time if you just |
|
L 2.0895 |
es |
... |
L 2.0896 |
turned the thing on and off -- but that doesn't make for |
|
L 2.0896 |
es |
... |
L 2.0897 |
nice musical beginnings and endings of notes. |
|
L 2.0897 |
es |
... |
L 2.0898 |
We want things to turn on and off smoothly, |
|
L 2.0898 |
es |
... |
L 2.0899 |
which you'll have to learn how to do. |
|
L 2.0899 |
es |
... |
L 2.0900 |
But the only way to accomplish that is by multiplying the outputs |
|
L 2.0900 |
es |
... |
L 2.0901 |
as a way of controlling the amplitude |
|
L 2.0901 |
es |
... |
L 2.0902 |
instead of simply by turning things on and off. |
|
L 2.0902 |
es |
... |
L 2.0903 |
#02[55:08]And a wonderful example of that is this. |
|
L 2.0903 |
es |
... |
L 2.0904 |
Let's multiply ourselves by not a number, but by another oscillator. |
|
L 2.0904 |
es |
... |
L 2.0905 |
[tone] And let's make it go at one Hertz. |
|
L 2.0905 |
es |
... |
L 2.0906 |
Now, this is where we're too loud for the mixer again, |
|
L 2.0906 |
es |
... |
L 2.0907 |
so we're hearing distortion. |
|
L 2.0907 |
es |
... |
L 2.0908 |
So rather than just take that lying down, |
|
L 2.0908 |
es |
... |
L 2.0909 |
I know how to deal with it now. |
|
L 2.0909 |
es |
... |
L 2.0910 |
So, let's say. |
|
L 2.0910 |
es |
... |
L 2.0911 |
Not only are we going to do that, but we're also going to have |
|
L 2.0911 |
es |
... |
L 2.0912 |
a multiplier controlling the overall amplitude. |
|
L 2.0912 |
es |
... |
L 2.0913 |
And now, we have a patch that does something interesting, |
|
L 2.0913 |
es |
... |
L 2.0914 |
but doesn't do it full blast. |
|
L 2.0914 |
es |
... |
L 2.0915 |
I'll start paying attention again and being careful about the outputs, |
|
L 2.0915 |
es |
... |
L 2.0916 |
so that I can turn the mixer up. |
|
L 2.0916 |
es |
... |
L 2.0917 |
#02[56:22]OK, so now what I'm doing is I'm taking this nice oscillator, |
|
L 2.0917 |
es |
... |
L 2.0918 |
that has a pitch of 330, and making it change its amplitude. |
|
L 2.0918 |
es |
... |
L 2.0919 |
So, as I click and look at the signal at different moments in time, |
|
L 2.0919 |
es |
... |
L 2.0920 |
I get different strengths. |
|
L 2.0920 |
es |
... |
L 2.0921 |
That's because this one is just making that waveform, whereas |
|
L 2.0921 |
es |
... |
L 2.0922 |
this other one, this one-Hertz job, if I look at it --. |
|
L 2.0922 |
es |
... |
L 2.0923 |
Now remember. There are 1,000 points in this array. |
|
L 2.0923 |
es |
... |
L 2.0924 |
That means the array has a 44th of a second. |
|
L 2.0924 |
es |
... |
L 2.0925 |
So, at the speeds that we're looking at, |
|
L 2.0925 |
es |
... |
L 2.0926 |
you don't see very much variation at all in a one Hertz sinusoid. |
|
L 2.0926 |
es |
... |
L 2.0927 |
#02[57:08]But of course, you hear variation, because there are |
|
L 2.0927 |
es |
... |
L 2.0928 |
44 of these things going by per second. |
|
L 2.0928 |
es |
... |
L 2.0929 |
Faster than the video frame rate of the thing. |
|
L 2.0929 |
es |
... |
L 2.0930 |
So, this thing, even though it looks like it's doing almost nothing, |
|
L 2.0930 |
es |
... |
L 2.0931 |
is in fact varying, it's going once a second, so what it's really doing is |
|
L 2.0931 |
es |
... |
L 2.0932 |
it's going up, down, up, down, up, down. |
|
L 2.0932 |
es |
... |
L 2.0933 |
And what you hear is two beats per second, because you hear |
|
L 2.0933 |
es |
... |
L 2.0934 |
a peak when the amplitude goes up to one, and you hear a peak |
|
L 2.0934 |
es |
... |
L 2.0935 |
when the amplitude goes down to minus one. |
|
L 2.0935 |
es |
... |
L 2.0936 |
Which means it got multiplied by minus one, which is also full blast. |
|
L 2.0936 |
es |
... |
L 2.0937 |
#02[57:44]Student: Is this different than Tuesday? |
|
L 2.0937 |
es |
... |
L 2.0938 |
Because Tuesday we were doing something with the frequencies. |
|
L 2.0938 |
es |
... |
L 2.0939 |
#02[57:48]Miller: Yes. This is a completely different situation |
|
L 2.0939 |
es |
... |
L 2.0940 |
from Tuesday's situation -- You've anticipated |
|
L 2.0940 |
es |
... |
L 2.0941 |
the next thing I want to do, in fact -- |
|
L 2.0941 |
es |
... |
L 2.0942 |
where there was an extra oscillator all right, but it was controlling |
|
L 2.0942 |
es |
... |
L 2.0943 |
the frequency of the oscillator we were listening to. |
|
L 2.0943 |
es |
... |
L 2.0944 |
Maybe it's time to "Save as ... |
|
L 2.0944 |
es |
... |
L 2.0945 |
Now we're saving "5.moreampfreq.pd". |
|
L 2.0945 |
es |
... |
L 2.0946 |
So, now what I want to do is say, "OK, this is good", but |
|
L 2.0946 |
es |
... |
L 2.0947 |
there's also the possibility where I had my nice oscillator. |
|
L 2.0947 |
es |
... |
L 2.0948 |
Here's an oscillator, and then I had an adder and I was adding 440, I think. |
|
L 2.0948 |
es |
... |
L 2.0949 |
And then I had another oscillator with another amplitude control. |
|
L 2.0949 |
es |
... |
L 2.0950 |
#02[59:10]Student: Isn't that one multiplying by 440? |
|
L 2.0950 |
es |
... |
L 2.0951 |
#02[59:15]Miller: Oh, thank you. |
|
L 2.0951 |
es |
... |
L 2.0952 |
I don't want to do that, do I? Now we have an oscillator. |
|
L 2.0952 |
es |
... |
L 2.0953 |
It's going to operate at some frequency, but, unlike last time, |
|
L 2.0953 |
es |
... |
L 2.0954 |
to give me more fun, I'll hook up a number there. |
|
L 2.0954 |
es |
... |
L 2.0955 |
I didn't have number objects last time, so I had to do it a little more severely. |
|
L 2.0955 |
es |
... |
L 2.0956 |
Now let's see what this does, let's do this. |
|
L 2.0956 |
es |
... |
L 2.0957 |
All right. Now we're getting complicated. |
|
L 2.0957 |
es |
... |
L 2.0958 |
#02[59:56]This is yesterday's patch with a little bit more controllability |
|
L 2.0958 |
es |
... |
L 2.0959 |
but doing exactly the same thing. |
|
L 2.0959 |
es |
... |
L 2.0960 |
This is the oscillator that's making noise. |
|
L 2.0960 |
es |
... |
L 2.0961 |
And, morally speaking, it's speaking in 440 Hertz. |
|
L 2.0961 |
es |
... |
L 2.0962 |
But, in fact, we're taking that 440 and |
|
L 2.0962 |
es |
... |
L 2.0963 |
we're adding another audio signal to it. |
|
L 2.0963 |
es |
... |
L 2.0964 |
And that audio signal is the output of the oscillator |
|
L 2.0964 |
es |
... |
L 2.0965 |
whose frequency and amplitude we are controlling. |
|
L 2.0965 |
es |
... |
L 2.0966 |
Now, what was happening last time was this oscillator said "osc~ 6". |
|
L 2.0966 |
es |
... |
L 2.0967 |
So, that I initialized it to six Hertz. |
|
L 2.0967 |
es |
... |
L 2.0968 |
This was "*~ 30", and it was doing a fixed thing. |
|
L 2.0968 |
es |
... |
L 2.0969 |
But, now I'm using the number boxes here to fill in |
|
L 2.0969 |
es |
... |
L 2.0970 |
the frequency and the amplitude of this so-called "modulating oscillator." |
|
L 2.0970 |
es |
... |
L 2.0971 |
#02[60:52]Now, if we turn this thing on, like this, |
|
L 2.0971 |
es |
... |
L 2.0972 |
Let's turn this one off, I have to turn the patch on [tone]. |
|
L 2.0972 |
es |
... |
L 2.0973 |
#02[61:02]There's 440 for us again. |
|
L 2.0973 |
es |
... |
L 2.0974 |
And, now if I say, this oscillator will run at three Hertz we got this. |
|
L 2.0974 |
es |
... |
L 2.0975 |
There's that. |
|
L 2.0975 |
es |
... |
L 2.0976 |
And now this one was doing something different, which was this: [tone]. |
|
L 2.0976 |
es |
... |
L 2.0977 |
Let's go to 440 so we can compare it. |
|
L 2.0977 |
es |
... |
L 2.0978 |
This is a changing amplitude. |
|
L 2.0978 |
es |
... |
L 2.0979 |
#02[61:27]Student: What's the point of adding the 440? |
|
L 2.0979 |
es |
... |
L 2.0980 |
Why didn't you just put the "osc~ 440" ? |
|
L 2.0980 |
es |
... |
L 2.0981 |
#02[61:36]Miller: If I did that then it wouldn't know to add it -- |
|
L 2.0981 |
es |
... |
L 2.0982 |
it would be overridden by the values coming in. |
|
L 2.0982 |
es |
... |
L 2.0983 |
It wouldn't be 440 _plus_ the values. |
|
L 2.0983 |
es |
... |
L 2.0984 |
#02[61:43]Student: Oh. OK. |
|
L 2.0984 |
es |
... |
L 2.0985 |
#02[61:45]Miller: Yeah, so. That's a good question. |
|
L 2.0985 |
es |
... |
L 2.0986 |
It's not beautiful yet, but it's OK. |
|
L 2.0986 |
es |
... |
L 2.0987 |
I could have tried this. |
|
L 2.0987 |
es |
... |
L 2.0988 |
I just want to run this right in and then say 440. |
|
L 2.0988 |
es |
... |
L 2.0989 |
But now this 440 is actually being overridden by this. |
|
L 2.0989 |
es |
... |
L 2.0990 |
In fact, what I have really is an oscillator that is buried |
|
L 2.0990 |
es |
... |
L 2.0991 |
between plus and minus six Hertz. |
|
L 2.0991 |
es |
... |
L 2.0992 |
It's very easy to make sounds that you can't hear. |
|
L 2.0992 |
es |
... |
L 2.0993 |
And the reason you can't hear the sound, you can look at it |
|
L 2.0993 |
es |
... |
L 2.0994 |
and see why you can't hear it, is that it's |
|
L 2.0994 |
es |
... |
L 2.0995 |
just not moving fast enough for us to hear it. |
|
L 2.0995 |
es |
... |
L 2.0996 |
#02[62:47]Student: For the lines you have connected, can you just grab it, |
|
L 2.0996 |
es |
... |
L 2.0997 |
disconnect it and move it to a different one or can you take the line off and ... |
|
L 2.0997 |
es |
... |
L 2.0998 |
#02[62:54]Miller: You'd want to be able to disconnect it either |
|
L 2.0998 |
es |
... |
L 2.0999 |
at the output or at the input. It doesn't do it. |
|
L 2.0999 |
es |
... |
L 2.1000 |
You have to delete the old line and make a new one. |
|
L 2.1000 |
es |
... |
L 2.1001 |
#02[63:02]Student: This is probably a silly question, but |
|
L 2.1001 |
es |
... |
L 2.1002 |
There's not like another window that would show you the signal level, |
|
L 2.1002 |
es |
... |
L 2.1003 |
no way you could see how things are / troubleshoot? |
|
L 2.1003 |
es |
... |
L 2.1004 |
#02[63:12]Miller: No, basically, no. |
|
L 2.1004 |
es |
... |
L 2.1005 |
There's no other window here except when you've got. |
|
L 2.1005 |
es |
... |
L 2.1006 |
I mean, you can build things that do that, but there's nothing built-in. |
|
L 2.1006 |
es |
... |
L 2.1007 |
OK, so, that didn't work but this works: [tone]. |
|
L 2.1007 |
es |
... |
L 2.1008 |
Now, at this point I'm just confusing you but I think it's 440. |
|
L 2.1008 |
es |
... |
L 2.1009 |
I'm going to save that. |
|
L 2.1009 |
es |
... |
L 2.1010 |
Furthermore, you can improve it by doing this -- |
|
L 2.1010 |
es |
... |
L 2.1011 |
now everything is up for control [plays an assortment of tones]. |
|
L 2.1011 |
es |
... |
L 2.1012 |
Don't try this at home. |
|
L 2.1012 |
es |
... |
L 2.1013 |
Then you have this -- which is how fast it's going. |
|
L 2.1013 |
es |
... |
L 2.1014 |
And this -- which is how deep it's going [demonstrating new tones and frequencies]. |
|
L 2.1014 |
es |
... |
L 2.1015 |
Now you have frequency modulation. |
|
L 2.1015 |
es |
... |
L 2.1016 |
This is 1960's computer music [laughter]. |
|
L 2.1016 |
es |
... |
L 2.1017 |
#02[64:25]"That is known as ""frequency modulation.""" |
|
L 2.1017 |
es |
... |
L 2.1018 |
Frequency modulation's taking the frequency of an oscillator and changing it. |
|
L 2.1018 |
es |
... |
L 2.1019 |
Modulation is a musical term that just means "change". |
|
L 2.1019 |
es |
... |
L 2.1020 |
In fact we shouldn't even call it "modulation." |
|
L 2.1020 |
es |
... |
L 2.1021 |
Well, maybe it means change with time or something like that, or repeated change. |
|
L 2.1021 |
es |
... |
L 2.1022 |
No, because -- modulating harmony might not be repeated at all. |
|
L 2.1022 |
es |
... |
L 2.1023 |
#02[64:48]What we're doing now is we're taking this oscillator, |
|
L 2.1023 |
es |
... |
L 2.1024 |
it's frequency is the sum of a base frequency, |
|
L 2.1024 |
es |
... |
L 2.1025 |
a "center-frequency" if you like and an oscillator. |
|
L 2.1025 |
es |
... |
L 2.1026 |
This is an oscillator, the amplitude and frequency are 172 Volts and 82 Hertz. |
|
L 2.1026 |
es |
... |
L 2.1027 |
#02[65:15]This is taking this oscillator |
|
L 2.1027 |
es |
... |
L 2.1028 |
and changing its frequency by talking to its input. |
|
L 2.1028 |
es |
... |
L 2.1029 |
This is taking this oscillator and changing its amplitude by |
|
L 2.1029 |
es |
... |
L 2.1030 |
multiplying its output by something. |
|
L 2.1030 |
es |
... |
L 2.1031 |
And that, contrast to the other things, makes it sound like this. |
|
L 2.1031 |
es |
... |
L 2.1032 |
We can make sounds with it. |
|
L 2.1032 |
es |
... |
L 2.1033 |
This is trigonometry. |
|
L 2.1033 |
es |
... |
L 2.1034 |
If this is cosine A, this is cosine B, this is (cosine A X cosine B), |
|
L 2.1034 |
es |
... |
L 2.1035 |
which we all know is 1/2 [cosine( A + B) + cosine (A - B)]. [tones and laughter] |
|
L 2.1035 |
es |
... |
L 2.1036 |
#02[65:53]Miller: So Algebra II is just this! |
|
L 2.1036 |
es |
... |
L 2.1037 |
Or actually to put that backwards: People will tell you that the reason, |
|
L 2.1037 |
es |
... |
L 2.1038 |
if you have two oscillators -- two sinusoids that are nearby in frequency -- |
|
L 2.1038 |
es |
... |
L 2.1039 |
they "beat" when you superimpose them, is because |
|
L 2.1039 |
es |
... |
L 2.1040 |
they're moving in and out of phase. |
|
L 2.1040 |
es |
... |
L 2.1041 |
That's the layman's explanation of what's going on. |
|
L 2.1041 |
es |
... |
L 2.1042 |
#02[66:24]The truth is that the sum of two sinusoids is |
|
L 2.1042 |
es |
... |
L 2.1043 |
algebraically equal to the product of two other sinusoids. |
|
L 2.1043 |
es |
... |
L 2.1044 |
It's the same relationship I just told you and the product |
|
L 2.1044 |
es |
... |
L 2.1045 |
tells you that it's changing in amplitude, which is the beating you hear, |
|
L 2.1045 |
es |
... |
L 2.1046 |
and the sum is the two that you put together. |
|
L 2.1046 |
es |
... |
L 2.1047 |
Now I'm doing that backwards, I'm taking an oscillator here and |
|
L 2.1047 |
es |
... |
L 2.1048 |
I'm making it beat by multiplying with another oscillator that |
|
L 2.1048 |
es |
... |
L 2.1049 |
changes its amplitude. And that's just algebraically equal to |
|
L 2.1049 |
es |
... |
L 2.1050 |
those two that you have to add to beat. |
|
L 2.1050 |
es |
... |
L 2.1051 |
It's the same stuff -- you can do it either way. |
|
L 2.1051 |
es |
... |
L 2.1052 |
#02[66:52]This however you can do to a real signal: |
|
L 2.1052 |
es |
... |
L 2.1053 |
Try that at home and see what you get. |
|
L 2.1053 |
es |
... |
L 2.1054 |
Find a politician you don't like and multiply him or her by |
|
L 2.1054 |
es |
... |
L 2.1055 |
a thirty Hertz oscillator, and then you'll get a pleasant surprise! [laughter] |
|
L 2.1055 |
es |
... |
L 2.1056 |
#02[67:16]Miller: This is an oscillator, changing the amplitude, |
|
L 2.1056 |
es |
... |
L 2.1057 |
which is sometimes called "amplitude modulation" |
|
L 2.1057 |
es |
... |
L 2.1058 |
sometimes called "ring modulation" as an historical term |
|
L 2.1058 |
es |
... |
L 2.1059 |
which we'll never get out of. |
|
L 2.1059 |
es |
... |
L 2.1060 |
This is frequency modulation, which is taking the same oscillator. |
|
L 2.1060 |
es |
... |
L 2.1061 |
(I should make a nice comment, emphasize what an oscillator is, |
|
L 2.1061 |
es |
... |
L 2.1062 |
the main oscillator if you like.) |
|
L 2.1062 |
es |
... |
L 2.1063 |
This is taking this oscillator and changing its input. |
|
L 2.1063 |
es |
... |
L 2.1064 |
You can do both at the same time if you want. |
|
L 2.1064 |
es |
... |
L 2.1065 |
#02[67:49]Yeah? |
|
L 2.1065 |
es |
... |
L 2.1066 |
#02[67:50]Student: Is the number that's zero right now? On the right hand side. |
|
L 2.1066 |
es |
... |
L 2.1067 |
#02[67:52]Miller: Yes. This one here? |
|
L 2.1067 |
es |
... |
L 2.1068 |
#02[67:54]Student: Is that the amplitude overall? |
|
L 2.1068 |
es |
... |
L 2.1069 |
#02[67:57]Miller: This and this, those are volume controls, or |
|
L 2.1069 |
es |
... |
L 2.1070 |
gain controls that I have on the outputs of both of these patches, |
|
L 2.1070 |
es |
... |
L 2.1071 |
so I can turn them on and off -- |
|
L 2.1071 |
es |
... |
L 2.1072 |
Which is not making the computer not compute, but it's |
|
L 2.1072 |
es |
... |
L 2.1073 |
multiplying them by a tenth or a zero. |
|
L 2.1073 |
es |
... |
L 2.1074 |
#02[68:14]And of course we don't hear them because also I've turned DSP off. |
|
L 2.1074 |
es |
... |
L 2.1075 |
[tone] This is a more correct way of showing you what's happening. |
|
L 2.1075 |
es |
... |
L 2.1076 |
#02[68:35]Student: What is cross-modulation. |
|
L 2.1076 |
es |
... |
L 2.1077 |
#02[68:37]Student: Is that not an official thing? |
|
L 2.1077 |
es |
... |
L 2.1078 |
#02[68:41]Miller: I would use that to mean that I was taking one sound and |
|
L 2.1078 |
es |
... |
L 2.1079 |
multiplying it by another sound or maybe doing something else to it |
|
L 2.1079 |
es |
... |
L 2.1080 |
depending on the other sound. |
|
L 2.1080 |
es |
... |
L 2.1081 |
I don't know if it's a trick definition. |
|
L 2.1081 |
es |
... |
L 2.1082 |
#02[68:54]Student: OK. |
|
L 2.1082 |
es |
... |
L 2.1083 |
#02[68:57]Miller: It's also, -- lots of terms. |
|
L 2.1083 |
es |
... |
L 2.1084 |
we'll get further along and see all sorts of other things. |
|
L 2.1084 |
es |
... |
L 2.1085 |
Any other questions about this? Sorry to belabor this |
|
L 2.1085 |
es |
... |
L 2.1086 |
but I'm going to belabor it slightly. |
|
L 2.1086 |
es |
... |
L 2.1087 |
What we have just by way of review, is |
|
L 2.1087 |
es |
... |
L 2.1088 |
two ways of looking at signals which are |
|
L 2.1088 |
es |
... |
L 2.1089 |
print~ and tabwrite~ going into an array. |
|
L 2.1089 |
es |
... |
L 2.1090 |
This one (tabwrite~) is more work but it gives you a nice graph. |
|
L 2.1090 |
es |
... |
L 2.1091 |
It's more work because you have to make a button and choose |
|
L 2.1091 |
es |
... |
L 2.1092 |
when you're going to do it and make a graph |
|
L 2.1092 |
es |
... |
L 2.1093 |
that agrees in name with the tabwrite~. |
|
L 2.1093 |
es |
... |
L 2.1094 |
I could have five or ten arrays in my patch, and five or ten tabwrite~ 's |
|
L 2.1094 |
es |
... |
L 2.1095 |
and they could talk to individual arrays. |
|
L 2.1095 |
es |
... |
L 2.1096 |
There's a print without a tilde and that is a thing which takes message input. |
|
L 2.1096 |
es |
... |
L 2.1097 |
And by the way, as I showed, it's good for printing these things out (messages) |
|
L 2.1097 |
es |
... |
L 2.1098 |
but it's not good for printing these things out (signals). |
|
L 2.1098 |
es |
... |
L 2.1099 |
Furthermore it will even refuse to allow me to connect it |
|
L 2.1099 |
es |
... |
L 2.1100 |
and will print a nasty message if I do that. |
|
L 2.1100 |
es |
... |
L 2.1101 |
In general you cannot take a signal and put it into a message input. |
|
L 2.1101 |
es |
... |
L 2.1102 |
A message input wouldn't know how to deal with 44,100 numbers a second. |
|
L 2.1102 |
es |
... |
L 2.1103 |
#02[70:21]I _can_ however take a message output and hook it into a signal input, |
|
L 2.1103 |
es |
... |
L 2.1104 |
as long as there's not a signal going into the signal input as well. |
|
L 2.1104 |
es |
... |
L 2.1105 |
The message will simply set the value of the signal. |
|
L 2.1105 |
es |
... |
L 2.1106 |
So numbers which are messages promoted to signals automatically, but not vice versa. |
|
L 2.1106 |
es |
... |
L 2.1107 |
#02[70:45]What else do I have to tell you about by way of review? |
|
L 2.1107 |
es |
... |
L 2.1108 |
One other thing, this is review but this is important, |
|
L 2.1108 |
es |
... |
L 2.1109 |
I'm thinking I could have confused you about. |
|
L 2.1109 |
es |
... |
L 2.1110 |
If you do this, this input doesn't take signals, |
|
L 2.1110 |
es |
... |
L 2.1111 |
it tells it that it's messages. |
|
L 2.1111 |
es |
... |
L 2.1112 |
That's to say, binary operations like times or plus -- |
|
L 2.1112 |
es |
... |
L 2.1113 |
If you feed it an argument that initializes the value |
|
L 2.1113 |
es |
... |
L 2.1114 |
that also tells that the inlet is expecting messages as opposed to signals. |
|
L 2.1114 |
es |
... |
L 2.1115 |
To multiply two signals, don't give it an argument just say times~. |
|
L 2.1115 |
es |
... |
L 2.1116 |
Now all this should be explained in the help windows for all these things. |
|
L 2.1116 |
es |
... |
L 2.1117 |
By way of reminder, you can always get help by right-click. |
|
L 2.1117 |
es |
... |
L 2.1118 |
Here's help for the oscillator, even a graph. |
|
L 2.1118 |
es |
... |