Forums > MaxMSP

max lacks a curve drawing tool with an intuitive GUI?!?

August 24, 2007 | 11:29 pm

OK, can you guys please enlighten me here:

From all that I can find, it seems like there are no Max/MSP objects or externals for drawing curves which have an intuitive GUI. An example of what I would consider to be a good GUI for curve drawing is the one in Adobe Photoshop.

[techno~] only has exponential curve drawing… this is too limited.

Jasch’s [bspline] object seems to be the closest thing to what I want. However, understanding how to use [bspline] confuses the heck out of me. I could spend a lot of time trying to figure it out, but I just feel like end users shouldn’t have to deal with this.

I just want to draw some curves to control the amplitudes of some [cycle~] objects. I have no interest in dealing with the internal language used by any curve drawing objects or patchers. I think that there should be an object or patcher available that allows me to simply click and drag to create and position some control points in order to create a curve, like there is in Photoshop. (+ some additional configurability, such as user definable range and domain size, etc.)

Am I wrong? Is there an object, external, or patcher out there that does what I want? Is there a way to do what I want using [bspline]? If so, can someone post a patcher?

Thanks, any help would be much appreciated


August 24, 2007 | 11:45 pm

It would be nice to have a mode of bpfunction which does this. Maybe a good feature request, but it doesn’t seem trivial to implement.

As a simple workaround you can use multislider or the waveform~ editor to draw curves, but they don’t provide the "bezier-style" creation of the lines like Photoshop, Audition, etc.

Or you can roll your own functions using sin, cos, etc., using an uzi to generate a large set of values. bpfunction can then be used to scale the result too.

–CJ


August 25, 2007 | 3:12 am

why cant they just add that to the envelope draw widget already!!! max 5!?


August 25, 2007 | 6:53 am

have a look at the updated help file of my [bspline] object.
there you’ll find a few tricks for GUI applications.

http://www.jasch.ch/dl/

