|
|
# Intro to Pure Data |
|
|
\ No newline at end of file |
|
|
# Intro to Pure Data
|
|
|
|
|
|
Open first_patch.pd
|
|
|
|
|
|
You should see three objects:
|
|
|
one with a very long name
|
|
|
one called "pd boop"
|
|
|
and one called "pd speaker"
|
|
|
|
|
|
|
|
|
pd speaker is the most important object here. It has one inlet. Anything that you send to that inlet will come out of your speaker.
|
|
|
|
|
|
pd boop does just what it sounds likes it does, boops! It needs to know which note you want it to play, and where to send it
|
|
|
You tell boop which note to play by sending a message into its inlet.
|
|
|
You tell boop where to send its boop by connecting its outlet to the destination.
|
|
|
|
|
|
We want to be able to hear our boops so connect the boop to the speaker.
|
|
|
Your mouse should look like a hand. If it doesn't, press control-E on your keyboard.
|
|
|
|
|
|
Next, move your mouse over the outlet of pd boop (the bold line on the bottom of the object), make sure the cursor changes from a hand, to an arrow.
|
|
|
|
|
|
Next, move your mouse over the inlet of pd speaker (the bold line on the top of the object). Make sure that the cursor changes to an arrow again.
|
|
|
Practice this a few times because you will need to it a lot and it can be a little tricky at first.
|
|
|
|
|
|
Then click and drag to the inlet (the bold line on the top of the pd speaker object), and make sure your cursor changes to and arrow again.
|
|
|
When you release the mouse, the two objects should be connected!
|
|
|
|
|
|
Now make a message box by pressing control-2 on the keyboard. Or by going to the "put" menu and choosing "message."
|
|
|
|
|
|
You will notice that it is connected to your mouse.
|
|
|
|
|
|
Move your cursor so that it is above the pd boop object and click once. This will place the message box where you want it.
|
|
|
|
|
|
It should still be blue and have a blinking cursor in it. (If it isn't click on it one more time)
|
|
|
|
|
|
Now we need to tell the pd boop object which note we want it to play. We do this using numbers.
|
|
|
|
|
|
Type 72 into the message box and click anywhere in the white space outside of the box.
|
|
|
|
|
|
Now we need to connect the message box to the pd boop object so that they can talk to each other.
|
|
|
|
|
|
Just like before move your mouse over the outlet of the message box. When your mouse turns into an arrow click and drag to the inlet of pd boop.
|
|
|
When your mouse turns into and arrow again, release it to connect the two objects.
|
|
|
|
|
|
We're almost ready to make some boops!
|
|
|
|
|
|
The last thing we need is a way to tell the pd boop when to make it boop. Right now it doesn't know when to make a note or which note to make. As soon as it knows which note to play, it will make a sound.
|
|
|
|
|
|
We will use the message to tell pd boop which note we want to hear. The message box won't send it until we tell it to though.
|
|
|
It's listening for a bang. As soon as it hears one it will send its message, in this case 72, to boop and we should hear a sound.
|
|
|
|
|
|
Let's make a bang object. You can either press control-shift-B on the keyboard or use the "put" menu and choose "Bang."
|
|
|
|
|
|
Just like before, it will be connected to your mouse. Move your mouse to be above the message and click once. This should place it where you clicked.
|
|
|
|
|
|
Now we need to connect the outlet of the bang to the inlet of the message. Try to see if you can do it just like we did before.
|
|
|
|
|
|
If everything is connected properly we should be able to make some sounds. In order to do that we need to "lock" the patch. Press control-E on the keyboard.
|
|
|
|
|
|
Notice that now you cannot move any objects. You can click on them and make them talk to each other though! Click on the bang to hear a boop.
|
|
|
|
|
|
What happened is the bang object sent a bang to the message. The message was waiting to hear a bang to tell pd boop which note to play.
|
|
|
|
|
|
p pd boop heard that we wanted to hear note 72 and sent that note to the speaker.
|
|
|
|
|
|
------------------------------------------------------
|
|
|
Now let's see if we can control pd boop using our kits.
|
|
|
|
|
|
That object with the long name in our patch can help us do that. Notice that it has a bunch of outlets. Some of these outlets are connected to the buttons on your kit.
|
|
|
When you press one of the buttons on the board, a bang will come out of one of those outlets. We can use the bang that comes out of that outlet to make a boop.
|
|
|
|
|
|
First we need to unlock our patch so we can make changes. Press control-E. Your cursor should turn back into a hand.
|
|
|
Connect the last outlet (the farthest right one) to the inlet of our bang object.
|
|
|
|
|
|
Now position your kit so that the buttons are on the side facing you and the potentiometers (the knobs) are facing away from you.
|
|
|
Press the farthest right button and you should hear a boop!
|
|
|
|
|
|
What if we wanted to hear a different note besides 72?
|
|
|
|
|
|
Click one time on the message box. Now you can change that number. Change it to something smaller, like 45.
|
|
|
Now lock the patch (by pressing control-E on the keyboard) and press the same button on your kit. You should hear a different note now.
|
|
|
|
|
|
Try unlocking your patch and changing the number again to something different. Lock the patch again and see what the note you chose sounds like.
|
|
|
|
|
|
We can play different notes, but it is pretty inconvenient to have to lock and unlock the patch just to play different notes, and we have all these buttons that we're not even using!
|
|
|
|
|
|
Unlock your patch one more time and click and drag to select the bang, the message, and pd boop. Now press control-C on the keyboard to copy them. Or you can use the "edit" menu and choose "copy."
|
|
|
|
|
|
This part can be confusing so make sure to watch the instructor do this step first.
|
|
|
|
|
|
Now we are going to paste these objects into the patch so we can play more notes. Either press control-V on the keyboard or use the "edit" menu and choose "paste."
|
|
|
|
|
|
Pd pasted our objects, but they are hidden by the objects we already have. You'll notice that it highlights them in blue. Click on the blue objects and drag them to the left.
|
|
|
|
|
|
Now you should have two bangs, two messages, and two pd boops. Let's control this second pd boop with the second to last button on the kit. That button is connected to the second to last outlet of the obejct at the top of the patch.
|
|
|
|
|
|
|
|
|
|