25 TTPtr graphOutlets[16];
28 typedef Iter* IterPtr;
32 IterPtr IterNew (t_symbol* msg,
long argc, t_atom* argv);
33 void IterFree (IterPtr
self);
34 void IterAssist (IterPtr
self,
void* b,
long msg,
long arg,
char* dst);
35 void IterGraphCallback (IterPtr
self,
TTValue& arg);
39 static t_class* sIterClass;
50 common_symbols_init();
52 c = class_new(
"j.iter-", (method)IterNew, (method)IterFree,
sizeof(Iter), (method)0L, A_GIMME, 0);
54 class_addmethod(c, (method)MaxGraphReset,
"graph.reset", A_CANT, 0);
55 class_addmethod(c, (method)MaxGraphConnect,
"graph.connect", A_OBJ, A_LONG, 0);
56 class_addmethod(c, (method)MaxGraphDrop,
"graph.drop", A_CANT, 0);
57 class_addmethod(c, (method)MaxGraphObject,
"graph.object", A_CANT, 0);
59 class_addmethod(c, (method)IterAssist,
"assist", A_CANT, 0);
60 class_addmethod(c, (method)object_obex_dumpout,
"dumpout", A_CANT, 0);
62 class_register(_sym_box, c);
71 IterPtr IterNew(t_symbol* msg,
long argc, t_atom* argv)
77 self = IterPtr(object_alloc(sIterClass));
79 object_obex_store((
void*)
self, _sym_dumpout, (t_object*)outlet_new(
self, NULL));
80 self->graphOutlets[0] = outlet_new(
self, NULL);
83 v[0] =
"graph.output";
87 if (!self->graphObject->mKernel.valid()) {
88 object_error(SELF,
"cannot load Jamoma object");
92 self->callback =
new TTObject(
"callback");
94 self->callback->set(
TT(
"function"),
TTPtr(&IterGraphCallback));
95 self->callback->set(
TT(
"baton"),
TTPtr(
self));
99 self->graphObject->mKernel.registerObserverForNotifications(*self->callback);
101 attr_args_process(
self, argc, argv);
108 void IterFree(IterPtr
self)
110 delete self->callback;
118 void IterAssist(IterPtr
self,
void* b,
long msg,
long arg,
char* dst)
121 strcpy (dst,
"multichannel input and control messages");
124 strcpy(dst,
"multichannel output");
126 strcpy(dst,
"dumpout");
132 void IterGraphCallback(IterPtr
self,
TTValue& arg)
143 numKeys = keys.
size();
145 for (
TTUInt32 k=0; k<numKeys; k++) {
151 aDictionary->
lookup(key, v);
156 for (
int i=0; i<ac; i++) {
169 atom_setlong(ap+i, ival);
173 atom_setfloat(ap+i, v[i]);
180 atom_setsym(ap+i, gensym((
char*)s.
c_str()));
184 outlet_anything(self->graphOutlets[0], gensym(key.
c_str()), ac, ap);
The TTGraphObjectBase wraps a TTDSP object such that it is possible to build a dynamic graph of audio...
8-bit unsigned integer, range is 0 through 255.
Create and use Jamoma object instances.
64-bit unsigned integer, range is 0 through 18,446,744,073,709,551,615.
size_type size() const noexcept
Return the number of elements.
TTErr getKeys(TTValue &aSetOfKeys)
Get an array of all of the keys for the hash table.
Base class for all first-class Jamoma objects.
TTErr(TTObjectBase::* TTMethod)(const TTSymbol methodName, const TTValue &anInputValue, TTValue &anOutputValue)
A type that can be used to store a pointer to a message for an object.
16-bit unsigned integer, range is 0 through 65,535.
A type that represents the key as a C-String and the value as a pointer to the matching TTSymbol obje...
#define TT
This macro is defined as a shortcut for doing a lookup in the symbol table.
void * TTPtr
A generic pointer.
This class is used to create a backward communication channel to notify a client that something chang...
16-bit signed integer, range is −32,768 through 32,767.
The TTSymbol class is used to represent a string and efficiently pass and compare that string...
TTErr TTObjectBaseInstantiate(const TTSymbol className, TTObjectBasePtr *returnedObjectPtr, const TTValue arguments)
DEPRECATED.
const char * c_str() const
Return a pointer to the internal string as a C-string.
std::int32_t TTInt32
32 bit signed integer
64-bit signed integer, ragne is −9,223,372,036,854,775,808 through 9,223,372,036,854,775,807
Set this flag if the method you are binding to this message is prototyped with a single TTValue& argu...
32-bit signed integer, range is -2,147,483,648 through 2,147,483,647.
TTErr
Jamoma Error Codes Enumeration of error codes that might be returned by any of the TTBlue functions a...
TTErr lookup(const TTSymbol aKey, TTValue &aValue) const
Find the value for the given key.
int C74_EXPORT main(void)
Set up this class as a Max external the first time an object of this kind is instantiated.
std::uint32_t TTUInt32
32 bit unsigned integer
32-bit unsigned integer, range is 0 through 4,294,967,295.
8-bit signed integer, range is -128 through 127.
TTErr notify(const TTValue &anInputValue, TTValue &anUnusedOutputValue)
Message called because we are registered as an observer to some other object, and then calls our exte...
TTDictionary * TTDictionaryPtr
[doxygenAppendixC_typedefExample]
void resize(size_type n)
Change the number of elements.
[doxygenAppendixC_copyExample]