/*j


August 25, 2007 | 12:40 pm

jasch skrev:
> have a look at the updated help file of my [bspline] object.
> there you’ll find a few tricks for GUI applications.
let me guess; v. 0.4, which is osx-only?

Andreas.


September 7, 2007 | 11:01 am

Hi there!
I am a little bit stopped here:
I am using the bspline-object from jasch’s homepage. I can’t get it rendered into a jit.window! When I take the "bspline.help"-file, the curve is rendered into a lcd-object. How can I render it into a jit.window or jit.pwindow?
I found another patch using the bspline-object (see afterwards) with a rendering, but when I try to mix the two patches up, I don’t get a result…
Here the patch:

#P toggle 265 220 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 226 219 35 9109513 sel 27;
#P message 265 238 68 9109513 fullscreen $1;
#P newex 168 263 235 9109513 jit.window mado @depthbuffer 1 @size 400 300;
#P newex 181 219 40 9109513 key;
#P toggle 647 158 15 0;
#N vpatcher 171 204 988 618;
#P origin 0 -3;
#P window setfont "Sans Serif" 9.;
#P comment 702 162 100 9109513 Wave Z Depth;
#P comment 316 68 100 9109513 Wave X Height;
#P inlet 53 53 15 0;
#P inlet 36 53 15 0;
#P newex 36 80 27 9109513 gate;
#P newex 189 162 35 9109513 zl rev;
#P flonum 279 66 32 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 109 88 180 9109513 jit.op @op – @val 0.5;
#P flonum 240 45 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 109 66 141 9109513 jit.op @op * @val 3;
#P number 147 134 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 109 134 27 9109513 t b l;
#P newex 109 158 48 9109513 speedlim;
#P newex 189 184 511 9109513 unpack 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.;
#P newex 109 45 123 9109513 jit.matrix 1 float32 1 12;
#P window setfont Verdana 9.;
#P newex 109 112 43 23724041 jit.spill;
#B color 5;
#P window setfont "Sans Serif" 9.;
#P hidden message 36 163 20 9109513 50;
#P hidden newex 36 140 45 9109513 loadbang;
#P newex 174 206 541 9109513 pack -1.2 0. 0. -1. 0. 0. -0.8 0. 0. -0.6 0. 0. -0.4 0. 0. -0.2 0. 0. 0. 0. 0. 0.2 0. 0. 0.4 0. 0. 0.6 0. 0. 0.8 0. 0. 1. 0. 0.;
#P number 36 186 35 9 4 255 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 36 203 45 9109513 steps $1;
#P newex 17 372 52 9109513 s sketchy;
#P message 111 297 58 9109513 set moveto;
#P message 92 320 50 9109513 set lineto;
#N vpatcher 40 55 440 355;
#N comlet bang on first bang;
#P outlet 25 197 15 0;
#P button 53 70 15 0;
#P window setfont "Sans Serif" 9.;
#N counter;
#X flags 0 0;
#P newobj 25 96 66 9109513 counter;
#N comlet reset;
#P inlet 53 42 15 0;
#N comlet bang-count;
#P inlet 25 42 15 0;
#P button 25 164 15 0;
#P newex 25 135 30 9109513 sel 0;
#P button 25 70 15 0;
#P connect 3 0 0 0;
#P connect 0 0 5 0;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 7 0;
#P connect 4 0 6 0;
#P connect 6 0 5 2;
#P pop;
#P newobj 35 297 67 9109513 p cntr;
#P newex 36 264 27 9109513 t b l;
#P message 167 320 88 9109513 glcolor 1. 1. 1. 1.;
#P newex 17 340 71 9109513 prepend lineto;
#P newex 36 236 66 9109513 bspline;
#P flonum 705 184 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 280 46 100 9109513 Wave Multiplier;
#P comment 6 135 100 9109513 Number of Steps to produce a nice curve – more the nicer but also slower;
#P fasten 8 0 4 0 97 339 22 339;
#P fasten 9 0 4 0 116 339 22 339;
#P fasten 6 1 4 0 58 331 22 331;
#P fasten 5 0 10 0 172 371 22 371;
#P connect 4 0 10 0;
#P connect 6 0 7 0;
#P connect 28 0 27 0;
#P hidden connect 14 0 15 0;
#P hidden connect 15 0 12 0;
#P connect 12 0 11 0;
#P connect 11 0 3 0;
#P fasten 13 0 3 0 179 231 41 231;
#P connect 3 0 6 0;
#P connect 29 0 27 1;
#P connect 3 1 7 1;
#P fasten 7 0 8 0 40 316 97 316;
#P fasten 27 0 17 0 41 103 100 103 100 39 114 39;
#P connect 17 0 22 0;
#P connect 22 0 24 0;
#P connect 24 0 16 0;
#P connect 16 0 20 0;
#P connect 20 0 19 0;
#P fasten 3 1 9 0 97 293 116 293;
#P connect 21 0 19 1;
#P fasten 6 0 5 0 41 293 172 293;
#P fasten 19 0 13 0 114 198 179 198;
#P fasten 20 1 26 0 131 154 194 154;
#P connect 26 0 18 0;
#P connect 18 0 13 1;
#P fasten 2 0 13 2 710 203 209 203;
#P connect 18 1 13 4;
#P connect 23 0 22 1;
#P fasten 2 0 13 5 710 203 254 203;
#P connect 25 0 24 1;
#P connect 18 2 13 7;
#P fasten 2 0 13 8 710 203 299 203;
#P connect 18 3 13 10;
#P fasten 2 0 13 11 710 203 344 203;
#P connect 18 4 13 13;
#P fasten 2 0 13 14 710 203 389 203;
#P connect 18 5 13 16;
#P fasten 2 0 13 17 710 203 434 203;
#P connect 18 6 13 19;
#P fasten 2 0 13 20 710 203 479 203;
#P connect 18 7 13 22;
#P fasten 2 0 13 23 710 203 524 203;
#P connect 18 8 13 25;
#P fasten 2 0 13 26 710 203 569 203;
#P connect 18 9 13 28;
#P fasten 2 0 13 29 710 203 614 203;
#P connect 18 10 13 31;
#P fasten 2 0 13 32 710 203 659 203;
#P connect 18 11 13 34;
#P fasten 2 0 13 35 710 203 704 203;
#P pop;
#P newobj 647 192 41 9109513 p wave;
#P hidden message 223 46 14 9109513 2;
#P flonum 109 45 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 191 305 434 569;
#P origin 9 0;
#P inlet 124 153 15 0;
#P inlet 13 28 15 0;
#P window setfont Verdana 9.;
#P newex 84 200 103 23724041 jit.poke~ efuefuti 2;
#P newex 176 127 43 23724041 !-~ 11;
#B color 4;
#P newex 84 175 50 23724041 *~ 0.02;
#P newex 84 131 56 23724041 cartopol~;
#P newex 84 99 102 23724041 fft~ 512 512 0;
#P newex 13 50 77 23724041 select 0 1;
#P newex 13 121 34 23724041 adc~;
#P message 46 72 68 23724041 startwindow;
#P message 13 72 31 23724041 stop;
#P newex 13 95 34 23724041 dac~;
#P connect 10 0 4 0;
#P connect 4 0 1 0;
#P hidden connect 3 0 0 0;
#P fasten 2 0 0 0 51 91 18 91;
#P connect 1 0 0 0;
#P hidden connect 3 1 0 1;
#P connect 4 1 2 0;
#P hidden fasten 3 1 5 0 59 136 59 94 89 94;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 9 0;
#P connect 11 0 7 1;
#P connect 5 1 6 1;
#P connect 5 2 8 0;
#P lcolor 5;
#P connect 8 0 9 2;
#P pop;
#P newobj 84 73 35 9109513 p peak;
#P number 194 67 35 9 1 63 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Verdana 9.;
#P message 194 90 76 23724041 line_width $1;
#P toggle 485 40 15 0;
#P message 509 41 92 23724041 blend_enable $1;
#P toggle 369 40 15 0;
#P message 394 41 69 23724041 antialias $1;
#P user jit.pwindow 465 196 132 119 0 1 0 0 1 0;
#P newex 466 160 156 23724041 jit.matrix efuefuti 1 char 1 12;
#P window setfont "Sans Serif" 9.;
#P message 43 295 33 9109513 reset;
#P newex 43 322 51 9109513 s sketchy;
#P newex 282 112 51 9109513 r sketchy;
#P toggle 370 68 15 0;
#P message 370 90 94 9109513 smooth_shading $1;
#P hidden newex 164 45 50 9109513 loadbang;
#P toggle 282 68 15 0;
#P message 282 90 81 9109513 depth_enable $1;
#P newex 282 135 89 9109513 jit.gl.sketch mado;
#B color 5;
#P hidden message 164 79 13 9109513 1;
#P number 64 45 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 19 45 15 0;
#P newex 19 71 55 9109513 qmetro 50;
#P newex 19 118 86 9109513 t b b b b b erase;
#P newex 19 209 90 9109513 jit.gl.render mado;
#P comment 19 28 44 9109513 START;
#P comment 108 32 100 9109513 Audio Level;
#P comment 666 159 100 9109513 Turn Wave off/on;
#P connect 18 0 19 0;
#P fasten 18 0 29 1 471 184 683 184;
#P connect 30 0 29 0;
#P hidden fasten 8 0 11 0 169 81 287 81;
#P hidden connect 8 0 21 0;
#P hidden fasten 8 0 14 0 169 81 375 81;
#P hidden connect 8 0 23 0;
#P hidden connect 8 0 30 0;
#P fasten 23 0 22 0 490 57 503 57 503 38 514 38;
#P fasten 4 3 18 0 69 159 471 159;
#P fasten 21 0 20 0 374 57 389 57 389 38 399 38;
#P connect 14 0 13 0;
#P hidden fasten 24 0 9 0 199 109 287 109;
#P hidden connect 10 0 9 0;
#P connect 15 0 9 0;
#P hidden connect 13 0 9 0;
#P hidden connect 20 0 9 0;
#P hidden connect 22 0 9 0;
#P connect 11 0 10 0;
#P connect 35 0 33 0;
#P fasten 34 0 35 0 231 237 262 237 262 217 270 217;
#P fasten 31 0 34 0 186 238 223 238 223 217 231 217;
#P hidden connect 12 0 8 0;
#P hidden connect 12 0 28 0;
#P connect 25 0 24 0;
#P hidden connect 28 0 25 0;
#P fasten 33 0 32 0 270 257 173 257;
#P connect 27 0 26 1;
#P connect 6 0 5 0;
#P fasten 6 0 26 0 24 65 89 65;
#P connect 7 0 5 1;
#P connect 17 0 16 0;
#P fasten 4 4 17 0 84 284 48 284;
#P connect 4 0 3 0;
#P fasten 4 5 3 0 99 166 24 166;
#P connect 5 0 4 0;
#P window clipboard copycount 36;

Can somebody have a look on the patch? Maybe I am just thinking too complicated?!?
Also I don’t afford to put some more control-points into the curve. With a function-object it would work, but just adding points by given x/y-coordinates poses a big barrier for me!
Thanx,
Johannes


September 7, 2007 | 4:13 pm

Hello there!

Well, I spent quite a time on my problem and finally I come forward but "step-bystep" (in fact, very small steps ;) ).
I could reach to mix the two patches together now! Well, nearly…
The bspline is rendered now in a "jit.window", and I can also put more control-points into the curve, by changing the "jit.matrix". I cannot just jet give the control-points the x/y-coordinates, but I will work on it (I think the solution is in creating a control-matrix, or so…).
But here the problem for the moment: I can’t visualize the control-points in the "jit.window"! The control-lines between the points are visible, but not the points. I have already a smoking head because of this problem…
Here my patch:

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 121 168 34 9109513 reset;
#P newex 121 191 172 9109513 jit.gl.handle mado @inherit_transform 1;
#P toggle 272 227 15 0;
#P newex 233 226 35 9109513 sel 27;
#P message 272 245 68 9109513 fullscreen $1;
#P newex 175 270 235 9109513 jit.window mado @depthbuffer 1 @size 400 300;
#P newex 188 226 40 9109513 key;
#P toggle 654 165 15 0;
#N vpatcher 1301 492 2118 906;
#P origin 0 -3;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 640 509 1240 909;
#P window setfont "Sans Serif" 9.;
#P window linecount 0;
#P message 302 153 88 9109513 set circle 0.5;
#P window linecount 1;
#N vpatcher 40 55 440 355;
#N comlet bang on first bang;
#P outlet 25 197 15 0;
#P window setfont "Sans Serif" 9.;
#N counter;
#X flags 0 0;
#P newobj 25 96 66 9109513 counter;
#N comlet reset;
#P inlet 53 42 15 0;
#N comlet bang-count;
#P inlet 25 42 15 0;
#P newex 25 135 30 9109513 sel 0;
#P connect 1 0 3 0;
#P connect 3 0 0 0;
#P connect 0 0 4 0;
#P connect 2 0 3 2;
#P pop;
#P newobj 303 129 40 9109513 p cntr;
#P message 372 126 58 9109513 set moveto;
#P message 408 98 79 9109513 glcolor 1. 1. 0. 1.;
#P message 191 99 77 9109513 glcolor 1. 0. 1. 1.;
#P newex 126 102 49 9109513 zl slice 2;
#P newex 126 80 45 9109513 zl iter 3;
#P newex 50 211 45 9109513 gate 1 1;
#P newex 266 204 45 9109513 gate 1 1;
#P newex 303 100 49 9109513 zl slice 2;
#P newex 302 177 82 9109513 prepend circle 0.5;
#P newex 302 78 45 9109513 zl iter 3;
#P message 145 158 58 9109513 set moveto;
#P message 85 158 50 9109513 set lineto;
#P newex 126 50 116 9109513 t b l b l b;
#N vpatcher 40 55 440 355;
#N comlet bang on first bang;
#P outlet 25 197 15 0;
#P window setfont "Sans Serif" 9.;
#N counter;
#X flags 0 0;
#P newobj 25 96 66 9109513 counter;
#N comlet reset;
#P inlet 53 42 15 0;
#N comlet bang-count;
#P inlet 25 42 15 0;
#P newex 25 135 30 9109513 sel 0;
#P connect 1 0 3 0;
#P connect 3 0 0 0;
#P connect 0 0 4 0;
#P connect 2 0 3 2;
#P pop;
#P newobj 85 137 40 9109513 p cntr;
#P newex 85 182 71 9109513 prepend lineto;
#P inlet 29 19 15 0;
#P inlet 50 19 15 0;
#P inlet 266 23 15 0;
#P outlet 50 255 15 0;
#P connect 2 0 13 0;
#P connect 12 0 0 0;
#P connect 13 0 0 0;
#P fasten 15 0 5 0 131 122 90 122;
#P connect 5 0 7 0;
#P fasten 15 0 4 0 131 178 90 178;
#P connect 7 0 4 0;
#P fasten 8 0 4 0 150 183 90 183;
#P fasten 16 0 13 1 196 147 214 147 214 205 90 205;
#P connect 4 0 13 1;
#P fasten 6 2 5 1 183 134 120 134;
#P connect 3 0 6 0;
#P connect 6 1 14 0;
#P connect 14 0 15 0;
#P fasten 6 2 8 0 183 154 150 154;
#P connect 6 2 16 0;
#P connect 1 0 12 0;
#P fasten 17 0 12 1 413 121 439 121 439 199 306 199;
#P connect 10 0 12 1;
#P fasten 6 3 9 0 209 73 307 73;
#P connect 19 0 20 0;
#P fasten 11 0 10 0 308 126 293 126 293 172 307 172;
#P fasten 18 0 10 0 377 148 399 148 399 172 307 172;
#P connect 20 0 10 0;
#P connect 9 0 11 0;
#P connect 11 0 19 0;
#P fasten 6 4 19 1 235 78 292 78 292 125 338 125;
#P fasten 6 4 18 0 235 74 377 74;
#P fasten 6 4 17 0 235 72 413 72;
#P pop;
#P newobj 397 288 78 9109513 p draw_control_2;
#P toggle 465 271 15 0;
#P objectname toggle[2];
#P toggle 431 271 15 0;
#P objectname toggle[1];
#P comment 702 162 100 9109513 Wave Z Depth;
#P comment 316 68 100 9109513 Wave X Height;
#P inlet 53 53 15 0;
#P inlet 36 53 15 0;
#P newex 36 80 27 9109513 gate;
#P newex 189 162 35 9109513 zl rev;
#P flonum 279 66 32 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 109 88 180 9109513 jit.op @op – @val 0.5;
#P flonum 240 45 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 109 66 141 9109513 jit.op @op * @val 3;
#P number 147 134 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 109 134 27 9109513 t b l;
#P newex 109 158 48 9109513 speedlim;
#P newex 189 184 511 9109513 unpack 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0. 0.;
#P newex 109 45 105 9109513 jit.matrix 1 float32 1 12;
#P window setfont Verdana 9.;
#P newex 109 112 43 23789577 jit.spill;
#B color 5;
#P window setfont "Sans Serif" 9.;
#P hidden message 36 163 20 9109513 50;
#P hidden newex 36 140 45 9109513 loadbang;
#P newex 174 206 541 9109513 pack -1.2 0. 0. -1. 0. 0. -0.8 0. 0. -0.6 0. 0. -0.4 0. 0. -0.2 0. 0. 0. 0. 0. 0.2 0. 0. 0.4 0. 0. 0.6 0. 0. 0.8 0. 0. 1. 0. 0.;
#P number 36 186 35 9 4 255 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P message 36 203 45 9109513 steps $1;
#P newex 17 372 52 9109513 s sketchy;
#P message 111 297 58 9109513 set moveto;
#P message 92 320 50 9109513 set lineto;
#N vpatcher 40 55 440 355;
#N comlet bang on first bang;
#P outlet 25 197 15 0;
#P button 53 70 15 0;
#P window setfont "Sans Serif" 9.;
#N counter;
#X flags 0 0;
#P newobj 25 96 66 9109513 counter;
#N comlet reset;
#P inlet 53 42 15 0;
#N comlet bang-count;
#P inlet 25 42 15 0;
#P button 25 164 15 0;
#P newex 25 135 30 9109513 sel 0;
#P button 25 70 15 0;
#P connect 3 0 0 0;
#P connect 0 0 5 0;
#P connect 5 0 1 0;
#P connect 1 0 2 0;
#P connect 2 0 7 0;
#P connect 4 0 6 0;
#P connect 6 0 5 2;
#P pop;
#P newobj 35 297 67 9109513 p cntr;
#P newex 36 264 27 9109513 t b l;
#P message 167 320 88 9109513 glcolor 1. 1. 1. 1.;
#P newex 17 340 71 9109513 prepend lineto;
#P newex 36 236 66 9109513 bspline;
#P flonum 703 185 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P comment 280 46 100 9109513 Wave Multiplier;
#P window linecount 4;
#P comment 6 135 100 9109513 Number of Steps to produce a nice curve – more the nicer but also slower;
#P fasten 6 1 4 0 58 331 22 331;
#P fasten 9 0 4 0 116 339 22 339;
#P fasten 8 0 4 0 97 339 22 339;
#P connect 34 0 10 0;
#P connect 4 0 10 0;
#P fasten 5 0 10 0 172 371 22 371;
#P connect 6 0 7 0;
#P connect 28 0 27 0;
#P hidden connect 14 0 15 0;
#P hidden connect 15 0 12 0;
#P connect 12 0 11 0;
#P connect 13 0 3 0;
#P connect 11 0 3 0;
#P connect 3 0 6 0;
#P connect 29 0 27 1;
#P connect 3 1 7 1;
#P fasten 7 0 8 0 40 316 97 316;
#P fasten 27 0 17 0 41 103 100 103 100 39 114 39;
#P connect 17 0 22 0;
#P connect 22 0 24 0;
#P connect 24 0 16 0;
#P connect 16 0 20 0;
#P connect 20 0 19 0;
#P fasten 3 1 9 0 97 293 116 293;
#P connect 21 0 19 1;
#P fasten 6 0 5 0 41 293 172 293;
#P connect 19 0 13 0;
#P fasten 20 1 26 0 131 154 194 154;
#P connect 26 0 18 0;
#P connect 18 0 13 1;
#P fasten 2 0 13 2 708 203 209 203;
#P connect 18 1 13 4;
#P connect 23 0 22 1;
#P fasten 2 0 13 5 708 203 254 203;
#P connect 25 0 24 1;
#P connect 18 2 13 7;
#P fasten 2 0 13 8 708 203 299 203;
#P connect 18 3 13 10;
#P fasten 2 0 13 11 708 203 344 203;
#P connect 18 4 13 13;
#P fasten 2 0 13 14 708 203 389 203;
#P connect 13 0 34 0;
#P connect 18 5 13 16;
#P fasten 2 0 13 17 708 203 434 203;
#P connect 32 0 34 1;
#P connect 18 6 13 19;
#P connect 33 0 34 2;
#P fasten 2 0 13 20 708 203 479 203;
#P connect 18 7 13 22;
#P fasten 2 0 13 23 708 203 524 203;
#P connect 18 8 13 25;
#P fasten 2 0 13 26 708 203 569 203;
#P connect 18 9 13 28;
#P fasten 2 0 13 29 708 203 614 203;
#P connect 18 10 13 31;
#P fasten 2 0 13 32 708 203 659 203;
#P connect 18 11 13 34;
#P fasten 2 0 13 35 708 203 704 203;
#P pop;
#P newobj 654 199 41 9109513 p wave;
#P hidden message 230 53 14 9109513 2;
#P flonum 116 52 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#N vpatcher 866 36 1109 300;
#P origin 9 0;
#P inlet 124 153 15 0;
#P inlet 13 28 15 0;
#P window setfont Verdana 9.;
#P window linecount 0;
#P newex 84 200 103 23789577 jit.poke~ efuefuti 2;
#P newex 176 127 42 23789577 !-~ 11;
#B color 4;
#P newex 84 175 50 23789577 *~ 0.02;
#P newex 84 131 56 23789577 cartopol~;
#P newex 84 99 102 23789577 fft~ 512 512 0;
#P newex 13 50 77 23789577 select 0 1;
#P newex 13 121 34 23789577 adc~;
#P message 46 72 68 23789577 startwindow;
#P message 13 72 31 23789577 stop;
#P newex 13 95 34 23789577 dac~;
#P connect 10 0 4 0;
#P connect 4 0 1 0;
#P connect 1 0 0 0;
#P fasten 2 0 0 0 51 91 18 91;
#P hidden connect 3 0 0 0;
#P hidden connect 3 1 0 1;
#P connect 4 1 2 0;
#P hidden fasten 3 1 5 0 59 136 59 94 89 94;
#P connect 5 0 6 0;
#P connect 6 0 7 0;
#P connect 7 0 9 0;
#P connect 11 0 7 1;
#P connect 5 1 6 1;
#P connect 5 2 8 0;
#P lcolor 5;
#P connect 8 0 9 2;
#P pop;
#P newobj 91 80 35 9109513 p peak;
#P number 201 74 35 9 1 63 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P window setfont Verdana 9.;
#P message 201 97 76 23789577 line_width $1;
#P toggle 492 47 15 0;
#P message 516 48 92 23789577 blend_enable $1;
#P toggle 376 47 15 0;
#P message 401 48 69 23789577 antialias $1;
#P user jit.pwindow 472 203 165 206 0 1 0 0 1 0;
#P newex 473 168 155 23789577 jit.matrix efuefuti 1 char 1 12;
#P window setfont "Sans Serif" 9.;
#P message 50 302 33 9109513 reset;
#P newex 50 329 51 9109513 s sketchy;
#P newex 289 119 51 9109513 r sketchy;
#P toggle 377 75 15 0;
#P message 377 97 94 9109513 smooth_shading $1;
#P hidden newex 171 52 50 9109513 loadbang;
#P toggle 289 75 15 0;
#P message 289 97 81 9109513 depth_enable $1;
#P newex 289 142 89 9109513 jit.gl.sketch mado;
#B color 5;
#P hidden message 171 86 13 9109513 1;
#P number 71 53 35 9 0 0 0 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P toggle 26 52 15 0;
#P newex 26 78 55 9109513 qmetro 50;
#P newex 26 125 86 9109513 t b b b b b erase;
#P newex 26 216 90 9109513 jit.gl.render mado;
#P comment 26 35 44 9109513 START;
#P comment 115 39 100 9109513 Audio Level;
#P comment 673 166 100 9109513 Turn Wave off/on;
#P connect 6 0 5 0;
#P connect 5 0 4 0;
#P fasten 4 5 3 0 106 173 31 173;
#P connect 4 0 3 0;
#P connect 36 0 3 0;
#P fasten 4 4 17 0 91 291 55 291;
#P connect 17 0 16 0;
#P connect 7 0 5 1;
#P fasten 6 0 26 0 31 72 96 72;
#P connect 27 0 26 1;
#P connect 37 0 36 0;
#P hidden connect 12 0 8 0;
#P fasten 33 0 32 0 277 264 180 264;
#P hidden connect 28 0 25 0;
#P connect 25 0 24 0;
#P hidden connect 12 0 28 0;
#P fasten 31 0 34 0 193 245 230 245 230 224 238 224;
#P fasten 34 0 35 0 238 244 269 244 269 224 277 224;
#P connect 35 0 33 0;
#P hidden fasten 8 0 11 0 176 88 294 88;
#P connect 11 0 10 0;
#P hidden connect 22 0 9 0;
#P hidden connect 20 0 9 0;
#P hidden connect 13 0 9 0;
#P connect 15 0 9 0;
#P hidden connect 10 0 9 0;
#P hidden fasten 24 0 9 0 206 116 294 116;
#P hidden connect 8 0 21 0;
#P hidden fasten 8 0 14 0 176 88 382 88;
#P connect 14 0 13 0;
#P fasten 21 0 20 0 381 64 396 64 396 45 406 45;
#P fasten 4 3 18 0 76 166 478 166;
#P connect 18 0 19 0;
#P hidden connect 8 0 23 0;
#P fasten 23 0 22 0 497 64 510 64 510 45 521 45;
#P hidden connect 8 0 30 0;
#P connect 30 0 29 0;
#P fasten 18 0 29 1 478 191 690 191;
#P window clipboard copycount 38;

Can somebody help me here, please? Maybe for better understanding: in the "bspline.help"-file the points are visible, but just in an LCD-object!
Thx a lot,
Johannes


September 7, 2007 | 5:19 pm

havn’t read the thread fully but have a look at this JSUI…

(curve-prelim)

http://www.cycling74.com/twiki/bin/view/Share/MartinRobinson

oli


September 8, 2007 | 9:03 am

Thanks Oli for your proposition!
Unfortunately it’s not exactly what I need: The new curve-function by Martin is a modulation of the already existing function-object in Max/MSP. I will go on drawing my curves with the bspline-object, but what I need is a solution to put control- or breaking-points by x/y-coordinates into the curve.
Maybe for better understanding, an example:
In a video I have a red spot and I grab the coordinates of this spot. When the spot is moving in the video, also the coordinates change and they should create the new control-points.
I don’t know, if it’s better for understanding now, but maybe somebody has an idea, how to put "endless" many points into the bspline-object…


September 8, 2007 | 2:10 pm

On Sep 8, 2007, at 10:03 AM, Johannes wrote:

> I don’t know, if it’s better for understanding now, but maybe
> somebody has an idea, how to put "endless" many points into the
> bspline-object…

hello, i did put endless points in a spline object…
splining is just a fancy interpolation that instead of using 2 normal
points as end, begin, it usually uses 4, drawing only in the space
between the middle two control points.

so basically, you need to keep track where you are interpolating, and
the moment you reach the end of _this 4 points interp_ you should
instantly change the control points, in fifo fashion. this behaviour
will make your spline continuous.

some pseudo code that exhibits continuous point calling spline and
regular spline reading n breakpoints..

// inside the object define:

//4 points for the continuous spline interp+next point
pt pt1,pt2,pt3,pt4,next;

// N breakpoints for regular spline path making
pt points[];
int numbreakpoints;

// store a head val that will keep track of where you are in the spline
float head=0.;
float stride=0.01;

// an example continuous function will only be triggered when
// you reach past 1. in the head

void spline_continuous_setpoint(pt next) {
//fifo control points
pt1 = pt2;
pt2 = pt3;
pt3 = pt4;
pt4 = next;
}

pt read_spline_continuous() {

//advance control val
head+=stride;
if(head>1.) {
head-=1.; //make sure control wraps
notify_user_point_is_past_head_so_he_can_update_next_pt();

pt nextpt = read_next_pt_into_x->next();
spline_continuous_setpoint(nextpt);
}

pt = somespline(p1,p2,p3,p4,head);

return pt;
}

pt read_spline_control_points() {

//advance control val and find control points
head+=stride;
if(head>x->numbreakpoints-2)
head-=x->numbreakpoints-2; //make sure control acesses all stored
points

int c = (int) head; //cheap floor
float sinterp = head-c; //set the spline interp range 0.-1. in
between breakpoints

// so the points for the spline interp are..

p1 = x->points[c-1];
p2 = x->points[c+0];
p3 = x->points[c+1];
p4 = x->points[c+2];

// perform the spline function with 4 points above and current head
value

pt = somespline(p1,p2,p3,p4,sinterp);

return pt;
}

if you want to see some code working, check out a-hspline3d from my
a-objects, available in my site at http://www.s373.net/code

the ‘stack’ message i implemented in the object uses these coding
concepts
to make a continuous ever-ending spline. however, its not an object
suitable
for curve drawing in max, i guess..

hope this helps,

a


September 8, 2007 | 3:57 pm

Did you ever consider to take the original (working) patch with lcd, and
just replace lcd with jit.lcd???

I didn’t try, but that would be the first I’d try…

Stefan


Stefan Tiedje————x——-
–_____———–|————–
–(_|_ —-|—–|—–()——-
– _|_)—-|—–()————–
———-()——–www.ccmix.com


September 9, 2007 | 7:34 pm


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