Forums > MaxMSP

buffer~

September 4, 2006 | 4:16 pm

I’m fairly new at working with max but how do i allow buffer~ to automatically load when opening a patch? I’m sure this is fairly simple however i’m new at this….Thanks Any help would be appreciated.


September 4, 2006 | 5:25 pm

You can put the name of a specific file in the buffer~ object if you
always want the same file to load – [buffer~ blah]
or you could [loadbang] a message box with something like [replace
blah] in it.

David

On 4 Sep 2006, at 17:16, B. Wood wrote:

>
> I’m fairly new at working with max but how do i allow buffer~ to
> automatically load when opening a patch? I’m sure this is fairly
> simple however i’m new at this….Thanks Any help would be
> appreciated.


September 4, 2006 | 5:41 pm

See, thats the funny thing. I do that. I’ve been ver specific with my command but it still doesnt do it. I have to incorporate a :read: message to the buffer~ object. Strange. It also corresponds to the groove~ as well but still doesnt allow it. the only way i can get it to open is by using read..whats up with that?


September 5, 2006 | 4:24 am

if read works, wont read work (conencted to a loadbang)?

you can use the info~ module to get the name of the last laoded file, save that in a message box and prepend "replace", and loadbang that, maybe.


September 5, 2006 | 11:13 am

Is the file you are trying to load in the max searchpath ??


September 5, 2006 | 3:49 pm

Yes of course. I tried the loadbang bit and it still doesnt work. I have to manually load "read" each sample….


September 5, 2006 | 5:27 pm

Make sure that your soundfile is in your path. (you can set the
search path in the "File Preferences" dialog) If it’s not, then Max
won’t be able to find it.

Peter McCulloch


September 8, 2006 | 8:44 pm

B. Wood wrote:
> Yes of course. I tried the loadbang bit and it still doesnt work. I
> have to manually load "read" each sample….

If you would have provided us with an example patche everybody would
have shown you that you just missed, that the first parameter is not the
file name, but the buffer name. You need the filename in addition as
second argument (ok thats really a shot in the dark).
But it would be an explanation, because nobody else is expieriencing a
problem but you… There must be something wrong the way you do it, but
nobody exept you would know what you actually patched…

Stefan


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


September 8, 2006 | 9:33 pm

——————————————–
> You can put the name of a specific file in the buffer~ object if you
> always want the same file to load – [buffer~ blah]
> or you could [loadbang] a message box with something like [replace
> blah] in it.
>
> David

if that is true, then the buffer~ helpfile and many of
my patches must be corrected.


September 8, 2006 | 9:39 pm

Quote: B. Wood wrote on Tue, 05 September 2006 09:49
—————————————————-
> Yes of course. I tried the loadbang bit and it still doesnt work. I have to manually load "read" each sample….
—————————————————-

buffer~ does not read files – it opens files and writes
the raw audio data into a buffer in the physical RAM.

the name ( [buffer~ blah] ) of a buffer object is only
an identifier, two buffer objects of the same name share
the same buffer content.

the thing with the loadbang-read _should work. that it did not
work on the first try does not mean that you did it wrong,
you just have not tried hard enough yet.

-110


September 8, 2006 | 10:01 pm

Hi Roman,

Not sure what you mean. I just checked this out, and it works as I
suspected (I was guessing the first time)

Or [buffer~ flt1.aif 1] also loads the audio file when the patch is
loaded.
I notice that I left out the name of the file to load in my original
reply though. Or the name off the buffer actually.

David

On 8 Sep 2006, at 22:33, Roman Thilenius wrote:

>
> ——————————————–
>> You can put the name of a specific file in the buffer~ object if you
>> always want the same file to load – [buffer~ blah]
>> or you could [loadbang] a message box with something like [replace
>> blah] in it.
>>
>> David
>
>
> if that is true, then the buffer~ helpfile and many of
> my patches must be corrected.


September 8, 2006 | 10:17 pm

On 8 Sep 2006, at 23:01, David Stevens wrote:

>
> Or [buffer~ flt1.aif 1]
>

darn it – I better go to bed – this time I left out the buffer name –
that should be [buffer~ bling flt1.aif 1]
sigh

David


September 8, 2006 | 10:42 pm

David Stevens wrote:
>
> Hi Roman,
>
> Not sure what you mean. I just checked this out, and it works as I
> suspected (I was guessing the first time)

