hi,
I would be glad to help, but could you be more specific about your MIDI setup? Is keyboard used as a controller for an external sound module? Do you have this trouble exclusively using Pd, or in any MIDI program (sequencer, etc.)? Have you tried connecting [notein] to [noteout]? Is `MIDI OUT' section of testtone patch working?
Krzysztof
Marcus Flanagan wrote: ...
In the "testtone.pd" I can hear the testtone through the speakers....and can see the MIDI IN notein values registering as I press my keyboards keys....but I cannot hear output from my keyboard. Must I create something for this?...of should keyboard storkes be output anyway?
Thank you for information about the ringmodulation. It's perfect now. Other question: Is there an external that can do permutations of numbers. like: 1 2 3 4 2 3 4 1 3 4 1 2 and so on; and 1 2 3 4 5 2 4 3 5 1 4 5 3 1 2 5 1 3 2 4 and so on;
i would like to comput controlldata from permutations.
Thanks for help
Greetns Thomas
hi, thomas, long time no see/hear:
i think the "matrix"-objects that you can find in the "zexy"-externals (once again them ;-)) might help you.
ciao
oliver
thomas gorbach wrote:
Thank you for information about the ringmodulation. It's perfect now. Other question: Is there an external that can do permutations of numbers. like: 1 2 3 4 2 3 4 1 3 4 1 2 and so on; and 1 2 3 4 5 2 4 3 5 1 4 5 3 1 2 5 1 3 2 4 and so on;
i would like to comput controlldata from permutations.
Thanks for help
Greetns Thomas
hi
there is a maybe useful object in the library of ian mott (motex), which is called "shuffle". it produces no-repeat random numbers. you can set the argument of the fraction of the end of a series and beginning of next to zero. this means: all numbers of the random range are produced once before re-shuffeling.
marius.
----- Original Message ----- From: "thomas gorbach" blackinch@chello.at To: pd-list@iem.kug.ac.at Sent: Wednesday, January 23, 2002 1:53 PM Subject: [PD] permutations
Thank you for information about the ringmodulation. It's perfect now. Other question: Is there an external that can do permutations of numbers. like: 1 2 3 4 2 3 4 1 3 4 1 2 and so on; and 1 2 3 4 5 2 4 3 5 1 4 5 3 1 2 5 1 3 2 4 and so on;
i would like to comput controlldata from permutations.
Thanks for help
Greetns Thomas
Hi Thomas,
I wrote an object for max/msp, which does exactly that. I'm planning to port all these objects to pd after I've finished the csound~ and markov object. That might be too late, but I could send you the sources, if you know how to write a code external in pd. Let me know if that's the case. In the meantime, you could use a hardwired system like the one down here. It is capable to deal with lists of up to 12 elements (but of course is extensible). The permutation has to be given in the lower message box in the subpatch, given the element reordering with a '$' sign before the numbers indicating the position. Note that you can use it even with shorter lists by specifying less elements in the message box.
#N canvas 404 220 450 406 10; #X msg 175 216 1 2 3 4 5; #N canvas 0 85 378 356 permute 1; #X obj 8 189 f; #X obj 39 189 f; #X obj 67 189 f; #X obj 97 188 f; #X obj 127 189 f; #X obj 195 37 inlet; #X obj 195 94 t b b; #X obj 76 333 outlet; #X obj 152 37 inlet; #X obj 195 61 t b l; #X obj 156 189 f; #X obj 187 189 f; #X obj 215 189 f; #X obj 245 188 f; #X obj 275 189 f; #X obj 301 189 f; #X obj 331 190 f; #X obj 69 132 unpack 0 0 0 0 0 0 0 0 0 0 0 0; #X obj 76 278 pack 0 0 0 0 0 0 0 0 0 0 0 0; #X msg 76 304 $2 $5 $4 $3 $1; #X connect 0 0 18 0; #X connect 1 0 18 1; #X connect 2 0 18 2; #X connect 3 0 18 3; #X connect 4 0 18 4; #X connect 5 0 9 0; #X connect 6 0 0 0; #X connect 6 1 1 0; #X connect 6 1 2 0; #X connect 6 1 3 0; #X connect 6 1 4 0; #X connect 6 1 10 0; #X connect 6 1 10 0; #X connect 6 1 11 0; #X connect 6 1 12 0; #X connect 6 1 13 0; #X connect 6 1 14 0; #X connect 6 1 15 0; #X connect 6 1 16 0; #X connect 8 0 6 0; #X connect 9 0 6 0; #X connect 9 1 17 0; #X connect 10 0 18 5; #X connect 11 0 18 6; #X connect 12 0 18 7; #X connect 13 0 18 8; #X connect 14 0 18 9; #X connect 15 0 18 10; #X connect 16 0 18 11; #X connect 17 0 0 1; #X connect 17 1 1 1; #X connect 17 2 2 1; #X connect 17 3 3 1; #X connect 17 4 4 1; #X connect 17 5 10 1; #X connect 17 6 11 1; #X connect 17 7 12 1; #X connect 17 8 13 1; #X connect 17 9 14 1; #X connect 17 10 15 1; #X connect 17 11 16 1; #X connect 18 0 19 0; #X connect 19 0 7 0; #X connect 19 0 17 0; #X restore 110 246 pd permute; #X obj 175 189 loadbang; #X obj 110 220 bng 15 250 50 0 empty empty empty 20 8 0 8 -262144 -1 -1; #X obj 110 274 print outlet_permutation; #X connect 0 0 1 1; #X connect 1 0 4 0; #X connect 2 0 0 0; #X connect 3 0 1 0;
The inlets work as follows: right inlet is for lists to be permutated. The left inlet triggers new permutation, storing the altered list for the next permutation intenally.
Yours, Orm
Am Mittwoch, den 23. Januar 2002 um 13:53:14 Uhr (+0100) schrieb thomas gorbach:
Thank you for information about the ringmodulation. It's perfect now. Other question: Is there an external that can do permutations of numbers. like: 1 2 3 4 2 3 4 1 3 4 1 2 and so on; and 1 2 3 4 5 2 4 3 5 1 4 5 3 1 2 5 1 3 2 4 and so on;
i would like to comput controlldata from permutations.
Thanks for help
Greetns Thomas
hi,
since Orm's [pd permute] cycles with a period of 6 (out of 5! == 120), I have just patched a correct(?) one as an evening refresher, trying to make it a bit more generic too...
This one is clumsy! But is there much simpler way?
Or is this yet another case of my blindness?
Krzysztof
#N canvas 312 133 651 568 12; #N canvas 0 0 430 335 init 0; #X obj 94 131 until; #X obj 94 174 int; #X obj 139 174 - 1; #X obj 94 213 t 0 0 0; #X obj 94 54 inlet; #X obj 94 260 tabwrite $0-t; #X obj 286 131 + 2; #X msg 255 245 ; $1-t resize $2; #X obj 255 213 pack; #X obj 255 174 int $0; #X obj 94 89 t 0 0 b 0; #X connect 0 0 1 0; #X connect 1 0 3 0; #X connect 2 0 1 1; #X connect 3 0 5 0; #X connect 3 1 5 1; #X connect 3 2 2 0; #X connect 4 0 10 0; #X connect 6 0 8 1; #X connect 8 0 7 0; #X connect 9 0 8 0; #X connect 10 0 0 0; #X connect 10 1 1 1; #X connect 10 2 9 0; #X connect 10 3 6 0; #X restore 29 102 pd init; #X obj 497 173 print please; #X msg 497 138 restart...; #N canvas 0 0 481 600 find-first 0; #X obj 124 116 until; #X obj 124 156 int; #X obj 173 156 - 1; #X obj 182 224 - 1; #X obj 153 399 >; #X obj 153 437 sel 1; #X obj 99 15 inlet; #X obj 153 547 outlet; #X obj 182 257 t 0 0; #X obj 124 192 t 0 0 0; #X obj 153 507 int; #X obj 228 547 outlet; #X obj 182 323 t 0 0; #X obj 228 507 int; #X obj 307 547 outlet; #X obj 307 195 spigot; #X obj 153 470 t b b b b; #X obj 99 48 t b 0 0 b; #X msg 307 162 1; #X msg 356 162 0; #X obj 199 48 r $0-find-first-stop; #X obj 256 470 s $0-find-first-stop; #X obj 182 290 tabread $0-t; #X obj 153 363 tabread $0-t; #X obj 124 83 - 1; #X connect 0 0 1 0; #X connect 1 0 9 0; #X connect 2 0 1 1; #X connect 3 0 8 0; #X connect 4 0 5 0; #X connect 5 0 16 0; #X connect 6 0 17 0; #X connect 8 0 22 0; #X connect 8 1 13 1; #X connect 9 0 2 0; #X connect 9 1 23 0; #X connect 9 2 3 0; #X connect 10 0 7 0; #X connect 12 0 4 1; #X connect 12 1 10 1; #X connect 13 0 11 0; #X connect 15 0 14 0; #X connect 16 0 10 0; #X connect 16 1 13 0; #X connect 16 2 21 0; #X connect 16 3 19 0; #X connect 17 0 15 0; #X connect 17 1 24 0; #X connect 17 2 1 1; #X connect 17 3 18 0; #X connect 18 0 15 1; #X connect 19 0 15 1; #X connect 20 0 0 1; #X connect 22 0 12 0; #X connect 23 0 4 0; #X connect 24 0 0 0; #X restore 179 248 pd find-first; #N canvas 0 0 514 503 find-last 0; #X obj 127 97 until; #X obj 127 137 int; #X obj 176 137 - 1; #X obj 156 291 >; #X obj 156 329 sel 1; #X obj 98 25 inlet; #X obj 156 439 outlet; #X obj 156 399 int; #X obj 310 439 outlet; #X obj 310 176 spigot; #X obj 98 58 t b 0 0 b; #X msg 310 143 1; #X msg 359 143 0; #X obj 198 58 r $0-find-last-stop; #X obj 267 362 s $0-find-last-stop; #X obj 177 25 inlet; #X obj 127 173 t 0 0 0; #X obj 156 250 t 0 0; #X obj 236 399 int; #X obj 236 439 outlet; #X obj 156 362 t b b b b; #X obj 156 214 tabread $0-t; #X connect 0 0 1 0; #X connect 1 0 16 0; #X connect 2 0 1 1; #X connect 3 0 4 0; #X connect 4 0 20 0; #X connect 5 0 10 0; #X connect 7 0 6 0; #X connect 9 0 8 0; #X connect 10 0 9 0; #X connect 10 1 0 0; #X connect 10 2 1 1; #X connect 10 3 11 0; #X connect 11 0 9 1; #X connect 12 0 9 1; #X connect 13 0 0 1; #X connect 15 0 3 1; #X connect 16 0 2 0; #X connect 16 1 21 0; #X connect 16 2 18 1; #X connect 17 0 3 0; #X connect 17 1 7 1; #X connect 18 0 19 0; #X connect 20 0 7 0; #X connect 20 1 18 0; #X connect 20 2 14 0; #X connect 20 3 12 0; #X connect 21 0 17 0; #X restore 229 361 pd find-last; #N canvas 0 0 445 202 switch 0; #X obj 78 38 inlet; #X obj 159 38 inlet; #X obj 236 38 inlet; #X obj 316 38 inlet; #X obj 78 131 tabwrite $0-t; #X obj 236 130 tabwrite $0-t; #X connect 0 0 4 0; #X connect 1 0 5 1; #X connect 2 0 5 0; #X connect 3 0 4 1; #X restore 204 398 pd switch; #X obj 29 30 table $0-t; #N canvas 326 10 459 541 reorder 0; #X obj 138 29 inlet; #X obj 176 148 until; #X obj 74 148 int; #X obj 178 105 unpack; #X obj 289 148 int; #X obj 340 148 - 1; #X obj 30 148 + 1; #X obj 176 181 t b b; #X obj 180 263 sel 1; #X obj 289 181 t 0 0 0; #X obj 74 181 t 0 0 0; #X obj 81 353 int; #X obj 296 353 int; #X obj 296 398 tabread $0-t; #X obj 180 230 >; #X obj 138 65 t l l; #X msg 138 105 $2; #X obj 81 398 tabread $0-t; #X obj 297 470 tabwrite $0-t; #X obj 81 470 tabwrite $0-t; #X obj 220 303 t b b b b; #X obj 81 437 int; #X obj 297 437 int; #X connect 0 0 15 0; #X connect 1 0 7 0; #X connect 2 0 10 0; #X connect 3 0 2 1; #X connect 3 1 4 1; #X connect 4 0 9 0; #X connect 5 0 4 1; #X connect 6 0 2 1; #X connect 7 0 2 0; #X connect 7 1 4 0; #X connect 8 0 1 1; #X connect 8 1 20 0; #X connect 9 0 14 1; #X connect 9 1 12 1; #X connect 9 2 5 0; #X connect 10 0 14 0; #X connect 10 1 11 1; #X connect 10 2 6 0; #X connect 11 0 17 0; #X connect 11 0 19 1; #X connect 12 0 13 0; #X connect 12 0 18 1; #X connect 13 0 21 1; #X connect 14 0 8 0; #X connect 15 0 16 0; #X connect 15 1 3 0; #X connect 16 0 1 0; #X connect 17 0 22 1; #X connect 20 0 21 0; #X connect 20 1 22 0; #X connect 20 2 11 0; #X connect 20 3 12 0; #X connect 21 0 19 0; #X connect 22 0 18 0; #X restore 125 500 pd reorder; #X obj 125 398 + 1; #X obj 125 361 int; #X obj 179 286 t b 0 b 0; #X obj 191 102 s $0-init; #X obj 29 65 r $0-init; #X obj 179 138 r $0-next; #X obj 433 248 s $0-next; #X obj 179 210 int; #X obj 201 173 r $0-init; #X obj 229 323 int; #X obj 433 323 int; #X obj 455 286 r $0-init; #N canvas 0 0 362 361 report 0; #X obj 80 34 inlet; #X obj 80 118 until; #X obj 80 161 int; #X obj 126 161 + 1; #X obj 80 199 t 0 0; #X obj 80 244 tabread $0-t; #X obj 80 76 t 0 b b; #X msg 138 118 1; #X obj 80 290 outlet; #X obj 211 290 outlet; #X obj 211 244 int; #X obj 256 244 + 1; #X obj 233 34 inlet; #X msg 233 208 1; #X connect 0 0 6 0; #X connect 1 0 2 0; #X connect 2 0 4 0; #X connect 3 0 2 1; #X connect 4 0 5 0; #X connect 4 1 3 0; #X connect 5 0 8 0; #X connect 6 0 1 0; #X connect 6 1 7 0; #X connect 6 2 10 0; #X connect 7 0 2 1; #X connect 10 0 11 0; #X connect 10 0 9 0; #X connect 11 0 10 1; #X connect 12 0 13 0; #X connect 13 0 10 1; #X restore 433 361 pd report; #X obj 336 138 until; #X obj 433 210 t b b; #X obj 433 432 print :; #X obj 291 286 s $0-end; #X obj 497 65 r $0-end; #X obj 497 102 t b b; #X msg 433 65 bang; #X obj 156 432 r $0-init; #X obj 125 467 pack; #X obj 336 102 t b 0; #X msg 336 65 5; #X obj 509 398 print permno; #X msg 382 65 8; #X msg 239 30 5; #X msg 288 30 8; #X msg 191 30 3; #X msg 288 65 3; #X connect 2 0 1 0; #X connect 3 0 10 0; #X connect 3 1 5 1; #X connect 3 1 9 1; #X connect 3 2 24 0; #X connect 4 0 5 2; #X connect 4 1 5 3; #X connect 8 0 29 0; #X connect 9 0 8 0; #X connect 10 0 9 0; #X connect 10 1 5 0; #X connect 10 2 17 0; #X connect 10 3 4 1; #X connect 12 0 0 0; #X connect 13 0 15 0; #X connect 15 0 3 0; #X connect 16 0 15 1; #X connect 16 0 17 1; #X connect 17 0 4 0; #X connect 18 0 20 0; #X connect 19 0 18 1; #X connect 19 0 20 1; #X connect 20 0 23 0; #X connect 20 1 32 0; #X connect 21 0 22 0; #X connect 22 0 14 0; #X connect 22 1 18 0; #X connect 25 0 26 0; #X connect 26 0 2 0; #X connect 26 1 21 1; #X connect 27 0 22 0; #X connect 28 0 29 1; #X connect 29 0 7 0; #X connect 30 0 21 0; #X connect 30 1 11 0; #X connect 31 0 30 0; #X connect 33 0 30 0; #X connect 34 0 11 0; #X connect 35 0 11 0; #X connect 36 0 11 0; #X connect 37 0 30 0;
hi Krzyzstof,
more of that brainfood, please! It's really permutaining. Apart from being an interesting approach, it taught me a lot of things about pd (and its differences to MAX), I didn't know. There should be more examples out there which show different programming styles.
About being generic: If the english meaning of "permutation" is the same as the german, permutation means a mapping of positions as implemented in my previous patch. What you proposed we call "combination": It refers to all possible combinations of a certain set of numbers (maybe even with a given subset, like in lotteries, where you select 6 numbers out of 49). There are lots of interesting properties of permutations, regarding their periods etc. which make them a somehow special subset of all possible combinations and that's probably the reason, why especially composers in the 50s really liked them (otherwise the pieces would have gotten even longer...).
Among the externals, I wrote for Max was also a patch, which does all combinations (of sets and of subsets of sets). This external has the advantage of being indexable and of telling you the exact number of possible combinations. I don't remember the exact approach about the systematics anymore, but I know, I had to make it up myself, too. I remember not being too satisfied with it. I'll send the original C-code to you in a seperate email together with the code for the permutation external. That way you can find out, how it was done.
Anybody else interested in it should let me know.
-- Orm
P.S.: I have to admit that I prefer a text based approach to solving problems like this, as I find it more comprehensible to read
for (i=max;((i > 0)&&(!found-first)); i--) ...
than to clutter the patch with int and +1 and trigger and until boxes just in order to implement a simple loop. That's probably, why I made code externals and after a while switched to James Mc'Cartneys "pyrite" object for Max (some sort of programming language with embedded text editor in a max object) before more or less ending the Max business altogether some 6 years ago. But that's probably poison for a pd-list =:-)
Am Donnerstag, den 24. Januar 2002 um 21:01:29 Uhr (+0100) schrieb Krzysztof Czaja:
hi,
since Orm's [pd permute] cycles with a period of 6 (out of 5! == 120), I have just patched a correct(?) one as an evening refresher, trying to make it a bit more generic too...
This one is clumsy! But is there much simpler way?
Or is this yet another case of my blindness?
Krzysztof
On Fri, 25 Jan 2002, Orm Finnendahl wrote:
P.S.: I have to admit that I prefer a text based approach to solving problems like this, as I find it more comprehensible to read
for (i=max;((i > 0)&&(!found-first)); i--) ...
than to clutter the patch with int and +1 and trigger and until boxes just in order to implement a simple loop. That's probably, why I made code externals and after a while switched to James Mc'Cartneys "pyrite" object for Max (some sort of programming language with embedded text editor in a max object) before more or less ending the Max business altogether some 6 years ago. But that's probably poison for a pd-list =:-)
I too, find that graphical programming is the wrong tool for things like this. Can you tell more about pyrite? I have never used Max.
I have made an extern that lets me write externs in Scheme for cases like this. It's at http://www.westnet.com/~lt but needs some work. I'll try to post a new version soon.
But, I would like to know what similar things Max has, out of curiosity.
Larry Troxler
.... you could do things like this with the (linux-only) shell external of ggee, where you might use any scripting language you like
Guenter
On Fri, 25 Jan 2002, Larry Troxler wrote:
On Fri, 25 Jan 2002, Orm Finnendahl wrote:
P.S.: I have to admit that I prefer a text based approach to solving problems like this, as I find it more comprehensible to read
for (i=max;((i > 0)&&(!found-first)); i--) ...
than to clutter the patch with int and +1 and trigger and until boxes just in order to implement a simple loop. That's probably, why I made code externals and after a while switched to James Mc'Cartneys "pyrite" object for Max (some sort of programming language with embedded text editor in a max object) before more or less ending the Max business altogether some 6 years ago. But that's probably poison for a pd-list =:-)
I too, find that graphical programming is the wrong tool for things like this. Can you tell more about pyrite? I have never used Max.
I have made an extern that lets me write externs in Scheme for cases like this. It's at http://www.westnet.com/~lt but needs some work. I'll try to post a new version soon.
But, I would like to know what similar things Max has, out of curiosity.
Larry Troxler
On Fri, 25 Jan 2002, [X-UNKNOWN] g�nter geiger wrote:
.... you could do things like this with the (linux-only) shell external of ggee, where you might use any scripting language you like
Guenter
Hi Guenter,
I hadn't really thought of using the shell external, because I assumed it would be too slow for handling real-time message processing. Could I be wrong?
Larry
On Fri, 25 Jan 2002, Larry Troxler wrote:
Hi Guenter,
I hadn't really thought of using the shell external, because I assumed it would be too slow for handling real-time message processing. Could I be wrong?
Larry
Hi,
Yes, it is true that shell isn't specifically fast, it depends on what you are using it for, i.e how fast your metro is.
Additionally I have planned an extension to shell, where the inlet is basically used to pipe commands to your script, then you don't have to start the interpreter everytime you want to execute something.
Another advantage of shell is that it will play very well with multiprocessor systems, because it's asychronous.
Guenter
Hi Larry,
I'm quite sure that the pyrite object doesn't exist any more. It was written for the 68k Mac and to my knowledge never got ported to PowerPC. After that, James McCartney started to develop SuperCollider, which has a very similar syntax as the former pyrite object (something between C,smalltalk and lisp).
Thanks for the hint concerning your external. I definetely will have a look at it. In general, I'm very interested in such things as I would like to interface pd with all sorts of external programs and already started to code some of this. Maybe we could discuss what is needed here on the list?
Yours, Orm
Am Freitag, den 25. Januar 2002 um 08:55:34 Uhr (-0500) schrieb Larry Troxler:
On Fri, 25 Jan 2002, Orm Finnendahl wrote:
P.S.: I have to admit that I prefer a text based approach to solving problems like this, as I find it more comprehensible to read
for (i=max;((i > 0)&&(!found-first)); i--) ...
than to clutter the patch with int and +1 and trigger and until boxes just in order to implement a simple loop. That's probably, why I made code externals and after a while switched to James Mc'Cartneys "pyrite" object for Max (some sort of programming language with embedded text editor in a max object) before more or less ending the Max business altogether some 6 years ago. But that's probably poison for a pd-list =:-)
I too, find that graphical programming is the wrong tool for things like this. Can you tell more about pyrite? I have never used Max.
I have made an extern that lets me write externs in Scheme for cases like this. It's at http://www.westnet.com/~lt but needs some work. I'll try to post a new version soon.
But, I would like to know what similar things Max has, out of curiosity.
Larry Troxler
ON this subject also check out the "pdsend" and "pdreceive" programs which allow you to open pipes between Pd and other programs.
cheers Miller
On Fri, Jan 25, 2002 at 03:56:05PM +0100, Orm Finnendahl wrote:
Hi Larry,
I'm quite sure that the pyrite object doesn't exist any more. It was written for the 68k Mac and to my knowledge never got ported to PowerPC. After that, James McCartney started to develop SuperCollider, which has a very similar syntax as the former pyrite object (something between C,smalltalk and lisp).
Thanks for the hint concerning your external. I definetely will have a look at it. In general, I'm very interested in such things as I would like to interface pd with all sorts of external programs and already started to code some of this. Maybe we could discuss what is needed here on the list?
Yours, Orm
Am Freitag, den 25. Januar 2002 um 08:55:34 Uhr (-0500) schrieb Larry Troxler:
On Fri, 25 Jan 2002, Orm Finnendahl wrote:
P.S.: I have to admit that I prefer a text based approach to solving problems like this, as I find it more comprehensible to read
for (i=max;((i > 0)&&(!found-first)); i--) ...
than to clutter the patch with int and +1 and trigger and until boxes just in order to implement a simple loop. That's probably, why I made code externals and after a while switched to James Mc'Cartneys "pyrite" object for Max (some sort of programming language with embedded text editor in a max object) before more or less ending the Max business altogether some 6 years ago. But that's probably poison for a pd-list =:-)
I too, find that graphical programming is the wrong tool for things like this. Can you tell more about pyrite? I have never used Max.
I have made an extern that lets me write externs in Scheme for cases like this. It's at http://www.westnet.com/~lt but needs some work. I'll try to post a new version soon.
But, I would like to know what similar things Max has, out of curiosity.
Larry Troxler