Under the Help Menu item, select browser. Click only once!
Now select 3. audio examples (click once).
Finally, select A01. sinewave.pd. Click ON, and you'll hear the 440Hz sound.
is going on.
In the file menu of the
sinewave.pd patch, choose Save-as and save
it as lab2.pd. Save it in your H:/ drive.
Now let's change the frequency and amplitude.
Change to Edit-mode, either by typing
Ctrl-e or by going into the Edit menu
and choosing Edit mode. (Note: Ctrl-e toggles
back and forth: in edit mode and out of edit mode).
Now, under the PUT menu, choose Number
and you'll see a blue number box that follows
your mouse until you click. You can still
drag it wherever you want it. Place it above
the osc~ object. (You can drag the others object around
one by one or drag to hightlight a few and
reposition the bunch).
At the top of a number box or object,
there are inlets. At the bottom, there are
outlets. Connect the outlet of the number
box to the left inlet (also called
the hot inlet) of the osc~ object.
PUT a second number box in the lab2 patch
and connect its outlet to the right
inlet (also called the cold inlet)
of the signal multiplier *~ object.
Now, PUT a comment by the number
box that says
<-- shift-click and drag to change by hundreths
By following the instructions in this commen,
the user (you) can change the amplitude by small
Leave edit mode (Ctrl-e) and click ON.
Drag the mouse over both numbers
a few times and listen.
Now carefully read and try out the
2. control examples, 00,01,02,03,04, and 05.
(Remember to click once only on each).
Next, add a counter to your lab2.
Copy the counter from example 05
into your lab2.pd patch. You may want to
clear out some of the comments first to make room
for it. To delete something, make
sure you are in edit mode (the cursor is a
hand) and highlight the comment
to delete and the hit Backspace.
To copy and paste, highlight over the
objects you want to copy then do
Ctrl-C and Ctrl-V to paste them.
When you paste, pd puts the objects
in the middle of the patch screen so
next, drag the objects one by one so they are
parallel to your osc~ and dac~ objects.
Notice that the coonections between
objects stretch for you.
Change the initial value of the
number box of the counter
under the + 1 object so it starts
at 200 instead of 0. Then connect the
outlet of this number box into the inlet of
the number box you have been using to change the
Click on the Bang message box and wait.
Click OFF when you are ready.
You can decide whether you want to keep the
counter connected to your osc~ or not
for the next part. Perhaps try it both ways.
Now we will write out to a wav file.
Make your lab2.pd screen larger by dragging
on the bottom right of its window.
Make a 2inch by 2inch empty space in the
Place an object called writesf~ in your
lab2.pd, and then right click on it to
Read the information on the writesf~help.pd
screen. Then copy the whole set of objects in
the top left of the screen,
including the bang and del 1000.
Paste this subpatch in your lab2.pd.
You can delete the writesf~ object you PUT
there since the new subpatch already has one.
Also, delete the osc~ 440 object that
came with the new subpatch.
Delete the second 2 open message boxes,
starting with open -bytes.
Change the file name
in the top and now only open message
box to lab2.wav.
Change del 1000 to del 30000 so we
record 30 second of sound instead of just 1.
Add a print object under the del 30000.
i.e. PUT an object and type print done in it.
Then make a connection from the
outlet of del 30000 to the left inlet of
the print done object.
Add a connection from your
osc~ object so it also goes into the left
inlet of the writesf~ object
as well as to the dac~.
Click bang, and then change the
frequency and amplitude by mousing the number
wav file on your web page along with