what is prepend good for ?
Hi!
Im pretty new at Max and have been through all the tutorials in Max but never really understood the use for prepend.
Can someone please help me with this?
and with a couple of examples where I have to use prepend and why
thanks a lot!
perik
It's great for loading things into [buffer~]/[jit.qt.movie] etc where you can use [dropfile] or [opendialog] to select the target file and then [prepend read] or [prepend open] it. As with all the objects available you shouldn't feel like you have to use them just because they exist. Wait until youu find a need for them - don't force yourself to patch a certain way.
The only exception to the rule is [trigger], start using this almost everywhere and you'll thank me later.
thanks!
but what does it do exactly?
any other ways I can use it?
For example in a patch like this - why is prepend used here [prepend read]:
another question that came up now:
Is it any reason for why or should I use [trigger b] instead of a [button] for creating a bang?
prepend puts one thing before another thing - so if i have [prepend muffintin] and send it 25.7, it will output the message muffintin 25.7
in that patch it just puts the word 'prefix' in front of the path of the folder coming out so you can use the prefix feature of umenu, which I personally have never explored.
Is it any reason for why or should I use [trigger b] instead of a [button] for creating a bang?
For one thing [t b] is considerably more efficient than using the bang graphic object.
In the really dim dark past using [prepend foo] was an overdrive-safe way of generating a message, while using a message box [foo $1] was not. This overdrive restriction went away so long ago that probably only people with long grey beards remember.
prepend also was the only way to prepend a symbol to a list using only one object, because
we did not have [pak] before, it used to be jitter only.
[pak] can do the same as [prepend]:
[pak read anything] = [prepend read]
-110
Dude. I have a short grey beard, and I don't remember that. I'll keep growing it.
mz
beard.help
Aha! Now I get it. Banging away at [append more_beard] was getting me no place.
tx,
mz
I remember it, but I shaved my beard off. Does that mean I have to forget?
Either forget, or lose the razor. No exceptions.
we just pirated the thread, right?
aye aye, blackbeard
Blackbeard shaving in the dead of night
Take these broken hairs and learn to cut
All your life
You were only waiting for this moment to arise
Blackbeard shaving in the dead of night
Take your smoothened chin and learn to see
all your life
you were only waiting for this moment to be free
Blackbeard go, Blackbeard go
Into the light of the dark black night.
(back to music...)
reading this over a decade later -- I thought I was being smart by using prepend instead of message boxes. at least i got to chuckle at the blackbird parody!