outputting current buffer~ name

Nov 15, 2008 at 4:22pm

outputting current buffer~ name

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.

#40863
Nov 15, 2008 at 4:37pm

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

#145030
Nov 15, 2008 at 4:47pm

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.

#145031
Nov 15, 2008 at 5:29pm

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;

#145032
Nov 15, 2008 at 7:11pm

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

jrp

#145033
Nov 15, 2008 at 7:28pm

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

#145034
Nov 15, 2008 at 11:23pm

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

#145035

You must be logged in to reply to this topic.