Capture momentary value from line object
@oid said:
@Moothart In this case it does not matter if it is the left or the right inlet and it would work the same. The general convention when something is patched as I did is that the connection does not cross inlets/outlets and is connected to the first it comes to since anything else would be ambiguous. Vast majority of those who patch like this, follow this convention.
Going to the right inlet it loads 0 into the float, than the [until] is banged sending [get 0 1( to [list store], the [until] then bangs until the [list store] gets an out of bounds get which sends a bang out of its right outlet to the left inlet of [until] which stops the [until]. Going to the left inlet the [f ] immediately outputs a zero which sends the [get 0 1( message to [list store], adds 1 to it and sends 1 to the right inlet of [f ], the [until] then starts and sends 1 out giving us [get 1 1(. Only difference between the two is that the [until] will bang one time less if you send [0( to the left inlet than it would if you send it to the right.
Good hint! THX
Is there a chance to see the change of the value in the moment, when the line passes a number of the [2 5 6 7 10]? I hope I get it right here in rebuilding the latest patch.
Maybe there is a chance to build in a number box representing the actual number for so long, until the next number from [line] is passed, being represented in that number box then. The result would be showing adjacent numbers from 2 5 6 7 10, each occuring for a specific amount of time depending on the line object passing that numbers one after another...
Capture momentary value from line object
@Moothart In this case it does not matter if it is the left or the right inlet and it would work the same. The general convention when something is patched as I did is that the connection does not cross inlets/outlets and is connected to the first it comes to since anything else would be ambiguous. Vast majority of those who patch like this, follow this convention.
Going to the right inlet it loads 0 into the float, than the [until] is banged sending [get 0 1( to [list store], the [until] then bangs until the [list store] gets an out of bounds get which sends a bang out of its right outlet to the left inlet of [until] which stops the [until]. Going to the left inlet the [f ] immediately outputs a zero which sends the [get 0 1( message to [list store], adds 1 to it and sends 1 to the right inlet of [f ], the [until] then starts and sends 1 out giving us [get 1 1(. Only difference between the two is that the [until] will bang one time less if you send [0( to the left inlet than it would if you send it to the right.
finding a bug in a patch causing PD crash via text edit?
Hi again,
a new problem...
While, after having worked with 2 video monitors, I was trying to correct the windows subpatch positions via text, putting the canvas values to 0 0... I have probably involuntarily messed up something else in my patch. Now the patch doesn't open anymore, and it causes PD to crash! Is there any way to correct the patch via text... to correct the mistake that causes the crash? I don't know how or where to start to debug this. Any help super appreciated, stefano
#N canvas 0 0 1920 976 12;
#X obj 166 93 tgl 60 0 empty empty player_A 12 28 0 8 #00f8fc #000000 #000000 0 1;
#X msg 72 198 1;
#X obj 72 222 +, f 8;
#X obj 72 173 gate;
#X obj 637 90 tgl 60 0 empty empty player_B 12 28 0 8 #fc8000 #000000 #000000 0 1;
#X msg 772 180 1;
#X obj 772 204 +, f 8;
#X obj 772 153 gate;
#X obj 71 150 r score;
#X obj 419 2 r ch-pl;
#X obj 419 26 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 317 221 nbx 2 50 -1e+37 1e+37 0 0 score-updA reset empty 0 -8 0 30 #00f8fc #000000 #000000 0 256;
#X obj 468 221 nbx 2 50 -1e+37 1e+37 0 0 score-updB reset empty 0 -8 0 30 #fc8000 #000000 #000000 0 256;
#X msg 104 271 0;
#X msg 828 285 0;
#X obj 773 129 r score;
#X obj 230 155 s gA;
#X obj 606 156 s gB;
#X obj 269 405 r move-nrA;
#X obj 507 392 r move-nrB;
#X obj 109 197 r score-updA;
#X obj 825 179 r score-updB;
#X obj 103 247 sel 1;
#X obj 730 232 sel 1;
#X symbolatom 540 186 3 0 0 2 scelta\ n° - - 0;
#X symbolatom 388 187 3 0 0 2 scelta\ n° - - 0;
#X obj 103 295 s plB-st;
#X obj 758 54 r plB-st;
#X obj 828 309 s plA-st;
#X obj 74 56 r plA-st;
#X obj 417 75 r pl-reset;
#X obj 419 46 t b b;
#X obj 730 256 del 1;
#X obj 107 347 s gAs;
#X obj 190 265 sel 1;
#X msg 191 289 1;
#X obj 643 269 sel 1;
#X msg 643 293 1;
#X obj 654 340 s gBs;
#X obj 237 281 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 152 346 s butt-gate;
#X obj 696 338 s butt-gate;
#X text 150 365 ai pulsanti;
#X text 820 332 ai pulsanti;
#X text 83 365 al player;
#X text 614 364 al player;
#X obj 317 139 bng 65 250 50 0 empty A-bc A 29 32 0 10 #ffffef #000000 #000000;
#N canvas 0 0 1920 976 set-player-warning 1;
#X obj 529 511 outlet;
#X obj 1644 400 r player-choosen;
#X obj 1766 400 r set-player-warn;
#X text 648 115 riceve la scelta dal decide contenuto in [init&reset];
#X obj 162 301 r moves;
#X obj 460 320 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 348 316 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X msg 400 315 stop;
#X obj 348 356 del 400;
#X obj 461 372 del 400;
#X msg 331 390 set ...;
#X msg 661 384 set ...;
#X obj 770 306 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 689 306 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X msg 725 312 stop;
#X obj 689 346 del 400;
#X obj 770 346 del 400;
#X msg 1060 530 set ...;
#X obj 1144 449 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 1063 449 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X msg 1099 455 stop;
#X obj 1063 489 del 600;
#X obj 1145 489 del 600;
#X msg 1154 530 set GAME_OVER!;
#X obj 1303 599 r instructions;
#X msg 403 425 set A:_IT'S_YOUR_TURN!;
#X msg 743 420 set B:_IT'S_YOUR_TURN!;
#X obj 460 197 r A-turn;
#X obj 772 186 r B-turn;
#X obj 8 51 inlet;
#X obj 218 50 inlet;
#X obj 524 48 inlet;
#X obj 823 47 inlet;
#X obj 294 676 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 84 602 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X msg 302 628 stop;
#X text 147 706 rosso;
#X text 405 711 bianco;
#X msg 80 727 \; A-bc color -1.67117e+07 -1 -1;
#X msg 341 729 \; A-bc color -1.67772e+07 -1 -1;
#X obj 834 676 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 618 612 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X msg 923 644 stop;
#X text 683 703 rosso;
#X text 941 708 bianco;
#X msg 616 724 \; B-bc color -1.67117e+07 -1 -1;
#X msg 877 726 \; B-bc color -1.67772e+07 -1 -1;
#X obj 305 599 t b b;
#X obj 898 608 t b b;
#X obj 208 662 del 400;
#X obj 744 659 del 400;
#X obj 232 701 del 400;
#X obj 768 698 del 400;
#X obj 874 512 r stop-player-flashing;
#X obj 79 773 cnv 19 470 30 empty empty empty 20 12 0 12 #feffc6 #404040 0;
#X obj 614 769 cnv 19 470 30 empty empty empty 20 12 0 12 #feffc6 #404040 0;
#X text 87 777 stato flashing A: sta giocando A;
#X text 619 776 stato flashing B: sta giocando B;
#X obj 8 155 s open-gateA;
#X text 76 867 serve a fare in modo che soltanto A possa fare l'assessment;
#X text 598 868 serve a fare in modo che soltanto B possa fare l'assessment;
#X obj 524 151 s open-gateB;
#X text 51 50 A rosso flashing;
#X text 261 51 A bianco + stop;
#X text 577 48 B rosso flashing;
#X text 867 48 B bianco + stop;
#X obj 460 221 sel 1;
#X obj 770 222 sel 1;
#X obj 379 259 bng 19 250 50 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000;
#X connect 5 0 9 0;
#X connect 5 0 25 0;
#X connect 6 0 8 0;
#X connect 6 0 10 0;
#X connect 7 0 8 0;
#X connect 7 0 9 0;
#X connect 8 0 5 0;
#X connect 9 0 6 0;
#X connect 10 0 0 0;
#X connect 11 0 0 0;
#X connect 12 0 16 0;
#X connect 12 0 26 0;
#X connect 13 0 15 0;
#X connect 13 0 11 0;
#X connect 14 0 15 0;
#X connect 14 0 16 0;
#X connect 15 0 12 0;
#X connect 16 0 13 0;
#X connect 18 0 22 0;
#X connect 19 0 21 0;
#X connect 20 0 21 0;
#X connect 20 0 22 0;
#X connect 21 0 18 0;
#X connect 21 0 17 0;
#X connect 22 0 19 0;
#X connect 22 0 23 0;
#X connect 25 0 0 0;
#X connect 26 0 0 0;
#X connect 27 0 66 0;
#X connect 27 0 68 0;
#X connect 28 0 67 0;
#X connect 29 0 58 0;
#X connect 31 0 61 0;
#X connect 33 0 39 0;
#X connect 33 0 51 0;
#X connect 34 0 38 0;
#X connect 34 0 49 0;
#X connect 35 0 49 0;
#X connect 35 0 51 0;
#X connect 40 0 46 0;
#X connect 40 0 52 0;
#X connect 41 0 45 0;
#X connect 41 0 50 0;
#X connect 42 0 50 0;
#X connect 42 0 52 0;
#X connect 47 0 39 0;
#X connect 47 1 35 0;
#X connect 48 0 46 0;
#X connect 48 1 42 0;
#X connect 49 0 33 0;
#X connect 50 0 40 0;
#X connect 51 0 34 0;
#X connect 52 0 41 0;
#X connect 53 0 48 0;
#X connect 53 0 47 0;
#X connect 66 0 5 0;
#X connect 66 0 14 0;
#X connect 66 0 34 0;
#X connect 66 0 48 0;
#X connect 67 0 12 0;
#X connect 67 0 7 0;
#X connect 67 0 47 0;
#X connect 67 0 41 0;
#X restore 362 492 pd set-player-warning;
#X symbolatom 358 275 18 0 0 0 - - - 16;
#X obj 579 403 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#N canvas 64 64 1920 976 who_wins? 0;
#X obj 273 124 +, f 5;
#X obj 273 83 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 273 60 t b f;
#X floatatom 272 148 5 0 0 0 - - - 0;
#X obj 28 211 >;
#X obj 22 182 int;
#X obj 53 182 int;
#X obj 272 193 tgl 15 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000 0 1;
#X obj 272 213 sel 1;
#X obj 272 235 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 119 116 t b b;
#X obj 460 205 >;
#X obj 456 169 int;
#X obj 490 167 int;
#X obj 421 118 t b b;
#X obj 459 229 sel 1;
#X obj 459 254 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 28 233 sel 1;
#X obj 28 264 bng 15 250 50 0 empty empty empty 17 7 0 10 #fcfcfc #000000 #000000;
#X obj 451 31 t f f f;
#X obj 20 28 t f f f;
#X obj 20 1 inlet A;
#X obj 451 3 inlet B;
#X obj 156 334 outlet;
#X msg 459 281 set ..and the winner is B!;
#X msg 28 285 set ..and the winner is A!;
#X obj 272 171 == 4;
#X connect 0 0 3 0;
#X connect 1 0 0 0;
#X connect 2 0 1 0;
#X connect 2 1 0 1;
#X connect 3 0 26 0;
#X connect 4 0 17 0;
#X connect 5 0 4 0;
#X connect 6 0 4 1;
#X connect 7 0 8 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 9 0 14 0;
#X connect 10 0 5 0;
#X connect 10 1 6 0;
#X connect 11 0 15 0;
#X connect 12 0 11 0;
#X connect 13 0 11 1;
#X connect 14 0 12 0;
#X connect 14 1 13 0;
#X connect 15 0 16 0;
#X connect 16 0 24 0;
#X connect 17 0 18 0;
#X connect 18 0 25 0;
#X connect 19 0 2 0;
#X connect 19 1 12 1;
#X connect 19 2 6 1;
#X connect 20 0 0 0;
#X connect 20 1 5 1;
#X connect 20 2 13 1;
#X connect 21 0 20 0;
#X connect 22 0 19 0;
#X connect 24 0 23 0;
#X connect 25 0 23 0;
#X connect 26 0 7 0;
#X restore 386 407 pd who_wins?;
#X obj 468 138 bng 65 250 50 0 empty B-bc B 29 32 0 10 #ffffef #000000 #000000;
#X text 27 32 DECISO DAL DECIDE IN INIT;
#X text 730 35 DECISO DAL DECIDE IN INIT;
#X obj 374 918 s player-turn;
#X msg 704 727 0;
#X msg 129 709 1;
#X obj 314 435 r A-turn;
#X obj 462 436 r B-turn;
#X obj 221 200 r A-score;
#X obj 590 200 r B-score;
#X obj 296 515 cnv 19 300 400 empty empty empty 20 12 0 12 #faff00 #404040 0;
#X obj 156 53 r A-turn;
#X obj 833 56 r B-turn;
#X msg 341 804 \; \$1-overctrl-gate 0;
#X obj 363 663 sel 1;
#X obj 407 669 r played-button;
#X floatatom 407 693 5 0 0 0 - - - 0;
#X obj 407 721 vs.group 2;
#X obj 477 762 vs.prepend set;
#X msg 477 786 5 8;
#X obj 385 750 unpack 0 0;
#X obj 341 842 print;
#X obj 429 778 int;
#X obj 341 775 int;
#X obj 336 748 t b b;
#X obj 478 581 >;
#X obj 478 605 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 361 587 >;
#X obj 361 611 tgl 19 0 empty empty empty 0 -10 0 12 #fcfcfc #000000 #000000 0 1;
#X obj 409 573 loadbang;
#X msg 409 599 0;
#X obj 512 552 int;
#X obj 454 541 t b f;
#X obj 376 548 int;
#X obj 318 537 t b f;
#X text 541 657 questa parte serve a mandare il segnale del fatto che l'ultimo giocatore è salito di un punto quindi l'ultima coppia era corretta quindi deve essere disabilitata (vedi patch button \, colore nero);
#X text 700 363 ai pulsanti;
#X connect 0 0 3 1;
#X connect 0 0 22 0;
#X connect 0 0 34 0;
#X connect 0 0 16 0;
#X connect 1 0 2 0;
#X connect 3 0 1 0;
#X connect 4 0 7 1;
#X connect 4 0 17 0;
#X connect 4 0 23 0;
#X connect 4 0 36 0;
#X connect 5 0 6 0;
#X connect 7 0 5 0;
#X connect 8 0 3 0;
#X connect 9 0 10 0;
#X connect 10 0 31 0;
#X connect 11 0 50 0;
#X connect 11 0 84 1;
#X connect 11 0 85 0;
#X connect 12 0 50 1;
#X connect 12 0 82 1;
#X connect 12 0 83 0;
#X connect 13 0 26 0;
#X connect 14 0 28 0;
#X connect 15 0 7 0;
#X connect 18 0 25 0;
#X connect 19 0 24 0;
#X connect 20 0 2 1;
#X connect 21 0 6 1;
#X connect 22 0 13 0;
#X connect 23 0 32 0;
#X connect 27 0 4 0;
#X connect 29 0 0 0;
#X connect 30 0 0 0;
#X connect 30 0 4 0;
#X connect 31 0 0 0;
#X connect 31 1 4 0;
#X connect 32 0 14 0;
#X connect 34 0 35 0;
#X connect 34 0 39 0;
#X connect 35 0 33 0;
#X connect 35 0 40 0;
#X connect 36 0 37 0;
#X connect 36 0 49 0;
#X connect 37 0 38 0;
#X connect 37 0 41 0;
#X connect 46 0 56 0;
#X connect 46 0 47 0;
#X connect 46 0 47 3;
#X connect 47 0 48 0;
#X connect 50 0 48 0;
#X connect 51 0 55 0;
#X connect 51 0 47 1;
#X connect 51 0 47 2;
#X connect 55 0 54 0;
#X connect 56 0 54 0;
#X connect 57 0 47 0;
#X connect 57 0 47 3;
#X connect 58 0 47 1;
#X connect 58 0 47 2;
#X connect 59 0 11 0;
#X connect 60 0 12 0;
#X connect 62 0 0 0;
#X connect 63 0 4 0;
#X connect 64 0 72 0;
#X connect 65 0 75 0;
#X connect 66 0 67 0;
#X connect 67 0 68 0;
#X connect 68 0 69 0;
#X connect 68 0 71 0;
#X connect 69 0 70 0;
#X connect 71 0 74 1;
#X connect 71 1 73 1;
#X connect 73 0 64 0;
#X connect 74 0 64 0;
#X connect 75 0 74 0;
#X connect 75 1 73 0;
#X connect 76 0 77 0;
#X connect 77 0 65 0;
#X connect 78 0 79 0;
#X connect 79 0 65 0;
#X connect 80 0 81 0;
#X connect 81 0 84 1;
#X connect 81 0 82 1;
#X connect 82 0 76 1;
#X connect 83 0 82 0;
#X connect 83 1 76 0;
#X connect 84 0 78 1;
#X connect 85 0 84 0;
#X connect 85 1 78 0;
#X coords 0 -1 1 1 300 240 2 300 130;
pure data in multicore
@Spyros said:
- In the abstraction I replaced all the inlets to [receive] and [send] from the main, the [inlet~]s to [receive~] and [send~] from the main and the [outlet~] to [dac~]
Almost right. You convert the inlets to [receive] but in main you don't [send] to them, you send a message to the left-most inlet of [pd~] prefixed with the name of the receive. So if you originally had an inlet that accepted the message [go bears( and converted that to a [receive cheers], you would send the message [cheers go bears( to the left-most inlet of [pd~].
Similarly, you can't [send~] in main to a [receive~] in the subprocess patch. In the subprocess patch you replace all [inlet~] with [adc~] and in main you configure [pd~] ninsig to match the number of adc~ channels. Those channels become inlet~s on the [pd~] object itself.
- in the main I created [pd~] and I am sending a message <pd~ start pd~-button.pd> calling the abstraction button.pd. But I get an error: "pd~-button.pd: can't open" (in a separate instance of Pd). The weird thing is that when I go to help of [pd~] and click on the message <pd~ start pd~-subprocess.pd> I don't get the error when I copy and past the help in my main.pd I get an error: "pd~-subprocess.pd: can't open".
The message should contain the name of your abstraction, "button.pd" not "pd~-button.pd". In the help example, the name of the subprocess patch has that "pd~-" prefix, but that's just how they chose to name it.
- In the button abstraction I have more abstractions. Will they run in the new separate instance of Pd as well?
Yes, provided the Pd subprocess can find them. That's what failed in 2)--you copied the main patch in help but didn't move the subprocess patch to your local directory.
Here's another example you can study: two subprocesses.zip
problem creating objects from external iemlib
hi everyone!
I'm trying to run the patch "Ambisonic_2d_example.pd" from the iem_ambi external. While trying to get it to run, I made some changes to the declare statement. You can find the code below..
I installed the externals needed for this patch through deken and I also set the "-lib iemlib" startup flag in PD.
Unfortunately I get the following errors. As you can see PD fails to create some objects (e.g. fadtodb, rbpq, mull~, dsp). These objects seem to all come from the iemlib which is loaded successfully. I have also checked the /externals/iemlib directory.. the four mentioned object-patches are there.
I am running PD on a VM running Debian 11.7 on a M1 MacBook Pro.
I have been trying to solve this for a couple of hours now.. Does anyone know why it's not working?
iemlib (1.22-1) library loaded! (c) Thomas Musil Jul 7 2023 : 18:09:42
musil@iem.at iem KUG Graz Austria
iem_ambi (1.21.1) library loaded! (c) Thomas Musil Jul 18 2023 : 11:42:00
musil@iem.at iem KUG Graz Austria
iemmatrix 0.3.3
objects for manipulating 2d-matrices
(c) 2001-2015 iem
IOhannes m zmölnig
Thomas Musil
Franz Zotter
compiled Jul 18 2023 : 22:25:45
iemlib (1.22-1) library loaded! (c) Thomas Musil Jul 7 2023 : 18:09:42
musil@iem.at iem KUG Graz Austria
♡♡♡
♡ the zexy external 2.4.2
♡ (c) 1999-2023 IOhannes m zmölnig
♡ forum::für::umläute
♡ iem @ kug
♡ compiled Jul 7 2023
♡ send me a 'help' message
♡♡♡
matchbox: OSC-pattern matching code (c) Matt Wright, CNMAT
iemgui (1.21-1) library loaded! (c) Thomas Musil Sep 13 2022 : 19:34:09
musil@iem.at iem KUG Graz Austria
dsp
... couldn't create
rbpq2~ 1000 2 100
... couldn't create
mull~ 1 100
... couldn't create
fadtodb
... couldn't create
matrix_inverse nonsingular
modified_Ambisonic_2d_example.pd:
#N canvas 1512 175 1512 1715 10;
#X declare -stdlib /home/amir/Documents/Pd/externals/iem_ambi -stdlib
/home/amir/Documents/Pd/externals/iemmatrix -stdlib /home/amir/Documents/Pd/externals/iemlib
-stdlib /home/amir/Documents/Pd/externals/zexy -stdlib /home/amir/Documents/Pd/externals/iemgui
;
#X obj 20 44 dsp;
#X obj 20 24 tgl 15 0 empty empty empty 0 -6 0 8 -260818 -1 -1 0 1
;
#X floatatom 20 83 5 0 0 0 - - -;
#X floatatom 33 65 5 0 0 0 - - -;
#X obj 230 88 ambi_encode 2;
#X obj 469 102 mtx_*~ 5 1 100;
#X obj 509 11 noise~;
#X obj 509 32 rbpq2~ 1000 2 100;
#X obj 225 591 mtx_print;
#X obj 230 140 mtx 5 1;
#X msg 230 51 col 1 \$1;
#X obj 230 109 t b a;
#X obj 699 118 prvu~;
#X obj 700 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 719 118 prvu~;
#X obj 720 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 739 118 prvu~;
#X obj 740 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 759 118 prvu~;
#X obj 760 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 779 118 prvu~;
#X obj 780 142 vu 15 120 empty empty -1 -8 0 8 -66577 -1 1 0;
#X obj 115 222 loadbang;
#X obj 442 257 mtx_*~ 2 2 100;
#X obj 537 257 mtx_*~ 2 2 100;
#X obj 233 240 ambi_rot 2;
#X obj 699 273 prvu~;
#X obj 700 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 719 273 prvu~;
#X obj 720 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 739 273 prvu~;
#X obj 740 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 759 273 prvu~;
#X obj 760 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 0 0;
#X obj 779 273 prvu~;
#X obj 780 297 vu 15 120 empty empty -1 -8 0 8 -66577 -1 1 0;
#X obj 411 257 *~ 1;
#X obj 131 436 round_zero 1e-06;
#X msg 147 343 real_ls \$1 \$2;
#X msg 131 364 begin_pseudo_inverse;
#X msg 115 385 end_pseudo_inverse;
#X obj 115 245 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
#X obj 131 414 ambi_decode3 2 2 8 0;
#X msg 147 322 1 0 \, 2 45 \, 3 90 \, 4 135 \, 5 180 \, 6 225 \, 7
270 \, 8 315;
#X obj 425 381 mtx_*~ 8 5 0 ________________;
#X obj 115 264 t b b b b;
#X obj 508 75 mull~ 1 100;
#X obj 678 27 fadtodb;
#X obj 551 55 dbtorms;
#X obj 618 58 - 100;
#X obj 618 82 vsl 15 121 0 120 0 1 empty empty empty 0 -8 0 8 -260818
-1 -1 24000 1;
#X floatatom 637 80 5 0 0 0 - - -;
#N canvas 0 0 462 312 __________________________ 0;
#X obj 25 66 rvu~;
#X obj 25 86 + 100;
#X obj 25 106 dbtorms;
#X obj 25 127 outlet;
#X obj 75 66 rvu~;
#X obj 75 86 + 100;
#X obj 75 106 dbtorms;
#X obj 75 127 outlet;
#X obj 125 66 rvu~;
#X obj 125 86 + 100;
#X obj 125 106 dbtorms;
#X obj 125 127 outlet;
#X obj 175 66 rvu~;
#X obj 175 86 + 100;
#X obj 175 106 dbtorms;
#X obj 175 127 outlet;
#X obj 225 66 rvu~;
#X obj 225 86 + 100;
#X obj 225 106 dbtorms;
#X obj 225 127 outlet;
#X obj 275 66 rvu~;
#X obj 275 86 + 100;
#X obj 275 106 dbtorms;
#X obj 275 127 outlet;
#X obj 325 66 rvu~;
#X obj 325 86 + 100;
#X obj 325 106 dbtorms;
#X obj 325 127 outlet;
#X obj 375 66 rvu~;
#X obj 375 86 + 100;
#X obj 375 106 dbtorms;
#X obj 375 127 outlet;
#X obj 25 45 inlet~;
#X obj 75 45 inlet~;
#X obj 125 45 inlet~;
#X obj 175 45 inlet~;
#X obj 225 45 inlet~;
#X obj 275 45 inlet~;
#X obj 325 45 inlet~;
#X obj 375 46 inlet~;
#X connect 0 0 1 0;
#X connect 1 0 2 0;
#X connect 2 0 3 0;
#X connect 4 0 5 0;
#X connect 5 0 6 0;
#X connect 6 0 7 0;
#X connect 8 0 9 0;
#X connect 9 0 10 0;
#X connect 10 0 11 0;
#X connect 12 0 13 0;
#X connect 13 0 14 0;
#X connect 14 0 15 0;
#X connect 16 0 17 0;
#X connect 17 0 18 0;
#X connect 18 0 19 0;
#X connect 20 0 21 0;
#X connect 21 0 22 0;
#X connect 22 0 23 0;
#X connect 24 0 25 0;
#X connect 25 0 26 0;
#X connect 26 0 27 0;
#X connect 28 0 29 0;
#X connect 29 0 30 0;
#X connect 30 0 31 0;
#X connect 32 0 0 0;
#X connect 33 0 4 0;
#X connect 34 0 8 0;
#X connect 35 0 12 0;
#X connect 36 0 16 0;
#X connect 37 0 20 0;
#X connect 38 0 24 0;
#X connect 39 0 28 0;
#X restore 425 406 pd __________________________;
#X obj 459 490 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 486 460 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 486 528 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 516 450 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 516 538 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 546 460 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 546 528 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X obj 573 490 vsl 15 51 0 0.2 0 0 empty empty empty 0 -8 0 8 -1 -24198
-1 0 1;
#X msg 310 58 ambi_weight 1 1 1;
#X msg 164 299 ambi_weight 1 1 0.3904;
#X msg 89 466 ambi_weight 1 1 1;
#X text 388 509 +90 degree;
#X text 601 506 -90 degree;
#X text 486 602 +-180 degree;
#X obj 234 220 cnv 12 30 12 empty empty empty 20 12 0 14 -260818 -66577
0;
#X obj 231 32 cnv 12 30 12 empty empty empty 20 12 0 14 -260818 -66577
0;
#X floatatom 230 31 5 -180 180 0 - - -;
#X text 232 14 phi;
#X floatatom 233 219 5 -180 180 0 - - -;
#X text 231 201 rho_z;
#X obj 264 213 cnv 8 8 8 empty empty empty 20 12 0 14 -262144 -66577
0;
#X obj 260 24 cnv 8 8 8 empty empty empty 20 12 0 14 -262144 -66577
0;
#X text 341 114 ENCODING;
#X text 309 378 DECODING;
#X text 323 257 ROTATING;
#X text 587 90 gain;
#X text 24 119 iemmatrix \, iem_ambi \, iemgui;
#X text 17 108 we need iemlib1 \, iemlib2 \,;
#X text 78 596 IEM KUG;
#X text 62 584 musil;
#X text 92 584 @;
#X text 98 584 iem.at;
#X text 61 606 Graz \, Austria;
#X text 13 573 (c) Thomas Musil 2000 - 2006;
#X obj 182 647 declare -stdlib /home/amir/Documents/Pd/externals/iem_ambi
-stdlib /home/amir/Documents/Pd/externals/iemmatrix -stdlib /home/amir/Documents/Pd/externals/iemlib
-stdlib /home/amir/Documents/Pd/externals/zexy -stdlib /home/amir/Documents/Pd/externals/iemgui
;
#X connect 0 0 2 0;
#X connect 0 1 3 0;
#X connect 1 0 0 0;
#X connect 4 0 11 0;
#X connect 5 0 12 0;
#X connect 5 0 36 0;
#X connect 5 1 14 0;
#X connect 5 1 23 1;
#X connect 5 2 16 0;
#X connect 5 2 23 2;
#X connect 5 3 18 0;
#X connect 5 3 24 1;
#X connect 5 4 20 0;
#X connect 5 4 24 2;
#X connect 6 0 7 0;
#X connect 7 0 46 0;
#X connect 9 0 5 0;
#X connect 10 0 4 0;
#X connect 11 0 9 0;
#X connect 11 1 9 0;
#X connect 12 0 13 0;
#X connect 14 0 15 0;
#X connect 16 0 17 0;
#X connect 18 0 19 0;
#X connect 20 0 21 0;
#X connect 22 0 41 0;
#X connect 23 0 28 0;
#X connect 23 0 44 2;
#X connect 23 1 30 0;
#X connect 23 1 44 3;
#X connect 24 0 32 0;
#X connect 24 0 44 4;
#X connect 24 1 34 0;
#X connect 24 1 44 5;
#X connect 25 0 23 0;
#X connect 25 1 24 0;
#X connect 26 0 27 0;
#X connect 28 0 29 0;
#X connect 30 0 31 0;
#X connect 32 0 33 0;
#X connect 34 0 35 0;
#X connect 36 0 26 0;
#X connect 36 0 44 1;
#X connect 37 0 44 0;
#X connect 38 0 42 0;
#X connect 39 0 42 0;
#X connect 40 0 42 0;
#X connect 41 0 45 0;
#X connect 42 0 37 0;
#X connect 43 0 38 0;
#X connect 44 0 52 0;
#X connect 44 1 52 1;
#X connect 44 2 52 2;
#X connect 44 3 52 3;
#X connect 44 4 52 4;
#X connect 44 5 52 5;
#X connect 44 6 52 6;
#X connect 44 7 52 7;
#X connect 45 0 40 0;
#X connect 45 1 39 0;
#X connect 45 2 43 0;
#X connect 45 3 62 0;
#X connect 46 0 5 1;
#X connect 47 0 48 0;
#X connect 47 0 49 0;
#X connect 48 0 46 1;
#X connect 49 0 51 0;
#X connect 50 0 47 0;
#X connect 52 0 56 0;
#X connect 52 1 54 0;
#X connect 52 2 53 0;
#X connect 52 3 55 0;
#X connect 52 4 57 0;
#X connect 52 5 59 0;
#X connect 52 6 60 0;
#X connect 52 7 58 0;
#X connect 61 0 4 0;
#X connect 62 0 42 0;
#X connect 63 0 42 0;
#X connect 69 0 10 0;
#X connect 71 0 25 0;
Help with audio patch on off based on some condition
@KMETE said:
Only one small issue I can solved with [onebang] is that the right outlet of play~ outputting many bangs at end instead of one and that could make problems(?)
I noticed that and logged a bug with cyclone for it.
However it won't cause a problem here.
There is a big difference between hot and cold inlets. A hot inlet produces a result at an outlet: 50 bangs to a hot inlet = 50 results. But in this case, the bang is sending a symbol only to a cold inlet. One message to a cold inlet = change in object's state, but no result. 50 messages to a cold inlet = change in object's state, but no result. So in this context it doesn't matter: the cold inlet will not produce redundant actions downstream because nothing will happen at the outlet.
hjh
Building on Windows - works from Git source, not from tarball
I wanted to build PD on Windows 10 to get ASIO support. I failed when I used the "Source" files from the PD website. I succeeded when I used source that I cloned from Github. I followed the same instructions from the wiki both when I failed and when I succeeded. (They are the same as in the manual, just a little more concise.)
I am sharing below my terminal output from the failed build attempts from the downloaded source code (the tar.gz file). Some of these messages suggest that there might be errors in the makefiles. I don't know anything about makefiles, so I can't really interpret the errors. But I did want to pass them along, in case a developer might find them useful. Here you go:
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ ./autogen.sh
libtoolize: putting auxiliary files in AC_CONFIG_AUX_DIR, 'm4/config'.
libtoolize: linking file 'm4/config/config.guess'
libtoolize: linking file 'm4/config/config.sub'
libtoolize: linking file 'm4/config/install-sh'
libtoolize: linking file 'm4/config/ltmain.sh'
libtoolize: putting macros in AC_CONFIG_MACRO_DIRS, 'm4/generated'.
libtoolize: linking file 'm4/generated/libtool.m4'
libtoolize: linking file 'm4/generated/ltoptions.m4'
libtoolize: linking file 'm4/generated/ltsugar.m4'
libtoolize: linking file 'm4/generated/ltversion.m4'
libtoolize: linking file 'm4/generated/lt~obsolete.m4'
configure.ac:166: warning: The macro `AC_LIBTOOL_DLOPEN' is obsolete.
configure.ac:166: You should run autoupdate.
aclocal.m4:8488: AC_LIBTOOL_DLOPEN is expanded from...
configure.ac:166: the top level
configure.ac:166: warning: AC_LIBTOOL_DLOPEN: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:166: put the 'dlopen' option into LT_INIT's first parameter.
../autoconf-2.71/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:8488: AC_LIBTOOL_DLOPEN is expanded from...
configure.ac:166: the top level
configure.ac:167: warning: The macro `AC_LIBTOOL_WIN32_DLL' is obsolete.
configure.ac:167: You should run autoupdate.
aclocal.m4:8523: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:167: the top level
configure.ac:167: warning: AC_LIBTOOL_WIN32_DLL: Remove this warning and the call to _LT_SET_OPTION when you
configure.ac:167: put the 'win32-dll' option into LT_INIT's first parameter.
../autoconf-2.71/lib/autoconf/general.m4:2434: AC_DIAGNOSE is expanded from...
aclocal.m4:8523: AC_LIBTOOL_WIN32_DLL is expanded from...
configure.ac:167: the top level
configure.ac:168: warning: The macro `AC_PROG_LIBTOOL' is obsolete.
configure.ac:168: You should run autoupdate.
aclocal.m4:121: AC_PROG_LIBTOOL is expanded from...
configure.ac:168: the top level
configure.ac:182: warning: The macro `AC_HEADER_STDC' is obsolete.
configure.ac:182: You should run autoupdate.
../autoconf-2.71/lib/autoconf/headers.m4:704: AC_HEADER_STDC is expanded from...
configure.ac:182: the top level
configure.ac:213: warning: The macro `AC_TYPE_SIGNAL' is obsolete.
configure.ac:213: You should run autoupdate.
../autoconf-2.71/lib/autoconf/types.m4:776: AC_TYPE_SIGNAL is expanded from...
configure.ac:213: the top level
configure.ac:235: warning: The macro `AC_CHECK_LIBM' is obsolete.
configure.ac:235: You should run autoupdate.
aclocal.m4:3879: AC_CHECK_LIBM is expanded from...
configure.ac:235: the top level
configure.ac:276: warning: The macro `AC_TRY_LINK' is obsolete.
configure.ac:276: You should run autoupdate.
../autoconf-2.71/lib/autoconf/general.m4:2920: AC_TRY_LINK is expanded from...
m4/universal.m4:14: PD_CHECK_UNIVERSAL is expanded from...
configure.ac:276: the top level
configure.ac:168: installing 'm4/config/compile'
configure.ac:9: installing 'm4/config/missing'
asio/Makefile.am: installing 'm4/config/depcomp'
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ autoupdate
configure.ac:182: warning: The preprocessor macro `STDC_HEADERS' is obsolete.
Except in unusual embedded environments, you can safely include all
ISO C90 headers unconditionally.
configure.ac:213: warning: your code may safely assume C89 semantics that RETSIGTYPE is void.
Remove this warning and the `AC_CACHE_CHECK' when you adjust the code.
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ ^C
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ ./configure
configure: loading site script /etc/config.site
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a race-free mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking build system type... x86_64-w64-mingw32
checking host system type... x86_64-w64-mingw32
configure: iPhone SDK only available for arm-apple-darwin hosts, skipping tests
configure: Android SDK only available for arm-linux hosts, skipping tests
checking for as... as
checking for dlltool... dlltool
checking for objdump... objdump
checking how to print strings... printf
checking whether make supports the include directive... yes (GNU style)
checking for gcc... gcc
checking whether the C compiler works... yes
checking for C compiler default output file name... a.exe
checking for suffix of executables... .exe
checking whether we are cross compiling... no
checking for suffix of object files... o
checking whether the compiler supports GNU C... yes
checking whether gcc accepts -g... yes
checking for gcc option to enable C11 features... none needed
checking whether gcc understands -c and -o together... yes
checking dependency style of gcc... gcc3
checking for a sed that does not truncate output... /usr/bin/sed
checking for grep that handles long lines and -e... /usr/bin/grep
checking for egrep... /usr/bin/grep -E
checking for fgrep... /usr/bin/grep -F
checking for ld used by gcc... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking for BSD- or MS-compatible name lister (nm)... /mingw64/bin/nm -B
checking the name lister (/mingw64/bin/nm -B) interface... BSD nm
checking whether ln -s works... no, using cp -pR
checking the maximum length of command line arguments... 8192
checking how to convert x86_64-w64-mingw32 file names to x86_64-w64-mingw32 format... func_convert_file_msys_to_w32
checking how to convert x86_64-w64-mingw32 file names to toolchain format... func_convert_file_msys_to_w32
checking for C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe option to reload object files... -r
checking for objdump... (cached) objdump
checking how to recognize dependent libraries... file_magic ^x86 archive import|^x86 DLL
checking for dlltool... (cached) dlltool
checking how to associate runtime and link libraries... func_cygming_dll_for_implib
checking for ar... ar
checking for archiver @FILE support... @
checking for strip... strip
checking for ranlib... ranlib
checking command to parse /mingw64/bin/nm -B output from gcc object... ok
checking for sysroot... no
checking for a working dd... /usr/bin/dd
checking how to truncate binary pipes... /usr/bin/dd bs=4096 count=1
checking for mt... no
checking if : is a manifest tool... no
checking for stdio.h... yes
checking for stdlib.h... yes
checking for string.h... yes
checking for inttypes.h... yes
checking for stdint.h... yes
checking for strings.h... yes
checking for sys/stat.h... yes
checking for sys/types.h... yes
checking for unistd.h... yes
checking for vfork.h... no
checking for dlfcn.h... no
checking for objdir... .libs
checking if gcc supports -fno-rtti -fno-exceptions... no
checking for gcc option to produce PIC... -DDLL_EXPORT -DPIC
checking if gcc PIC flag -DDLL_EXPORT -DPIC works... yes
checking if gcc static flag -static works... yes
checking if gcc supports -c -o file.o... yes
checking if gcc supports -c -o file.o... (cached) yes
checking whether the gcc linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking whether -lc should be explicitly linked in... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether stripping libraries is possible... yes
checking if libtool supports shared libraries... yes
checking whether to build shared libraries... yes
checking whether to build static libraries... yes
checking for gcc... (cached) gcc
checking whether the compiler supports GNU C... (cached) yes
checking whether gcc accepts -g... (cached) yes
checking for gcc option to enable C11 features... (cached) none needed
checking whether gcc understands -c and -o together... (cached) yes
checking dependency style of gcc... (cached) gcc3
checking for g++... g++
checking whether the compiler supports GNU C++... yes
checking whether g++ accepts -g... yes
checking for g++ option to enable C++11 features... none needed
checking dependency style of g++... gcc3
checking how to run the C++ preprocessor... g++ -E
checking for ld used by g++... C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe
checking if the linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) is GNU ld... yes
checking whether the g++ linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking for g++ option to produce PIC... -DDLL_EXPORT -DPIC
checking if g++ PIC flag -DDLL_EXPORT -DPIC works... yes
checking if g++ static flag -static works... yes
checking if g++ supports -c -o file.o... yes
checking if g++ supports -c -o file.o... (cached) yes
checking whether the g++ linker (C:/msys64/mingw64/x86_64-w64-mingw32/bin/ld.exe) supports shared libraries... yes
checking dynamic linker characteristics... Win32 ld.exe
checking how to hardcode library paths into programs... immediate
checking whether make sets $(MAKE)... (cached) yes
checking whether ln -s works... no, using cp -pR
checking for grep that handles long lines and -e... (cached) /usr/bin/grep
checking for a sed that does not truncate output... (cached) /usr/bin/sed
checking for windres... windres
checking for egrep... (cached) /usr/bin/grep -E
checking for fcntl.h... yes
checking for limits.h... yes
checking for malloc.h... yes
checking for netdb.h... no
checking for netinet/in.h... no
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking for string.h... (cached) yes
checking for sys/ioctl.h... no
checking for sys/param.h... yes
checking for sys/socket.h... no
checking for sys/soundcard.h... no
checking for sys/time.h... yes
checking for sys/timeb.h... yes
checking for unistd.h... (cached) yes
checking for int16_t... yes
checking for int32_t... yes
checking for off_t... yes
checking for pid_t... yes
checking for size_t... yes
checking for working alloca.h... no
checking for alloca... yes
checking for error_at_line... no
checking for fork... no
checking for vfork... no
checking for GNU libc compatible malloc... (cached) yes
checking for GNU libc compatible realloc... (cached) yes
checking return type of signal handlers... void
checking for dup2... yes
checking for floor... yes
checking for getcwd... yes
checking for gethostbyname... no
checking for gettimeofday... yes
checking for memmove... yes
checking for memset... yes
checking for pow... yes
checking for regcomp... no
checking for select... no
checking for socket... no
checking for sqrt... yes
checking for strchr... yes
checking for strerror... yes
checking for strrchr... yes
checking for strstr... yes
checking for strtol... yes
checking for dlopen in -ldl... no
checking for cos in -lm... yes
checking for CoreAudio/CoreAudio.h... no
checking for pthread_create in -lpthread... yes
checking for msgfmt... yes
checking for sys/soundcard.h... (cached) no
checking for snd_pcm_info in -lasound... no
configure: Using included PortAudio
configure: Using included PortMidi
checking that generated files are newer than configure... done
configure: creating ./config.status
config.status: creating Makefile
config.status: creating asio/Makefile
config.status: creating doc/Makefile
config.status: creating font/Makefile
config.status: creating mac/Makefile
config.status: creating man/Makefile
config.status: creating msw/Makefile
config.status: creating portaudio/Makefile
config.status: creating portmidi/Makefile
config.status: creating tcl/Makefile
config.status: creating tcl/pd-gui
config.status: creating po/Makefile
config.status: creating src/Makefile
config.status: creating extra/Makefile
config.status: creating extra/bob~/GNUmakefile
config.status: creating extra/bonk~/GNUmakefile
config.status: creating extra/choice/GNUmakefile
config.status: creating extra/fiddle~/GNUmakefile
config.status: creating extra/loop~/GNUmakefile
config.status: creating extra/lrshift~/GNUmakefile
config.status: creating extra/pd~/GNUmakefile
config.status: creating extra/pique/GNUmakefile
config.status: creating extra/sigmund~/GNUmakefile
config.status: creating extra/stdout/GNUmakefile
config.status: creating pd.pc
config.status: executing depfiles commands
config.status: executing libtool commands
configure:
pd 0.51.4 is now configured
Platform: MinGW
Debug build: no
Universal build: no
Localizations: yes
Source directory: .
Installation prefix: /mingw64
Compiler: gcc
CPPFLAGS:
CFLAGS: -g -O2 -ffast-math -funroll-loops -fomit-frame-pointer -O3
LDFLAGS:
INCLUDES:
LIBS: -lpthread
External extension: dll
External CFLAGS: -mms-bitfields
External LDFLAGS: -s -Wl,--enable-auto-import -no-undefined -lpd
fftw: no
wish(tcl/tk): wish85.exe
audio APIs: PortAudio ASIO MMIO
midi APIs: PortMidi
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ make
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh '/c/Useras/bhage/Downloads/pd-0.51-4/m4/config/missing' aclocal-1.16 -I m4/generated -I m4
configure.ac:170: error: AC_REQUIRE(): cannot be used outside of an AC_DEFUN'd macro
configure.ac:170: the top level
autom4te: error: /usr/bin/m4 failed with exit status: 1
aclocal-1.16: error: autom4te failed with exit status: 1
make: *** [Makefile:451: aclocal.m4] Error 1
bhage@LAPTOP-F1TU0LRH MINGW64 /c/Users/bhage/Downloads/pd-0.51-4
$ make app
CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh '/c/Users/bhage/Downloads/pd-0.51-4/m4/config/missing' aclocal-1.16 -I m4/generated -I m4
configure.ac:170: error: AC_REQUIRE(): cannot be used outside of an AC_DEFUN'd macro
configure.ac:170: the top level
autom4te: error: /usr/bin/m4 failed with exit status: 1
aclocal-1.16: error: autom4te failed with exit status: 1
make: *** [Makefile:451: aclocal.m4] Error 1
Mono / stereo detection
@Obineg said:
i would have found it more logically that inlet~ would only get activated when you connect something to it, since patching requires a recompile anyway.
the way it is you are creating a lot of signal connections for nothing for some abstraction designs.
A counterexample:
Let's say you're making a mid-side encoder abstraction: two signal inlet~'s (left and right), and a [+~] and [-~]. The left inlet~ goes into the left inlets of the two math operators; the right inlet~ goes into the operators' right inlets. So the adder produces the mid signal, and the difference operator produces the side.
Now you put the abstraction into another patch, and connect a signal to the abstraction instance's right inlet.
By your logic, the operators' left inlets should be deactivated. But the operators still need to calculate. (Passthrough isn't an option because, in this contrived example, the [-~] side signal should be phase inverted relative to the mid signal -- the [-~] must be doing 0 - R.) To calculate, the operators need two inputs.
At this point, software designers would have to weigh the CPU cost of passing zeros (arguably this is likely to be minimal) against the added complexity of maintaining active vs inactive connection states. Considering that it's easy to underestimate the maintenance impact of code complexity, it actually is a legit decision to accept a small CPU cost in exchange for more straightforward logic.
I don't find it strange at all.
hjh
How do I create an arbitrary number of signal inlets in an external?
Hi all, I'm trying to create an external that has one float inlet and a number of signal inlets corresponding to the creation argument. Something like [nfader 4] should have four signal inlets and one float inlet for the interpolation parameter.
Yes, I already found abstract-based solutions but dynamic patching is black magic to me so I'd rather code this in C with which I'm quite comfortable.
The problem is I thought I could have a t_inlet **inlets field in the object's struct and then allocate the inlets with the usual combo of (t_inlet **)malloc(n * sizeof(t_inlet *)) but apparently sizeof does not have access to _inlet (aliased to t_inlet) as it is an externally defined symbol.
Bottom line: all the examples I could think of that have arbitrary amounts of inlets (and outlets for that matter) are bondo from cyclone and pack from vanilla. I tried expr~ but its complexity is not really helping…
… pointers?
Activated, temporary, input gate/threshold.
Don't know what to call this really. I put this together to prevent unwanted control changes after loading presets. A useful utility for hardware-controlled patches with presets.
-Inlet 1 passes control signal to the outlet.
-A bang to inlet 2 activates the temporary threshold/gate.
After activated, no control changes will pass through until a change that exceeds the threshold value is registered. (Relative to the control value at activation).
-(optional) Set threshold through inlet 3. Default is 10.
Example:
*Control signal through inlet 1 is at 50 when gate gets activated with a bang to inlet 2 (threshold set at default value, 10).
*Values of 41-59 will not pass through.
*A control signal <=10 or >=30 opens the gate.
*After the gate is opened, the control signal passes through until another bang is sent to inlet 2.
TemporaryThreshold.pd

If there is already an abstraction or external out there that does this in a better way please let me know 
Noticed a possible source or errors, if the 'float-box' were to send its value to the hot inlet of the 'subtraction-box' before it does the cold inlet. Not a problem on my system but this might be safer with a trigger to make sure..
Cheers!
