[PD] reproduce envelope

Hans Roels hans.roels at versateladsl.be
Thu Oct 30 17:32:23 CET 2008


Hello,

Is is possible in Pd to produce exactly the same envelope again and 
again? If I send the same message to vline and use this to cut an 
envelope out of noise or a sine wave, it always changes a bit (if you 
listen carefully). (The phase is always reset, that's not the 
problem.) I recorded the sounds, had a look at the soundfiles in an 
edit program and noticed that all the envelopes were slightly 
different. Then I used line~ in a subpatch with blocksize 1 and did 
the same thing. This sounds better and if I looked at the recorded 
sound files they were more identical (although the release changes a 
bit, there seems to be a very small inaccuracy in the delay... but 
you can't hear this with the sine sound. The noise sound is always a 
bit different, I guess because it are randomly generated frequencies?).
Anyway I thought that vline~ was more precise than line~ but this 
doesn't seem to be true...?
Have a look at the file in attach.

Hans R 
-------------- next part --------------
#N canvas 42 23 722 623 12;
#X obj 106 154 vline~;
#X obj 68 185 *~;
#X obj 59 259 dac~;
#X obj 145 81 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
-1;
#X msg 106 130 0.5 20 \, 0 50 20;
#X obj 146 15 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 145 43 metro 500;
#N canvas 0 0 450 300 (subpatch) 0;
#X array view 1000 float 2;
#X coords 0 1 1000 -1 200 140 1;
#X restore 297 25 graph;
#X obj 121 447 vline~;
#X obj 81 521 *~;
#X obj 62 580 dac~;
#X obj 154 367 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144
-1 -1;
#X msg 122 425 0.5 20 \, 0 50 20;
#X obj 158 313 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 158 338 metro 500;
#X obj 115 578 tabwrite~ view;
#X obj 37 438 osc~ 440;
#X msg 81 409 0;
#X obj 31 114 noise~;
#X obj 100 260 tabwrite~ view;
#X obj 258 216 loadbang;
#X msg 256 243 \; view resize 1000 \;;
#X msg 408 243 \; view resize 5000 \;;
#X obj 421 436 dac~;
#N canvas 738 321 564 342 blocksize1-osc 0;
#X obj 15 7 block~ 1;
#X obj 58 222 *~;
#X obj 134 20 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 133 48 metro 500;
#X obj 59 258 outlet~;
#X obj 96 191 line~;
#X obj 152 77 t b b;
#X msg 169 125 0.5 20;
#X obj 112 111 del 20;
#X msg 89 145 0 50;
#X obj 152 262 tabwrite~ view2;
#N canvas 0 0 450 300 (subpatch) 0;
#X array view2 1000 float 2;
#X coords 0 1 1000 -1 200 140 1;
#X restore 280 30 graph;
#X obj 21 151 osc~ 440;
#X msg 71 110 0;
#X text 170 207 the attack is more exact now \, the release (the delay
object...?) still changes a bit though...;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 5 0 1 1;
#X connect 5 0 10 0;
#X connect 6 0 8 0;
#X connect 6 1 7 0;
#X connect 6 1 10 0;
#X connect 6 1 13 0;
#X connect 7 0 5 0;
#X connect 8 0 9 0;
#X connect 9 0 5 0;
#X connect 12 0 1 0;
#X connect 13 0 12 1;
#X restore 330 348 pd blocksize1-osc;
#N canvas 687 533 628 346 blocksize1-noise 0;
#X obj 15 7 block~ 1;
#X obj 58 222 *~;
#X obj 134 20 tgl 15 0 empty empty empty 17 7 0 10 -262144 -1 -1 0
1;
#X obj 133 48 metro 500;
#X obj 59 258 outlet~;
#X obj 96 191 line~;
#X obj 152 77 t b b;
#X msg 169 125 0.5 20;
#X obj 112 111 del 20;
#X msg 89 145 0 50;
#N canvas 0 0 450 300 (subpatch) 0;
#X array view3 1000 float 2;
#X coords 0 1 1000 -1 200 140 1;
#X restore 280 30 graph;
#X msg 71 110 0;
#X obj 21 151 noise~;
#X obj 152 262 tabwrite~ view3;
#X text 153 183 the attack is more exact now \, the release (the delay
object...?) still changes a bit though...;
#X connect 1 0 4 0;
#X connect 2 0 3 0;
#X connect 3 0 6 0;
#X connect 5 0 1 1;
#X connect 5 0 13 0;
#X connect 6 0 8 0;
#X connect 6 1 7 0;
#X connect 6 1 11 0;
#X connect 6 1 13 0;
#X connect 7 0 5 0;
#X connect 8 0 9 0;
#X connect 9 0 5 0;
#X connect 12 0 1 0;
#X restore 478 351 pd blocksize1-noise;
#X text 332 323 better solution in here:;
#N canvas 369 718 474 156 record-file 0;
#X obj 66 51 bng 15 250 50 0 1-refsrec 1-refrrec rec 0 -6 0 8 -258699
-1 -1;
#X obj 107 52 bng 15 250 50 0 1-refsstop 1-refrstop stop -5 -6 0 8
-262144 -1 -1;
#X msg 136 313 start;
#X msg 294 358 stop;
#X obj 48 424 inlet~;
#X obj 28 226 savepanel;
#X msg 45 289 open \$1.wav;
#X obj 407 203 inlet;
#X obj 406 259 select 0 1;
#X text 411 171 1 = record \, 0 = stop recording;
#X obj 140 189 r 1-refsrec;
#X obj 303 328 r 1-refsstop;
#X obj 517 299 s 1-refrrec;
#X obj 405 299 s 1-refrstop;
#X symbolatom 26 77 45 0 0 0 - #1-refrsym -;
#X obj 25 345 s 1-refrsym;
#X text 388 79 .wav;
#X obj 26 51 bng 15 250 50 0 1-refsopen 1-refropen open -5 -6 0 8 -262144
-1 -1;
#X obj 23 194 r 1-refsopen;
#X obj 275 432 inlet~;
#X obj 46 520 writesf~ 1;
#X obj 245 534 writesf~ 2;
#X obj 129 431 spigot;
#X obj 218 431 spigot;
#X obj 197 375 == 0;
#X obj 170 50 tgl 15 0 1-refsstereo 1-refrstereo stereo_rec_on 17 7
0 9 -262144 -1 -1 0 1;
#X obj 220 282 r 1-refsstereo;
#X obj 426 373 loadbang;
#X msg 426 399 0;
#X obj 424 468 s 1-refrstereo;
#X obj 45 258 symbol;
#X obj 211 314 t b f;
#X obj 406 230 > 0;
#X obj 137 459 print m;
#X obj 208 465 print s;
#X text 421 427 niet naar hieronder anders via r \$1-refsstereo bij
opstarten altijd bang 'open .wav';
#X connect 2 0 22 0;
#X connect 2 0 23 0;
#X connect 3 0 22 0;
#X connect 3 0 23 0;
#X connect 4 0 20 0;
#X connect 4 0 21 0;
#X connect 5 0 15 0;
#X connect 5 0 30 0;
#X connect 6 0 22 0;
#X connect 6 0 23 0;
#X connect 7 0 32 0;
#X connect 8 0 13 0;
#X connect 8 1 12 0;
#X connect 10 0 2 0;
#X connect 11 0 3 0;
#X connect 18 0 5 0;
#X connect 19 0 21 1;
#X connect 22 0 20 0;
#X connect 23 0 21 0;
#X connect 24 0 22 1;
#X connect 26 0 31 0;
#X connect 27 0 28 0;
#X connect 28 0 23 1;
#X connect 28 0 24 0;
#X connect 30 0 6 0;
#X connect 31 0 30 0;
#X connect 31 1 24 0;
#X connect 31 1 23 1;
#X connect 32 0 8 0;
#X restore 370 576 pd record-file;
#X text 124 179 the moment at which the attack starts changes a bit...
;
#X connect 0 0 1 1;
#X connect 0 0 19 0;
#X connect 1 0 2 0;
#X connect 1 0 2 1;
#X connect 3 0 4 0;
#X connect 3 0 19 0;
#X connect 3 0 18 0;
#X connect 4 0 0 0;
#X connect 5 0 6 0;
#X connect 6 0 3 0;
#X connect 8 0 9 1;
#X connect 9 0 10 0;
#X connect 9 0 10 1;
#X connect 9 0 15 0;
#X connect 9 0 27 0;
#X connect 11 0 12 0;
#X connect 11 0 17 0;
#X connect 11 0 15 0;
#X connect 12 0 8 0;
#X connect 13 0 14 0;
#X connect 14 0 11 0;
#X connect 16 0 9 0;
#X connect 17 0 16 1;
#X connect 18 0 1 0;
#X connect 20 0 21 0;
#X connect 24 0 23 0;
#X connect 24 0 23 1;
#X connect 24 0 27 0;
#X connect 25 0 23 0;
#X connect 25 0 23 1;


More information about the Pd-list mailing list