aboutsummaryrefslogtreecommitdiff
path: root/pd
diff options
context:
space:
mode:
authorMiller Puckette <millerpuckette@users.sourceforge.net>2006-09-08 23:45:31 +0000
committerMiller Puckette <millerpuckette@users.sourceforge.net>2006-09-08 23:45:31 +0000
commit026589c77ea733ae92c38b78fbd633bfbd0b8e94 (patch)
treecfee6b4dad7347415955e5fb8442ffbfca6256b6 /pd
parent018a1061ed9e619398d7d26fa54c9876b3f26d31 (diff)
Many bug fixes
svn path=/trunk/; revision=5906
Diffstat (limited to 'pd')
-rw-r--r--pd/doc/3.audio.examples/E03.octave.divider.pd11
-rw-r--r--pd/doc/3.audio.examples/H02.high-pass.pd59
-rw-r--r--pd/doc/5.reference/help-intro.pd362
-rw-r--r--pd/doc/5.reference/list-help.pd26
-rw-r--r--pd/doc/5.reference/namecanvas-help.pd6
-rw-r--r--pd/doc/5.reference/qlist-help.pd5
-rw-r--r--pd/doc/7.stuff/tools/testtone.pd592
-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/CHANGELOG.txt129
-rw-r--r--pd/src/configure.in2
-rw-r--r--pd/src/g_bang.c4
-rw-r--r--pd/src/g_canvas.c2
-rw-r--r--pd/src/g_editor.c8
-rw-r--r--pd/src/g_hdial.c4
-rw-r--r--pd/src/g_hslider.c4
-rw-r--r--pd/src/g_numbox.c2
-rw-r--r--pd/src/g_template.c17
-rw-r--r--pd/src/g_text.c2
-rw-r--r--pd/src/g_toggle.c4
-rw-r--r--pd/src/g_vdial.c4
-rw-r--r--pd/src/g_vslider.c4
-rw-r--r--pd/src/m_pd.h2
-rw-r--r--pd/src/makefile.in1
-rw-r--r--pd/src/notes.txt193
-rw-r--r--pd/src/s_audio.c69
-rw-r--r--pd/src/s_audio_alsa.c6
-rw-r--r--pd/src/s_loader.c2
-rw-r--r--pd/src/s_main.c10
-rw-r--r--pd/src/s_midi.c31
-rw-r--r--pd/src/s_path.c2
-rw-r--r--pd/src/u_main.tk192
-rw-r--r--pd/src/x_midi.c2
35 files changed, 1056 insertions, 709 deletions
diff --git a/pd/doc/3.audio.examples/E03.octave.divider.pd b/pd/doc/3.audio.examples/E03.octave.divider.pd
index 251e4561..5fa88f46 100644
--- a/pd/doc/3.audio.examples/E03.octave.divider.pd
+++ b/pd/doc/3.audio.examples/E03.octave.divider.pd
@@ -1,4 +1,4 @@
-#N canvas 159 17 793 665 12;
+#N canvas 51 52 793 665 12;
#X obj 477 135 loadbang;
#X obj 31 289 hip~ 5;
#X obj 477 53 adc~ 1;
@@ -17,7 +17,7 @@
#X msg 194 125 0.5;
#X floatatom 194 154 3 0 0 0 - - -;
#X msg 232 125 15;
-#N canvas 0 0 446 202 /SUBPATCH/ 0;
+#N canvas 0 0 446 202 (subpatch) 0;
#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 100 20 inlet~;
@@ -29,7 +29,7 @@
#X connect 2 0 3 0;
#X coords 0 0 100 100 40 18 1;
#X restore 78 248 pd;
-#N canvas 0 0 446 202 /SUBPATCH/ 0;
+#N canvas 0 0 446 202 (subpatch) 0;
#X obj 261 30 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 1 1
;
#X obj 100 20 inlet~;
@@ -44,7 +44,7 @@
#X obj 78 222 *~ 2;
#X obj 194 100 loadbang;
#N canvas 414 195 613 302 looper 0;
-#N canvas 0 0 450 300 graph1 0;
+#N canvas 0 0 450 300 (subpatch) 0;
#X array E03-table 44103 float 0;
#X coords 0 1.02 44103 -1.02 200 130 1;
#X restore 349 22 graph;
@@ -132,10 +132,9 @@ intact but introduce funny formants.);
#X connect 19 0 1 0;
#X connect 20 0 18 0;
#X connect 21 0 15 0;
-#X connect 22 0 8 0;
#X connect 22 0 25 0;
+#X connect 22 0 8 0;
#X connect 24 0 6 0;
#X connect 25 0 19 0;
#X connect 25 0 12 0;
#X connect 34 0 3 0;
-#X connect 35 0 25 0;
diff --git a/pd/doc/3.audio.examples/H02.high-pass.pd b/pd/doc/3.audio.examples/H02.high-pass.pd
index 3342c64e..ddbca85c 100644
--- a/pd/doc/3.audio.examples/H02.high-pass.pd
+++ b/pd/doc/3.audio.examples/H02.high-pass.pd
@@ -1,11 +1,11 @@
-#N canvas 29 10 607 643 12;
-#X obj 38 563 output~;
-#X text 336 611 updated for Pd version 0.39;
-#X obj 126 544 metro 250;
-#X obj 126 524 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
+#N canvas 29 10 595 573 12;
+#X obj 26 479 output~;
+#X text 324 527 updated for Pd version 0.39;
+#X obj 114 460 metro 250;
+#X obj 114 440 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0
1;
-#X text 144 521 graphing on/off;
-#N canvas 0 0 450 300 graph2 0;
+#X text 132 437 graphing on/off;
+#N canvas 0 0 450 300 (subpatch) 0;
#X array H02-graph 882 float 3;
#A 0 0.86084 0.876465 0.891113 0.904785 0.917725 0.929688 0.940918
0.950928 0.960205 0.968506 0.97583 0.982178 0.987793 0.992188 0.995605
@@ -125,8 +125,8 @@
-0.0324707 -0.0637207 -0.0949707 -0.125977 -0.157227 -0.187988 -0.21875
-0.249268 -0.279297 -0.309326 -0.339111 -0.368408;
#X coords 0 1 882 -1 200 140 1;
-#X restore 381 407 graph;
-#X text 405 549 --- 0.02 sec ---;
+#X restore 369 323 graph;
+#X text 393 465 --- 0.02 sec ---;
#X text 24 31 Many synthesis algorithms and transformations can have
outputs with a zero-freqency component (commonly called DC for "direct
current"). These are inaudible and sometimes cause distortion in audio
@@ -138,34 +138,29 @@ filter \, tuned to a low frequency such as 3 Hertz \, and to subtract
its output from the original. This difference is called a one-pole
\, one-zero high-pass filter \, and it is used so often that Pd provides
one in the "hip~" object.;
-#X obj 38 354 +~ 1;
-#X obj 37 491 hip~ 5;
-#X text 100 491 high-pass filter;
-#X floatatom 86 450 5 0 0 0 - - -;
-#X msg 86 380 0;
-#X text 122 329 sinusoidal test signal;
-#X text 83 354 add "DC";
-#X text 124 380 zero for no filtering;
-#X msg 86 403 3;
-#X text 121 404 3 (or so) to remove DC;
-#X text 126 427 higher freqencies affect;
-#X text 166 443 the audible part of;
-#X text 166 459 the signal as well.;
-#X obj 38 329 osc~ 220;
-#X msg 86 426 220;
-#X text 23 229 The simplest way to do this is to use a one-pole low-pass
-filter \, tuned to a low frequency such as 3 Hertz \, and to subtract
-its output from the original. This difference is computed by a one-pole
-\, one-zero high-pass filter. These are used so often that Pd provides
-one in the "hip~" object.;
+#X obj 26 270 +~ 1;
+#X obj 25 407 hip~ 5;
+#X text 88 407 high-pass filter;
+#X floatatom 74 366 5 0 0 0 - - -;
+#X msg 74 296 0;
+#X text 110 245 sinusoidal test signal;
+#X text 71 270 add "DC";
+#X text 112 296 zero for no filtering;
+#X msg 74 319 3;
+#X text 109 320 3 (or so) to remove DC;
+#X text 114 343 higher freqencies affect;
+#X text 154 359 the audible part of;
+#X text 154 375 the signal as well.;
+#X obj 26 245 osc~ 220;
+#X msg 74 342 220;
#X text 131 4 ONE-POLE \, ONE-ZERO HIGH-PASS FILTER;
-#X obj 126 569 tabwrite~ H02-graph;
-#X connect 2 0 26 0;
+#X obj 114 485 tabwrite~ H02-graph;
+#X connect 2 0 25 0;
#X connect 3 0 2 0;
#X connect 9 0 10 0;
#X connect 10 0 0 0;
#X connect 10 0 0 1;
-#X connect 10 0 26 0;
+#X connect 10 0 25 0;
#X connect 12 0 10 1;
#X connect 13 0 12 0;
#X connect 17 0 12 0;
diff --git a/pd/doc/5.reference/help-intro.pd b/pd/doc/5.reference/help-intro.pd
new file mode 100644
index 00000000..a7286115
--- /dev/null
+++ b/pd/doc/5.reference/help-intro.pd
@@ -0,0 +1,362 @@
+#N canvas 155 0 693 923 12;
+#X declare;
+#X obj 24 150 bang;
+#X text 124 150 - output a bang message;
+#X obj 24 180 float;
+#X text 124 180 - store and recall a number;
+#X obj 24 210 symbol;
+#X text 124 210 - store and recall a symbol;
+#X obj 24 240 int;
+#X text 124 240 - store and recall an integer;
+#X obj 24 270 send;
+#X text 124 270 - send a message to a named object;
+#X obj 24 300 receive;
+#X text 124 300 - catch "sent" messages;
+#X obj 24 330 select;
+#X text 124 330 - test for matching numbers or symbols;
+#X obj 24 360 route;
+#X text 124 360 - route messages according to first element;
+#X obj 24 390 pack;
+#X text 124 390 - make compound messages;
+#X obj 24 420 unpack;
+#X text 124 420 - get elements of compound messages;
+#X obj 24 450 trigger;
+#X text 124 450 - sequence and convert messagess;
+#X obj 24 480 spigot;
+#X text 124 480 - interruptible message connection;
+#X obj 24 510 moses;
+#X text 124 510 - part a numeric stream;
+#X obj 24 540 until;
+#X text 124 540 - looping mechanism;
+#X obj 24 570 print;
+#X text 124 570 - print out messages;
+#X obj 24 600 makefilename;
+#X text 145 601 - format a symbol with a variable field;
+#X obj 24 630 change;
+#X text 124 630 - remove repeated numbers from a stream;
+#X obj 24 660 swap;
+#X text 124 660 - swap two numbers;
+#X obj 24 690 value;
+#X text 124 690 - shared numeric value;
+#X obj 19 751 delay;
+#X text 119 751 - send a message after a time delay;
+#X obj 19 781 metro;
+#X text 119 781 - send a message periodically;
+#X obj 19 811 line;
+#X text 119 811 - send a series of linearly stepped numbers;
+#X obj 19 841 timer;
+#X text 119 841 - measure time intervals;
+#X obj 19 871 cputime;
+#X text 119 871 - measure CPU time;
+#X obj 19 901 realtime;
+#X text 119 901 - measure real time;
+#X obj 19 931 pipe;
+#X text 119 931 - dynamically growable delay line for numbers;
+#X text 209 990 - arithmetic;
+#X text 210 1013 - relational tests;
+#X text 189 1037 - bit twiddling;
+#X obj 20 1066 mtof;
+#X obj 20 1088 ftom;
+#X obj 61 1066 powtodb;
+#X obj 129 1065 rmstodb;
+#X obj 61 1087 dbtopow;
+#X obj 129 1087 dbtorms;
+#X text 211 1079 - convert acoustical units;
+#X obj 19 1111 mod;
+#X obj 50 1111 div;
+#X obj 81 1111 sin;
+#X obj 112 1111 cos;
+#X obj 143 1111 tan;
+#X obj 19 1132 atan;
+#X obj 59 1132 atan2;
+#X obj 108 1132 sqrt;
+#X obj 148 1132 log;
+#X obj 179 1132 exp;
+#X obj 210 1132 abs;
+#X text 250 1123 - higher math;
+#X obj 19 1155 random;
+#X text 119 1155 - lower math;
+#X obj 19 1178 max;
+#X obj 51 1178 min;
+#X text 119 1178 - greater or lesser of 2 numbers;
+#X obj 19 1201 clip;
+#X text 119 1201 - force a number into a range;
+#X obj 16 1251 notein;
+#X obj 75 1251 ctlin;
+#X obj 126 1251 pgmin;
+#X obj 176 1251 bendin;
+#X obj 235 1251 touchin;
+#X obj 16 1274 polytouchin;
+#X obj 120 1274 midiin;
+#X obj 179 1274 sysexin;
+#X text 318 1263 - MIDI input;
+#X obj 19 1317 noteout;
+#X obj 87 1317 ctlout;
+#X obj 147 1317 pgmout;
+#X obj 206 1317 bendout;
+#X obj 19 1338 touchout;
+#X obj 97 1338 polytouchout;
+#X obj 210 1338 midiout;
+#X text 318 1327 - MIDI output;
+#X obj 20 1370 makenote;
+#X text 109 1368 - schedule a delayed "note off" message corresponding
+to a note-on;
+#X obj 19 1402 stripnote;
+#X text 112 1403 - strip "note off" messages;
+#X obj 17 1441 tabread;
+#X text 117 1441 - read a number from a table;
+#X obj 17 1463 tabread4;
+#X text 117 1463 - read a number from a table;
+#X obj 17 1485 tabwrite;
+#X text 117 1485 - write a number to a table;
+#X obj 17 1508 soundfiler;
+#X text 117 1508 - read and write tables to soundfiles;
+#X obj 19 1558 loadbang;
+#X text 119 1558 - bang on load;
+#X obj 19 1584 serial;
+#X text 119 1584 - serial device control for NT only;
+#X obj 19 1612 netsend;
+#X text 119 1612 - send messages over the internet;
+#X obj 19 1633 netreceive;
+#X text 119 1633 - receive them;
+#X obj 19 1663 qlist;
+#X text 119 1663 - message sequencer;
+#X obj 19 1693 textfile;
+#X text 119 1693 - file to message converter;
+#X obj 19 1723 openpanel;
+#X text 119 1723 - "Open" dialog;
+#X obj 19 1746 savepanel;
+#X text 119 1746 - "Save as" dialog;
+#X obj 19 1783 bag;
+#X text 119 1783 - set of numbers;
+#X obj 19 1813 poly;
+#X text 119 1813 - polyphonic voice allocation;
+#X obj 19 1843 key;
+#X obj 53 1843 keyup;
+#X text 119 1843 - numeric key values from keyboard;
+#X obj 19 1866 keyname;
+#X text 119 1866 - symbolic key name;
+#X text 144 1960 - arithmetic on audio signals;
+#X text 116 1992 - maximum or minimum of 2 inputs;
+#X obj 16 2022 clip~;
+#X text 116 2022 - constrict signal to lie between two bounds;
+#X obj 16 2052 q8_rsqrt~;
+#X text 116 2052 - cheap reciprocal square root (beware -- 8 bits!)
+;
+#X obj 16 2082 q8_sqrt~;
+#X text 116 2082 - cheap square root (beware -- 8 bits!);
+#X obj 16 2112 wrap~;
+#X text 116 2112 - wraparound (fractional part;
+#X obj 16 2142 fft~;
+#X text 116 2142 - complex forward discrete Fourier transform;
+#X obj 16 2172 ifft~;
+#X text 116 2172 - complex inverse discrete Fourier transform;
+#X obj 16 2202 rfft~;
+#X text 116 2202 - real forward discrete Fourier transform;
+#X obj 16 2232 rifft~;
+#X text 116 2232 - real inverse discrete Fourier transform;
+#X obj 16 2262 framp~;
+#X text 116 2262 - output a ramp for each block;
+#X obj 16 2292 mtof~;
+#X obj 67 2292 ftom~;
+#X obj 117 2292 rmstodb~;
+#X obj 195 2292 dbtorms~;
+#X obj 273 2292 rmstopow~;
+#X obj 359 2292 powtorms~;
+#X text 448 2293 - acoustic conversions;
+#X obj 20 2355 dac~;
+#X text 120 2355 - audio output;
+#X obj 20 2385 adc~;
+#X text 120 2385 - audio input;
+#X obj 20 2415 sig~;
+#X text 120 2415 - convert numbers to audio signals;
+#X obj 20 2445 line~;
+#X text 120 2445 - generate audio ramps;
+#X obj 20 2475 vline~;
+#X text 120 2475 - deluxe line~;
+#X obj 20 2535 snapshot~;
+#X text 120 2535 - sample a signal (convert it back to a number);
+#X obj 20 2565 vsnapshot~;
+#X text 120 2565 - deluxe snapshot~;
+#X obj 20 2595 bang~;
+#X text 120 2595 - send a bang message after each DSP block;
+#X obj 20 2625 samplerate~;
+#X text 120 2625 - get the sample rate;
+#X obj 20 2655 send~;
+#X text 120 2655 - nonlocal signal connection with fanout;
+#X obj 20 2685 receive~;
+#X text 120 2685 - get signal from send~;
+#X obj 20 2715 throw~;
+#X text 120 2715 - add to a summing bus;
+#X obj 20 2745 catch~;
+#X text 120 2745 - define and read a summing bus;
+#X obj 20 2775 block~;
+#X text 120 2775 - specify block size and overlap;
+#X obj 20 2805 switch~;
+#X text 120 2805 - switch DSP computation on and off;
+#X obj 20 2835 readsf~;
+#X text 120 2835 - soundfile playback from disk;
+#X obj 20 2865 writesf~;
+#X text 120 2865 - record sound to disk;
+#X obj 17 2927 phasor~;
+#X text 117 2927 - sawtooth oscillator;
+#X obj 17 2957 cos~;
+#X text 117 2957 - cosine;
+#X obj 17 2987 osc~;
+#X text 117 2987 - cosine oscillator;
+#X obj 17 3017 tabwrite~;
+#X text 117 3017 - write to a table;
+#X obj 17 3047 tabplay~;
+#X text 117 3047 - play back from a table (non-transposing);
+#X obj 17 3077 tabread~;
+#X text 117 3077 - non-interpolating table read;
+#X obj 17 3107 tabread4~;
+#X text 117 3107 - four-point interpolating table read;
+#X obj 17 3137 tabosc4~;
+#X text 117 3137 - wavetable oscillator;
+#X obj 17 3167 tabsend~;
+#X text 117 3167 - write one block continuously to a table;
+#X obj 17 3197 tabreceive~;
+#X text 117 3197 - read one block continuously from a table;
+#X text 18 3228 -------------------- AUDIO FILTERS ------------------------
+;
+#X obj 18 3258 vcf~;
+#X text 118 3258 - voltage controlled filter;
+#X obj 18 3288 noise~;
+#X text 118 3288 - white noise generator;
+#X obj 18 3318 env~;
+#X text 118 3318 - envelope follower;
+#X obj 18 3348 hip~;
+#X text 118 3348 - high pass filter;
+#X obj 18 3378 lop~;
+#X text 118 3378 - low pass filter;
+#X obj 18 3408 bp~;
+#X text 118 3408 - band pass filter;
+#X obj 18 3438 biquad~;
+#X text 118 3438 - raw filter;
+#X obj 18 3468 samphold~;
+#X text 118 3468 - sample and hold unit;
+#X obj 18 3498 print~;
+#X text 118 3498 - print out one or more "blocks";
+#X obj 18 3528 rpole~;
+#X text 118 3528 - raw real-valued one-pole filter;
+#X obj 18 3558 rzero~;
+#X text 118 3558 - raw real-valued one-zero filter;
+#X obj 18 3588 rzero_rev~;
+#X obj 113 3588 rzero~;
+#X text 166 3588 - time-reversed;
+#X obj 18 3618 cpole~;
+#X obj 77 3618 czero~;
+#X text 214 3618 - corresponding complex-valued filters;
+#X text 18 3648 -------------------- AUDIO DELAY ------------------------
+;
+#X obj 18 3678 delwrite~;
+#X text 118 3678 - write to a delay line;
+#X obj 18 3708 delread~;
+#X text 118 3708 - read from a delay line;
+#X obj 18 3738 vd~;
+#X text 118 3738 - read from a delay line at a variable delay time
+;
+#N canvas 0 0 450 300 (subpatch) 0;
+#X restore 18 3798 pd;
+#X text 118 3798 - define a subwindow;
+#X obj 18 3828 table;
+#X text 118 3828 - array of numbers in a subwindow;
+#X obj 18 3858 inlet;
+#X text 118 3858 - add an inlet to a pd;
+#X obj 18 3888 outlet;
+#X text 118 3888 - add an outlet to a pd;
+#X obj 18 3918 inlet~;
+#X obj 78 3918 outlet~;
+#X obj 18 3978 struct;
+#X text 118 3978 - define a data structure;
+#X obj 18 4008 drawcurve;
+#X obj 106 4008 filledcurve;
+#X text 219 4008 - draw a curve;
+#X obj 18 4038 drawpolygon;
+#X obj 123 4038 filledpolygon;
+#X text 253 4038 - draw a polygon;
+#X obj 18 4068 plot;
+#X text 118 4068 - plot an array field;
+#X obj 18 4098 drawnumber;
+#X text 118 4098 - print a numeric value;
+#X obj 18 4158 pointer;
+#X text 118 4158 - point to an object belonging to a template;
+#X obj 18 4188 get;
+#X text 118 4188 - get numeric fields;
+#X obj 18 4218 set;
+#X text 118 4218 - change numeric fields;
+#X obj 18 4248 element;
+#X text 118 4248 - get an array element;
+#X obj 18 4278 getsize;
+#X text 118 4278 - get the size of an array;
+#X obj 18 4308 setsize;
+#X text 118 4308 - change the size of an array;
+#X obj 18 4338 append;
+#X text 118 4338 - add an element to a list;
+#X obj 18 4368 sublist;
+#X text 118 4368 - get a pointer into a list which is an element of
+another scalar;
+#X obj 14 4449 scalar;
+#X text 104 4448 - draw a scalar on parent;
+#X obj 15 4479 scope~;
+#X text 115 4479 (use tabwrite~ now);
+#X obj 15 4509 namecanvas;
+#X obj 15 4539 template;
+#X text 115 4539 (use struct now);
+#X obj 136 3618 czero_rev~;
+#X text 20 2324 ------------- AUDIO GLUE ----------------------------
+;
+#X obj 20 2505 threshold~;
+#X text 120 2505 - detect signal thresholds;
+#X text 16 1930 ---------------------- AUDIO MATH -----------------------
+;
+#X text 17 1419 --------------------- TABLES -------------------------
+;
+#X text 18 1539 --------------------- MISC ----------------------;
+#X text 20 961 ------------------------- MATH -----------------;
+#X text 19 721 ------------------------- TIME --------------------------
+;
+#X text 17 1232 ------------------------ MIDI -------------------------
+;
+#X text 24 120 --------------- GLUE ----------------;
+#X text 18 3768 ------------------------ SUBWINDOWS ------------------------
+;
+#X text 18 3948 ---------------------- DATA TEMPLATES ----------------------
+;
+#X text 18 4128 ---------------------- ACCESSING DATA ----------------------
+;
+#X text 17 2897 ------------ AUDIO OSCILLATORS AND TABLES -------------
+;
+#X obj 57 1992 min~;
+#X obj 16 1992 max~;
+#X obj 19 1014 ==;
+#X obj 51 1014 !=;
+#X obj 83 1014 >;
+#X obj 115 1014 <;
+#X obj 146 1014 >=;
+#X obj 177 1014 <=;
+#X text 18 4410 ------------------------ OBSOLETE --------------------------
+;
+#X obj 51 991 -;
+#X obj 84 991 *;
+#X obj 116 991 /;
+#X obj 149 991 pow;
+#X obj 19 991 +;
+#X obj 19 1037 &;
+#X obj 47 1037 &&;
+#X obj 74 1038 |;
+#X obj 102 1038 ||;
+#X obj 129 1038 %;
+#X obj 16 1960 +~;
+#X obj 48 1960 -~;
+#X obj 79 1960 *~;
+#X obj 111 1960 /~;
+#X obj 19 1895 declare;
+#X text 119 1895 - set search path and/or load libraries;
+#X text 156 3919 - signal versions;
+#X text 23 22 The following is a list of built-in objects in Pd. (Not
+included in this list are messages \, atoms \, graphs \, etc. which
+aren't typed into object boxes but come straight off the "add" menu.)
+Right-click (or double-click on a Macintosh) on any object to get its
+"help window".;
diff --git a/pd/doc/5.reference/list-help.pd b/pd/doc/5.reference/list-help.pd
index 1d5cf9d8..07207ae1 100644
--- a/pd/doc/5.reference/list-help.pd
+++ b/pd/doc/5.reference/list-help.pd
@@ -87,7 +87,7 @@ list \, float \, or bang.);
#X restore 506 160 pd trim;
#X text 501 53 details:;
#X text 499 36 click for;
-#N canvas 322 170 608 420 append 0;
+#N canvas 100 190 608 420 append 0;
#X obj 17 324 list append 1 2;
#X floatatom 17 154 5 0 0 0 - - -;
#X msg 17 129 1 2 3;
@@ -169,7 +169,6 @@ the split point.;
#X connect 11 0 3 0;
#X restore 506 134 pd split;
#N canvas 0 0 640 478 prepend 0;
-#X obj 17 324 list append 1 2;
#X floatatom 17 154 5 0 0 0 - - -;
#X msg 17 129 1 2 3;
#X msg 17 82 list cis boom bah;
@@ -191,17 +190,18 @@ the split point.;
#X text 289 286 need be a number to make this;
#X text 289 304 a list.);
#X text 20 6 Prepend - prepend the second list to the first;
-#X text 167 324 <- creation args initialize the list to prepend;
-#X connect 0 0 6 0;
-#X connect 1 0 0 0;
-#X connect 2 0 0 0;
-#X connect 3 0 0 0;
-#X connect 4 0 0 0;
-#X connect 5 0 0 1;
-#X connect 7 0 0 0;
-#X connect 8 0 0 1;
-#X connect 9 0 0 1;
-#X connect 10 0 0 1;
+#X text 171 326 <- creation args initialize the list to prepend;
+#X obj 17 324 list prepend 1 2;
+#X connect 0 0 22 0;
+#X connect 1 0 22 0;
+#X connect 2 0 22 0;
+#X connect 3 0 22 0;
+#X connect 4 0 22 1;
+#X connect 6 0 22 0;
+#X connect 7 0 22 1;
+#X connect 8 0 22 1;
+#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
\, and one each for split and trim) will convert non-list messages
diff --git a/pd/doc/5.reference/namecanvas-help.pd b/pd/doc/5.reference/namecanvas-help.pd
index 4c408bcb..63f1119e 100644
--- a/pd/doc/5.reference/namecanvas-help.pd
+++ b/pd/doc/5.reference/namecanvas-help.pd
@@ -1,8 +1,8 @@
-#N canvas 38 53 532 261 12;
+#N canvas 217 14 532 261 12;
#X obj 66 15 namecanvas;
#X text 169 15 - ATTACH THIS CANVAS TO A NAME;
#X obj 204 107 namecanvas bonzo;
#X msg 205 64 \; bonzo msg 50 50 hi there;
-#X text 252 224 updated for Pd version 0.33;
-#X msg 79 180 \; pd-namecanvas.pd msg 50 70 this is better;
#X text 44 153 This is obsolete. Instead \, you can just say:;
+#X msg 79 180 \; pd-namecanvas-help.pd msg 50 70 this is better;
+#X text 252 224 updated for Pd version 0.40.;
diff --git a/pd/doc/5.reference/qlist-help.pd b/pd/doc/5.reference/qlist-help.pd
index a5b2a574..894c9bb8 100644
--- a/pd/doc/5.reference/qlist-help.pd
+++ b/pd/doc/5.reference/qlist-help.pd
@@ -2,7 +2,7 @@
#X obj 546 328 qlist;
#X msg 592 110 rewind;
#X msg 591 135 next;
-#X floatatom 546 382 0 0 0;
+#X floatatom 546 382 0 0 0 0 - - -;
#X msg 593 54 bang;
#X obj 441 515 r this;
#X obj 544 515 r that;
@@ -60,6 +60,8 @@ in this directory.;
#X text 668 158 single-step forward SUPRESSING MESSAGE-SENDING;
#X msg 591 161 next 1;
#X text 921 558 updated for Pd version 0.35;
+#X msg 593 29 print;
+#X text 667 28 print contents to Pd window;
#X connect 0 0 3 0;
#X connect 0 1 9 0;
#X connect 1 0 0 0;
@@ -74,3 +76,4 @@ in this directory.;
#X connect 27 0 0 0;
#X connect 28 0 0 0;
#X connect 37 0 0 0;
+#X connect 39 0 0 0;
diff --git a/pd/doc/7.stuff/tools/testtone.pd b/pd/doc/7.stuff/tools/testtone.pd
index 6e88a268..d286bb9d 100644
--- a/pd/doc/7.stuff/tools/testtone.pd
+++ b/pd/doc/7.stuff/tools/testtone.pd
@@ -1,21 +1,20 @@
-#N canvas 99 78 581 402 12;
-#X floatatom 83 307 3 0 0 0 - - -;
-#X obj 33 257 notein;
-#X obj 33 283 stripnote;
-#X floatatom 32 308 3 0 0 0 - - -;
+#N canvas 90 35 581 402 12;
+#X floatatom 93 305 3 0 0 0 - - -;
+#X obj 43 254 notein;
+#X obj 43 280 stripnote;
+#X floatatom 43 305 3 0 0 0 - - -;
#X text 35 5 Welcome to Pd ("Pure Data"). This window can test your
audio and MIDI connections. To see Pd's DOCUMENTATION select "getting
started" in the Help menu.;
-#X text 236 258 MIDI OUT;
-#X text 33 233 MIDI IN;
-#X floatatom 175 305 3 0 0 0 - - -;
+#X text 228 251 MIDI OUT;
+#X text 43 230 MIDI IN;
+#X floatatom 175 304 3 0 0 0 - - -;
#X floatatom 136 304 3 0 0 0 - - -;
#X obj 136 279 ctlin;
#N canvas 0 0 484 446 midi 0;
-#X obj 95 61 inlet;
+#X obj 96 65 inlet;
#X obj 96 262 noteout;
#X floatatom 96 92 0 0 0 0 - - -;
-#X obj 107 120 outlet;
#X obj 338 113 loadbang;
#X obj 96 184 metro;
#X obj 96 236 makenote;
@@ -33,44 +32,40 @@ started" in the Help menu.;
#X text 232 145 vel;
#X text 268 146 length;
#X obj 230 257 ctlout 1;
-#X floatatom 231 228 0 0 0 0 - - -;
+#X floatatom 230 228 0 0 0 0 - - -;
#X connect 0 0 2 0;
-#X connect 2 0 3 0;
-#X connect 2 0 5 0;
-#X connect 4 0 12 0;
-#X connect 4 0 13 0;
-#X connect 4 0 14 0;
-#X connect 4 0 15 0;
-#X connect 5 0 8 0;
-#X connect 6 0 1 0;
-#X connect 6 1 1 1;
-#X connect 7 0 8 1;
-#X connect 8 0 6 0;
+#X connect 2 0 4 0;
+#X connect 3 0 11 0;
+#X connect 3 0 12 0;
+#X connect 3 0 13 0;
+#X connect 3 0 14 0;
+#X connect 4 0 7 0;
+#X connect 5 0 1 0;
+#X connect 5 1 1 1;
+#X connect 6 0 7 1;
+#X connect 7 0 5 0;
+#X connect 8 0 4 1;
#X connect 9 0 5 1;
-#X connect 10 0 6 1;
-#X connect 11 0 6 2;
-#X connect 12 0 9 0;
-#X connect 13 0 7 0;
+#X connect 10 0 5 2;
+#X connect 11 0 8 0;
+#X connect 12 0 6 0;
+#X connect 13 0 9 0;
#X connect 14 0 10 0;
-#X connect 15 0 11 0;
-#X connect 21 0 20 0;
-#X restore 236 308 pd midi;
-#X floatatom 139 185 3 0 0 0 - - -;
-#X floatatom 171 185 3 0 0 0 - - -;
-#X text 24 341 PD is COPYRIGHT 1997-2002 by Miller Puckette and others
-but is free for you to use for any reasonable purpose. See the file
-\, LICENSE.txt in the distribution.;
+#X connect 20 0 19 0;
+#X restore 228 301 pd midi;
+#X floatatom 137 185 3 0 0 0 - tone-vu1 -;
+#X floatatom 168 185 3 0 0 0 - tone-vu2 -;
#X obj 135 117 tgl 20 0 tone-ch1 tone-ch1 1 5 -8 0 12 -262144 -1 -1
1 1;
#X obj 160 117 tgl 20 0 tone-ch2 tone-ch2 2 5 -8 0 12 -262144 -1 -1
1 1;
-#X obj 236 282 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
+#X obj 228 275 tgl 20 0 empty empty empty 20 8 0 8 -262144 -1 -1 0
1;
-#X obj 394 110 tgl 20 0 tone-monitor set-tone-monitor monitor 25 10
+#X obj 399 97 tgl 20 0 tone-monitor set-tone-monitor monitor 25 10
0 12 -262144 -1 -1 0 1;
-#X text 70 137 OFF;
-#X text 67 121 -40;
-#X text 67 103 -20;
+#X text 69 133 OFF;
+#X text 68 118 -40;
+#X text 68 101 -20;
#N canvas 0 0 536 251 more 0;
#X floatatom 42 209 0 0 0 0 - - -;
#X obj 42 183 f;
@@ -90,8 +85,8 @@ but is free for you to use for any reasonable purpose. See the file
#X connect 3 0 1 0;
#X connect 4 0 3 0;
#X restore 459 298 pd more;
-#X obj 393 148 tgl 20 0 tone-hipass set-tone-hipass input-hipass 25
-10 0 12 -262144 -1 -1 0 1;
+#X obj 399 135 tgl 20 0 tone-hipass set-tone-hipass input-hipass 25
+10 0 12 -262144 -1 -1 1 1;
#X obj 185 117 tgl 20 0 tone-ch3 tone-ch3 3 5 -8 0 12 -262144 -1 -1
1 1;
#X obj 210 117 tgl 20 0 tone-ch4 tone-ch4 4 5 -8 0 12 -262144 -1 -1
@@ -104,59 +99,35 @@ but is free for you to use for any reasonable purpose. See the file
-1 -1;
#X obj 331 129 bng 15 250 50 0 tone-none empty NONE 20 8 0 12 -262144
-1 -1;
-#X floatatom 204 185 3 0 0 0 - - -;
-#X floatatom 237 185 3 0 0 0 - - -;
-#X floatatom 269 186 3 0 0 0 - - -;
-#X floatatom 302 186 3 0 0 0 - - -;
-#X text 154 210 AUDIO INPUT (RMS dB);
+#X floatatom 203 185 3 0 0 0 - tone-vu3 -;
+#X floatatom 234 185 3 0 0 0 - tone-vu4 -;
+#X floatatom 269 185 3 0 0 0 - tone-vu5 -;
+#X floatatom 300 185 3 0 0 0 - tone-vu6 -;
+#X text 168 205 AUDIO INPUT (RMS dB);
#X text 45 62 TEST;
-#X text 72 174 noise;
-#X text 71 191 tone;
+#X text 70 171 noise;
+#X text 69 188 tone;
#X text 44 80 SIGNAL;
-#X text 131 78 test signal channels:;
-#X obj 52 174 vradio 15 1 0 2 tone-type tone-type-set empty 0 -6 0
+#X text 138 78 test signal channels:;
+#X obj 51 174 vradio 15 1 0 2 tone-type tone-type-set empty 0 -6 0
8 -262144 -1 -1 1;
#X obj 51 104 vradio 15 1 0 3 tone-radio tone-radio-set empty 0 -6
-0 8 -262144 -1 -1 0;
-#X obj 379 220 adc~;
-#X obj 379 256 print~;
-#X obj 438 227 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+0 8 -262144 -1 -1 2;
+#X obj 460 193 adc~;
+#X obj 459 240 print~;
+#X obj 468 217 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#N canvas 0 114 903 462 -------audio----------- 0;
-#X obj 186 95 hip~ 5;
-#X obj 194 172 outlet;
-#X obj 194 146 int;
-#X obj 194 120 env~ 8192;
-#X obj 186 42 adc~ 1;
-#X obj 196 195 r~ tone-mon;
-#X obj 205 330 line~;
-#X obj 186 220 *~;
-#X obj 205 303 pack 0 50;
-#X obj 205 277 r tone-ch1;
-#X obj 196 250 r~ tone-osc;
-#X obj 196 355 *~;
-#X obj 186 410 dac~ 1;
-#X obj 186 385 +~;
-#X obj 194 68 r tone-hip;
+#X floatatom 335 185 3 0 0 0 - tone-vu7 -;
+#X floatatom 366 185 3 0 0 0 - tone-vu8 -;
+#X obj 283 117 tgl 20 0 tone-ch7 tone-ch7 7 5 -8 0 12 -262144 -1 -1
+1 1;
+#X obj 308 117 tgl 20 0 tone-ch8 tone-ch8 8 5 -8 0 12 -262144 -1 -1
+1 1;
+#N canvas 233 399 903 462 audio 0;
#X obj 25 303 s~ tone-mon;
#X obj 25 277 line~;
#X obj 25 249 pack 0 50;
#X obj 25 223 r tone-monitor;
-#X obj 306 94 hip~ 5;
-#X obj 314 171 outlet;
-#X obj 314 145 int;
-#X obj 314 119 env~ 8192;
-#X obj 316 194 r~ tone-mon;
-#X obj 325 329 line~;
-#X obj 306 219 *~;
-#X obj 325 302 pack 0 50;
-#X obj 316 249 r~ tone-osc;
-#X obj 316 354 *~;
-#X obj 306 384 +~;
-#X obj 314 67 r tone-hip;
-#X obj 306 41 adc~ 2;
-#X obj 306 409 dac~ 2;
-#X obj 325 276 r tone-ch2;
#X obj 28 140 * 5;
#X obj 28 165 s tone-hip;
#X obj 28 114 r tone-hipass;
@@ -174,66 +145,6 @@ but is free for you to use for any reasonable purpose. See the file
#X connect 1 0 4 0;
#X connect 2 0 5 0;
#X restore 22 332 pd glue+loadbang;
-#X obj 428 96 hip~ 5;
-#X obj 436 173 outlet;
-#X obj 436 147 int;
-#X obj 436 121 env~ 8192;
-#X obj 438 196 r~ tone-mon;
-#X obj 447 331 line~;
-#X obj 428 221 *~;
-#X obj 447 304 pack 0 50;
-#X obj 438 251 r~ tone-osc;
-#X obj 438 356 *~;
-#X obj 428 386 +~;
-#X obj 436 69 r tone-hip;
-#X obj 544 92 hip~ 5;
-#X obj 552 169 outlet;
-#X obj 552 143 int;
-#X obj 552 117 env~ 8192;
-#X obj 554 192 r~ tone-mon;
-#X obj 563 327 line~;
-#X obj 544 217 *~;
-#X obj 563 300 pack 0 50;
-#X obj 554 247 r~ tone-osc;
-#X obj 554 352 *~;
-#X obj 544 382 +~;
-#X obj 552 65 r tone-hip;
-#X obj 661 92 hip~ 5;
-#X obj 669 169 outlet;
-#X obj 669 143 int;
-#X obj 669 117 env~ 8192;
-#X obj 671 192 r~ tone-mon;
-#X obj 680 327 line~;
-#X obj 661 217 *~;
-#X obj 680 300 pack 0 50;
-#X obj 671 247 r~ tone-osc;
-#X obj 671 352 *~;
-#X obj 661 382 +~;
-#X obj 669 65 r tone-hip;
-#X obj 781 91 hip~ 5;
-#X obj 789 168 outlet;
-#X obj 789 142 int;
-#X obj 789 116 env~ 8192;
-#X obj 791 191 r~ tone-mon;
-#X obj 800 326 line~;
-#X obj 781 216 *~;
-#X obj 800 299 pack 0 50;
-#X obj 791 246 r~ tone-osc;
-#X obj 791 351 *~;
-#X obj 781 381 +~;
-#X obj 789 64 r tone-hip;
-#X obj 428 43 adc~ 3;
-#X obj 544 39 adc~ 4;
-#X obj 661 39 adc~ 5;
-#X obj 781 38 adc~ 6;
-#X obj 447 278 r tone-ch3;
-#X obj 563 273 r tone-ch4;
-#X obj 680 274 r tone-ch5;
-#X obj 800 273 r tone-ch6;
-#X obj 428 411 dac~ 3;
-#X obj 543 406 dac~ 4;
-#X obj 661 407 dac~ 5;
-#X obj 781 406 dac~ 6;
#N canvas 487 35 468 559 tone-generator 0;
#X obj 22 134 osc~;
#X obj 22 66 mtof;
@@ -296,72 +207,170 @@ but is free for you to use for any reasonable purpose. See the file
#X connect 27 0 20 0;
#X connect 28 0 16 0;
#X restore 24 68 pd tone-generator;
-#X obj 899 96 hip~ 5;
-#X obj 907 173 outlet;
-#X obj 907 147 int;
-#X obj 907 121 env~ 8192;
-#X obj 909 196 r~ tone-mon;
-#X obj 918 331 line~;
-#X obj 899 221 *~;
-#X obj 918 304 pack 0 50;
-#X obj 909 251 r~ tone-osc;
-#X obj 909 356 *~;
-#X obj 899 386 +~;
-#X obj 907 69 r tone-hip;
-#X obj 1019 95 hip~ 5;
-#X obj 1027 172 outlet;
-#X obj 1027 146 int;
-#X obj 1027 120 env~ 8192;
-#X obj 1029 195 r~ tone-mon;
-#X obj 1038 330 line~;
-#X obj 1019 220 *~;
-#X obj 1038 303 pack 0 50;
-#X obj 1029 250 r~ tone-osc;
-#X obj 1029 355 *~;
-#X obj 1019 385 +~;
-#X obj 1027 68 r tone-hip;
-#X obj 899 43 adc~ 7;
-#X obj 1019 42 adc~ 8;
-#X obj 899 411 dac~ 7;
-#X obj 1019 410 dac~ 8;
-#X obj 918 278 r tone-ch7;
-#X obj 1038 277 r tone-ch8;
-#X connect 0 0 7 0;
-#X connect 0 0 3 0;
+#N canvas 76 157 975 436 assigns 0;
+#X obj 12 71 hip~ 5;
+#X obj 20 122 int;
+#X obj 20 96 env~ 8192;
+#X obj 12 18 adc~ 1;
+#X obj 22 171 r~ tone-mon;
+#X obj 31 306 line~;
+#X obj 12 196 *~;
+#X obj 31 279 pack 0 50;
+#X obj 31 253 r tone-ch1;
+#X obj 22 226 r~ tone-osc;
+#X obj 22 331 *~;
+#X obj 12 386 dac~ 1;
+#X obj 12 361 +~;
+#X obj 20 44 r tone-hip;
+#X obj 132 70 hip~ 5;
+#X obj 140 121 int;
+#X obj 140 95 env~ 8192;
+#X obj 142 170 r~ tone-mon;
+#X obj 151 305 line~;
+#X obj 132 195 *~;
+#X obj 151 278 pack 0 50;
+#X obj 142 225 r~ tone-osc;
+#X obj 142 330 *~;
+#X obj 132 360 +~;
+#X obj 140 43 r tone-hip;
+#X obj 132 17 adc~ 2;
+#X obj 132 385 dac~ 2;
+#X obj 151 252 r tone-ch2;
+#X obj 254 72 hip~ 5;
+#X obj 262 123 int;
+#X obj 262 97 env~ 8192;
+#X obj 264 172 r~ tone-mon;
+#X obj 273 307 line~;
+#X obj 254 197 *~;
+#X obj 273 280 pack 0 50;
+#X obj 264 227 r~ tone-osc;
+#X obj 264 332 *~;
+#X obj 254 362 +~;
+#X obj 262 45 r tone-hip;
+#X obj 370 68 hip~ 5;
+#X obj 378 119 int;
+#X obj 378 93 env~ 8192;
+#X obj 380 168 r~ tone-mon;
+#X obj 389 303 line~;
+#X obj 370 193 *~;
+#X obj 389 276 pack 0 50;
+#X obj 380 223 r~ tone-osc;
+#X obj 380 328 *~;
+#X obj 370 358 +~;
+#X obj 378 41 r tone-hip;
+#X obj 487 68 hip~ 5;
+#X obj 495 119 int;
+#X obj 495 93 env~ 8192;
+#X obj 497 168 r~ tone-mon;
+#X obj 506 303 line~;
+#X obj 487 193 *~;
+#X obj 506 276 pack 0 50;
+#X obj 497 223 r~ tone-osc;
+#X obj 497 328 *~;
+#X obj 487 358 +~;
+#X obj 495 41 r tone-hip;
+#X obj 607 67 hip~ 5;
+#X obj 615 118 int;
+#X obj 615 92 env~ 8192;
+#X obj 617 167 r~ tone-mon;
+#X obj 626 302 line~;
+#X obj 607 192 *~;
+#X obj 626 275 pack 0 50;
+#X obj 617 222 r~ tone-osc;
+#X obj 617 327 *~;
+#X obj 607 357 +~;
+#X obj 615 40 r tone-hip;
+#X obj 254 19 adc~ 3;
+#X obj 370 15 adc~ 4;
+#X obj 487 15 adc~ 5;
+#X obj 607 14 adc~ 6;
+#X obj 273 254 r tone-ch3;
+#X obj 389 249 r tone-ch4;
+#X obj 506 250 r tone-ch5;
+#X obj 626 249 r tone-ch6;
+#X obj 254 387 dac~ 3;
+#X obj 369 382 dac~ 4;
+#X obj 487 383 dac~ 5;
+#X obj 607 382 dac~ 6;
+#X obj 725 72 hip~ 5;
+#X obj 733 123 int;
+#X obj 733 97 env~ 8192;
+#X obj 735 172 r~ tone-mon;
+#X obj 744 307 line~;
+#X obj 725 197 *~;
+#X obj 744 280 pack 0 50;
+#X obj 735 227 r~ tone-osc;
+#X obj 735 332 *~;
+#X obj 725 362 +~;
+#X obj 733 45 r tone-hip;
+#X obj 845 71 hip~ 5;
+#X obj 853 122 int;
+#X obj 853 96 env~ 8192;
+#X obj 855 171 r~ tone-mon;
+#X obj 864 306 line~;
+#X obj 845 196 *~;
+#X obj 864 279 pack 0 50;
+#X obj 855 226 r~ tone-osc;
+#X obj 855 331 *~;
+#X obj 845 361 +~;
+#X obj 853 44 r tone-hip;
+#X obj 725 19 adc~ 7;
+#X obj 845 18 adc~ 8;
+#X obj 725 387 dac~ 7;
+#X obj 845 386 dac~ 8;
+#X obj 744 254 r tone-ch7;
+#X obj 864 253 r tone-ch8;
+#X obj 20 148 s tone-vu1;
+#X obj 140 147 s tone-vu2;
+#X obj 262 149 s tone-vu3;
+#X obj 378 145 s tone-vu4;
+#X obj 495 145 s tone-vu5;
+#X obj 615 144 s tone-vu6;
+#X obj 733 149 s tone-vu7;
+#X obj 853 148 s tone-vu8;
+#X connect 0 0 6 0;
+#X connect 0 0 2 0;
+#X connect 1 0 112 0;
#X connect 2 0 1 0;
-#X connect 3 0 2 0;
-#X connect 4 0 0 0;
-#X connect 5 0 7 1;
-#X connect 6 0 11 1;
-#X connect 7 0 13 0;
-#X connect 8 0 6 0;
-#X connect 9 0 8 0;
-#X connect 10 0 11 0;
-#X connect 11 0 13 1;
-#X connect 13 0 12 0;
-#X connect 14 0 0 1;
+#X connect 3 0 0 0;
+#X connect 4 0 6 1;
+#X connect 5 0 10 1;
+#X connect 6 0 12 0;
+#X connect 7 0 5 0;
+#X connect 8 0 7 0;
+#X connect 9 0 10 0;
+#X connect 10 0 12 1;
+#X connect 12 0 11 0;
+#X connect 13 0 0 1;
+#X connect 14 0 19 0;
+#X connect 14 0 16 0;
+#X connect 15 0 113 0;
#X connect 16 0 15 0;
-#X connect 17 0 16 0;
-#X connect 18 0 17 0;
-#X connect 19 0 25 0;
-#X connect 19 0 22 0;
-#X connect 21 0 20 0;
-#X connect 22 0 21 0;
-#X connect 23 0 25 1;
-#X connect 24 0 28 1;
-#X connect 25 0 29 0;
-#X connect 26 0 24 0;
-#X connect 27 0 28 0;
-#X connect 28 0 29 1;
-#X connect 29 0 32 0;
-#X connect 30 0 19 1;
-#X connect 31 0 19 0;
-#X connect 33 0 26 0;
-#X connect 34 0 35 0;
-#X connect 36 0 34 0;
-#X connect 38 0 44 0;
-#X connect 38 0 41 0;
-#X connect 40 0 39 0;
+#X connect 17 0 19 1;
+#X connect 18 0 22 1;
+#X connect 19 0 23 0;
+#X connect 20 0 18 0;
+#X connect 21 0 22 0;
+#X connect 22 0 23 1;
+#X connect 23 0 26 0;
+#X connect 24 0 14 1;
+#X connect 25 0 14 0;
+#X connect 27 0 20 0;
+#X connect 28 0 33 0;
+#X connect 28 0 30 0;
+#X connect 29 0 114 0;
+#X connect 30 0 29 0;
+#X connect 31 0 33 1;
+#X connect 32 0 36 1;
+#X connect 33 0 37 0;
+#X connect 34 0 32 0;
+#X connect 35 0 36 0;
+#X connect 36 0 37 1;
+#X connect 37 0 80 0;
+#X connect 38 0 28 1;
+#X connect 39 0 44 0;
+#X connect 39 0 41 0;
+#X connect 40 0 115 0;
#X connect 41 0 40 0;
#X connect 42 0 44 1;
#X connect 43 0 47 1;
@@ -369,101 +378,84 @@ but is free for you to use for any reasonable purpose. See the file
#X connect 45 0 43 0;
#X connect 46 0 47 0;
#X connect 47 0 48 1;
-#X connect 48 0 94 0;
-#X connect 49 0 38 1;
-#X connect 50 0 56 0;
-#X connect 50 0 53 0;
+#X connect 48 0 81 0;
+#X connect 49 0 39 1;
+#X connect 50 0 55 0;
+#X connect 50 0 52 0;
+#X connect 51 0 116 0;
#X connect 52 0 51 0;
-#X connect 53 0 52 0;
-#X connect 54 0 56 1;
-#X connect 55 0 59 1;
-#X connect 56 0 60 0;
-#X connect 57 0 55 0;
-#X connect 58 0 59 0;
-#X connect 59 0 60 1;
-#X connect 60 0 95 0;
-#X connect 61 0 50 1;
-#X connect 62 0 68 0;
-#X connect 62 0 65 0;
-#X connect 64 0 63 0;
-#X connect 65 0 64 0;
-#X connect 66 0 68 1;
-#X connect 67 0 71 1;
-#X connect 68 0 72 0;
-#X connect 69 0 67 0;
-#X connect 70 0 71 0;
-#X connect 71 0 72 1;
-#X connect 72 0 96 0;
-#X connect 73 0 62 1;
-#X connect 74 0 80 0;
-#X connect 74 0 77 0;
-#X connect 76 0 75 0;
-#X connect 77 0 76 0;
-#X connect 78 0 80 1;
-#X connect 79 0 83 1;
-#X connect 80 0 84 0;
-#X connect 81 0 79 0;
-#X connect 82 0 83 0;
-#X connect 83 0 84 1;
-#X connect 84 0 97 0;
-#X connect 85 0 74 1;
-#X connect 86 0 38 0;
-#X connect 87 0 50 0;
-#X connect 88 0 62 0;
-#X connect 89 0 74 0;
-#X connect 90 0 45 0;
-#X connect 91 0 57 0;
-#X connect 92 0 69 0;
-#X connect 93 0 81 0;
-#X connect 99 0 105 0;
-#X connect 99 0 102 0;
-#X connect 101 0 100 0;
-#X connect 102 0 101 0;
-#X connect 103 0 105 1;
-#X connect 104 0 108 1;
-#X connect 105 0 109 0;
-#X connect 106 0 104 0;
-#X connect 107 0 108 0;
-#X connect 108 0 109 1;
-#X connect 109 0 125 0;
-#X connect 110 0 99 1;
-#X connect 111 0 117 0;
-#X connect 111 0 114 0;
-#X connect 113 0 112 0;
-#X connect 114 0 113 0;
-#X connect 115 0 117 1;
-#X connect 116 0 120 1;
-#X connect 117 0 121 0;
-#X connect 118 0 116 0;
-#X connect 119 0 120 0;
-#X connect 120 0 121 1;
-#X connect 121 0 126 0;
-#X connect 122 0 111 1;
-#X connect 123 0 99 0;
-#X connect 124 0 111 0;
-#X connect 127 0 106 0;
-#X connect 128 0 118 0;
-#X restore 139 159 pd -------audio-----------;
-#X floatatom 335 186 3 0 0 0 - - -;
-#X floatatom 368 186 3 0 0 0 - - -;
-#X obj 283 117 tgl 20 0 tone-ch7 tone-ch7 7 5 -8 0 12 -262144 -1 -1
-1 1;
-#X obj 308 117 tgl 20 0 tone-ch8 tone-ch8 8 5 -8 0 12 -262144 -1 -1
-1 1;
+#X connect 53 0 55 1;
+#X connect 54 0 58 1;
+#X connect 55 0 59 0;
+#X connect 56 0 54 0;
+#X connect 57 0 58 0;
+#X connect 58 0 59 1;
+#X connect 59 0 82 0;
+#X connect 60 0 50 1;
+#X connect 61 0 66 0;
+#X connect 61 0 63 0;
+#X connect 62 0 117 0;
+#X connect 63 0 62 0;
+#X connect 64 0 66 1;
+#X connect 65 0 69 1;
+#X connect 66 0 70 0;
+#X connect 67 0 65 0;
+#X connect 68 0 69 0;
+#X connect 69 0 70 1;
+#X connect 70 0 83 0;
+#X connect 71 0 61 1;
+#X connect 72 0 28 0;
+#X connect 73 0 39 0;
+#X connect 74 0 50 0;
+#X connect 75 0 61 0;
+#X connect 76 0 34 0;
+#X connect 77 0 45 0;
+#X connect 78 0 56 0;
+#X connect 79 0 67 0;
+#X connect 84 0 89 0;
+#X connect 84 0 86 0;
+#X connect 85 0 118 0;
+#X connect 86 0 85 0;
+#X connect 87 0 89 1;
+#X connect 88 0 92 1;
+#X connect 89 0 93 0;
+#X connect 90 0 88 0;
+#X connect 91 0 92 0;
+#X connect 92 0 93 1;
+#X connect 93 0 108 0;
+#X connect 94 0 84 1;
+#X connect 95 0 100 0;
+#X connect 95 0 97 0;
+#X connect 96 0 119 0;
+#X connect 97 0 96 0;
+#X connect 98 0 100 1;
+#X connect 99 0 103 1;
+#X connect 100 0 104 0;
+#X connect 101 0 99 0;
+#X connect 102 0 103 0;
+#X connect 103 0 104 1;
+#X connect 104 0 109 0;
+#X connect 105 0 95 1;
+#X connect 106 0 84 0;
+#X connect 107 0 95 0;
+#X connect 110 0 90 0;
+#X connect 111 0 101 0;
+#X restore 38 387 pd assigns;
+#X connect 1 0 0 0;
+#X connect 2 0 1 0;
+#X connect 3 0 2 0;
+#X connect 4 0 5 0;
+#X connect 6 0 4 0;
+#X restore 459 275 pd audio;
+#X text 24 341 PD is under copyright by Miller Puckette and others
+but is free for you to use for any reasonable purpose. See the file
+\, LICENSE.txt in the distribution.;
#X connect 1 0 2 0;
#X connect 1 1 2 1;
#X connect 2 0 3 0;
#X connect 2 1 0 0;
#X connect 9 0 8 0;
#X connect 9 1 7 0;
-#X connect 16 0 10 0;
-#X connect 41 0 42 0;
-#X connect 43 0 42 0;
-#X connect 44 0 11 0;
-#X connect 44 1 12 0;
-#X connect 44 2 29 0;
-#X connect 44 3 30 0;
-#X connect 44 4 31 0;
-#X connect 44 5 32 0;
-#X connect 44 6 45 0;
-#X connect 44 7 46 0;
+#X connect 15 0 10 0;
+#X connect 40 0 41 0;
+#X connect 42 0 41 0;
diff --git a/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c b/pd/portaudio/pa_win_wdmks/pa_win_wdmks.c
index 79cffbaa..2c0971b8 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.11 2006-08-24 15:40:28 millerpuckette Exp $
+ * $Id: pa_win_wdmks.c,v 1.12 2006-09-08 23:45:30 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 0e4975d7..43ceb881 100644
--- a/pd/portaudio/pablio/ringbuffer.c
+++ b/pd/portaudio/pablio/ringbuffer.c
@@ -1,5 +1,5 @@
/*
- * $Id: ringbuffer.c,v 1.10 2006-08-24 15:40:28 millerpuckette Exp $
+ * $Id: ringbuffer.c,v 1.11 2006-09-08 23:45:30 millerpuckette Exp $
* ringbuffer.c
* Ring Buffer utility..
*
diff --git a/pd/portaudio/pablio/ringbuffer.h b/pd/portaudio/pablio/ringbuffer.h
index eaaa1203..90fac919 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.11 2006-08-24 15:40:28 millerpuckette Exp $
+ * $Id: ringbuffer.h,v 1.12 2006-09-08 23:45:30 millerpuckette Exp $
* ringbuffer.h
* Ring Buffer utility..
*
diff --git a/pd/portmidi/pm_mac/pmmacosxcm.c b/pd/portmidi/pm_mac/pmmacosxcm.c
index 3a83f96f..b587cbb7 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.11 2006-08-24 15:40:28 millerpuckette Exp $
+ * $Id: pmmacosxcm.c,v 1.12 2006-09-08 23:45:30 millerpuckette Exp $
*/
/* Notes:
diff --git a/pd/src/CHANGELOG.txt b/pd/src/CHANGELOG.txt
index 321b0bc8..ccd8641d 100644
--- a/pd/src/CHANGELOG.txt
+++ b/pd/src/CHANGELOG.txt
@@ -1,5 +1,6 @@
This file describes implementation and API changes; stuff more visible to the
-user appears in the "release notes" instead.
+user appears in the "release notes" instead. See the bottom of this file
+for original notes on source stype and organization.
0.40.0
@@ -119,4 +120,130 @@ one more improvement in jack support (guenter)
make an "nrt" flag so mac can disable pthread_setschedparam call if yu want.
+------------------- original source notes -------------
+
+0. structure definition roadmap. First, the containment tree of things
+that can be sent messages ("pure data"). (note that t_object and t_text,
+and t_graph and t_canvas, should be unified...)
+
+------------ BFFORE 0.35: ---------
+m_pd.h t_pd anything with a class
+ t_gobj "graphic object"
+ t_text text object
+g_canvas.h
+ t_glist list of graphic objects
+g_canvas.c t_canvas Pd "document"
+
+------------ AFTER 0.35: ---------
+m_pd.h t_pd anything with a class
+ t_gobj "graphic object"
+ t_text patchable object, AKA t_object
+g_canvas.h t_glist list of graphic objects, AKA t_canvas
+
+... and other structures:
+g_canvas.h t_selection -- linked list of gobjs
+ t_editor -- editor state, allocated for visible glists
+m_imp.h t_methodentry -- method handler
+ t_widgetbehavior -- class-dependent editing behavior for gobjs
+ t_parentwidgetbehavior -- objects' behavior on parent window
+ t_class -- method definitions, instance size, flags, etc.
+
+
+1. C coding style. The source should pass most "warnings" of C compilers
+(-Wall on linux, for instance; see the makefile.) Some informalities
+are intentional, for instance the loose use of function prototypes (see
+below) and uncast conversions from longer to shorter numerical formats.
+The code doesn't respect "const" yet.
+
+1.1. Prefixes in structure elements. The names of structure elements always
+have a K&R-style prefix, as in ((t_atom)x)->a_type, where the "a_" prefix
+indicates "atom." This is intended to enhance readability (although the
+convention arose from a limitation of early C compilers.) Common prefixes are
+"w_" (word), "a_" (atom), "s_" (symbol), "ob_" (object), "te_" (text object),
+"g_" (graphical object), and "gl_" (glist, a list of graphical objects). Also,
+global symbols sometimes get prefixes, as in "s_float" (the symbol whose string
+is "float). Typedefs are prefixed by "t_". Most _private_ structures, i.e.,
+structures whose definitions appear in a ".c" file, are prefixed by "x_".
+
+1.2. Function arguments. Many functions take as their first
+argument a pointer named "x", which is a pointer to a structure suggested
+by the function prefix; e.g., canvas_dirty(x, n) where "x" points to a canvas
+(t_canvas *x).
+
+1.3. Function Prototypes. Functions which are used in at least two different
+files (besides where they originate) are prototyped in the appropriate include
+file. Functions which are provided in one file and used in one other are
+prototyped right where they are used. This is just to keep the size of the
+".h" files down for readability's sake.
+
+1.4. Whacko private terminology. Some terms are lifted from other historically
+relevant programs, notably "ugen" (which is just a tilde object; see d_ugen.c.)
+
+1.5. Spacing. Tabs are 8 spaces; indentation is 4 spaces. Indenting
+curly brackets are by themselves on their own lines, as in:
+
+ if (x)
+ {
+ x = 0;
+ }
+
+Lines should fit within 80 spaces.
+
+2. Max patch-level compatibility. "Import" and "Export" functions are
+provided which aspire to strict compatibility with 0.26 patches (ISPW version),
+but which don't get anywhere close to that yet. Where possible, features
+appearing on the Mac will comeday also be provided; for instance, the connect
+message on the Mac offers segmented patch cords; these will devolve into
+straight lines in Pd. Many, many UI objects in Opcode Max will not appear in
+Pd, at least at first.
+
+3. Compatibility with Max 0.26 "externs", i.e., source-level compatibility. Pd
+objects follow the style of 0.26 objects as closely as possible, making
+exceptions in cases where the 0.26 model is clearly deficient. These are:
+
+3.1. Anything involving the MacIntosh "Handle" data type is changed to use
+char * or void * instead.
+
+3.2. Pd passes true single-precision floating-point arguments to methods;
+Max uses double.
+Typedefs are provided:
+ t_floatarg, t_intarg for arguments passed by the message system
+ t_float, t_int for the "word" union (in atoms, for example.)
+
+3.3. Badly-named entities got name changes:
+
+ w_long --> w_int (in the "union word" structure)
+
+3.4. Many library functions are renamed and have different arguments;
+I hope to provide an include file to alias them when compiling Max externs.
+
+4. Function name prefixes.
+Many function names have prefixes which indicate what "package" they belong
+to. The exceptions are:
+ typedmess, vmess, getfn, gensym (m_class.c)
+ getbytes, freebytes, resizebytes (m_memory.c)
+ post, error, bug (s_print.c)
+which are all frequently called and which don't fit into simple categories.
+Important packages are:
+(pd-gui:) pdgui -- everything
+(pd:) pd -- functions common to all "pd" objects
+ obj -- fuctions common to all "patchable" objects ala Max
+ sys -- "system" level functions
+ binbuf -- functions manipulating binbufs
+ class -- functions manipulating classes
+ (other) -- functions common to the named Pd class
+
+5. Source file prefixes.
+PD:
+s system interface
+m message system
+g graphics stuff
+d DSP objects
+x control objects
+z other
+
+PD-GUI:
+t TK front end
+
+
diff --git a/pd/src/configure.in b/pd/src/configure.in
index 08ad6204..a1ceb48e 100644
--- a/pd/src/configure.in
+++ b/pd/src/configure.in
@@ -251,7 +251,7 @@ then
-DUSEAPI_PORTAUDIO -DPA19 -DPA_USE_COREAUDIO"
if test `uname -r` = 7.9.0;
then
- MORECFLAGS="-DPA_BIG_ENDIAN -Wno-error"
+ MORECFLAGS="-DMACOSX3 -DPA_BIG_ENDIAN -Wno-error"
EXTERNTARGET=d_ppc
else
MORECFLAGS="-arch i386 -arch ppc -Wno-error"
diff --git a/pd/src/g_bang.c b/pd/src/g_bang.c
index 7c0cc091..3a5ef4d3 100644
--- a/pd/src/g_bang.c
+++ b/pd/src/g_bang.c
@@ -433,8 +433,8 @@ static void *bng_new(t_symbol *s, int argc, t_atom *argv)
t_bng *x = (t_bng *)pd_new(bng_class);
int bflcol[]={-262144, -1, -1};
int a=IEM_GUI_DEFAULTSIZE;
- int ldx=0, ldy=-6;
- int fs=8;
+ int ldx=17, ldy=7;
+ int fs=10;
int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME,
fthold=IEM_BNG_DEFAULTHOLDFLASHTIME;
char str[144];
diff --git a/pd/src/g_canvas.c b/pd/src/g_canvas.c
index 71aa89b9..dd9dd478 100644
--- a/pd/src/g_canvas.c
+++ b/pd/src/g_canvas.c
@@ -72,7 +72,7 @@ static void glist_doupdatewindowlist(t_glist *gl, char *sbuf)
if (strlen(sbuf) + strlen(gl->gl_name->s_name) + 100 <= 1024)
{
char tbuf[1024];
- sprintf(tbuf, "{%s .x%lx} ", gl->gl_name->s_name,
+ sprintf(tbuf, "{{%s} .x%lx} ", gl->gl_name->s_name,
(t_int)canvas);
strcat(sbuf, tbuf);
}
diff --git a/pd/src/g_editor.c b/pd/src/g_editor.c
index 1bbeacbf..8b146fc1 100644
--- a/pd/src/g_editor.c
+++ b/pd/src/g_editor.c
@@ -1018,11 +1018,7 @@ static void canvas_done_popup(t_canvas *x, float which, float xpos, float ypos)
if (which == 0)
canvas_properties(x);
else if (which == 2)
- {
- strcpy(pathbuf, sys_libdir->s_name);
- strcat(pathbuf, "/doc/5.reference/0.INTRO.txt");
- sys_vgui("menu_opentext %s\n", pathbuf);
- }
+ open_via_helppath("intro.pd", canvas_getdir((t_canvas *)x)->s_name);
}
#define NOMOD 0
@@ -1480,7 +1476,7 @@ void canvas_key(t_canvas *x, t_symbol *s, int ac, t_atom *av)
keynum = (av[1].a_type == A_FLOAT ? av[1].a_w.w_float : 0);
if (keynum == '\\' || keynum == '{' || keynum == '}')
{
- post("%c: dropped", (int)keynum);
+ post("keycode %d: dropped", (int)keynum);
return;
}
#if 0
diff --git a/pd/src/g_hdial.c b/pd/src/g_hdial.c
index 5f37fbed..df595126 100644
--- a/pd/src/g_hdial.c
+++ b/pd/src/g_hdial.c
@@ -546,8 +546,8 @@ static void *hradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
t_hradio *x = (t_hradio *)pd_new(old? hradio_old_class : hradio_class);
int bflcol[]={-262144, -1, -1};
int a=IEM_GUI_DEFAULTSIZE, on=0, f=0;
- int ldx=0, ldy=-6, chg=1, num=8;
- int fs=8;
+ int ldx=0, ldy=-8, chg=1, num=8;
+ int fs=10;
int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME, fthold=IEM_BNG_DEFAULTHOLDFLASHTIME;
char str[144];
diff --git a/pd/src/g_hslider.c b/pd/src/g_hslider.c
index 624f1afe..4958639a 100644
--- a/pd/src/g_hslider.c
+++ b/pd/src/g_hslider.c
@@ -526,8 +526,8 @@ static void *hslider_new(t_symbol *s, int argc, t_atom *argv)
t_hslider *x = (t_hslider *)pd_new(hslider_class);
int bflcol[]={-262144, -1, -1};
int w=IEM_SL_DEFAULTSIZE, h=IEM_GUI_DEFAULTSIZE;
- int lilo=0, ldx=-2, ldy=-6, f=0, v=0, steady=1;
- int fs=8;
+ int lilo=0, ldx=-2, ldy=-8, f=0, v=0, steady=1;
+ int fs=10;
double min=0.0, max=(double)(IEM_SL_DEFAULTSIZE-1);
char str[144];
diff --git a/pd/src/g_numbox.c b/pd/src/g_numbox.c
index 68e1399d..04c9c1bb 100644
--- a/pd/src/g_numbox.c
+++ b/pd/src/g_numbox.c
@@ -749,7 +749,7 @@ static void *my_numbox_new(t_symbol *s, int argc, t_atom *argv)
t_my_numbox *x = (t_my_numbox *)pd_new(my_numbox_class);
int bflcol[]={-262144, -1, -1};
int w=5, h=14;
- int lilo=0, f=0, ldx=0, ldy=-6;
+ int lilo=0, f=0, ldx=0, ldy=-8;
int fs=10;
int log_height=256;
double min=-1.0e+37, max=1.0e+37,v=0.0;
diff --git a/pd/src/g_template.c b/pd/src/g_template.c
index 1624e0ed..2ee67196 100644
--- a/pd/src/g_template.c
+++ b/pd/src/g_template.c
@@ -94,7 +94,7 @@ t_template *template_new(t_symbol *templatesym, int argc, t_atom *argv)
else
{
pd_error(x, "%s: no such type", newtypesym->s_name);
- return (0);
+ goto bad;
}
newn = (oldn = x->t_n) + 1;
x->t_vec = (t_dataslot *)t_resizebytes(x->t_vec,
@@ -514,7 +514,7 @@ static void *template_usetemplate(void *dummy, t_symbol *s,
/* check if there's already a template by this name. */
if ((x = (t_template *)pd_findbyclass(templatesym, template_class)))
{
- t_template *y = template_new(&s_, argc, argv);
+ t_template *y = template_new(&s_, argc, argv), *y2;
/* If the new template is the same as the old one,
there's nothing to do. */
if (!template_match(x, y))
@@ -531,7 +531,8 @@ static void *template_usetemplate(void *dummy, t_symbol *s,
/* conform everyone to the new template */
template_conform(x, y);
pd_free(&x->t_pdobj);
- template_new(templatesym, argc, argv);
+ y2 = template_new(templatesym, argc, argv);
+ y2->t_list = 0;
}
}
pd_free(&y->t_pdobj);
@@ -656,6 +657,7 @@ static void gtemplate_free(t_gtemplate *x)
{
/* get off the template's list */
t_template *t = x->x_template;
+ t_gtemplate *y;
if (x == t->t_list)
{
canvas_redrawallfortemplate(t, 2);
@@ -663,13 +665,16 @@ static void gtemplate_free(t_gtemplate *x)
{
/* if we were first on the list, and there are others on
the list, make a new template corresponding to the new
- first-on-list and replace teh existing template with it. */
- t_template *z = template_new(&s_, x->x_argc, x->x_argv);
+ first-on-list and replace the existing template with it. */
+ t_template *z = template_new(&s_,
+ x->x_next->x_argc, x->x_next->x_argv);
template_conform(t, z);
pd_free(&t->t_pdobj);
pd_free(&z->t_pdobj);
- z = template_new(x->x_sym, x->x_argc, x->x_argv);
+ z = template_new(x->x_sym, x->x_next->x_argc, x->x_next->x_argv);
z->t_list = x->x_next;
+ for (y = z->t_list; y ; y = y->x_next)
+ y->x_template = z;
}
else t->t_list = 0;
canvas_redrawallfortemplate(t, 1);
diff --git a/pd/src/g_text.c b/pd/src/g_text.c
index 3cca6b3a..a146ae91 100644
--- a/pd/src/g_text.c
+++ b/pd/src/g_text.c
@@ -902,7 +902,7 @@ static void gatom_properties(t_gobj *z, t_glist *owner)
{
t_gatom *x = (t_gatom *)z;
char buf[200];
- sprintf(buf, "pdtk_gatom_dialog %%s %d %g %g %d %s %s %s\n",
+ sprintf(buf, "pdtk_gatom_dialog %%s %d %g %g %d {%s} {%s} {%s}\n",
x->a_text.te_width, x->a_draglo, x->a_draghi,
x->a_wherelabel, gatom_escapit(x->a_label)->s_name,
gatom_escapit(x->a_symfrom)->s_name,
diff --git a/pd/src/g_toggle.c b/pd/src/g_toggle.c
index efed91e2..e36be5fa 100644
--- a/pd/src/g_toggle.c
+++ b/pd/src/g_toggle.c
@@ -363,8 +363,8 @@ static void *toggle_new(t_symbol *s, int argc, t_atom *argv)
t_toggle *x = (t_toggle *)pd_new(toggle_class);
int bflcol[]={-262144, -1, -1};
int a=IEM_GUI_DEFAULTSIZE, f=0;
- int ldx=0, ldy=-6;
- int fs=8;
+ int ldx=17, ldy=7;
+ int fs=10;
float on=0.0, nonzero=1.0;
char str[144];
diff --git a/pd/src/g_vdial.c b/pd/src/g_vdial.c
index 81e29693..3d352b35 100644
--- a/pd/src/g_vdial.c
+++ b/pd/src/g_vdial.c
@@ -550,8 +550,8 @@ static void *vradio_donew(t_symbol *s, int argc, t_atom *argv, int old)
t_vradio *x = (t_vradio *)pd_new(old? vradio_old_class : vradio_class);
int bflcol[]={-262144, -1, -1};
int a=IEM_GUI_DEFAULTSIZE, on=0, f=0;
- int ldx=0, ldy=-6, chg=1, num=8;
- int fs=8;
+ int ldx=0, ldy=-8, chg=1, num=8;
+ int fs=10;
int ftbreak=IEM_BNG_DEFAULTBREAKFLASHTIME, fthold=IEM_BNG_DEFAULTHOLDFLASHTIME;
char str[144];
diff --git a/pd/src/g_vslider.c b/pd/src/g_vslider.c
index eba519a3..1b575dac 100644
--- a/pd/src/g_vslider.c
+++ b/pd/src/g_vslider.c
@@ -507,8 +507,8 @@ static void *vslider_new(t_symbol *s, int argc, t_atom *argv)
t_vslider *x = (t_vslider *)pd_new(vslider_class);
int bflcol[]={-262144, -1, -1};
int w=IEM_GUI_DEFAULTSIZE, h=IEM_SL_DEFAULTSIZE;
- int lilo=0, f=0, ldx=0, ldy=-8;
- int fs=8, v=0, steady=1;
+ int lilo=0, f=0, ldx=0, ldy=-9;
+ int fs=10, v=0, steady=1;
double min=0.0, max=(double)(IEM_SL_DEFAULTSIZE-1);
char str[144];
diff --git a/pd/src/m_pd.h b/pd/src/m_pd.h
index d6b6877f..f4426ada 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 "test05"
+#define PD_TEST_VERSION "test07"
/* 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/makefile.in b/pd/src/makefile.in
index 4339da57..05a1ecf8 100644
--- a/pd/src/makefile.in
+++ b/pd/src/makefile.in
@@ -141,6 +141,7 @@ externs:
cd ../extra/loop~;make @EXTERNTARGET@
cd ../extra/lrshift~;make @EXTERNTARGET@
cd ../extra/pique;make @EXTERNTARGET@
+ cd ../extra/sigmund~;make @EXTERNTARGET@
BINARYMODE=@binarymode@
diff --git a/pd/src/notes.txt b/pd/src/notes.txt
index 07067182..1b614645 100644
--- a/pd/src/notes.txt
+++ b/pd/src/notes.txt
@@ -1,30 +1,25 @@
---------------- dolist --------------------
-fix:
-look again at array vis/invis conundrum, g_template.c
-subpatches appear at top left of screen regardless
-$1-args not evaluated (z.pd)
-
test:
compile on various versions of linux
windows:
modal dialogs confuse watchdog
check the right-click-on-empty-canvas
MIDI I/O (inc. sysex)
+ "-audiodev" with no args in registry can't start up?
mac:
- text paste broken
clicking on windows seems sometimes not to open them
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?
-done:
+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)
-
-doc:
-x flag for curves
object list
document env~ second argument (and why is it no less than 1/10 of first???)
@@ -35,55 +30,52 @@ document tabwrite~_start
$-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
+TK commands to nonexistent windows? (occasionally still happens)
+still can't detect when a window is moved or resized
open_via_path call in d_soundfile.c isn't threadsafe
-Jack interface never goes idle? (Michael Berkowski, Pd list Aug 11 2006)
crashed Pd putting vec and template in wrong order in array element of struct
-z.pd - list to numbox misbehaves (inlet and object but object is noinlet)
floor, ciel functions in expr misdeclared
-graphics updates in data sometimes don't happen?
graph names don't appear until graph moved? (invis/vis on new array/rename)
-flag to defeat .pdsettings
-'{' bug
-"-audiodev" with no args in registry can't start up in MSW
-"save as" with spaces in filename still messes up
don't filter locked click() through getrect
-better scalar hit detection (getrect is too greedy)
when retyping abstractions, offer to save dirty one
should linux stop grabbing focus on vis? Is there a way to detect whether
the mouse is in a window when it opens?
-TK commands to nonexistent windows? (occasionally still happens)
arrays that don't fit in bounds don't update (same as red rectangle problem?)
look in d_resample.pd to understand inlet~ upsampling...
patcher inlets don't deal with scalars (zbug.pd)
check if there's a problem loading libs on startup if superuser
-'[' in numbox label breaks it (Yury Sept. 3)
read xx.txt in "bad" gives warnings
-qlist - 'next 1' seems not to work
Krzysztof's qlist_next reentrancy bug
don't draw in/outlets on gui objects in graph-on-parent
-reasonable font size default for GUIs
-moving a bang toward top of window creates problem (invisible label)
get rid of messages causing renaming; try to prevent patches closing themselves.
scofo reports error on reading score1.txt
loading e-mailed patches without removing headers crashes pd
-pd $1 bug ($1 is saved as it was evaluated, not as '$1')
check if _vsnprintf with zero argument in windows works any better...
detect adc~ and dac~ reblocking
features:
-sprout inlet for "route", "sel" if one arg; also send
-list length and nth functions
-poly inlet to turn stealing on/off
-.dll to .msw32 or .pd_msw (then offer .pd_msw64, .pd_lnx64, etc.)
+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
+more list functions (see x_list.c)
+poly inlet to turn stealing on/off, plus mode to handle note-with-duration
integrate video into tilde objects
graph "hide name" flag controllable from dialog
-flag to suppress scrollbars in canvases
+"installation mode" - turn off Pd window, accelerators, menu bars, scrollbars
fix copyright notices
pixel font sizes
pd to find running ones (pd -new to defeat)
-rename windowname-pd instead of pd-windowname
tables:
if there's just one array, don't do stringent hit check.
array click protection (Krzysztof's suggestion)
@@ -92,7 +84,6 @@ tables:
flag to hide array names
think of a way to embed abstractions in a patch
make watchdog work for MACOSX
-search path to include both calling patch and abstraction, if different
pasting should look at current mouse location
delete-in-rectangle message to Pds
put serial object in main dist (see rat@telecoma, Apr. 25; winfried May 22)
@@ -100,7 +91,7 @@ open/save panel to take messages to init directory, and to set extent list
flags to defeat pre-loading specified classes
expr to parse exponential notation
pipe to handle symbols&pointers (just takes floats now???)
-use snd_pcm_poll_descriptors_count, etc., to set alsa FDs CLOEXEC?
+fix "system" (google CLOEXEC alsa)
editing:
"enter" into object box to create new one (also, change border? forking?)
tab to jump to a connected object (first one?) (shift-tab to back up?)
@@ -112,7 +103,7 @@ editing:
(also, a way to make multiple connections?)
data:
-hook for table mousing
+hooks for table mousing, other changes (scalars?)
data to save as succession of "list" messages that textfile can store, etc.
implement list field (GOP or subwindow, perhaps GOP could suppress bounds rect?)
fix blue selection rectangle to update if selected datum is redrawn
@@ -120,12 +111,10 @@ data copy/paste doesn't check templates aren't changed
arrays of non-existent templates crash
vget, vset traversal objects
cursor to show (x, y) location
-typing at drawnumbers
-test and debug list elements of templates
+improve typing at drawnumbers
sublists should display on parent if desired? (new drawing instruction)
+test and debug list elements of templates
sublists seem not to handle canvas allocation right (get.pd->pointer.pd bug)
-scalar hook to catch the mouse
-protect against "plots" going away while you drag on them
append doesn't do symbols yet.
more features:
@@ -136,7 +125,6 @@ search for -mcpu=cpu-type in man gcc.
-Wno-unused to -Wno-unused-paramter and clean up unused automatic variables
security module system in 2.6 - see the kernel module replacing jackstart
signal inlets to sense signals; fix +~ etc, vcf~, biquad~, other filters
-mess with RME ALSA some more; ALSA readn doesn't work yet; use mmap?
try to reduce startup time
investigate gcc 3.3 warnings; try to reinstate -fstrict-aliasing
message dialog not to disappear
@@ -144,7 +132,6 @@ why does changing the name of an explode in jupiter patch take so long?
close-subwindows menu item
show results of opening audio and MIDI on dialogs
windows escape from control-C
-settable netsend and netreceive port numbers
new: abs~, nexttick~, extend threshold~ and snapshot~ (vthreshold~ etc)
incorporate pddp doc
try again to fix the font scene
@@ -153,25 +140,20 @@ look at prctl(2) for FP exception handling
netsend separate thread
netreceive (and netsend?) message to set port number
graph_vis() to decorate graphs when they're toplevel (parent_glist == 0)
-suita.chopin.edu.pl/~czaja/miXed/externs/xeq.html -- MIDI file reader
in glist_delete, consider why this can't be just "vis 0" -- why do we need it?
closebang
check that -blocksize really reflects in audiobuf calc for Hammerfall
makefile to have make install depend on make local.
-Float method for random
put in something for tilde order forcing
extensible "toolbar" so people can add external GUI objects
variable send and receive -- check how max/MSP does it?
number boxes to darken for typing and/or received messages
-pique~ and fiddle~ unification (notice pique filtering is different!)
new message box look
figure out what to do when "pd sym" conflicts with window title as in Pluton?
bonk~ file path handling
-unify arrays and garrays
dialog to give values of $1, ... for the canvas
bang at end of line~, tabwrite~, etc.
recording to part of a table
-printout to main window
should sys_bail kill all "threads" on the way out?
check a_valid usage
allow backslashes (or else really disallow them)
@@ -186,128 +168,3 @@ get gui to notice early EOF
rewrite t_getbytes properly
obj_new should do a longjmp on out-of-memory
---------------------- source notes --------------------------
-
-0. structure definition roadmap. First, the containment tree of things
-that can be sent messages ("pure data"). (note that t_object and t_text,
-and t_graph and t_canvas, should be unified...)
-
------------- BFFORE 0.35: ---------
-m_pd.h t_pd anything with a class
- t_gobj "graphic object"
- t_text text object
-g_canvas.h
- t_glist list of graphic objects
-g_canvas.c t_canvas Pd "document"
-
------------- AFTER 0.35: ---------
-m_pd.h t_pd anything with a class
- t_gobj "graphic object"
- t_text patchable object, AKA t_object
-g_canvas.h t_glist list of graphic objects, AKA t_canvas
-
-... and other structures:
-g_canvas.h t_selection -- linked list of gobjs
- t_editor -- editor state, allocated for visible glists
-m_imp.h t_methodentry -- method handler
- t_widgetbehavior -- class-dependent editing behavior for gobjs
- t_parentwidgetbehavior -- objects' behavior on parent window
- t_class -- method definitions, instance size, flags, etc.
-
-
-1. C coding style. The source should pass most "warnings" of C compilers
-(-Wall on linux, for instance; see the makefile.) Some informalities
-are intentional, for instance the loose use of function prototypes (see
-below) and uncast conversions from longer to shorter numerical formats.
-The code doesn't respect "const" yet.
-
-1.1. Prefixes in structure elements. The names of structure elements always
-have a K&R-style prefix, as in ((t_atom)x)->a_type, where the "a_" prefix
-indicates "atom." This is intended to enhance readability (although the
-convention arose from a limitation of early C compilers.) Common prefixes are
-"w_" (word), "a_" (atom), "s_" (symbol), "ob_" (object), "te_" (text object),
-"g_" (graphical object), and "gl_" (glist, a list of graphical objects). Also,
-global symbols sometimes get prefixes, as in "s_float" (the symbol whose string
-is "float). Typedefs are prefixed by "t_". Most _private_ structures, i.e.,
-structures whose definitions appear in a ".c" file, are prefixed by "x_".
-
-1.2. Function arguments. Many functions take as their first
-argument a pointer named "x", which is a pointer to a structure suggested
-by the function prefix; e.g., canvas_dirty(x, n) where "x" points to a canvas
-(t_canvas *x).
-
-1.3. Function Prototypes. Functions which are used in at least two different
-files (besides where they originate) are prototyped in the appropriate include
-file. Functions which are provided in one file and used in one other are
-prototyped right where they are used. This is just to keep the size of the
-".h" files down for readability's sake.
-
-1.4. Whacko private terminology. Some terms are lifted from other historically
-relevant programs, notably "ugen" (which is just a tilde object; see d_ugen.c.)
-
-1.5. Spacing. Tabs are 8 spaces; indentation is 4 spaces. Indenting
-curly brackets are by themselves on their own lines, as in:
-
- if (x)
- {
- x = 0;
- }
-
-Lines should fit within 80 spaces.
-
-2. Max patch-level compatibility. "Import" and "Export" functions are
-provided which aspire to strict compatibility with 0.26 patches (ISPW version),
-but which don't get anywhere close to that yet. Where possible, features
-appearing on the Mac will comeday also be provided; for instance, the connect
-message on the Mac offers segmented patch cords; these will devolve into
-straight lines in Pd. Many, many UI objects in Opcode Max will not appear in
-Pd, at least at first.
-
-3. Compatibility with Max 0.26 "externs", i.e., source-level compatibility. Pd
-objects follow the style of 0.26 objects as closely as possible, making
-exceptions in cases where the 0.26 model is clearly deficient. These are:
-
-3.1. Anything involving the MacIntosh "Handle" data type is changed to use
-char * or void * instead.
-
-3.2. Pd passes true single-precision floating-point arguments to methods;
-Max uses double.
-Typedefs are provided:
- t_floatarg, t_intarg for arguments passed by the message system
- t_float, t_int for the "word" union (in atoms, for example.)
-
-3.3. Badly-named entities got name changes:
-
- w_long --> w_int (in the "union word" structure)
-
-3.4. Many library functions are renamed and have different arguments;
-I hope to provide an include file to alias them when compiling Max externs.
-
-4. Function name prefixes.
-Many function names have prefixes which indicate what "package" they belong
-to. The exceptions are:
- typedmess, vmess, getfn, gensym (m_class.c)
- getbytes, freebytes, resizebytes (m_memory.c)
- post, error, bug (s_print.c)
-which are all frequently called and which don't fit into simple categories.
-Important packages are:
-(pd-gui:) pdgui -- everything
-(pd:) pd -- functions common to all "pd" objects
- obj -- fuctions common to all "patchable" objects ala Max
- sys -- "system" level functions
- binbuf -- functions manipulating binbufs
- class -- functions manipulating classes
- (other) -- functions common to the named Pd class
-
-5. Source file prefixes.
-PD:
-s system interface
-m message system
-g graphics stuff
-d DSP objects
-x control objects
-z other
-
-PD-GUI:
-t TK front end
-
diff --git a/pd/src/s_audio.c b/pd/src/s_audio.c
index 8d4683f8..086ca490 100644
--- a/pd/src/s_audio.c
+++ b/pd/src/s_audio.c
@@ -170,7 +170,8 @@ void sys_open_audio(int naudioindev, int *audioindev, int nchindev,
{
int i, *ip;
int defaultchannels = SYS_DEFAULTCH;
- int inchans, outchans;
+ int inchans, outchans, nrealindev, nrealoutdev;
+ int realindev[MAXAUDIOINDEV], realoutdev[MAXAUDIOOUTDEV];
int realinchans[MAXAUDIOINDEV], realoutchans[MAXAUDIOOUTDEV];
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
@@ -296,10 +297,22 @@ void sys_open_audio(int naudioindev, int *audioindev, int nchindev,
}
/* count total number of input and output channels */
- for (i = inchans = 0; i < naudioindev; i++)
- inchans += (realinchans[i] = (chindev[i] > 0 ? chindev[i] : 0));
- for (i = outchans = 0; i < naudiooutdev; i++)
- outchans += (realoutchans[i] = (choutdev[i] > 0 ? choutdev[i] : 0));
+ for (i = nrealindev = inchans = 0; i < naudioindev; i++)
+ if (chindev[i] > 0)
+ {
+ realinchans[nrealindev] = chindev[i];
+ realindev[nrealindev] = audioindev[i];
+ inchans += chindev[i];
+ nrealindev++;
+ }
+ for (i = nrealoutdev = outchans = 0; i < naudiooutdev; i++)
+ if (choutdev[i] > 0)
+ {
+ realoutchans[nrealoutdev] = choutdev[i];
+ realoutdev[nrealoutdev] = audiooutdev[i];
+ outchans += choutdev[i];
+ nrealoutdev++;
+ }
/* if no input or output devices seem to have been specified,
this really means just disable audio, which we now do. */
if (!inchans && !outchans)
@@ -322,23 +335,23 @@ else
#endif
#ifdef USEAPI_JACK
if (sys_audioapi == API_JACK)
- jack_open_audio((naudioindev > 0 ? realinchans[0] : 0),
- (naudiooutdev > 0 ? realoutchans[0] : 0), rate);
+ jack_open_audio((nrealindev > 0 ? realinchans[0] : 0),
+ (nrealoutdev > 0 ? realoutchans[0] : 0), rate);
else
#endif
#ifdef USEAPI_OSS
if (sys_audioapi == API_OSS)
- oss_open_audio(naudioindev, audioindev, nchindev, realinchans,
- naudiooutdev, audiooutdev, nchoutdev, realoutchans, rate);
+ oss_open_audio(nrealindev, realindev, nrealindev, realinchans,
+ nrealoutdev, realoutdev, nrealoutdev, realoutchans, rate);
else
#endif
#ifdef USEAPI_ALSA
/* for alsa, only one device is supported; it may
be open for both input and output. */
if (sys_audioapi == API_ALSA)
- alsa_open_audio(naudioindev, audioindev, nchindev, realinchans,
- naudiooutdev, audiooutdev, nchoutdev, realoutchans, rate);
+ alsa_open_audio(nrealindev, audioindev, nrealindev, realinchans,
+ nrealoutdev, audiooutdev, nrealoutdev, realoutchans, rate);
else
#endif
#ifdef USEAPI_SGI
@@ -354,8 +367,8 @@ else
#endif
#ifdef USEAPI_MMIO
if (sys_audioapi == API_MMIO)
- mmio_open_audio(naudioindev, audioindev, nchindev, realinchans,
- naudiooutdev, audiooutdev, nchoutdev, realoutchans, rate);
+ mmio_open_audio(nrealindev, audioindev, nrealindev, realinchans,
+ nrealoutdev, audiooutdev, nrealoutdev, realoutchans, rate);
else
#endif
post("unknown audio API specified");
@@ -638,29 +651,18 @@ void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
int nindevs = 0, noutdevs = 0, canmulti = 0, i;
- char indevliststring[MAXNDEV*(DEVDESCSIZE+4)+80],
- outdevliststring[MAXNDEV*(DEVDESCSIZE+4)+80];
-
audio_getdevs(indevlist, &nindevs, outdevlist, &noutdevs, &canmulti,
MAXNDEV, DEVDESCSIZE);
- strcpy(indevliststring, "{");
+ sys_gui("set audio_indevlist {}\n");
for (i = 0; i < nindevs; i++)
- {
- strcat(indevliststring, "\"");
- strcat(indevliststring, indevlist + i * DEVDESCSIZE);
- strcat(indevliststring, "\" ");
- }
- strcat(indevliststring, "}");
+ sys_vgui("lappend audio_indevlist \"%s\"\n",
+ indevlist + i * DEVDESCSIZE);
- strcpy(outdevliststring, "{");
+ sys_gui("set audio_outdevlist {}\n");
for (i = 0; i < noutdevs; i++)
- {
- strcat(outdevliststring, "\"");
- strcat(outdevliststring, outdevlist + i * DEVDESCSIZE);
- strcat(outdevliststring, "\" ");
- }
- strcat(outdevliststring, "}");
+ sys_vgui("lappend audio_outdevlist \"%s\"\n",
+ outdevlist + i * DEVDESCSIZE);
sys_get_audio_params(&naudioindev, audioindev, chindev,
&naudiooutdev, audiooutdev, choutdev, &rate, &advance);
@@ -670,7 +672,6 @@ void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
if (naudioindev > 1 || naudiooutdev > 1)
flongform = 1;
-
audioindev1 = (naudioindev > 0 && audioindev[0]>= 0 ? audioindev[0] : 0);
audioindev2 = (naudioindev > 1 && audioindev[1]>= 0 ? audioindev[1] : 0);
audioindev3 = (naudioindev > 2 && audioindev[2]>= 0 ? audioindev[2] : 0);
@@ -689,13 +690,11 @@ void glob_audio_properties(t_pd *dummy, t_floatarg flongform)
audiooutchan4 = (naudiooutdev > 3 ? choutdev[3] : 0);
sprintf(buf,
"pdtk_audio_dialog %%s \
-%s %d %d %d %d %d %d %d %d \
-%s %d %d %d %d %d %d %d %d \
+%d %d %d %d %d %d %d %d \
+%d %d %d %d %d %d %d %d \
%d %d %d %d\n",
- indevliststring,
audioindev1, audioindev2, audioindev3, audioindev4,
audioinchan1, audioinchan2, audioinchan3, audioinchan4,
- outdevliststring,
audiooutdev1, audiooutdev2, audiooutdev3, audiooutdev4,
audiooutchan1, audiooutchan2, audiooutchan3, audiooutchan4,
rate, advance, canmulti, (flongform != 0));
diff --git a/pd/src/s_audio_alsa.c b/pd/src/s_audio_alsa.c
index eb9bdc10..83530de9 100644
--- a/pd/src/s_audio_alsa.c
+++ b/pd/src/s_audio_alsa.c
@@ -37,6 +37,8 @@
static void alsa_checkiosync( void);
static void alsa_numbertoname(int iodev, char *devname, int nchar);
+static int alsa_jittermax;
+#define ALSA_DEFJITTERMAX 3
/* don't assume we can turn all 31 bits when doing float-to-fix;
otherwise some audio drivers (e.g. Midiman/ALSA) wrap around. */
@@ -240,6 +242,7 @@ int alsa_open_audio(int naudioindev, int *audioindev, int nchindev,
/* save our belief as to ALSA's buffer size for later */
alsa_buf_samps = nfrags * frag_size;
alsa_nindev = alsa_noutdev = 0;
+ alsa_jittermax = ALSA_DEFJITTERMAX;
if (sys_verbose)
post("audio buffer set to %d", (int)(0.001 * sys_schedadvance));
@@ -655,6 +658,7 @@ static void alsa_checkiosync( void)
if (giveup-- <= 0)
{
post("tried but couldn't sync A/D/A");
+ alsa_jittermax += 1;
return;
}
minphase = 0x7fffffff;
@@ -712,7 +716,7 @@ static void alsa_checkiosync( void)
equal; but since we only make corrections DEFDACBLKSIZE samples
at a time, we just ask that the spread be not more than 3/4
of a block. */
- if (maxphase <= minphase + (3 * DEFDACBLKSIZE / 4))
+ if (maxphase <= minphase + (alsa_jittermax * (DEFDACBLKSIZE / 4)))
break;
if (!alreadylogged)
diff --git a/pd/src/s_loader.c b/pd/src/s_loader.c
index 159be4bf..b72d799b 100644
--- a/pd/src/s_loader.c
+++ b/pd/src/s_loader.c
@@ -42,7 +42,7 @@ static char sys_dllextent[] = ".l_i386", sys_dllextent2[] = ".pd_linux";
#endif
#endif
#ifdef MACOSX
-#ifdef __i386__
+#ifndef MACOSX3
static char sys_dllextent[] = ".d_fat", sys_dllextent2[] = ".pd_darwin";
#else
static char sys_dllextent[] = ".d_ppc", sys_dllextent2[] = ".pd_darwin";
diff --git a/pd/src/s_main.c b/pd/src/s_main.c
index 50fde079..8c745dc4 100644
--- a/pd/src/s_main.c
+++ b/pd/src/s_main.c
@@ -256,6 +256,7 @@ static void pd_makeversion(void)
/* this is called from main() in s_entry.c */
int sys_main(int argc, char **argv)
{
+ int i, noprefs;
sys_externalschedlib = 0;
sys_extraflags = 0;
#ifdef PD_DEBUG
@@ -263,7 +264,11 @@ int sys_main(int argc, char **argv)
#endif
pd_init(); /* start the message system */
sys_findprogdir(argv[0]); /* set sys_progname, guipath */
- sys_loadpreferences(); /* load default settings */
+ for (i = noprefs = 0; i < argc; i++) /* prescan args for noprefs */
+ if (!strcmp(argv[i], "-noprefs"))
+ noprefs = 1;
+ if (!noprefs)
+ sys_loadpreferences(); /* load default settings */
#ifndef MSW
sys_rcfile(); /* parse the startup file */
#endif
@@ -387,6 +392,7 @@ static char *(usagemessage[]) = {
"-guiport <n> -- connect to pre-existing GUI over port <n>\n",
"-guicmd \"cmd...\" -- start alternatve GUI program (e.g., remote via ssh)\n",
"-send \"msg...\" -- send a message at startup, after patches are loaded\n",
+"-noprefs -- suppress loading preferences on startup\n",
#ifdef UNISTD
"-rt or -realtime -- use real-time priority\n",
"-nrt -- don't use real-time priority\n",
@@ -852,6 +858,8 @@ int sys_argparse(int argc, char **argv)
goto usage;
argc -= 2; argv += 2;
}
+ else if (!strcmp(*argv, "-noprefs")) /* did this earlier */
+ ;
else
{
unsigned int i;
diff --git a/pd/src/s_midi.c b/pd/src/s_midi.c
index 77943121..936fb282 100644
--- a/pd/src/s_midi.c
+++ b/pd/src/s_midi.c
@@ -650,29 +650,18 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
char indevlist[MAXNDEV*DEVDESCSIZE], outdevlist[MAXNDEV*DEVDESCSIZE];
int nindevs = 0, noutdevs = 0, i;
- char indevliststring[MAXNDEV*(DEVDESCSIZE+4)+80],
- outdevliststring[MAXNDEV*(DEVDESCSIZE+4)+80];
-
midi_getdevs(indevlist, &nindevs, outdevlist, &noutdevs,
MAXNDEV, DEVDESCSIZE);
- strcpy(indevliststring, "{ {none} ");
+ sys_gui("set midi_indevlist {none}\n");
for (i = 0; i < nindevs; i++)
- {
- strcat(indevliststring, "\"");
- strcat(indevliststring, indevlist + i * DEVDESCSIZE);
- strcat(indevliststring, "\" ");
- }
- strcat(indevliststring, "}");
+ sys_vgui("lappend midi_indevlist \"%s\"\n",
+ indevlist + i * DEVDESCSIZE);
- strcpy(outdevliststring, "{ {none} ");
+ sys_gui("set midi_outdevlist {none}\n");
for (i = 0; i < noutdevs; i++)
- {
- strcat(outdevliststring, "\"");
- strcat(outdevliststring, outdevlist + i * DEVDESCSIZE);
- strcat(outdevliststring, "\" ");
- }
- strcat(outdevliststring, "}");
+ sys_vgui("lappend midi_outdevlist \"%s\"\n",
+ outdevlist + i * DEVDESCSIZE);
sys_get_midi_params(&nindev, midiindev, &noutdev, midioutdev);
@@ -692,22 +681,18 @@ void glob_midi_properties(t_pd *dummy, t_floatarg flongform)
if (sys_midiapi == API_ALSA)
sprintf(buf,
"pdtk_alsa_midi_dialog %%s \
-%s %d %d %d %d %s %d %d %d %d \
+%d %d %d %d %d %d %d %d \
%d 1\n",
- indevliststring,
midiindev1, midiindev2, midiindev3, midiindev4,
- outdevliststring,
midioutdev1, midioutdev2, midioutdev3, midioutdev4,
(flongform != 0));
else
#endif
sprintf(buf,
"pdtk_midi_dialog %%s \
-%s %d %d %d %d %s %d %d %d %d \
+%d %d %d %d %d %d %d %d \
%d\n",
- indevliststring,
midiindev1, midiindev2, midiindev3, midiindev4,
- outdevliststring,
midioutdev1, midioutdev2, midioutdev3, midioutdev4,
(flongform != 0));
diff --git a/pd/src/s_path.c b/pd/src/s_path.c
index 6d4d33bf..07520bcf 100644
--- a/pd/src/s_path.c
+++ b/pd/src/s_path.c
@@ -342,7 +342,7 @@ void open_via_helppath(const char *name, const char *dir)
return;
gotone:
close (fd);
- glob_evalfile(0, gensym((char*)realname), gensym(dirbuf));
+ glob_evalfile(0, gensym((char*)basename), gensym(dirbuf));
}
diff --git a/pd/src/u_main.tk b/pd/src/u_main.tk
index 2dacec81..e8a57f10 100644
--- a/pd/src/u_main.tk
+++ b/pd/src/u_main.tk
@@ -226,8 +226,11 @@ proc pdtk_enquote {x} {
}
#enquote a string to send it to Pd. Blow off semi and comma; alias spaces
+#we also blow off "{", "}", "\" because they'll just cause bad trouble later.
proc pdtk_unspace {x} {
- string map {" " "_" ";" "" "," ""} $x
+ set y [string map {" " "_" ";" "" "," "" "{" "" "}" "" "\\" ""} $x]
+ if {$y == ""} {set y "empty"}
+ concat $y
}
#enquote a string for preferences (command strings etc.)
@@ -860,7 +863,7 @@ proc pdtk_canvas_new {name width height geometry editable} {
set geometry [join $geometry +]
}
wm geometry $name $geometry
- canvas $name.c -width $width -height $height -background white \
+ canvas $name.c -width $width -height $height -background white \
-yscrollcommand "$name.scrollvert set" \
-xscrollcommand "$name.scrollhort set" \
-scrollregion [concat 0 0 $width $height]
@@ -1436,16 +1439,20 @@ proc canvastosym {name} {
set pdtk_lastcanvasconfigured ""
set pdtk_lastcanvasconfiguration ""
+set pdtk_lastcanvasconfiguration2 ""
proc pdtk_canvas_checkgeometry {topname} {
set boo [winfo geometry $topname.c]
set boo2 [wm geometry $topname]
global pdtk_lastcanvasconfigured
global pdtk_lastcanvasconfiguration
+ global pdtk_lastcanvasconfiguration2
if {$topname != $pdtk_lastcanvasconfigured || \
- $boo != $pdtk_lastcanvasconfiguration} {
+ $boo != $pdtk_lastcanvasconfiguration || \
+ $boo2 != $pdtk_lastcanvasconfiguration2} {
set pdtk_lastcanvasconfigured $topname
set pdtk_lastcanvasconfiguration $boo
+ set pdtk_lastcanvasconfiguration2 $boo2
pd $topname relocate $boo $boo2 \;
}
}
@@ -3516,9 +3523,9 @@ proc audio_popup {name buttonname varname devlist} {
# opening several devices; if not, we get an extra button to turn longform
# on and restart the dialog.
-proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \
+proc pdtk_audio_dialog {id indev1 indev2 indev3 indev4 \
inchan1 inchan2 inchan3 inchan4 \
- outdevlist outdev1 outdev2 outdev3 outdev4 \
+ outdev1 outdev2 outdev3 outdev4 \
outchan1 outchan2 outchan3 outchan4 sr advance multi longform} {
global audio_indev1 audio_indev2 audio_indev3 audio_indev4
global audio_inchan1 audio_inchan2 audio_inchan3 audio_inchan4
@@ -3528,6 +3535,7 @@ proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \
global audio_outenable1 audio_outenable2 audio_outenable3 audio_outenable4
global audio_sr audio_advance
global audio_indevlist audio_outdevlist
+ global pd_indev pd_outdev
set audio_indev1 $indev1
set audio_indev2 $indev2
@@ -3559,8 +3567,6 @@ proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \
set audio_sr $sr
set audio_advance $advance
- set audio_indevlist $indevlist
- set audio_outdevlist $outdevlist
toplevel $id
wm title $id {audio}
@@ -3594,49 +3600,52 @@ proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \
checkbutton $id.in1f.x0 -variable audio_inenable1 \
-text {input device 1} -anchor e
- button $id.in1f.x1 -text [lindex $indevlist $audio_indev1] \
- -command [list audio_popup $id $id.in1f.x1 audio_indev1 $indevlist]
+ button $id.in1f.x1 -text [lindex $audio_indevlist $audio_indev1] \
+ -command [list audio_popup $id $id.in1f.x1 audio_indev1 $audio_indevlist]
label $id.in1f.l2 -text "channels:"
entry $id.in1f.x2 -textvariable audio_inchan1 -width 3
pack $id.in1f.x0 $id.in1f.x1 $id.in1f.l2 $id.in1f.x2 -side left
# input device 2
- if {$longform && $multi > 1 && [llength $indevlist] > 1} {
+ if {$longform && $multi > 1 && [llength $audio_indevlist] > 1} {
frame $id.in2f
pack $id.in2f -side top
checkbutton $id.in2f.x0 -variable audio_inenable2 \
-text {input device 2} -anchor e
- button $id.in2f.x1 -text [lindex $indevlist $audio_indev2] \
- -command [list audio_popup $id $id.in2f.x1 audio_indev2 $indevlist]
+ button $id.in2f.x1 -text [lindex $audio_indevlist $audio_indev2] \
+ -command [list audio_popup $id $id.in2f.x1 audio_indev2 \
+ $audio_indevlist]
label $id.in2f.l2 -text "channels:"
entry $id.in2f.x2 -textvariable audio_inchan2 -width 3
pack $id.in2f.x0 $id.in2f.x1 $id.in2f.l2 $id.in2f.x2 -side left
}
# input device 3
- if {$longform && $multi > 1 && [llength $indevlist] > 2} {
+ if {$longform && $multi > 1 && [llength $audio_indevlist] > 2} {
frame $id.in3f
pack $id.in3f -side top
checkbutton $id.in3f.x0 -variable audio_inenable3 \
-text {input device 3} -anchor e
- button $id.in3f.x1 -text [lindex $indevlist $audio_indev3] \
- -command [list audio_popup $id $id.in3f.x1 audio_indev3 $indevlist]
+ button $id.in3f.x1 -text [lindex $audio_indevlist $audio_indev3] \
+ -command [list audio_popup $id $id.in3f.x1 audio_indev3 \
+ $audio_indevlist]
label $id.in3f.l2 -text "channels:"
entry $id.in3f.x2 -textvariable audio_inchan3 -width 3
pack $id.in3f.x0 $id.in3f.x1 $id.in3f.l2 $id.in3f.x2 -side left
}
# input device 4
- if {$longform && $multi > 1 && [llength $indevlist] > 3} {
+ if {$longform && $multi > 1 && [llength $audio_indevlist] > 3} {
frame $id.in4f
pack $id.in4f -side top
checkbutton $id.in4f.x0 -variable audio_inenable4 \
-text {input device 4} -anchor e
- button $id.in4f.x1 -text [lindex $indevlist $audio_indev4] \
- -command [list audio_popup $id $id.in4f.x1 audio_indev4 $indevlist]
+ button $id.in4f.x1 -text [lindex $audio_indevlist $audio_indev4] \
+ -command [list audio_popup $id $id.in4f.x1 audio_indev4 \
+ $audio_indevlist]
label $id.in4f.l2 -text "channels:"
entry $id.in4f.x2 -textvariable audio_inchan4 -width 3
pack $id.in4f.x0 $id.in4f.x1 $id.in4f.l2 $id.in4f.x2 -side left
@@ -3646,15 +3655,15 @@ proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \
frame $id.out1f
pack $id.out1f -side top
- checkbutton $id.out1f.x0 -variable audio_outenable1 -text {output device 1} \
- -anchor e
+ checkbutton $id.out1f.x0 -variable audio_outenable1 \
+ -text {output device 1} -anchor e
if {$multi == 0} {
label $id.out1f.l1 \
-text "(same as input device) .............. "
} else {
- button $id.out1f.x1 -text [lindex $outdevlist $audio_outdev1] \
- -command \
- [list audio_popup $id $id.out1f.x1 audio_outdev1 $outdevlist]
+ button $id.out1f.x1 -text [lindex $audio_outdevlist $audio_outdev1] \
+ -command [list audio_popup $id $id.out1f.x1 audio_outdev1 \
+ $audio_outdevlist]
}
label $id.out1f.l2 -text "channels:"
entry $id.out1f.x2 -textvariable audio_outchan1 -width 3
@@ -3665,45 +3674,45 @@ proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \
}
# output device 2
- if {$longform && $multi > 1 && [llength $indevlist] > 1} {
+ if {$longform && $multi > 1 && [llength $audio_outdevlist] > 1} {
frame $id.out2f
pack $id.out2f -side top
checkbutton $id.out2f.x0 -variable audio_outenable2 \
-text {output device 2} -anchor e
- button $id.out2f.x1 -text [lindex $outdevlist $audio_outdev2] \
+ button $id.out2f.x1 -text [lindex $audio_outdevlist $audio_outdev2] \
-command \
- [list audio_popup $id $id.out2f.x1 audio_outdev2 $outdevlist]
+ [list audio_popup $id $id.out2f.x1 audio_outdev2 $audio_outdevlist]
label $id.out2f.l2 -text "channels:"
entry $id.out2f.x2 -textvariable audio_outchan2 -width 3
pack $id.out2f.x0 $id.out2f.x1 $id.out2f.l2 $id.out2f.x2 -side left
}
# output device 3
- if {$longform && $multi > 1 && [llength $indevlist] > 2} {
+ if {$longform && $multi > 1 && [llength $audio_outdevlist] > 2} {
frame $id.out3f
pack $id.out3f -side top
checkbutton $id.out3f.x0 -variable audio_outenable3 \
-text {output device 3} -anchor e
- button $id.out3f.x1 -text [lindex $outdevlist $audio_outdev3] \
+ button $id.out3f.x1 -text [lindex $audio_outdevlist $audio_outdev3] \
-command \
- [list audio_popup $id $id.out3f.x1 audio_outdev3 $outdevlist]
+ [list audio_popup $id $id.out3f.x1 audio_outdev3 $audio_outdevlist]
label $id.out3f.l2 -text "channels:"
entry $id.out3f.x2 -textvariable audio_outchan3 -width 3
pack $id.out3f.x0 $id.out3f.x1 $id.out3f.l2 $id.out3f.x2 -side left
}
# output device 4
- if {$longform && $multi > 1 && [llength $indevlist] > 3} {
+ if {$longform && $multi > 1 && [llength $audio_outdevlist] > 3} {
frame $id.out4f
pack $id.out4f -side top
checkbutton $id.out4f.x0 -variable audio_outenable4 \
-text {output device 4} -anchor e
- button $id.out4f.x1 -text [lindex $outdevlist $audio_outdev4] \
+ button $id.out4f.x1 -text [lindex $audio_outdevlist $audio_outdev4] \
-command \
- [list audio_popup $id $id.out4f.x1 audio_outdev4 $outdevlist]
+ [list audio_popup $id $id.out4f.x1 audio_outdev4 $audio_outdevlist]
label $id.out4f.l2 -text "channels:"
entry $id.out4f.x2 -textvariable audio_outchan4 -width 3
pack $id.out4f.x0 $id.out4f.x1 $id.out4f.l2 $id.out4f.x2 -side left
@@ -3736,7 +3745,8 @@ proc pdtk_audio_dialog {id indevlist indev1 indev2 indev3 indev4 \
proc midi_apply {id} {
global midi_indev1 midi_indev2 midi_indev3 midi_indev4
- global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4 midi_alsain midi_alsaout
+ global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4
+ global midi_alsain midi_alsaout
pd [concat pd midi-dialog \
$midi_indev1 \
@@ -3785,8 +3795,8 @@ proc midi_popup {name buttonname varname devlist} {
# start a dialog window to select midi devices. "longform" asks us to make
# controls for opening several devices; if not, we get an extra button to
# turn longform on and restart the dialog.
-proc pdtk_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
- outdevlist outdev1 outdev2 outdev3 outdev4 longform} {
+proc pdtk_midi_dialog {id indev1 indev2 indev3 indev4 \
+ outdev1 outdev2 outdev3 outdev4 longform} {
global midi_indev1 midi_indev2 midi_indev3 midi_indev4
global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4
global midi_indevlist midi_outdevlist
@@ -3800,10 +3810,8 @@ proc pdtk_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
set midi_outdev2 $outdev2
set midi_outdev3 $outdev3
set midi_outdev4 $outdev4
- set midi_indevlist $indevlist
- set midi_outdevlist $outdevlist
- set midi_alsain [llength $indevlist]
- set midi_alsaout [llength $outdevlist]
+ set midi_alsain [llength $midi_indevlist]
+ set midi_alsaout [llength $midi_outdevlist]
toplevel $id
wm title $id {midi}
@@ -3826,40 +3834,43 @@ proc pdtk_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
pack $id.in1f -side top
label $id.in1f.l1 -text "input device 1:"
- button $id.in1f.x1 -text [lindex $indevlist $midi_indev1] \
- -command [list midi_popup $id $id.in1f.x1 midi_indev1 $indevlist]
+ button $id.in1f.x1 -text [lindex $midi_indevlist $midi_indev1] \
+ -command [list midi_popup $id $id.in1f.x1 midi_indev1 $midi_indevlist]
pack $id.in1f.l1 $id.in1f.x1 -side left
# input device 2
- if {$longform && [llength $indevlist] > 2} {
+ if {$longform && [llength $midi_indevlist] > 2} {
frame $id.in2f
pack $id.in2f -side top
label $id.in2f.l1 -text "input device 2:"
- button $id.in2f.x1 -text [lindex $indevlist $midi_indev2] \
- -command [list midi_popup $id $id.in2f.x1 midi_indev2 $indevlist]
+ button $id.in2f.x1 -text [lindex $midi_indevlist $midi_indev2] \
+ -command [list midi_popup $id $id.in2f.x1 midi_indev2 \
+ $midi_indevlist]
pack $id.in2f.l1 $id.in2f.x1 -side left
}
# input device 3
- if {$longform && [llength $indevlist] > 3} {
+ if {$longform && [llength $midi_indevlist] > 3} {
frame $id.in3f
pack $id.in3f -side top
label $id.in3f.l1 -text "input device 3:"
- button $id.in3f.x1 -text [lindex $indevlist $midi_indev3] \
- -command [list midi_popup $id $id.in3f.x1 midi_indev3 $indevlist]
+ button $id.in3f.x1 -text [lindex $midi_indevlist $midi_indev3] \
+ -command [list midi_popup $id $id.in3f.x1 midi_indev3 \
+ $midi_indevlist]
pack $id.in3f.l1 $id.in3f.x1 -side left
}
# input device 4
- if {$longform && [llength $indevlist] > 4} {
+ if {$longform && [llength $midi_indevlist] > 4} {
frame $id.in4f
pack $id.in4f -side top
label $id.in4f.l1 -text "input device 4:"
- button $id.in4f.x1 -text [lindex $indevlist $midi_indev4] \
- -command [list midi_popup $id $id.in4f.x1 midi_indev4 $indevlist]
+ button $id.in4f.x1 -text [lindex $midi_indevlist $midi_indev4] \
+ -command [list midi_popup $id $id.in4f.x1 midi_indev4 \
+ $midi_indevlist]
pack $id.in4f.l1 $id.in4f.x1 -side left
}
@@ -3868,40 +3879,41 @@ proc pdtk_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
frame $id.out1f
pack $id.out1f -side top
label $id.out1f.l1 -text "output device 1:"
- button $id.out1f.x1 -text [lindex $outdevlist $midi_outdev1] \
- -command [list midi_popup $id $id.out1f.x1 midi_outdev1 $outdevlist]
+ button $id.out1f.x1 -text [lindex $midi_outdevlist $midi_outdev1] \
+ -command [list midi_popup $id $id.out1f.x1 midi_outdev1 \
+ $midi_outdevlist]
pack $id.out1f.l1 $id.out1f.x1 -side left
# output device 2
- if {$longform && [llength $indevlist] > 2} {
+ if {$longform && [llength $midi_outdevlist] > 2} {
frame $id.out2f
pack $id.out2f -side top
label $id.out2f.l1 -text "output device 2:"
- button $id.out2f.x1 -text [lindex $outdevlist $midi_outdev2] \
+ button $id.out2f.x1 -text [lindex $midi_outdevlist $midi_outdev2] \
-command \
- [list midi_popup $id $id.out2f.x1 midi_outdev2 $outdevlist]
+ [list midi_popup $id $id.out2f.x1 midi_outdev2 $midi_outdevlist]
pack $id.out2f.l1 $id.out2f.x1 -side left
}
# output device 3
- if {$longform && [llength $indevlist] > 3} {
+ if {$longform && [llength $midi_midi_outdevlist] > 3} {
frame $id.out3f
pack $id.out3f -side top
label $id.out3f.l1 -text "output device 3:"
- button $id.out3f.x1 -text [lindex $outdevlist $midi_outdev3] \
+ button $id.out3f.x1 -text [lindex $midi_outdevlist $midi_outdev3] \
-command \
- [list midi_popup $id $id.out3f.x1 midi_outdev3 $outdevlist]
+ [list midi_popup $id $id.out3f.x1 midi_outdev3 $midi_outdevlist]
pack $id.out3f.l1 $id.out3f.x1 -side left
}
# output device 4
- if {$longform && [llength $indevlist] > 4} {
+ if {$longform && [llength $midi_midi_outdevlist] > 4} {
frame $id.out4f
pack $id.out4f -side top
label $id.out4f.l1 -text "output device 4:"
- button $id.out4f.x1 -text [lindex $outdevlist $midi_outdev4] \
+ button $id.out4f.x1 -text [lindex $midi_outdevlist $midi_outdev4] \
-command \
- [list midi_popup $id $id.out4f.x1 midi_outdev4 $outdevlist]
+ [list midi_popup $id $id.out4f.x1 midi_outdev4 $midi_outdevlist]
pack $id.out4f.l1 $id.out4f.x1 -side left
}
@@ -3917,8 +3929,8 @@ proc pdtk_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
}
}
-proc pdtk_alsa_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
- outdevlist outdev1 outdev2 outdev3 outdev4 longform alsa} {
+proc pdtk_alsa_midi_dialog {id indev1 indev2 indev3 indev4 \
+ outdev1 outdev2 outdev3 outdev4 longform alsa} {
global midi_indev1 midi_indev2 midi_indev3 midi_indev4
global midi_outdev1 midi_outdev2 midi_outdev3 midi_outdev4
global midi_indevlist midi_outdevlist
@@ -3932,10 +3944,8 @@ proc pdtk_alsa_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
set midi_outdev2 $outdev2
set midi_outdev3 $outdev3
set midi_outdev4 $outdev4
- set midi_indevlist $indevlist
- set midi_outdevlist $outdevlist
- set midi_alsain [llength $indevlist]
- set midi_alsaout [llength $outdevlist]
+ set midi_alsain [llength $midi_indevlist]
+ set midi_alsaout [llength $midi_outdevlist]
toplevel $id
wm title $id {midi}
@@ -3959,40 +3969,43 @@ proc pdtk_alsa_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
if {$alsa == 0} {
# input device 1
label $id.in1f.l1 -text "input device 1:"
- button $id.in1f.x1 -text [lindex $indevlist $midi_indev1] \
- -command [list midi_popup $id $id.in1f.x1 midi_indev1 $indevlist]
+ button $id.in1f.x1 -text [lindex $midi_indevlist $midi_indev1] \
+ -command [list midi_popup $id $id.in1f.x1 midi_indev1 $midi_indevlist]
pack $id.in1f.l1 $id.in1f.x1 -side left
# input device 2
- if {$longform && [llength $indevlist] > 2} {
+ if {$longform && [llength $midi_indevlist] > 2} {
frame $id.in2f
pack $id.in2f -side top
label $id.in2f.l1 -text "input device 2:"
- button $id.in2f.x1 -text [lindex $indevlist $midi_indev2] \
- -command [list midi_popup $id $id.in2f.x1 midi_indev2 $indevlist]
+ button $id.in2f.x1 -text [lindex $midi_indevlist $midi_indev2] \
+ -command [list midi_popup $id $id.in2f.x1 midi_indev2 \
+ $midi_indevlist]
pack $id.in2f.l1 $id.in2f.x1 -side left
}
# input device 3
- if {$longform && [llength $indevlist] > 3} {
+ if {$longform && [llength $midi_indevlist] > 3} {
frame $id.in3f
pack $id.in3f -side top
label $id.in3f.l1 -text "input device 3:"
- button $id.in3f.x1 -text [lindex $indevlist $midi_indev3] \
- -command [list midi_popup $id $id.in3f.x1 midi_indev3 $indevlist]
+ button $id.in3f.x1 -text [lindex $midi_indevlist $midi_indev3] \
+ -command [list midi_popup $id $id.in3f.x1 midi_indev3 \
+ $midi_indevlist]
pack $id.in3f.l1 $id.in3f.x1 -side left
}
# input device 4
- if {$longform && [llength $indevlist] > 4} {
+ if {$longform && [llength $midi_indevlist] > 4} {
frame $id.in4f
pack $id.in4f -side top
label $id.in4f.l1 -text "input device 4:"
- button $id.in4f.x1 -text [lindex $indevlist $midi_indev4] \
- -command [list midi_popup $id $id.in4f.x1 midi_indev4 $indevlist]
+ button $id.in4f.x1 -text [lindex $midi_indevlist $midi_indev4] \
+ -command [list midi_popup $id $id.in4f.x1 midi_indev4 \
+ $midi_indevlist]
pack $id.in4f.l1 $id.in4f.x1 -side left
}
@@ -4001,40 +4014,41 @@ proc pdtk_alsa_midi_dialog {id indevlist indev1 indev2 indev3 indev4 \
frame $id.out1f
pack $id.out1f -side top
label $id.out1f.l1 -text "output device 1:"
- button $id.out1f.x1 -text [lindex $outdevlist $midi_outdev1] \
- -command [list midi_popup $id $id.out1f.x1 midi_outdev1 $outdevlist]
+ button $id.out1f.x1 -text [lindex $midi_outdevlist $midi_outdev1] \
+ -command [list midi_popup $id $id.out1f.x1 midi_outdev1 \
+ $midi_outdevlist]
pack $id.out1f.l1 $id.out1f.x1 -side left
# output device 2
- if {$longform && [llength $indevlist] > 2} {
+ if {$longform && [llength $midi_outdevlist] > 2} {
frame $id.out2f
pack $id.out2f -side top
label $id.out2f.l1 -text "output device 2:"
- button $id.out2f.x1 -text [lindex $outdevlist $midi_outdev2] \
+ button $id.out2f.x1 -text [lindex $midi_outdevlist $midi_outdev2] \
-command \
- [list midi_popup $id $id.out2f.x1 midi_outdev2 $outdevlist]
+ [list midi_popup $id $id.out2f.x1 midi_outdev2 $midi_outdevlist]
pack $id.out2f.l1 $id.out2f.x1 -side left
}
# output device 3
- if {$longform && [llength $indevlist] > 3} {
+ if {$longform && [llength $midi_outdevlist] > 3} {
frame $id.out3f
pack $id.out3f -side top
label $id.out3f.l1 -text "output device 3:"
- button $id.out3f.x1 -text [lindex $outdevlist $midi_outdev3] \
+ button $id.out3f.x1 -text [lindex $midi_outdevlist $midi_outdev3] \
-command \
- [list midi_popup $id $id.out3f.x1 midi_outdev3 $outdevlist]
+ [list midi_popup $id $id.out3f.x1 midi_outdev3 $midi_outdevlist]
pack $id.out3f.l1 $id.out3f.x1 -side left
}
# output device 4
- if {$longform && [llength $indevlist] > 4} {
+ if {$longform && [llength $midi_outdevlist] > 4} {
frame $id.out4f
pack $id.out4f -side top
label $id.out4f.l1 -text "output device 4:"
- button $id.out4f.x1 -text [lindex $outdevlist $midi_outdev4] \
+ button $id.out4f.x1 -text [lindex $midi_outdevlist $midi_outdev4] \
-command \
- [list midi_popup $id $id.out4f.x1 midi_outdev4 $outdevlist]
+ [list midi_popup $id $id.out4f.x1 midi_outdev4 $midi_outdevlist]
pack $id.out4f.l1 $id.out4f.x1 -side left
}
diff --git a/pd/src/x_midi.c b/pd/src/x_midi.c
index ad1429a8..b985041d 100644
--- a/pd/src/x_midi.c
+++ b/pd/src/x_midi.c
@@ -648,7 +648,7 @@ void inmidi_realtimein(int portno, int SysMsg)
t_atom at[2];
SETFLOAT(at, portno);
SETFLOAT(at+1, SysMsg);
- pd_list(midirealtimein_sym->s_thing, &s_list, 1, at);
+ pd_list(midirealtimein_sym->s_thing, &s_list, 2, at);
}
}