Forums > MaxMSP

outputting current buffer~ name


Nov 15 2008 | 4:22 pm

G’morning

In a buffer~ that changes name multiple times, is there any way of outputting the current name of that buffer~?

I’m on Max 4.6 on windows xp.

Nov 15 2008 | 4:37 pm

On 15 nov. 08, at 17:22, Jay Bodley wrote:

> G’morning
>
> In a buffer~ that changes name multiple times, is there any way of
> outputting the current name of that buffer~?

If you want to know the name of the file, you might want to have a
look to the info~ object.

HTH,
ej

Nov 15 2008 | 4:47 pm

info~ does not output the buffer~ name, only the file name.
I’m writing an object that will need to know the buffer name of every patch that it’s included in (or buffer~ that it’s used for). I want to have the buffer name output to send to a [prepend symbol]-[set $1] to send to groove~. What I’m going for is something like the #1 argument for numbers.

Nov 15 2008 | 5:29 pm

When you set the name of the buffer you could also store the name in zl reg or a central coll then you could query the name quite simply.

#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 312 140 93 196617 name anothername;
#P comment 29 142 100 196617 Who do you love? >;
#P button 124 140 15 0;
#P newex 124 221 62 196617 prepend set;
#P message 124 251 75 196617 anothername;
#P newex 124 197 36 196617 zl reg;
#P newex 150 173 60 196617 route name;
#P message 226 140 82 196617 name somename;
#P newex 226 203 44 196617 buffer~;
#P fasten 8 0 2 0 317 164 155 164;
#P fasten 8 0 0 0 317 179 231 179;
#P connect 6 0 3 0;
#P connect 5 0 4 0;
#P connect 3 0 5 0;
#P connect 2 0 3 1;
#P fasten 1 0 2 0 231 164 155 164;
#P connect 1 0 0 0;
#P window clipboard copycount 9;

Nov 15 2008 | 7:11 pm

just put the name out, right after you changed it.

jrp

Nov 15 2008 | 7:28 pm

ok, but how about if the buffer name is given as an argument?

Nov 15 2008 | 11:23 pm

On 15 nov. 08, at 20:28, Jay Bodley wrote:

> ok, but how about if the buffer name is given as an argument?

well if you had the courage to write it as an argument, there’s good
chance that you could write it somewhere else too where you could
query it, right? Otherwise, you can can make some abstraction which
would do both (declaring the buffer, and storing its name).

ej

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

Forums > MaxMSP