your attached "pastedgraphic.tiff" tells me: load a copy of the file fit1.aif into RAM and let the buffer~ named bling refer to the first 2000 ms of the left (= first) channel of this copy

>
>
> Or [buffer~ flt1.aif 1] also loads the audio file when the patch is
> loaded.

you mean [buffer~ buffername flt1.aif 1], right? this loads indeed the file but actually just the first millisecond

i must admit i overlooked this feature for 9 years so thanks for pointing me at this :)

p

> I notice that I left out the name of the file to load in my original
> reply though. Or the name off the buffer actually.
>
> David
>
>
> On 8 Sep 2006, at 22:33, Roman Thilenius wrote:
>
>>
>> ——————————————–
>>
>>> You can put the name of a specific file in the buffer~ object if you
>>> always want the same file to load – [buffer~ blah]
>>> or you could [loadbang] a message box with something like [replace
>>> blah] in it.
>>>
>>> David
>>
>>
>>
>> if that is true, then the buffer~ helpfile and many of
>> my patches must be corrected.
>
>
>
> ————————————————————————
>


September 9, 2006 | 1:03 am

Hola,
Does anyone know where to purchase a miditron in the
UK?
I need one ASAP!
All the best,
Stuart



Eav
September 9, 2006 | 1:53 am

Hi

Just order it at Cycling, they ship fast. It only took a couple of
days to get it to Belgium.

yves

On 09 Sep 2006, at 03:03, stuart smith wrote:

> Hola,
> Does anyone know where to purchase a miditron in the
> UK?
> I need one ASAP!
> All the best,
> Stuart
>


September 9, 2006 | 7:59 am

On 8 Sep 2006, at 23:42, pure@test.at wrote:

>
> your attached "pastedgraphic.tiff" tells me: load a copy of the
> file fit1.aif into RAM and let the buffer~ named bling refer to the
> first 2000 ms of the left (= first) channel of this copy

Not quite. Using the replace message resizes the buffer to the length
of the loaded file. The 1 (left channel only) is because I always
work with mono files (I’m struggling with having enough cpu as it is
without doubling the processing load with stereo!)
>>
>
> you mean [buffer~ buffername flt1.aif 1], right? this loads indeed
> the file but actually just the first millisecond

For me it loads the whole file. But the behaviour of the 1 is not
what I expected. (Just checking to make sure I’m not talking total
rubbish here!)

For some reason (another story) the files I was loading _were_ stereo
files, with audio only in the left channel (like I said – another
story).

So – [buffer~ bling flt1.aif 1] loads full length and both channels
of the accidentally stereo file.

If I unlock the patch and select and re-enter the [1], the buffer~ is
forced to mono. If I then use the replace message to load the same
file, only the left channel is loaded. But if I save and then quit
the patch and reload it, despite the [1] argument, both sides of the
stereo are loaded.
Have I discovered a bug, or is this how it’s meant to work?

Just had a look at the help file again, and tried [read flt1.aif 0 -1
1] which loads in the left channel only and hence makes the buffer 1
channel.
So it looks to me, if. like me, you work with 1 channel buffer~s and
you want to make sure that they stay mono, [read filename 0 -1 1] is
the way to go. Using replace (and loading already existing stereo
files) is probably how I ended up with left channel only stereo files!
>
> i must admit i overlooked this feature for 9 years

To tell the truth, pre-loading files is not something I ever do!
Hence my fuzziness around how it actually works!

David


September 9, 2006 | 9:08 am

> Not quite. Using the replace message resizes the buffer to the length
> of the loaded file.

good morning neighbour!

usually i am the first here at saturday morning.

see you know lots about buffer, you just always forgot
one of the arguments when posting to the forum. :)

your accident with first the bling and later the filename
missing reminded me on my first expirience with the pp object,
which used to accept only arguments like "0. 7" with no point
behind the second float, so when wrote "0. 7." the dot f*cked
up the next argument behind the range.

/end of irrelevant story

-110


September 9, 2006 | 10:26 am

>
> good morning neighbour!

good morning – and a lovely autumn morning it is, too!
>
> see you know lots about buffer, you just always forgot
> one of the arguments when posting to the forum. :)

Stress and age, that’s my excuse this week! Shoot, I forget stuff
like that all the time, but that’s what’s great about max – it’s
easy to look stuff up, and it’s easy to just try something and see
what it does!

/end of irrelevant ramblings

:-))))))

david


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