aboutsummaryrefslogtreecommitdiff
path: root/pd
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2006-09-19 22:30:33 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2006-09-19 22:30:33 +0000
commit2ed8e5ab0516ba0a3d66fdc5612a4631fee5f6d5 (patch)
tree374ec1f6de1ea4165c7f94a4c167bd0531ceb0da /pd
parent70defb88ba3a62b0efd0fe2e256c368a039cd92f (diff)
Bug fixes
svn path=/trunk/; revision=5972
Diffstat (limited to 'pd')
-rw-r--r--pd/doc/1.manual/x5.htm25
-rw-r--r--pd/doc/5.reference/block~-help.pd53
-rw-r--r--pd/doc/5.reference/drawpolygon-help.pd28
-rw-r--r--pd/doc/5.reference/env~-help.pd47
-rw-r--r--pd/doc/5.reference/list-help.pd48
-rw-r--r--pd/doc/5.reference/pd-help.pd179
-rw-r--r--pd/doc/5.reference/tabwrite~-help.pd70
-rw-r--r--pd/portaudio/pa_win_wdmks/pa_win_wdmks.c2
-rw-r--r--pd/portaudio/pablio/ringbuffer.c2
-rw-r--r--pd/portaudio/pablio/ringbuffer.h2
-rw-r--r--pd/portmidi/pm_mac/pmmacosxcm.c2
-rw-r--r--pd/src/g_canvas.c2
-rw-r--r--pd/src/g_io.c9
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/notes.txt32
-rw-r--r--pd/src/s_audio.c26
-rw-r--r--pd/src/s_main.c8
-rw-r--r--pd/src/s_midi.c4
18 files changed, 348 insertions, 193 deletions
diff --git a/pd/doc/1.manual/x5.htm b/pd/doc/1.manual/x5.htm
index 064d093e..1bc8ef9d 100644
--- a/pd/doc/1.manual/x5.htm
+++ b/pd/doc/1.manual/x5.htm
@@ -25,7 +25,8 @@
for resources such as abstractions and libraries.
<P> Sybmols can now be built using multiple dollar sign variables, as in
-"$1-$2.$3".
+"$1-$2.$3". Meanwhile, naming subpatches as in "pd $1-foo" now seems to
+work correctly.
<P> The switch~ object takes a "bang" message to compute one block of DSP on
demand. Also, block sizes are no longer required to be powers of two
@@ -47,8 +48,30 @@ search.
<P> Templates can get notified when data are selected/deselected. I want
to provide this for mouse actions on locked canvases too, but haven't yet.
+<P> Characters like "\", "[", etc., typed into dialogs for labelling
+number boxes or other GUI objects, get filtered out so that they at
+least don't hang Pd up.
+
+<P> Drawcurve (and the others, filledcurve, drawpolygon, filledpolygon)
+have a new "-x" flag that inhibits a scalar getting
+selected when the curve is clicked on. This is useful for drawing stuff in
+the background (grids, clefs, etc).
+
<P> 6 or so patches adopted from sourceforge.
+<P> A "list length" object
+
+<P> IEM Gui labels (except for the VU meter) default to 10 point fonts
+(typically 8 before).
+
+<P> "send" without an argument gets an inlet to set the destination
+
+<P> A -noprefs flag defeats loading startup preferences. This gives you a
+way to rescue things if Pd's settings somehow crash Pd on startup.
+
+<P> tabwrite~ takes a "start" message to allow writing into the middle
+of the table.
+
<P> ------------------ 0.39.2 --------------------------
<P> Bug fixes: memory leak in OSX version; problem printing numbers as symbols.
diff --git a/pd/doc/5.reference/block~-help.pd b/pd/doc/5.reference/block~-help.pd
index 69abe2e2..4d2bdbdc 100644
--- a/pd/doc/5.reference/block~-help.pd
+++ b/pd/doc/5.reference/block~-help.pd
@@ -1,27 +1,26 @@
-#N canvas 322 48 653 647 12;
-#X text 411 630 updated for Pd version 0.37;
+#N canvas 21 2 607 676 12;
#X obj 48 10 block~;
#X text 112 11 (and switch~) - block size and on/off control for DSP
;
#X text 44 40 The block~ and switch~ objects set the block size \,
overlap \, and up/down-sampling ratio for the window. (The overlap
and resampling ratio are relative to the super-patch.);
-#X text 137 332 INTERACTIONS WITH OTHER OBJECTS:;
#X text 45 230 You may have at most one block~/switch~ object in any
window.;
#X text 45 176 A switch~ with no arguments does not reblock audio computation
-- in other words \, block size and sample rate are as in the parent
patch.;
-#X text 46 353 Dac~ and adc~ don't work correctly if reblocked \, nor
-if a parent window is reblocked \, even if the window containing the
-dac~ or adc~ is reblocked back to the default block size and sample
-rate.;
-#X text 48 573 see also:;
-#X obj 136 573 fft~;
-#X text 47 599 ... and the control.blocksize and up.downsampling audio
+#X text 46 531 see also:;
+#X obj 134 531 fft~;
+#X text 44 567 ... and the control.blocksize and up.downsampling audio
example patches.;
-#X text 180 295 <--- example usage in subpatch;
-#N canvas 351 51 695 365 /SUBPATCH/ 1;
+#X text 194 459 <--- example usage in subpatch;
+#X text 43 92 Switch~ \, in addition \, allows you to switch DSP on
+and off for the window. All subwindows are also switched. (If a subwindow
+of a switched window is also switched \, both switches must be on for
+the subwindow's audio DSP to run. Pd's global DSP must also be on.)
+;
+#N canvas 372 9 695 365 block-example 0;
#X obj 258 238 bang~;
#X obj 258 264 t b b;
#X obj 258 290 timer;
@@ -59,17 +58,31 @@ example patches.;
#X connect 7 0 10 0;
#X connect 8 0 10 0;
#X connect 9 0 10 0;
-#X restore 140 295 pd;
-#X text 47 501 Patches using send~/receive~ or throw~/catch~ to intercommunicate
+#X restore 41 457 pd block-example;
+#N canvas 112 205 599 297 block-interations 0;
+#X text 32 61 Dac~ and adc~ don't work correctly if reblocked \, nor
+if a parent window is reblocked \, even if the window containing the
+dac~ or adc~ is reblocked back to the default block size and sample
+rate.;
+#X text 33 209 Patches using send~/receive~ or throw~/catch~ to intercommunicate
must have the same blocking -- and if their parents are blocked bigger
than they are \, there might be wierdness.;
-#X text 45 420 If using send~ or delwrite~ from a switched-off patch
+#X text 31 128 If using send~ or delwrite~ from a switched-off patch
\, the output of corresponding receive~ and delread~ objects in other
\, running patches will cycle old input (and sound like garbage). Throw~
may be switched with impunity \, but not catch~.;
-#X text 43 92 Switch~ \, in addition \, allows you to switch DSP on
-and off for the window. All subwindows are also switched. (If a subwindow
-of a switched window is also switched \, both switches must be on for
-the subwindow's audio DSP to run. Pd's global DSP must also be on.)
+#X text 32 11 INTERACTIONS BETWEEN BLOCK~/SWITCH~ AND OTHER OBJECTS
+IN PD;
+#X restore 40 482 pd block-interations;
+#X text 227 483 INTERACTIONS WITH OTHER OBJECTS;
+#X text 44 269 Pd's default block size is 64 samples. The inlet~ and
+outlet~ objects reblock signals to adjust for differences between parent
+and subpatch \, but only power-of-two adjustments are possible. So
+for "normal" audio computations \, all blocaks should also be power-of-two
+in size. HOWEVER \, if you have no inlet~ or outlet~ you may specify
+any other block size. This is intended for later use in video processing.
;
-#X text 44 269 Pd's default block size is 64 samples.;
+#X text 45 395 Switch~ takes a "bang" message that causes one block
+of DSP to be computed. This might be useful for pre-computing waveforms
+or window functions \, or also for video processing.;
+#X text 337 604 updated for Pd version 0.4;
diff --git a/pd/doc/5.reference/drawpolygon-help.pd b/pd/doc/5.reference/drawpolygon-help.pd
index e269107e..7b3dfd24 100644
--- a/pd/doc/5.reference/drawpolygon-help.pd
+++ b/pd/doc/5.reference/drawpolygon-help.pd
@@ -1,6 +1,6 @@
#N struct help-drawpolygon-template float x float y float cat float
dog float weasel;
-#N canvas 6 23 565 187 12;
+#N canvas 16 28 537 188 12;
#X text 13 130 see also:;
#X obj 95 149 drawnumber;
#X obj 191 149 plot;
@@ -9,36 +9,38 @@ dog float weasel;
#X obj 126 11 filledpolygon;
#X obj 127 33 filledcurve;
#X text 225 10 -- draw shapes for data structures;
-#N canvas 678 71 587 435 help-drawpolygon-template 1;
+#N canvas 177 100 580 549 help-drawpolygon-template 1;
#X obj 19 24 drawpolygon 0 2 0 0 0 weasel;
-#X obj 18 259 filledpolygon 900 dog 3 10 0 20 cat 30 0;
-#X text 30 281 filledpolyconn and filledcurve take the same arguments
+#X obj 18 300 filledpolygon 900 dog 3 10 0 20 cat 30 0;
+#X text 30 322 filledpolyconn and filledcurve take the same arguments
\, except that a new first argument is added to specify interior color.
Here the interior color is red (900) \, the outline color is controlled
by the "dog" field \, and the three points describe a triangle of altitude
"cat". The fields x and y automatically govern the placement of the
object as a whole.;
-#X text 37 123 - RGB color (0=black \, 999=white \, 900=red \, 90=green
+#X text 37 164 - RGB color (0=black \, 999=white \, 900=red \, 90=green
\, 9=blue \, 555=grey \, etc.);
-#X text 36 160 - line width;
-#X text 36 181 - two or more (x \, y) pairs giving coordinates.;
-#X text 25 444 This object defines the fields for this template. You
+#X text 36 201 - line width;
+#X text 36 222 - two or more (x \, y) pairs giving coordinates.;
+#X text 25 485 This object defines the fields for this template. You
can see teh fields' values by right-clicking on the object in the "data"
window and selecting "properties.";
-#X obj 13 400 struct help-drawpolygon-template float x float y float
+#X obj 13 441 struct help-drawpolygon-template float x float y float
cat float dog float weasel;
#X text 26 44 drawpolygon and drawcurve take these arguments:;
#X text 40 67 - optional "-n" flag to make invisible initially;
#X text 38 88 - alternatively \, an optional "-v [variable]" flag to
assign a variable to make this visible/invisible.;
-#X text 27 202 Any of these (except the flags) can be numbers or field
+#X text 27 243 Any of these (except the flags) can be numbers or field
names \, like "weasel" here. The example above draws a vertical black
line of height "weasel".;
-#X restore 274 93 pd help-drawpolygon-template;
+#X text 38 127 - optional "-x" flag to inhibit selecting the object
+when the shape is clicked on in "edit" mode;
+#X restore 240 92 pd help-drawpolygon-template;
#N canvas 11 270 384 178 help-drawpolygon-data 1;
#X scalar help-drawpolygon-template 50 40 30 9 80 \;;
#X scalar help-drawpolygon-template 150 40 -20 90 50 \;;
#X coords 0 178 1 177 0 0 0;
-#X restore 274 119 pd help-drawpolygon-data;
+#X restore 240 118 pd help-drawpolygon-data;
#X obj 34 149 struct;
-#X text 312 168 updated for Pd version 0.39;
+#X text 272 166 updated for Pd version 0.40.;
diff --git a/pd/doc/5.reference/env~-help.pd b/pd/doc/5.reference/env~-help.pd
index 64a245ae..212da310 100644
--- a/pd/doc/5.reference/env~-help.pd
+++ b/pd/doc/5.reference/env~-help.pd
@@ -1,28 +1,31 @@
-#N canvas 40 55 711 401 12;
-#X floatatom 103 303 0 0 0;
+#N canvas 134 127 625 411 12;
+#X floatatom 11 332 0 0 0 0 - - -;
#X obj 74 14 env~;
#X text 120 16 - envelope follower;
-#X obj 103 275 env~ 16384;
-#X obj 103 214 osc~ 400;
-#X obj 103 241 *~;
-#X floatatom 217 220 3 -99 300;
-#X obj 217 244 dbtorms;
+#X obj 11 209 osc~ 400;
+#X obj 11 236 *~;
+#X floatatom 103 211 3 -99 300 0 - - -;
+#X obj 103 235 dbtorms;
#X text 9 46 The env~ object takes a signal and outputs its RMS amplitude
in dB (with 1 normalized to 100 dB.) Output is bounded below by zero.
;
-#X text 8 105 The analysis is Hanning windowed.;
-#X text 9 131 The optional creation argument is the analysis window
-size in samples \, and should be a power of two. The analysis windows
-overlap by two \, so that the period of output is half the window size.
+#X text 141 209 <- set peak-to-peak amplitude here in dB.;
+#X text 57 333 <- the output is RMS amplitude which (for a sinusoid)
+is about 3 dB below peak-to-peak amplitude.;
+#X text 359 380 updated for Pd version 0.40.;
+#X obj 11 269 env~ 16384 8192;
+#X text 160 259 creation arguments:;
+#X text 158 277 1 window size in samples (1024 default);
+#X text 158 296 2 period in samples per analysis (window/2 default)
;
-#X text 206 274 <- creation argument sets window size;
-#X text 265 221 <- set peak-to-peak amplitude here in dB.;
-#X text 185 305 <- the output is RMS amplitude which is about 3 dB
-below peak-to-peak amplitude.;
-#X text 459 375 updated for Pd version 0.35;
-#X connect 3 0 0 0;
-#X connect 3 0 0 0;
-#X connect 4 0 5 0;
-#X connect 5 0 3 0;
-#X connect 6 0 7 0;
-#X connect 7 0 5 1;
+#X text 9 102 The analysis is "Hanning" (raised cosine) windowed.;
+#X text 9 125 The optional creation arguments are the analysis window
+size in samples \, and the period (the number of samples between analyses).
+The latter should normally be a multiple of the DSP block size \, although
+this isn't enforced.;
+#X connect 3 0 4 0;
+#X connect 4 0 11 0;
+#X connect 5 0 6 0;
+#X connect 6 0 4 1;
+#X connect 11 0 0 0;
+#X connect 11 0 0 0;
diff --git a/pd/doc/5.reference/list-help.pd b/pd/doc/5.reference/list-help.pd
index 07207ae1..608cd02a 100644
--- a/pd/doc/5.reference/list-help.pd
+++ b/pd/doc/5.reference/list-help.pd
@@ -1,6 +1,5 @@
#N canvas 596 406 629 492 12;
#X obj 29 11 list;
-#X text 352 455 updated for Pd version 0.39;
#X text 76 12 - building and using variable-length messages;
#N canvas 92 130 654 658 about-lists 0;
#X obj 50 625 print message;
@@ -48,7 +47,7 @@ inappropriate!) way.;
#X connect 6 0 4 0;
#X connect 13 0 15 0;
#X connect 14 0 15 0;
-#X restore 42 311 pd about-lists;
+#X restore 43 324 pd about-lists;
#X text 33 52 There are four list classes:;
#X obj 22 82 list append;
#X obj 22 107 list prepend;
@@ -203,11 +202,11 @@ the split point.;
#X connect 9 0 22 1;
#X connect 22 0 5 0;
#X restore 506 109 pd prepend;
-#X text 29 228 In general \, inlets that take lists (two each for append/prepend
+#X text 30 241 In general \, inlets that take lists (two each for append/prepend
\, and one each for split and trim) will convert non-list messages
(such as "set 5") to lists (such as "list set 5" automatically. Here's
more about lists in Pd:;
-#X text 30 344 And here are some examples showing how to use these
+#X text 31 357 And here are some examples showing how to use these
objects to compose and/or use variable length messages:;
#N canvas 381 50 719 646 example1 0;
#X obj 43 173 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
@@ -275,8 +274,8 @@ the list.;
#X connect 15 0 17 0;
#X connect 17 0 14 0;
#X connect 18 0 11 0;
-#X restore 221 397 pd example1;
-#X text 64 396 simple sequencer;
+#X restore 222 410 pd example1;
+#X text 65 409 simple sequencer;
#N canvas 126 39 568 569 example2 0;
#X obj 66 263 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
@@ -327,9 +326,9 @@ by taking the "pitch" output before the delay object (previously the
#X connect 16 0 15 0;
#X connect 16 1 11 1;
#X connect 16 2 19 0;
-#X restore 221 423 pd example2;
-#X text 55 425 another sequencer;
-#X text 113 452 serializer;
+#X restore 222 436 pd example2;
+#X text 56 438 another sequencer;
+#X text 115 465 serializer;
#N canvas 116 31 673 426 example3 0;
#X obj 19 287 list split 1;
#X obj 19 378 print;
@@ -359,6 +358,31 @@ append" above.;
#X connect 4 1 3 1;
#X connect 5 0 2 1;
#X connect 6 0 4 0;
-#X restore 220 450 pd example3;
-#X obj 22 194 list;
-#X text 70 195 - short for "list append";
+#X restore 222 463 pd example3;
+#X obj 23 207 list;
+#X text 71 208 - short for "list append";
+#X obj 22 182 list trim;
+#X text 141 185 - output number of items in list;
+#N canvas 188 111 576 365 length 0;
+#X msg 126 183 1 2 3;
+#X msg 126 134 list cis boom bah;
+#X msg 127 209 bang;
+#X msg 126 107 walk the dog;
+#X msg 127 231 1 x y;
+#X msg 126 257 x 1 y;
+#X msg 126 157 55;
+#X obj 101 285 list length;
+#X floatatom 101 311 5 0 0 0 - - -;
+#X text 29 18 length - number of items in list;
+#X text 27 55 The "list length" object outputs the number of arguments
+in a list or other message.;
+#X connect 0 0 7 0;
+#X connect 1 0 7 0;
+#X connect 2 0 7 0;
+#X connect 3 0 7 0;
+#X connect 4 0 7 0;
+#X connect 5 0 7 0;
+#X connect 6 0 7 0;
+#X connect 7 0 8 0;
+#X restore 506 186 pd length;
+#X text 353 468 updated for Pd version 0.40.;
diff --git a/pd/doc/5.reference/pd-help.pd b/pd/doc/5.reference/pd-help.pd
index f7db8f66..ad7c917d 100644
--- a/pd/doc/5.reference/pd-help.pd
+++ b/pd/doc/5.reference/pd-help.pd
@@ -1,52 +1,141 @@
-#N canvas 32 130 677 385 12;
-#N canvas 0 0 600 400 /SUBPATCH/ 0;
-#X restore 59 10 pd;
-#X text 88 12 - subpatch;
-#X obj 218 10 inlet;
-#X text 263 10 - control inlet;
-#X obj 442 11 inlet~;
-#X text 494 12 - audio inlet;
-#X obj 215 39 outlet;
-#X text 265 39 - control outlet;
-#X obj 435 40 outlet~;
-#X text 494 40 - audio outlet;
-#X text 37 74 Type "pd" into an object box to make a subpatch. When
+#N canvas 1 -8 631 456 12;
+#N canvas 0 0 600 400 (subpatch) 0;
+#X restore 23 13 pd;
+#X text 57 14 - subpatch;
+#X obj 180 13 inlet;
+#X text 238 12 - control inlet;
+#X obj 410 12 inlet~;
+#X text 480 12 - audio inlet;
+#X obj 180 41 outlet;
+#X text 238 43 - control outlet;
+#X obj 410 40 outlet~;
+#X text 480 40 - audio outlet;
+#X text 15 77 Type "pd" into an object box to make a subpatch. When
in run mode you can click on the object to open the subpatch. You can
name the subpatch with an argument:;
-#N canvas 0 0 600 396 my-subpatch 0;
-#X restore 133 131 pd my-subpatch;
-#N canvas 0 0 600 392 my-subpatch-with-inlets-and-outlets 0;
-#X obj 68 126 inlet;
-#X text 20 96 control inlet for receiving messages;
-#X floatatom 68 154 0 0 0;
-#X floatatom 71 255 0 0 0;
-#X obj 71 287 outlet;
-#X text 35 225 control outlet for sending message;
-#X obj 403 121 inlet~;
-#X obj 403 172 print~;
-#X msg 418 146 bang;
-#X obj 402 314 outlet~;
-#X obj 402 288 sig~ 34;
+#N canvas 156 300 518 221 my-subpatch 0;
+#X text 49 96 this is a subpatch for the "pd" help window.;
+#X restore 111 134 pd my-subpatch;
+#X text 19 161 and you can put inlets and outlets by making "inlet"
+objects \, etc \, in the subpatch (open the patch below to see them.)
+;
+#X obj 361 329 print~;
+#X obj 359 249 sig~ 12;
+#X floatatom 50 253 0 0 0 0 - - -;
+#X floatatom 50 305 0 0 0 0 - - -;
+#X text 388 306 (check that audio is on);
+#X text 20 232 messages in and out;
+#X text 329 226 audio in and out;
+#X text 20 426 see also:;
+#X obj 104 426 block~;
+#X obj 371 307 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 358 427 updated for Pd version 0.40.;
+#N canvas 60 123 618 466 up/downsampling 0;
+#X obj 29 395 print~;
+#X obj 47 369 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 152 397 print~;
+#X obj 170 371 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 276 395 print~;
+#X obj 294 369 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array \$0-tab 64 float 3;
+#A 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
+0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0;
+#X coords 0 1 64 -1 200 140 1;
+#X restore 285 180 graph;
+#X obj 354 360 s \$0-tab;
+#X msg 353 333 const 0 \, 0 0 1;
+#X obj 176 243 print~;
+#X obj 176 218 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 24 191 tabreceive~ \$0-tab;
+#N canvas 81 269 585 267 test-subpatch-upsampled 0;
+#X obj 40 17 block~ 128 1 2;
+#X obj 209 149 inlet~ hold;
+#X obj 367 153 inlet~ lin;
+#X obj 23 146 inlet~;
+#X obj 23 202 print~;
+#X obj 41 176 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
+-1;
+#X obj 209 209 print~;
+#X obj 227 183 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X obj 366 213 print~;
+#X obj 383 187 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
+-1 -1;
+#X text 42 49 Upsampling methods:;
+#X text 206 114 sample/hold;
+#X text 337 111 linear interpolation;
+#X text 16 114 interleaved zeros;
+#X connect 1 0 6 0;
+#X connect 2 0 8 0;
+#X connect 3 0 4 0;
+#X connect 5 0 4 0;
+#X connect 7 0 6 0;
+#X connect 9 0 8 0;
+#X restore 24 295 pd test-subpatch-upsampled;
+#N canvas 46 43 585 267 test-subpatch-downsampled 0;
+#X obj 23 146 outlet~;
+#X obj 209 149 outlet~ hold;
+#X obj 367 153 outlet~ lin;
+#X text 206 173 sample/hold;
+#X text 364 177 linear interpolation;
+#X text 197 19 upsampling methods:;
+#X obj 40 17 block~ 32 1 0.5;
+#X text 18 169 interleaved zeros;
+#X obj 21 83 tabreceive~ \$0-tab;
+#X connect 8 0 0 0;
+#X connect 8 0 1 0;
+#X connect 8 0 2 0;
+#X restore 28 339 pd test-subpatch-downsampled;
+#X text 50 11 When a subpatch is reblocked to a higher or lower sample
+rate \, the inlet~ and outlet~ objects offer a choice of three upsampling
+methods. (The inlet~ upsamples when entering a subpatch with a higher
+sample rate \; the outlet~ upsamples when leaving a subpatch of _lower_
+sample rate \, as demonstrated below.) There is no corresponding choice
+of downsampling method - downsampling is done simply by dropping the
+extra samples.;
+#X connect 1 0 0 0;
+#X connect 3 0 2 0;
+#X connect 5 0 4 0;
+#X connect 8 0 7 0;
+#X connect 10 0 9 0;
+#X connect 11 0 12 0;
+#X connect 11 0 12 1;
+#X connect 11 0 12 2;
+#X connect 11 0 9 0;
+#X connect 13 0 0 0;
+#X connect 13 1 2 0;
+#X connect 13 2 4 0;
+#X restore 20 370 pd up/downsampling;
+#N canvas 105 182 600 392 subpatch-with-inlets-and-outlets 0;
+#X obj 64 83 inlet;
+#X text 16 53 control inlet for receiving messages;
+#X floatatom 64 111 0 0 0 0 - - -;
+#X floatatom 67 212 0 0 0 0 - - -;
+#X obj 67 244 outlet;
+#X text 31 182 control outlet for sending message;
+#X obj 399 78 inlet~;
+#X obj 399 129 print~;
+#X msg 414 103 bang;
+#X obj 398 271 outlet~;
+#X obj 398 245 sig~ 34;
+#X text 392 32 same for;
+#X text 393 51 signals.;
#X connect 0 0 2 0;
#X connect 3 0 4 0;
#X connect 6 0 7 0;
#X connect 8 0 7 0;
#X connect 10 0 9 0;
-#X restore 86 272 pd my-subpatch-with-inlets-and-outlets;
-#X text 55 174 and you can put inlets and outlets by making "inlet"
-objects \, etc \, in the subpatch (open the patch below to see them.)
-;
-#X obj 423 322 print~;
-#X msg 362 294 bang;
-#X obj 422 243 sig~ 12;
-#X floatatom 86 246 0 0 0;
-#X floatatom 86 298 0 0 0;
-#X text 441 272 (check that audio is on);
-#X text 52 221 messages in and out;
-#X text 392 220 audio in and out;
-#X text 391 351 updated for Pd version 0.26;
-#X connect 12 0 18 0;
-#X connect 12 1 14 0;
-#X connect 15 0 14 0;
-#X connect 16 0 12 1;
-#X connect 17 0 12 0;
+#X restore 50 279 pd subpatch-with-inlets-and-outlets;
+#X text 193 368 <- here are some ugly details on;
+#X text 219 386 up/downsampling for inlet~ and outlet~;
+#X connect 14 0 25 1;
+#X connect 15 0 25 0;
+#X connect 22 0 13 0;
+#X connect 25 0 16 0;
+#X connect 25 1 13 0;
diff --git a/pd/doc/5.reference/tabwrite~-help.pd b/pd/doc/5.reference/tabwrite~-help.pd
index 606f4f30..7fb3874b 100644
--- a/pd/doc/5.reference/tabwrite~-help.pd
+++ b/pd/doc/5.reference/tabwrite~-help.pd
@@ -1,30 +1,40 @@
-#N canvas 119 134 697 332 10;
-#X obj 31 27 tabwrite~;
-#X text 110 27 object to write a signal in an array;
-#X msg 43 131 bang;
-#X obj 23 211 tabwrite~ array99;
-#X graph graph1 0 -1 100 1 460 235 610 135;
-#X array array99 100 float;
-#X pop;
-#X obj 23 82 sig~ 3000;
-#X obj 23 110 phasor~;
-#X text 149 213 creation argument initializes array name;
-#X msg 40 181 set array99;
-#X msg 445 35 \; pd dsp 1;
-#X msg 524 37 \; pd dsp 0;
-#X text 85 133 bang to start recording;
-#X text 126 180 set the destination array;
-#X text 18 251 see also the "array" tutorial in section 2 of the Pd documentation \, and these objects:;
-#X obj 90 282 tabread;
-#X obj 149 282 tabwrite;
-#X obj 214 282 tabsend~;
-#X obj 279 282 tabreceive~;
-#X obj 17 282 tabread4~;
-#X msg 43 153 stop;
-#X text 85 154 stop recording;
-#X text 458 288 updated for Pd version 0.29;
-#X connect 2 0 3 0;
-#X connect 5 0 6 0;
-#X connect 6 0 3 0;
-#X connect 8 0 3 0;
-#X connect 19 0 3 0;
+#N canvas 159 22 645 442 12;
+#X obj 12 12 tabwrite~;
+#X msg 47 210 bang;
+#X obj 28 318 tabwrite~ array99;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X array array99 1000 float 0;
+#X coords 0 1 999 -1 200 100 1;
+#X restore 414 207 graph;
+#X text 190 318 creation argument initializes array name;
+#X msg 45 288 set array99;
+#X msg 555 13 \; pd dsp 1;
+#X msg 555 51 \; pd dsp 0;
+#X text 23 353 see also the "array" tutorial in section 2 of the Pd
+documentation \, and these objects:;
+#X obj 107 389 tabread;
+#X obj 174 389 tabwrite;
+#X obj 250 389 tabsend~;
+#X obj 327 389 tabreceive~;
+#X obj 22 389 tabread4~;
+#X msg 48 260 stop;
+#X text 153 261 stop recording;
+#X msg 47 236 start 500;
+#X text 147 236 start in middle of table;
+#X text 370 420 updated for Pd version 0.40.;
+#X text 104 12 - write a signal in an array;
+#X obj 27 187 phasor~ 200;
+#X text 148 209 start recording;
+#X text 149 286 set destination array;
+#X text 16 44 Tabwrite~ records an audio signal sequentially into an
+array. Sending it "bang" writes from beginning to end of the array.
+To avoid writing all the way to the end \, you can send a "stop message
+at an appropriate later time. The "start" message allows skipping a
+number of samples at the nbeginning. (Starting and stopping occur on
+block boundaries \, typically multiples of 64 samples \, in the input
+signal.);
+#X connect 1 0 2 0;
+#X connect 5 0 2 0;
+#X connect 14 0 2 0;
+#X connect 16 0 2 0;
+#X connect 20 0 2 0;
diff --git a/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c b/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
index 2c0971b8..e4344f7f 100644
--- a/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
+++ b/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
@@ -1,5 +1,5 @@
/*
- * $Id: pa_win_wdmks.c,v 1.12 2006-09-08 23:45:30 millerpuckette Exp $
+ * $Id: pa_win_wdmks.c,v 1.13 2006-09-19 22:30:32 millerpuckette Exp $
* PortAudio Windows WDM-KS interface
*
* Author: Andrew Baldwin
diff --git a/pd/portaudio/pablio/ringbuffer.c b/pd/portaudio/pablio/ringbuffer.c
index 43ceb881..d954eb69 100644
--- a/pd/portaudio/pablio/ringbuffer.c
+++ b/pd/portaudio/pablio/ringbuffer.c
@@ -1,5 +1,5 @@
/*
- * $Id: ringbuffer.c,v 1.11 2006-09-08 23:45:30 millerpuckette Exp $
+ * $Id: ringbuffer.c,v 1.12 2006-09-19 22:30:33 millerpuckette Exp $
* ringbuffer.c
* Ring Buffer utility..
*
diff --git a/pd/portaudio/pablio/ringbuffer.h b/pd/portaudio/pablio/ringbuffer.h
index 90fac919..08cf1818 100644
--- a/pd/portaudio/pablio/ringbuffer.h
+++ b/pd/portaudio/pablio/ringbuffer.h
@@ -6,7 +6,7 @@ extern "C"
#endif /* __cplusplus */
/*
- * $Id: ringbuffer.h,v 1.12 2006-09-08 23:45:30 millerpuckette Exp $
+ * $Id: ringbuffer.h,v 1.13 2006-09-19 22:30:33 millerpuckette Exp $
* ringbuffer.h
* Ring Buffer utility..
*
diff --git a/pd/portmidi/pm_mac/pmmacosxcm.c b/pd/portmidi/pm_mac/pmmacosxcm.c
index b587cbb7..ccb48598 100644
--- a/pd/portmidi/pm_mac/pmmacosxcm.c
+++ b/pd/portmidi/pm_mac/pmmacosxcm.c
@@ -5,7 +5,7 @@
* and subsequent work by Andrew Zeldis and Zico Kolter
* and Roger B. Dannenberg
*
- * $Id: pmmacosxcm.c,v 1.12 2006-09-08 23:45:30 millerpuckette Exp $
+ * $Id: pmmacosxcm.c,v 1.13 2006-09-19 22:30:33 millerpuckette Exp $
*/
/* Notes:
diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c
index dd9dd478..9385c05f 100644
--- a/pd/src/g_canvas.c
+++ b/pd/src/g_canvas.c
@@ -377,6 +377,8 @@ t_canvas *canvas_new(void *dummy, t_symbol *sel, int argc, t_atom *argv)
static int dollarzero = 1000;
t_canvasenvironment *env = x->gl_env =
(t_canvasenvironment *)getbytes(sizeof(*x->gl_env));
+ if (!canvas_newargv)
+ canvas_newargv = getbytes(0);
env->ce_dir = canvas_newdirectory;
env->ce_argc = canvas_newargc;
env->ce_argv = canvas_newargv;
diff --git a/pd/src/g_io.c b/pd/src/g_io.c
index eb4263d0..6c173c27 100644
--- a/pd/src/g_io.c
+++ b/pd/src/g_io.c
@@ -217,10 +217,13 @@ void vinlet_dspprolog(struct _vinlet *x, t_signal **parentsigs,
(x->x_hop - prologphase * re_parentvecsize);
if (upsample * downsample == 1)
- dsp_add(vinlet_doprolog, 3, x, insig->s_vec, re_parentvecsize);
+ dsp_add(vinlet_doprolog, 3, x, insig->s_vec,
+ re_parentvecsize);
else {
- resamplefrom_dsp(&x->x_updown, insig->s_vec, parentvecsize, re_parentvecsize, x->x_updown.method);
- dsp_add(vinlet_doprolog, 3, x, x->x_updown.s_vec, re_parentvecsize);
+ resamplefrom_dsp(&x->x_updown, insig->s_vec, parentvecsize,
+ re_parentvecsize, x->x_updown.method);
+ dsp_add(vinlet_doprolog, 3, x, x->x_updown.s_vec,
+ re_parentvecsize);
}
/* if the input signal's reference count is zero, we have
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index f4426ada..e76b541e 100644
--- a/pd/src/m_pd.h
+++ b/pd/src/m_pd.h
@@ -11,7 +11,7 @@ extern "C" {
#define PD_MAJOR_VERSION 0
#define PD_MINOR_VERSION 40
#define PD_BUGFIX_VERSION 0
-#define PD_TEST_VERSION "test07"
+#define PD_TEST_VERSION "test08"
/* old name for "MSW" flag -- we have to take it for the sake of many old
"nmakefiles" for externs, which will define NT and not MSW */
diff --git a/pd/src/notes.txt b/pd/src/notes.txt
index 1b614645..bdf362bb 100644
--- a/pd/src/notes.txt
+++ b/pd/src/notes.txt
@@ -1,4 +1,6 @@
---------------- dolist --------------------
+check bug reports on sourceforge
+PC device counting problem (first device invoked by -audiodev 0)
test:
compile on various versions of linux
@@ -13,30 +15,6 @@ what does OSX do when jack is compiled into Pd but not installed??
turn on paMacCore_ChangeDeviceParameters for mac (pa_mac_core.h)
Gnome: why don't windows pop up when clicked on?
-doc:
-declare help window
-openpanel directory
-big-soundfile support
-escaping filenames for wierdly named externs
-infrastructure for adding externs in non-ascii languages
-'$' patch (multiple dollar-sign expansion)
--x flag for curves
-object list
-document env~ second argument (and why is it no less than 1/10 of first???)
-vibrato example
-block resampling arguments
-document tabwrite~_start
-"list" to signal inlet (e.g., "*~") or float inlet (f) complains.
-$-expansion changed
-list length
-send inlet
-bug fix: list to numbox (inlet and object but object is noinlet)
-bug fix: pd $1 bug ($1 is saved as it was evaluated, not as '$1')
-flag to defeat .pdsettings
-'{' dropped better
-'[' in numbox label breaks it (Yury Sept. 3)
-more reasonable font size default for GUIs
-
problems:
help browser (offer both versions?)
look again at array vis/invis conundrum, g_template.c
@@ -63,8 +41,10 @@ loading e-mailed patches without removing headers crashes pd
check if _vsnprintf with zero argument in windows works any better...
detect adc~ and dac~ reblocking
+more demonstration patches:
+vibrato using variable delay
+
features:
-flag to defeat .pdsettings
externs able to usurp built-ins (+mem alignment for SSE)
replace gatom_escapit with a quoting mechanism (handle '[', spaces, etc.)
sprout inlet for "route", "sel" if one arg
@@ -165,6 +145,6 @@ fix edit mode menu item
fancier text editing
tools (reassigns meaning of primary click)
get gui to notice early EOF
-rewrite t_getbytes properly
+rewrite t_getbytes properly (m_newmemory.c in pd/attic)
obj_new should do a longjmp on out-of-memory
diff --git a/pd/src/s_audio.c b/pd/src/s_audio.c
index 086ca490..623b073b 100644
--- a/pd/src/s_audio.c
+++ b/pd/src/s_audio.c
@@ -131,9 +131,19 @@ static void audio_init( void)
void sys_setchsr(int chin, int chout, int sr)
{
int nblk;
- int inbytes = (chin ? chin : 2) * (DEFDACBLKSIZE*sizeof(float));
- int outbytes = (chout ? chout : 2) * (DEFDACBLKSIZE*sizeof(float));
+ int inbytes = (chin ? chin : 2) *
+ (DEFDACBLKSIZE*sizeof(float));
+ int outbytes = (chout ? chout : 2) *
+ (DEFDACBLKSIZE*sizeof(float));
+ if (sys_soundin)
+ freebytes(sys_soundin,
+ (sys_inchannels? sys_inchannels : 2) *
+ (DEFDACBLKSIZE*sizeof(float)));
+ if (sys_soundout)
+ freebytes(sys_soundout,
+ (sys_outchannels? sys_outchannels : 2) *
+ (DEFDACBLKSIZE*sizeof(float)));
sys_inchannels = chin;
sys_outchannels = chout;
sys_dacsr = sr;
@@ -141,14 +151,10 @@ void sys_setchsr(int chin, int chout, int sr)
if (sys_advance_samples < 3 * DEFDACBLKSIZE)
sys_advance_samples = 3 * DEFDACBLKSIZE;
- if (sys_soundin)
- free(sys_soundin);
- sys_soundin = (t_float *)malloc(inbytes);
+ sys_soundin = (t_float *)getbytes(inbytes);
memset(sys_soundin, 0, inbytes);
- if (sys_soundout)
- free(sys_soundout);
- sys_soundout = (t_float *)malloc(outbytes);
+ sys_soundout = (t_float *)getbytes(outbytes);
memset(sys_soundout, 0, outbytes);
if (sys_verbose)
@@ -654,12 +660,12 @@ void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
audio_getdevs(indevlist, &nindevs, outdevlist, &noutdevs, &canmulti,
MAXNDEV, DEVDESCSIZE);
- sys_gui("set audio_indevlist {}\n");
+ sys_gui("global audio_indevlist; set audio_indevlist {}\n");
for (i = 0; i < nindevs; i++)
sys_vgui("lappend audio_indevlist \"%s\"\n",
indevlist + i * DEVDESCSIZE);
- sys_gui("set audio_outdevlist {}\n");
+ sys_gui("global audio_outdevlist; set audio_outdevlist {}\n");
for (i = 0; i < noutdevs; i++)
sys_vgui("lappend audio_outdevlist \"%s\"\n",
outdevlist + i * DEVDESCSIZE);
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index 8c745dc4..dd4e7cb7 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -249,7 +249,7 @@ static void pd_makeversion(void)
char foo[100];
sprintf(foo, "Pd version %d.%d-%d%s\n",PD_MAJOR_VERSION,
PD_MINOR_VERSION,PD_BUGFIX_VERSION,PD_TEST_VERSION);
- pd_version = malloc(strlen(foo+1));
+ pd_version = malloc(strlen(foo)+1);
strcpy(pd_version, foo);
}
@@ -859,7 +859,7 @@ int sys_argparse(int argc, char **argv)
argc -= 2; argv += 2;
}
else if (!strcmp(*argv, "-noprefs")) /* did this earlier */
- ;
+ argc--, argv++;
else
{
unsigned int i;
@@ -972,8 +972,8 @@ static void sys_afterargparse(void)
advance = sys_main_advance;
if (sys_main_srate)
rate = sys_main_srate;
- sys_open_audio(naudioindev, audioindev, naudioindev, chindev,
- naudiooutdev, audiooutdev, naudiooutdev, choutdev, rate, advance, 0);
+ sys_open_audio(naudioindev, audioindev, nchindev, chindev,
+ naudiooutdev, audiooutdev, nchoutdev, choutdev, rate, advance, 0);
sys_open_midi(nmidiindev, midiindev, nmidioutdev, midioutdev, 0);
}
diff --git a/pd/src/s_midi.c b/pd/src/s_midi.c
index 936fb282..12c31258 100644
--- a/pd/src/s_midi.c
+++ b/pd/src/s_midi.c
@@ -653,12 +653,12 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
midi_getdevs(indevlist, &nindevs, outdevlist, &noutdevs,
MAXNDEV, DEVDESCSIZE);
- sys_gui("set midi_indevlist {none}\n");
+ sys_gui("global midi_indevlist; set midi_indevlist {none}\n");
for (i = 0; i < nindevs; i++)
sys_vgui("lappend midi_indevlist \"%s\"\n",
indevlist + i * DEVDESCSIZE);
- sys_gui("set midi_outdevlist {none}\n");
+ sys_gui("global midi_outdevlist; set midi_outdevlist {none}\n");
for (i = 0; i < noutdevs; i++)
sys_vgui("lappend midi_outdevlist \"%s\"\n",
outdevlist + i * DEVDESCSIZE);