Forums > MaxMSP

deleting the space before append

April 29, 2006 | 12:56 pm

hey,

im sorry this is probably very basic and i’ve missed a trick but…

im trying to get rid of the space created with the append object, as it puts a space before the message…anyone know how?!

cheers,
dave
Express yourself instantly with MSN Messenger! Download today it’s FREE!
http://messenger.msn.click-url.com/go/onm00200471ave/direct/ 01/


April 29, 2006 | 1:08 pm

use sprintf instead of append.

Mathieu


April 29, 2006 | 1:26 pm

there may be a simpler way, but I’ve done it like this …

max v2;
#N vpatcher 209 46 585 415;
#P window setfont "Sans Serif" 10.;
#P window linecount 1;
#P message 124 255 55 196618 blahblah;
#P newex 124 224 49 196618 prepend;
#P newex 124 192 27 196618 itoa;
#P window linecount 5;
#P message 43 157 55 196618 98 108 97 104 32 98 108 97 104;
#P window linecount 1;
#P newex 43 134 49 196618 prepend;
#P message 199 124 55 196618 blah blah;
#P newex 199 99 49 196618 prepend;
#P newex 124 141 49 196618 Lfilt 32;
#P message 124 38 31 196618 blah;
#P newex 124 63 67 196618 append blah;
#P newex 124 94 27 196618 atoi;
#P fasten 0 0 6 0 129 123 48 123;
#P connect 6 0 7 0;
#P connect 2 0 1 0;
#P connect 1 0 0 0;
#P connect 0 0 3 0;
#P connect 3 0 8 0;
#P connect 8 0 9 0;
#P connect 9 0 10 0;
#P fasten 1 0 4 0 129 90 204 90;
#P connect 4 0 5 0;
#P pop;

david


April 29, 2006 | 1:30 pm

>
Oops – that should be [prepend set] (though I see that it still works
without "set") and you’ll need [Lfilt] from Peter Elsea’s LObjects
externals.

david


April 29, 2006 | 1:56 pm

nice one mate!

cheers! it’s all working now!

dave



jln
April 29, 2006 | 2:32 pm

hi,

[regexp] may help as well. I must admit I’m not at ease enough with the syntax to tell more, though.

Julien.


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