[PD] line~ segments

Frank Barknecht barknech at ph-cip.uni-koeln.de
Sun Mar 3 13:46:21 CET 2002


Miller Puckette hat gesagt: // Miller Puckette wrote:

> I think Max/MSP might do this... but Pd never has.  

So my mind was playing tricks on me: I have never used Max/MSP.

> (I think it's possible to do this in an abstraction, using, for
> example, "textfile" to hold a list of breakpoints that you would send
> by messages, that would be sent to a line~ in sequence.)

That's a good idea, but in fact it was a bit trickier to realize than
I first thought. I got it working and as I think that this is a very
useful abstraction I attached a "lineseg~", that can be used just like
the Csound opcode or as a simple ADSR.

It would be trivial to extend it with a note-off sensor and an amplitude
scaling factor if one replaces the trigger bang with float messages and a
[select 0].

Ciao,
-- 
                                                 __    __
 Frank Barknecht       ____ ______   ____ __ trip\ \  / /wire ______
                      / __// __  /__/ __// // __  \ \/ /  __ \\  ___\	
                     / /  / ____/  / /  / // ____// /\ \\  ___\\____ \	
                    /_/  /_____/  /_/  /_//_____// /  \ \\_____\\_____\
                                                /_/    \_\ 
-------------- next part --------------
#N canvas 533 390 627 430 10;
#X obj 256 29 inlet;
#X obj 140 297 outlet~;
#X obj 140 246 line~;
#X obj 207 147 textfile;
#X obj 207 246 print text;
#X obj 171 36 inlet;
#X msg 343 98 rewind;
#X obj 207 78 del 0;
#X obj 69 184 unpack 0 0;
#X msg 343 155 0;
#X obj 343 120 t b;
#X obj 69 206 t b;
#X text 142 13 trigger bang;
#X msg 256 51 add \$1 \$2;
#X obj 473 29 inlet;
#X text 473 9 textfile messages;
#X text 256 9 add amp/time as float pairs;
#X connect 0 0 13 0;
#X connect 2 0 1 0;
#X connect 3 0 2 0;
#X connect 3 0 4 0;
#X connect 3 0 8 0;
#X connect 3 1 6 0;
#X connect 5 0 7 0;
#X connect 6 0 3 0;
#X connect 6 0 10 0;
#X connect 7 0 3 0;
#X connect 8 0 11 0;
#X connect 8 1 7 1;
#X connect 9 0 7 1;
#X connect 10 0 9 0;
#X connect 11 0 7 0;
#X connect 13 0 3 0;
#X connect 14 0 3 0;
-------------- next part --------------
#N canvas 226 209 966 525 10;
#X obj 253 312 vu 15 120 empty empty 35 8 0 8 -66577 -1 1 0;
#X obj 257 260 env~;
#X obj 252 281 - 96;
#X obj 118 153 bng 30 250 50 0 empty empty empty 20 8 0 8 -241291 -258699
-1;
#X msg 350 138 clear;
#X msg 305 86 add 0;
#X obj 257 213 lineseg~;
#X msg 356 169 print;
#X msg 415 169 rewind;
#X msg 317 113 add 0.5 20;
#X obj 118 260 tabwrite~ lineout;
#X msg 283 46 clear \, add 0 0 \, add 1 200 \, add 0.5 100 \, add 0.8
100 \, add 1 0 \, add 0 100;
#X text 120 131 GO!;
#X msg 86 50 0 0 \, 1 200 \, 0.5 100 \, 0.1 0;
#X text 396 346 1: trigger bang;
#X text 396 382 3: textfile messages;
#X text 384 327 lineseg~ inlets;
#X text 395 364 2: add amp/time as float pairs;
#X text 543 141 ADD AN ARRAY NAMED 'lineout' WITH SIZE 44100 HERE TO
SEE THE ENVELOPE!!!;
#X connect 1 0 2 0;
#X connect 2 0 0 0;
#X connect 3 0 6 0;
#X connect 3 0 10 0;
#X connect 4 0 6 2;
#X connect 5 0 6 2;
#X connect 6 0 1 0;
#X connect 6 0 10 0;
#X connect 7 0 6 2;
#X connect 8 0 6 2;
#X connect 9 0 6 2;
#X connect 11 0 6 2;
#X connect 13 0 6 1;


More information about the Pd-list mailing list