Exemplo n.º 1
0
void TTScoreInitialize()
{
    // Initialized Foundation framework
	TTFoundationInit();
    
	if (!TTScoreInitialized) {
		
		TTScoreInitialized = true;
		
		// register classes -- both internal and external
        TTTimeCondition::registerClass();
        TTTimeContainer::registerClass();
        TTTimeEvent::registerClass();
        TTTimeProcess::registerClass();
        
		TTScoreTest::registerClass();
        
#ifdef TT_DEBUG
		TTLogMessage("Score -- Version %s -- Debugging Enabled\n", TTSCORE_VERSION_STRING);
#else
		TTLogMessage("Score -- Version %s\n", TTSCORE_VERSION_STRING);
#endif
        
	}
}
Exemplo n.º 2
0
int C74_EXPORT main(void)
{
	t_class* c;
	
	TTFoundationInit();
	common_symbols_init();
	
	// Define our class
	c = class_new("j.unit",(method)dataspace_new, (method)dataspace_free, sizeof(t_dataspace), (method)0L, A_GIMME, 0);
	
	// Make methods accessible for our class:
	class_addmethod(c, (method)dataspace_int,			"int",				A_LONG, 0);
	class_addmethod(c, (method)dataspace_float,			"float",			A_FLOAT, 0);
	class_addmethod(c, (method)dataspace_list,			"list",				A_GIMME, 0);
	class_addmethod(c, (method)dataspace_getDataspaces,	"dataspaces.get",	0);
 	class_addmethod(c, (method)dataspace_getUnits,		"units.get",		A_GIMME, 0);
	class_addmethod(c, (method)dataspace_assist,		"assist",			A_CANT, 0); 
    class_addmethod(c, (method)object_obex_dumpout, 	"dumpout",			A_CANT, 0);
	class_addmethod(c, (method)jamoma_fileusage, "fileusage", A_CANT, 0);
	
	class_addattr(c, 
				  attr_offset_new("dataspace", _sym_symbol, 0,
								  (method)0, (method)dataspace_setDataspace, calcoffset(t_dataspace, attr_dataspace)));

	CLASS_ATTR_SYM(c,		"input",	0,		t_dataspace,	attr_dataspace_active);
	CLASS_ATTR_ACCESSORS(c,	"input",	NULL,	dataspace_setDataspaceActive);
	
	CLASS_ATTR_SYM(c,		"output",	0,		t_dataspace,	attr_dataspace_native);
	CLASS_ATTR_ACCESSORS(c,	"output",	NULL,	dataspace_setDataspaceNative);
	
	// Finalize our class
	class_register(CLASS_BOX, c);
	dataspace_class = c;
	return 0;
}
Exemplo n.º 3
0
void TTGraphInit(void)
{
	if (!initialized) {
		initialized = true;
		TTFoundationInit();
		
		TTGraphObjectBase::registerClass();
		TTGraphInput::registerClass();
		TTGraphOutput::registerClass();
	}
}
Exemplo n.º 4
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	void *p, *q;
	
	TTFoundationInit();
	StencilClassInit();	
	setup((t_messlist**)&sMaxStencilClass, (method)MaxStencilNew, (method)MaxStencilFree, sizeof(MaxStencilObject), 0, A_GIMME, 0);
	
	p = max_jit_classex_setup(calcoffset(MaxStencilObject, obex));
	q = jit_class_findbyname(gensym("jcom_stencil"));    
    max_jit_classex_mop_wrap(p, q, 0);							// attrs & methods for name, type, dim, planecount, bang, outputmatrix, etc
    max_jit_classex_standard_wrap(p, q, 0);						// attrs & methods for getattributes, dumpout, maxjitclassaddmethods, etc
    addmess((method)max_jit_mop_assist, (char*)"assist", A_CANT, 0);	// standard matrix-operator (mop) assist fn
	return 0;
}
Exemplo n.º 5
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	WrappedClassOptionsPtr	options = new WrappedClassOptions;
	TTValue					value;
	WrappedClassPtr			c = NULL;

	TTFoundationInit();
	
	value.clear();
	value.append(0);
	options->append(TT("fixedNumChannels"), value);
	
	wrapTTClassAsMaxClass(TT("net.send"), "jcom.net.send", &c, options);
	CLASS_ATTR_ENUM(c->maxClass, "mode", 0, "tcp udp");
	return 0;
}
Exemplo n.º 6
0
void TTGraphicsInit()
{
	if(!TTGraphicsHasInitialized){
		TTGraphicsHasInitialized = true;

		TTFoundationInit();
		TTGraphicsWindow::registerClass();
		TTGraphicsContext::registerClass();
		TTGraphicsSurface::registerClass();	
		
#ifdef TT_DEBUG
		TTLogMessage("JamomaGraphics -- Version %s -- Debugging Enabled\n", TTGRAPHICS_VERSION_STRING);
#else
		TTLogMessage("JamomaGraphics -- Version %s\n", TTGRAPHICS_VERSION_STRING);
#endif
		
	}
}
Exemplo n.º 7
0
void TTDSPInit(const char* pathToBinaries)
{
	TTFoundationInit(pathToBinaries);
	
	if (!TTDSPHasInitialized) {
		TTDSPHasInitialized = true;
				
		// TODO: someday implement these so that we have project-scoped caches and don't stuff everything into the foundation?
		//TTDSPSymbolCacheInit();
		//TTDSPValueCacheInit();
		
#ifdef TT_DEBUG
		TTLogMessage("JamomaDSP -- Version %s -- Debugging Enabled\n", TTDSP_VERSION_STRING);
#else
		TTLogMessage("JamomaDSP -- Version %s\n", TTDSP_VERSION_STRING);
#endif
		TTDSPRegisterInternalClasses();
	}
}
Exemplo n.º 8
0
int main(int argc, const char * argv[])
{
	TTFoundationInit();
	
	TTValue classNames;
	
	TTObject::GetRegisteredClassNames(classNames);
	
	for (int i=0; i<classNames.size(); i++) {
		TTSymbol name = classNames[i];
		TTObject obj(name);
		
		obj.send("test");
	}
	
	// insert code here...
	std::cout << "Hello, World!\n";
    return 0;
}
Exemplo n.º 9
0
int TTCLASSWRAPPERMAX_EXPORT main(void)
{
	void *p, *q;
	
	TTFoundationInit();
	
	// initialize the Jitter class
	GainClassInit();
	
	// create the Max class
	setup((t_messlist**)&sMaxGainClass, (method)MaxGainNew, (method)MaxGainFree, sizeof(MaxGainObject), 0, A_GIMME, 0);
	
	// specify a byte offset to keep additional information
	p = max_jit_classex_setup(calcoffset(MaxGainObject, obex));
	
	// look up the Jitter class in the class registry
	q = jit_class_findbyname(gensym("j_gain"));
	
    max_jit_classex_mop_wrap(p, q, 0);							// attrs & methods for name, type, dim, planecount, bang, outputmatrix, etc
    max_jit_classex_standard_wrap(p, q, 0);						// attrs & methods for getattributes, dumpout, maxjitclassaddmethods, etc
    addmess((method)max_jit_mop_assist, (char*)"assist", A_CANT, 0);	// standard matrix-operator (mop) assist fn
	return 0;
}
Exemplo n.º 10
0
extern "C" TT_EXTENSION_EXPORT TTErr TTLoadJamomaExtension_System(void)
{
	TTFoundationInit();
	System::registerClass();
	return kTTErrNone;
}
Exemplo n.º 11
0
extern "C" TT_EXTENSION_EXPORT TTErr TTLoadJamomaExtension_WebSocket(void)
{
	TTFoundationInit();
	WebSocket::registerClass();
	return kTTErrNone;
}