Forums > MaxMSP

[bugreport?] waveform~ 's crop doesn't work when hidden in an patcher/abstraction

February 20, 2008 | 12:33 pm

Description:
I just did an abstraction to crop buffers with the help of
[waveform~]. But if [waveform~] is hidden, i.e. in a patcher or
abstraction with its window closed, the buffer is cropped but empty
until the object is made visible again.

Expected behavior:
[waveform~]‘s crop message should work even if the object is not
visible.

Steps to reproduce:
See the patch. Note that if the [p cropBuffer~] window is opened, then
the example will work.
I even had some crashes sometimes when opning the [p cropBuffer~]
patcher, but they are not reproductible (the crash happened in the
waveform redraw routine)

Max463, OSX52, intel core duo 2.6

Patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P comment 91 54 122 196617 0_ turn on dac;
#P window linecount 4;
#P comment 151 256 100 196617 5_ open this abstraction => now point 3
and 4 do work;
#B color 6;
#P window linecount 2;
#P comment 83 221 122 196617 2_ this will crop the first sec.;
#P window linecount 1;
#P message 27 221 34 196617 1000;
#P newex 29 408 49 196617 *~ 0.2;
#P message 28 329 72 196617 0 , 1000 1000;
#P newex 28 357 30 196617 line~;
#P user ezdac~ 29 436 73 469 0;
#P newex 29 382 57 196617 play~ foob;
#P button 27 283 15 0;
#N vpatcher 493 384 1093 784;
#P window setfont "Sans Serif" 9.;
#P newex 164 67 59 196617 print CROP;
#P flonum 90 90 121 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 225 146 59 196617 t 0 f;
#P newex 127 198 62 196617 prepend set;
#P newex 25 67 109 196617 route set float int;
#P outlet 90 339 15 0;
#P newex 90 111 194 196617 t b crop f;
#P inlet 25 39 15 0;
#P newex 127 135 48 196617 loadbang;
#P message 127 165 29 196617 foob;
#P user waveform~ 127 269 206 74 3 9;
#W mode select;
#W mouseoutput continuous;
#W unit ms;
#W grid 1000.;
#W ticks 0;
#W labels 1;
#W vlabels 0;
#W vticks 1;
#W bpm 120. 4.;
#W frgb 33 0 0;
#W brgb 60 178 173;
#W rgb2 0 95 255;
#W rgb3 0 0 0;
#W rgb4 0 0 0;
#W rgb5 190 137 255;
#W rgb6 100 100 100;
#W rgb7 100 100 100;
#P connect 3 0 6 0;
#P connect 6 2 9 0;
#P connect 6 1 9 0;
#P connect 9 0 4 0;
#P connect 4 0 5 0;
#P lcolor 3;
#P connect 2 0 1 0;
#P fasten 6 0 7 0 30 186 132 186;
#P connect 1 0 7 0;
#P fasten 4 1 0 0 187 247 132 247;
#P fasten 7 0 0 0 132 248 132 248;
#P connect 3 0 10 0;
#P connect 4 2 8 0;
#P connect 8 0 0 2;
#P connect 8 1 0 3;
#P pop;
#P newobj 27 251 95 196617 p cropBuffer~ foob;
#P message 31 502 67 196617 size 120000;
#P user meter~ 89 109 169 122 50 0 168 0 103 103 103 255 153 0 255 0 0
217 217 0 153 186 0 12 3 3 3 3;
#P user ezadc~ 25 41 69 74 0;
#P toggle 112 129 15 0;
#P newex 25 155 68 196617 record~ foob;
#P newex 31 524 105 196617 buffer~ foob 120000;
#P comment 150 129 122 196617 1_ record some sound;
#P comment 106 330 100 196617 3_ play => nothing;
#P window linecount 3;
#P comment 144 522 100 196617 4_ dble click here => silent buffer but
its lenght is correct;
#P connect 6 0 7 0;
#P connect 6 1 4 0;
#P connect 6 1 7 0;
#P connect 15 0 12 0;
#P connect 15 0 12 1;
#P connect 8 0 3 0;
#P connect 11 0 15 0;
#P connect 13 0 11 0;
#P connect 14 0 13 0;
#P connect 9 0 10 0;
#P connect 16 0 9 0;
#P connect 5 0 4 0;
#P connect 6 0 4 0;
#P window clipboard copycount 20;

_____________________________
Patrick Delges

Centre de Recherches et de Formation Musicales de Wallonie asbl

http://www.crfmw.be/max


February 20, 2008 | 1:36 pm

Confirmed on Mac OS X.4.11, Max 4.6.3


February 21, 2008 | 12:45 am

Thanks for the report. I can confirm.

-A


Viewing 3 posts - 1 through 3 (of 3 total)