[PD] [PD-announce] pd 0.47-0test2 released

Christof Ressi christof.ressi at gmx.at
Sun May 1 00:39:29 CEST 2016


To me the behaviour of [phasor~] and [line~] seems just fine, they are both time depended and simply listen to the internal clock. The problem rather lies in the convertion from samples to milliseconds/frequency. You can't trust [samplerate~] there because it doesn't reflect the implicit upsampling for the overlap.

I think the easist solution is to add some documentation and warnings in the [samplerate~] and/or [block~] help patches for the overlap case. This way you don't have to worry about any back compatibility issues. After all, we've had to live with for years and it's no problem at all once you are aware of it. 


PS: I attached an even more confusing case, this time with [del]. [del 128 1 samp] won't make a 128 sample delay, because 'sample rate' is internally defined the same way as in [samplerate~]. 


> Gesendet: Sonntag, 01. Mai 2016 um 00:06 Uhr
> Von: "Miller Puckette" <msp at ucsd.edu>
> An: "Christof Ressi" <christof.ressi at gmx.at>
> Cc: "pd-list at lists.iem.at" <pd-list at lists.iem.at>
> Betreff: Re: Re: [PD] [PD-announce] pd 0.47-0test2 released
>
> I think that's wierd behavior from phasor~ and line~ that should be fixed
> (if I can do it withouth breaking compatibility somehow :)
> 
> M
> 
> On Sat, Apr 30, 2016 at 11:17:40PM +0200, Christof Ressi wrote:
> > > especially if you use [samplerate~] for converting samples into milliseconds.
> > 
> > See the attached patch for two examples. 
> > 
> > I also think, that the documention of [block~] could be expanded regarding to how overlapping actually works. I noticed that the behaviour of overlapping subpatches is one of the most confusing/challenging parts in Pd for beginners. 
> > 
> > It would probably help to mention that 
> > a) the overlapping blocks are calculated sequentially
> > b) as a consequence, the calculation for each block happens N times faster (N = overlap factor). 
> > 
> > This might seem like a truism for programmers and Pd long-time users but it's not really obvious for beginners!
> > 
> > Just some ideas that came to my mind.
> > 
> > > Gesendet: Samstag, 30. April 2016 um 21:33 Uhr
> > > Von: "Christof Ressi" <christof.ressi at gmx.at>
> > > An: "Miller Puckette" <msp at ucsd.edu>
> > > Cc: "pd-list at lists.iem.at" <pd-list at lists.iem.at>
> > > Betreff: Re: [PD] [PD-announce] pd 0.47-0test2 released
> > >
> > > > samplerate~ reports the sample rate, not the
> > > > number of samples per second
> > > 
> > > I guess that's a matter of definition, which of these two is the actual sample rate. [samplerate~] and [iem_samplerate~] have different opinions on this subject. ;-)
> > > 
> > > If one defines 'samplerate' as 'numbers of samples per second', then the behaviour of [samplerate~] could lead to some surprise in overlapping FFTs, especially if you use [samplerate~] for converting samples into milliseconds.
> > > 
> > > To avoid any potential confusion, I think it's good to just document the actual behaviour in the help patch.
> > > 
> > > 
> > > 
> > > > Gesendet: Samstag, 30. April 2016 um 21:06 Uhr
> > > > Von: "Miller Puckette" <msp at ucsd.edu>
> > > > An: "Christof Ressi" <christof.ressi at gmx.at>
> > > > Cc: "pd-list at lists.iem.at" <pd-list at lists.iem.at>
> > > > Betreff: Re: [PD] [PD-announce] pd 0.47-0test2 released
> > > >
> > > > Hmm.. now I'm genuinely confused - all that changed last Dec. was that I took
> > > > out trailing spaces.  The actual functionality hasn't changed since 2007.
> > > > 
> > > > Interior patches having a block~ object providing overlap don't report a
> > > > higher sample rate - i.e., samplerate~ reports the sample rate, not the
> > > > number of samples per second (equal to sample rate times overlap).
> > > > 
> > > > So now I think the existingsamplerate~ object works fine and doens't need
> > > > changing.
> > > > 
> > > > cheers
> > > > Miller
> > > > 
> > > > On Sat, Apr 30, 2016 at 08:31:02PM +0200, Christof Ressi wrote:
> > > > > Are you sure you really want to change the behaviour instead of just documenting it? Won't this break all overlapping FFTs patches which rely on a [samplerate~] object? If one wants the 'correct' behaviour for overlapping, he/she could use [iem_samplerate~] which was designed for this very purpose...
> > > > > 
> > > > > > Gesendet: Samstag, 30. April 2016 um 19:49 Uhr
> > > > > > Von: "Miller Puckette" <msp at ucsd.edu>
> > > > > > An: "Christof Ressi" <christof.ressi at gmx.at>
> > > > > > Cc: "Alexandre Torres Porres" <porres at gmail.com>, "pd-list at lists.iem.at" <pd-list at lists.iem.at>
> > > > > > Betreff: Re: [PD] [PD-announce] pd 0.47-0test2 released
> > > > > >
> > > > > > I fixed the (incorrect) samplerate~ behavior... it should be now working
> > > > > > correctly (and thus can make do with a simpler help file :)
> > > > > > 
> > > > > > M
> > > > > > 
> > > > > > On Fri, Apr 29, 2016 at 11:40:25AM +0200, Christof Ressi wrote:
> > > > > > > Also it would be cool to finally have a help file for [samplerate~], so users are more likely to understand and avoid its pitfalls (mainly with overlapping subpatches). I just made one, see the attachment.
> > > > > > > 
> > > > > > > Just in case you actually plan to include a help patch for [vsnapshot~], it would be great to mention that - unlike [vline~] - it's only sample accurate and not subsample accurate. I could, however, easily make a subsample accurate version of [vsnapshot~] as an abstraction, so I'm wondering if this difference in behaviour is actually on purpose or rather a bug?
> > > > > > > 
> > > > > > > Christof
> > > > > > >  
> > > > > > >  
> > > > > > > 
> > > > > > > Gesendet: Donnerstag, 28. April 2016 um 06:07 Uhr
> > > > > > > Von: "Alexandre Torres Porres" <porres at gmail.com>
> > > > > > > An: "Miller Puckette" <mpuckett at imusic1.ucsd.edu>
> > > > > > > Cc: "pd-list at lists.iem.at" <pd-list at lists.iem.at>
> > > > > > > Betreff: Re: [PD] [PD-announce] pd 0.47-0test2 released
> > > > > > > 
> > > > > > > a few other things I think we could easily sneak into the next release, related to documentation.
> > > > > > >  
> > > > > > > 1- re-include "paf~" external - it could be brought back now that its patent is over, The F13 example still mentions the existence of this object, so an external should exist or this mention needs to be removed.
> > > > > > > https://sourceforge.net/p/pure-data/bugs/1206/
> > > > > > > 
> > > > > > >  
> > > > > > >  
> > > > > > > 2- there's no help for [vnsapshot~], include one?
> > > > > > >  
> > > > > > > https://sourceforge.net/p/pure-data/bugs/1205/[https://sourceforge.net/p/pure-data/bugs/1205/]
> > > > > > >  3- no help file for [clip]
> > > > > > >  
> > > > > > > https://sourceforge.net/p/pure-data/bugs/1237/[https://sourceforge.net/p/pure-data/bugs/1237/]
> > > > > > >  
> > > > > > > 4 - There are these 2 midi objects in vanilla ([midirealtimein] & [midiclkin]) that have no help file and are not mentioned in the midi-help.pd file, neither are present in the "MIDI and OSC" section of help-intro.pd
> > > > > > > https://sourceforge.net/p/pure-data/bugs/1221[https://sourceforge.net/p/pure-data/bugs/1221/]
> > > > > > >  
> > > > > > > cheers
> > > > > > > 
> > > > > > >  
> > > > > > > 2016-04-27 12:18 GMT-03:00 Alexandre Torres Porres <porres at gmail.com[porres at gmail.com]>:
> > > > > > > yeah, apple always complains about installing pd, but once you say "hey, it's fine, I'm taking the risk" it never bothers you again - as with vanilla 0.46-7 
> > > > > > >  
> > > > > > > apparently something changed now and is making things harder 
> > > > > > >  
> > > > > > > cheers
> > > > > > >  
> > > > > > > 
> > > > > > > 2016-04-27 5:15 GMT-03:00 Pierre Guillot <guillotpierre6 at gmail.com[guillotpierre6 at gmail.com]>:
> > > > > > > 
> > > > > > > > which alert window?> what is the "same" you are referring to?
> > > > > > >  
> > > > > > > My mistake, I thought having the same problem than Alexandre (the window saying that the app comes from an unidentified developer). 
> > > > > > >  
> > > > > > > > no matter how many times i tell mac os it is fine to open pd-47 test, it keeps saying it's from an undentified developer...
> > > > > > > > anybody else or just me?
> > > > > > >  
> > > > > > > But in fact my window says that the app comes from the web. I changed the privileges of the app, now PD works fine.
> > > > > > >  
> > > > > > >  
> > > > > > >  _______________________________________________
> > > > > > > Pd-list at lists.iem.at[Pd-list at lists.iem.at] mailing list
> > > > > > > UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list[https://lists.puredata.info/listinfo/pd-list]
> > > > > > >  _______________________________________________ Pd-list at lists.iem.at mailing list UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list[https://lists.puredata.info/listinfo/pd-list]
> > > > > > 
> > > > > > > #N canvas 843 167 447 292 10;
> > > > > > > #X obj 28 35 samplerate~;
> > > > > > > #X obj 27 97 samplerate~;
> > > > > > > #X obj 27 72 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
> > > > > > > -1;
> > > > > > > #X floatatom 27 119 5 0 0 0 - - -, f 5;
> > > > > > > #X msg 26 248 \; pd dsp 1;
> > > > > > > #N canvas 659 314 450 300 resample 0;
> > > > > > > #X obj 35 85 samplerate~;
> > > > > > > #X obj 35 62 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
> > > > > > > -1;
> > > > > > > #X floatatom 35 111 8 0 0 0 - - -, f 8;
> > > > > > > #X obj 153 112 block~ 64 1 4;
> > > > > > > #X msg 153 85 set 64 1 \$1;
> > > > > > > #X floatatom 153 62 5 0 0 0 - - -, f 5;
> > > > > > > #X text 197 60 set resampling factor;
> > > > > > > #X obj 63 59 loadbang;
> > > > > > > #X connect 0 0 2 0;
> > > > > > > #X connect 1 0 0 0;
> > > > > > > #X connect 4 0 3 0;
> > > > > > > #X connect 5 0 4 0;
> > > > > > > #X connect 7 0 0 0;
> > > > > > > #X restore 25 186 pd resample;
> > > > > > > #N canvas 624 194 811 437 overlap 0;
> > > > > > > #X obj 37 87 samplerate~;
> > > > > > > #X obj 37 64 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
> > > > > > > -1;
> > > > > > > #X floatatom 37 113 8 0 0 0 - - -, f 8;
> > > > > > > #X floatatom 135 61 5 0 0 0 - - -, f 5;
> > > > > > > #X text 179 59 set overlap;
> > > > > > > #X obj 36 153 bang~;
> > > > > > > #X obj 36 204 timer;
> > > > > > > #X msg 135 87 set 1024 \$1 1;
> > > > > > > #X floatatom 36 320 8 0 0 1 ms - -, f 8;
> > > > > > > #X msg 83 203 1024;
> > > > > > > #X obj 83 228 /;
> > > > > > > #X obj 124 203 samplerate~;
> > > > > > > #X obj 36 175 t b b b b;
> > > > > > > #X floatatom 83 276 8 0 0 1 ms - -, f 8;
> > > > > > > #X floatatom 124 228 5 0 0 0 - - -, f 5;
> > > > > > > #X obj 83 250 * 1000;
> > > > > > > #X text 162 276 This the theoretical duration of a block of 1024 samples
> > > > > > > for the global samplerate;
> > > > > > > #X text 214 204 global sample rate \, no deliberate up/downsampling
> > > > > > > ;
> > > > > > > #X obj 60 63 loadbang;
> > > > > > > #X obj 135 118 block~ 1024 4 1;
> > > > > > > #X text 118 320 This is the actual duration. Pd has to speed up the
> > > > > > > computation to create all the additional blocks needed for overlapping.
> > > > > > > This means that Pd is actually upsampling by a factor of N (= overlap
> > > > > > > factor)., f 69;
> > > > > > > #X text 118 365 [samplerate~] \, however \, does NOT reflect this kind
> > > > > > > of implicit upsampling!;
> > > > > > > #X connect 0 0 2 0;
> > > > > > > #X connect 1 0 0 0;
> > > > > > > #X connect 3 0 7 0;
> > > > > > > #X connect 5 0 12 0;
> > > > > > > #X connect 6 0 8 0;
> > > > > > > #X connect 7 0 19 0;
> > > > > > > #X connect 9 0 10 0;
> > > > > > > #X connect 10 0 15 0;
> > > > > > > #X connect 11 0 14 0;
> > > > > > > #X connect 11 0 10 1;
> > > > > > > #X connect 12 0 6 0;
> > > > > > > #X connect 12 1 6 1;
> > > > > > > #X connect 12 2 9 0;
> > > > > > > #X connect 12 3 11 0;
> > > > > > > #X connect 15 0 13 0;
> > > > > > > #X connect 18 0 0 0;
> > > > > > > #X restore 26 217 pd overlap;
> > > > > > > #X text 23 155 [samplerate~] + [block~]:;
> > > > > > > #X text 118 216 but it doesn't reflect overlapping, f 37;
> > > > > > > #X text 115 186 [samplerate~] reflects up/downsampling;
> > > > > > > #X text 52 70 bang to retrieve current samplerate;
> > > > > > > #X text 115 35 get the samplerate in a subpatch;
> > > > > > > #X connect 1 0 3 0;
> > > > > > > #X connect 2 0 1 0;
> > > > > > 
> > > > > > > #N canvas 805 271 655 300 10;
> > > > > > > #X obj 21 163 vsnapshot~;
> > > > > > > #X obj 131 3 loadbang;
> > > > > > > #X obj 179 24 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
> > > > > > > -1;
> > > > > > > #X obj 20 1 bang~;
> > > > > > > #X obj 51 125 del;
> > > > > > > #X floatatom 21 185 5 0 0 0 - - -, f 5;
> > > > > > > #X floatatom 89 126 5 0 0 1 scroll_me - -, f 5;
> > > > > > > #X msg 254 51 \; pd dsp 1;
> > > > > > > #X text 21 206 NOT subsample accurate;
> > > > > > > #X obj 21 90 vline~;
> > > > > > > #X msg 21 66 0 \, 64 \$1;
> > > > > > > #X obj 21 42 f;
> > > > > > > #X obj 21 21 t b b;
> > > > > > > #X obj 131 24 t b b;
> > > > > > > #X obj 163 52 samplerate~;
> > > > > > > #X msg 131 53 64;
> > > > > > > #X obj 131 77 /;
> > > > > > > #X obj 131 99 * 1000;
> > > > > > > #X floatatom 70 43 5 0 0 0 - - -, f 5;
> > > > > > > #X connect 0 0 5 0;
> > > > > > > #X connect 1 0 13 0;
> > > > > > > #X connect 2 0 13 0;
> > > > > > > #X connect 3 0 12 0;
> > > > > > > #X connect 4 0 0 0;
> > > > > > > #X connect 6 0 4 1;
> > > > > > > #X connect 9 0 0 0;
> > > > > > > #X connect 10 0 9 0;
> > > > > > > #X connect 11 0 10 0;
> > > > > > > #X connect 12 0 11 0;
> > > > > > > #X connect 12 1 4 0;
> > > > > > > #X connect 13 0 15 0;
> > > > > > > #X connect 13 1 14 0;
> > > > > > > #X connect 13 1 7 0;
> > > > > > > #X connect 14 0 16 1;
> > > > > > > #X connect 15 0 16 0;
> > > > > > > #X connect 16 0 17 0;
> > > > > > > #X connect 17 0 18 0;
> > > > > > > #X connect 18 0 11 1;
> > > > > > 
> > > > > > > _______________________________________________
> > > > > > > Pd-list at lists.iem.at mailing list
> > > > > > > UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> > > > > > 
> > > > > >
> > > > > 
> > > > > _______________________________________________
> > > > > Pd-list at lists.iem.at mailing list
> > > > > UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> > > >
> > > 
> > > _______________________________________________
> > > Pd-list at lists.iem.at mailing list
> > > UNSUBSCRIBE and account-management -> https://lists.puredata.info/listinfo/pd-list
> > >
> 
> > #N canvas 773 411 790 516 10;
> > #X text 14 26 making a ramp inside overlapping subpatch;
> > #X obj 40 218 phasor~;
> > #X obj 270 243 vline~;
> > #N canvas 0 50 450 250 (subpatch) 0;
> > #X array \$0-plot 256 float 3;
> > #A 0 0.00390625 0.0078125 0.0117188 0.015625 0.0195313 0.0234375 0.0273438
> > 0.03125 0.0351563 0.0390625 0.0429688 0.046875 0.0507813 0.0546875
> > 0.0585938 0.0625 0.0664063 0.0703125 0.0742188 0.078125 0.0820313 0.0859375
> > 0.0898438 0.09375 0.0976563 0.101563 0.105469 0.109375 0.113281 0.117188
> > 0.121094 0.125 0.128906 0.132813 0.136719 0.140625 0.144531 0.148438
> > 0.152344 0.15625 0.160156 0.164063 0.167969 0.171875 0.175781 0.179688
> > 0.183594 0.1875 0.191406 0.195313 0.199219 0.203125 0.207031 0.210938
> > 0.214844 0.21875 0.222656 0.226563 0.230469 0.234375 0.238281 0.242188
> > 0.246094 0.25 0.253906 0.257813 0.261719 0.265625 0.269531 0.273438
> > 0.277344 0.28125 0.285156 0.289063 0.292969 0.296875 0.300781 0.304688
> > 0.308594 0.3125 0.316406 0.320313 0.324219 0.328125 0.332031 0.335938
> > 0.339844 0.34375 0.347656 0.351563 0.355469 0.359375 0.363281 0.367188
> > 0.371094 0.375 0.378906 0.382813 0.386719 0.390625 0.394531 0.398438
> > 0.402344 0.40625 0.410156 0.414063 0.417969 0.421875 0.425781 0.429688
> > 0.433594 0.4375 0.441406 0.445313 0.449219 0.453125 0.457031 0.460938
> > 0.464844 0.46875 0.472656 0.476563 0.480469 0.484375 0.488281 0.492188
> > 0.496094 0.5 0.503906 0.507813 0.511719 0.515625 0.519531 0.523438
> > 0.527344 0.53125 0.535156 0.539063 0.542969 0.546875 0.550781 0.554688
> > 0.558594 0.5625 0.566406 0.570313 0.574219 0.578125 0.582031 0.585938
> > 0.589844 0.59375 0.597656 0.601563 0.605469 0.609375 0.613281 0.617188
> > 0.621094 0.625 0.628906 0.632813 0.636719 0.640625 0.644531 0.648438
> > 0.652344 0.65625 0.660156 0.664063 0.667969 0.671875 0.675781 0.679688
> > 0.683594 0.6875 0.691406 0.695313 0.699219 0.703125 0.707031 0.710938
> > 0.714844 0.71875 0.722656 0.726563 0.730469 0.734375 0.738281 0.742188
> > 0.746094 0.75 0.753906 0.757813 0.761719 0.765625 0.769531 0.773438
> > 0.777344 0.78125 0.785156 0.789063 0.792969 0.796875 0.800781 0.804688
> > 0.808594 0.8125 0.816406 0.820313 0.824219 0.828125 0.832031 0.835938
> > 0.839844 0.84375 0.847656 0.851563 0.855469 0.859375 0.863281 0.867188
> > 0.871094 0.875 0.878906 0.882813 0.886719 0.890625 0.894531 0.898438
> > 0.902344 0.90625 0.910156 0.914063 0.917969 0.921875 0.925781 0.929688
> > 0.933594 0.9375 0.941406 0.945313 0.949219 0.953125 0.957031 0.960938
> > 0.964844 0.96875 0.972656 0.976563 0.980469 0.984375 0.988281 0.992188
> > 0.996094 1;
> > #X coords 0 1 256 0 200 140 1 0 0;
> > #X restore 258 324 graph;
> > #X obj 33 336 block~ 256 4 1;
> > #X msg 88 183 0;
> > #X obj 21 72 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
> > -1;
> > #X obj 41 123 samplerate~;
> > #X obj 21 98 t b b b;
> > #X obj 42 181 / 256;
> > #X obj 31 264 tabwrite~ \$0-plot;
> > #X obj 42 151 * 4;
> > #X text 74 153 multiply by overlap!;
> > #X msg 268 214 0 \, 1 \$1;
> > #X obj 261 271 tabwrite~ \$0-plot;
> > #X obj 247 73 bng 15 250 50 0 empty empty empty 17 7 0 10 -262144 -1
> > -1;
> > #X obj 296 121 samplerate~;
> > #X obj 247 99 t b b b;
> > #X obj 294 144 * 4;
> > #X text 324 143 multiply by overlap!;
> > #X obj 268 168 /;
> > #X msg 264 125 256;
> > #X obj 268 190 * 1000;
> > #X connect 1 0 10 0;
> > #X connect 2 0 14 0;
> > #X connect 5 0 1 1;
> > #X connect 6 0 8 0;
> > #X connect 7 0 11 0;
> > #X connect 8 0 10 0;
> > #X connect 8 1 7 0;
> > #X connect 8 2 5 0;
> > #X connect 9 0 1 0;
> > #X connect 11 0 9 0;
> > #X connect 13 0 2 0;
> > #X connect 15 0 17 0;
> > #X connect 16 0 18 0;
> > #X connect 17 0 14 0;
> > #X connect 17 1 21 0;
> > #X connect 17 2 16 0;
> > #X connect 18 0 20 1;
> > #X connect 20 0 22 0;
> > #X connect 21 0 20 0;
> > #X connect 22 0 13 0;
> 
>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: overlap_del.pd
Type: text/x-puredata
Size: 1716 bytes
Desc: not available
URL: <http://lists.puredata.info/pipermail/pd-list/attachments/20160501/ab8ed9af/attachment-0001.bin>


More information about the Pd-list mailing list