Prepend without space
Dear Reader,
I am trying to use prepend to load buffers in mxj.buf.Op. ...
My problem is that mxj.buf.Op crushes when I try to copy it's inside into an other buffer whenever the buffers name is only one number (like 1).
Therefore I am using a name for buffers with a letter (like s1) - this works perfectly...
Now, I could not find a hint for an object (like prepend) without adding a space between the message an it's argument:
two patches attached, as they do not even work together..
Please give me a tip, which object to look for...
Krisztian
WORKS:
CRASHES
On 15 mars 08, at 21:21, tedor wrote:
> Dear Reader,
>
> I am trying to use prepend to load buffers in mxj.buf.Op. ...
>
> My problem is that mxj.buf.Op crushes when I try to copy it's inside
> into an other buffer whenever the buffers name is only one number
> (like 1).
The buffer name must be a simple, it can't be an integer.
ej
sprintf is your friend here.
hth
david
tedor wrote:
> Dear Reader,
>
> I am trying to use prepend to load buffers in mxj.buf.Op. ...
>
> My problem is that mxj.buf.Op crushes when I try to copy it's inside into an other buffer whenever the buffers name is only one number (like 1).
>
> Therefore I am using a name for buffers with a letter (like s1) - this works perfectly...
>
> Now, I could not find a hint for an object (like prepend) without adding a space between the message an it's argument:
>
> two patches attached, as they do not even work together..
>
> Please give me a tip, which object to look for...
>
> Krisztian
>
>
> WORKS:
>
> max v2;
> #N vpatcher 79 228 1008 773;
> #P window setfont "Sans Serif" 12.;
> #P comment 84 44 72 196620 SOUND 1;
> #P window setfont "Sans Serif" 9.;
> #P message 28 66 118 196617 read 01_SHOVEL_01.aif;
> #P newex 45 126 29 196617 adc~;
> #P toggle 13 126 15 0;
> #P newex 13 149 60 196617 record~ s1;
> #P message 11 47 41 196617 replace;
> #P newex 11 88 58 196617 buffer~ s1;
> #P user panel 7 41 152 131;
> #X brgb 191 191 191;
> #X frgb 0 0 0;
> #X border 1;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P window setfont "Sans Serif" 14.;
> #P message 338 87 55 196622 set s1;
> #P window setfont "Sans Serif" 9.;
> #P message 211 126 44 196617 set s 10;
> #P newex 211 89 87 196617 prepend set set s;
> #P number 211 53 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 598 85 101 196617 buffer~ seq01 5000;
> #P message 455 155 78 196617 copyInto seq01;
> #P newex 455 179 43 196617 s toop1;
> #P newex 338 141 43 196617 r toop1;
> #P window setfont "Sans Serif" 18.;
> #P newex 338 166 104 196626 mxj buf.Op;
> #P hidden connect 15 0 10 0;
> #P hidden connect 11 0 10 0;
> #P connect 13 0 12 0;
> #P hidden fasten 14 0 12 0 50 145 18 145;
> #P connect 5 0 6 0;
> #P connect 6 0 7 0;
> #P connect 7 0 0 0;
> #P connect 1 0 0 0;
> #P connect 8 0 0 0;
> #P connect 3 0 2 0;
> #P pop;
>
>
> CRASHES
>
> max v2;
> #N vpatcher 79 228 1008 773;
> #P window setfont "Sans Serif" 12.;
> #P comment 84 44 72 196620 SOUND 1;
> #P window setfont "Sans Serif" 9.;
> #P message 28 66 118 196617 read 01_SHOVEL_01.aif;
> #P newex 45 126 29 196617 adc~;
> #P toggle 13 126 15 0;
> #P newex 13 149 60 196617 record~ s1;
> #P message 11 47 41 196617 replace;
> #P newex 11 88 53 196617 buffer~ 1;
> #P user panel 7 41 152 131;
> #X brgb 191 191 191;
> #X frgb 0 0 0;
> #X border 1;
> #X rounded 0;
> #X shadow 0;
> #X done;
> #P window setfont "Sans Serif" 14.;
> #P message 338 87 47 196622 set 1;
> #P window setfont "Sans Serif" 9.;
> #P message 211 126 44 196617 set 1;
> #P newex 211 89 79 196617 prepend set set;
> #P number 211 51 35 9 0 0 0 3 0 0 0 221 221 221 222 222 222 0 0 0;
> #P newex 598 85 101 196617 buffer~ seq01 5000;
> #P message 455 155 78 196617 copyInto seq01;
> #P newex 455 179 43 196617 s toop1;
> #P newex 338 141 43 196617 r toop1;
> #P window setfont "Sans Serif" 18.;
> #P newex 338 166 104 196626 mxj buf.Op;
> #P hidden connect 11 0 10 0;
> #P hidden connect 15 0 10 0;
> #P connect 13 0 12 0;
> #P hidden fasten 14 0 12 0 50 145 18 145;
> #P connect 5 0 6 0;
> #P connect 6 0 7 0;
> #P connect 7 0 0 0;
> #P connect 1 0 0 0;
> #P connect 8 0 0 0;
> #P connect 3 0 2 0;
> #P pop;
>
>
>
>
>
>
>
ok,
David, that is what I was looking for!!!
Thanks for the quick help guys!!!
all the best!
tEd