Max 5 API Reference
An Atombuf is an alternative to Binbufs for temporary storage of atoms. More...
![]() |
Data Structures | |
struct | t_atombuf |
The atombuf struct provides a way to pass a collection of atoms. More... | |
Functions | |
void * | atombuf_new (long argc, t_atom *argv) |
Use atombuf_new() to create a new Atombuf from an array of t_atoms. | |
void | atombuf_free (t_atombuf *x) |
Use atombuf_free() to dispose of the memory used by a t_atombuf. | |
void | atombuf_text (t_atombuf **x, char **text, long size) |
Use atombuf_text() to convert text to a t_atom array in a t_atombuf. |
An Atombuf is an alternative to Binbufs for temporary storage of atoms.
Its principal advantage is that the internal structure is publicly available so you can manipulate the atoms in place. The standard Max text objects (message box, object box, comment) use the Atombuf structure to store their text (each word of text is stored as a t_symbol or a number).
void atombuf_free | ( | t_atombuf * | x | ) |
Use atombuf_free() to dispose of the memory used by a t_atombuf.
x | The t_atombuf to free. |
void* atombuf_new | ( | long | argc, | |
t_atom * | argv | |||
) |
Use atombuf_new() to create a new Atombuf from an array of t_atoms.
argc | Number of t_atoms in the argv array. May be 0. | |
argv | Array of t_atoms. If creating an empty Atombuf, you may pass 0. |
void atombuf_text | ( | t_atombuf ** | x, | |
char ** | text, | |||
long | size | |||
) |
Use atombuf_text() to convert text to a t_atom array in a t_atombuf.
To use this routine to create a new Atombuf from the text buffer, first create a new empty t_atombuf with a call to atombuf_new(0,NULL).
x | Pointer to existing atombuf variable. The variable will be replaced by a new Atombuf containing the converted text. | |
text | Handle to the text to be converted. It need not be zero-terminated. | |
size | Number of characters in the text. |