int C74_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); TTAudioGraphInit(); options->append(TT("nonadapting"), value); // don't change the number of out-channels in response to changes in the number of in-channels wrapAsMaxAudioGraph(TT("mixer"), "j.mixer=", NULL, options); wrapAsMaxAudioGraph(TT("mixer"), "mixer=", NULL, options); return 0; }
int C74_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); TTAudioGraphInit(); options->append(TT("argumentDefinesNumInlets"), value); options->append(TT("nonadapting"), value); // don't change the number of out-channels in response to changes in the number of in-channels wrapAsMaxAudioGraph(TT("audio.join"), "j.join=", NULL, options); return wrapAsMaxAudioGraph(TT("audio.join"), "join=", NULL, options); }
int C74_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); TTAudioGraphInit(); options->append(TT("generator"), value); wrapAsMaxAudioGraph(TT("phasor"), "j.phasor=", NULL, options); wrapAsMaxAudioGraph(TT("phasor"), "phasor=", NULL, options); return 0; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); TTAudioGraphInit(); options->append(TT("nonadapting"), value); // don't change the number of out-channels in response to changes in the number of in-channels options->append(TT("userCanSetNumChannels"), NO); wrapAsMaxAudioGraph(TT("audio.offset"), "j.offset=", NULL, options); return wrapAsMaxAudioGraph(TT("audio.offset"), "offset=", NULL, options); }
int C74_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); TTAudioGraphInit(); options->append(TT("argumentDefinesNumInlets"), value); value = 1; options->append(TT("argumentDefinesNumOutlets"), value); wrapAsMaxAudioGraph(TT("multimixer"), "j.multimixer=", NULL, options); wrapAsMaxAudioGraph(TT("multimixer"), "multimixer=", NULL, options); return 0; }
int C74_EXPORT main(void) { s_jamoma_class = class_new("j=", (method)jamoma_new, (method)NULL, 0 /*sizeof(t_object)*/, (method)0L, A_GIMME, 0); // standalone support: class_addmethod(s_jamoma_class, (method)jamoma_fileusage, "fileusage", A_CANT, 0); class_register(CLASS_BOX, s_jamoma_class); common_symbols_init(); TTAudioGraphInit(); return 0; }
void setup_jcom_op0x3d(void) { TTAudioGraphInit(); sOpClass = class_new(gensym("jcom_op="), (t_newmethod)OpNew, (t_method)OpFree, sizeof(Op), 0, A_GIMME, 0); class_addmethod(sOpClass, (t_method)OpReset, gensym("audio.reset"), A_CANT, 0); class_addmethod(sOpClass, (t_method)OpSetup, gensym("audio.setup"), A_CANT, 0); class_addmethod(sOpClass, (t_method)OpConnect, gensym("audio.connect"), A_POINTER, A_POINTER, 0); class_addmethod(sOpClass, (t_method)OpSetOperator, gensym("operator"), A_SYMBOL, 0); class_addmethod(sOpClass, (t_method)OpSetOperand, gensym("operand"), A_FLOAT, 0); class_sethelpsymbol(sOpClass, gensym("help-jcom_op=.pd")); }
int TTCLASSWRAPPERMAX_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); MaxAudioGraphWrappedClassPtr c = NULL; TTAudioGraphInit(); wrapAsMaxAudioGraph(TT("average"), "jcom.average≈", &c, options); CLASS_ATTR_ENUM(c->maxClass, "mode", 0, "absolute bipolar rms"); wrapAsMaxAudioGraph(TT("average"), "average≈", &c, options); CLASS_ATTR_ENUM(c->maxClass, "mode", 0, "absolute bipolar rms"); return 0; }
int C74_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); MaxAudioGraphWrappedClassPtr c = NULL; TTAudioGraphInit(); wrapAsMaxAudioGraph(TT("soundfile.recorder"), "j.soundfile.recorder=", &c, options); CLASS_ATTR_ENUM(c->maxClass, "format", 0, "AIFF AIFF-16bit AIFF-24bit AIFF-32bit CAF CAF-16bit CAF-24bit CAF-32bit FLAC FLAC-16bit FLAC-24bit FLAC-32bit Matlab-16bit Matlab-32bit Matlab-64bit WAV WAV-16bit WAV-24bit WAV-32bit"); wrapAsMaxAudioGraph(TT("soundfile.recorder"), "soundfile.recorder=", &c, options); CLASS_ATTR_ENUM(c->maxClass, "format", 0, "AIFF AIFF-16bit AIFF-24bit AIFF-32bit CAF CAF-16bit CAF-24bit CAF-32bit FLAC FLAC-16bit FLAC-24bit FLAC-32bit Matlab-16bit Matlab-32bit Matlab-64bit WAV WAV-16bit WAV-24bit WAV-32bit"); return 0; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; // TTValue value(0); MaxAudioGraphWrappedClassPtr c = NULL; TTAudioGraphInit(); // options->append(TT("generator"), value); options->append(TT("generator"), YES); options->append(TT("userCanSetNumChannels"), YES); wrapAsMaxAudioGraph(TT("noise"), "j.noise=", &c, options); CLASS_ATTR_ENUM(c->maxClass, "mode", 0, "white pink brown blue gauss"); wrapAsMaxAudioGraph(TT("noise"), "noise=", &c, options); CLASS_ATTR_ENUM(c->maxClass, "mode", 0, "white pink brown blue gauss"); return 0; }
int C74_EXPORT main(void) { MaxAudioGraphWrappedClassOptionsPtr options = new MaxAudioGraphWrappedClassOptions; TTValue value(0); MaxAudioGraphWrappedClassPtr c = NULL; TTAudioGraphInit(); options->append(TT("generator"), value); value = 2; options->append(TT("wrapperDefinesNumOutlets"), value); wrapAsMaxAudioGraph(TT("soundfile.player"), "j.soundfile.player=", &c, options); CLASS_ATTR_STYLE(c->maxClass, "filePath", 0, "file"); wrapAsMaxAudioGraph(TT("soundfile.player"), "soundfile.player=", &c, options); CLASS_ATTR_STYLE(c->maxClass, "filePath", 0, "file"); return 0; }
int C74_EXPORT main(void) { t_class* c; TTAudioGraphInit(); common_symbols_init(); c = class_new("j.info=", (method)InfoNew, (method)InfoFree, sizeof(Info), (method)0L, A_GIMME, 0); class_addmethod(c, (method)InfoBang, "bang", 0); class_addmethod(c, (method)MaxAudioGraphReset, "graph.reset", A_CANT, 0); class_addmethod(c, (method)InfoConnect, "audio.connect", A_OBJ, A_LONG, 0); class_addmethod(c, (method)MaxAudioGraphSetup, "audio.setup", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphDrop, "audio.drop", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphObject, "audio.object", A_CANT, 0); class_addmethod(c, (method)InfoAssist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); class_register(_sym_box, c); sInfoClass = c; return 0; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { ClassPtr c; TTAudioGraphInit(); common_symbols_init(); c = class_new("jcom.pack≈", (method)PackNew, (method)PackFree, sizeof(Pack), (method)0L, A_GIMME, 0); class_addmethod(c, (method)PackReset, "audio.reset", A_CANT, 0); class_addmethod(c, (method)PackSetup, "audio.setup", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphDrop, "audio.drop", A_CANT, 0); class_addmethod(c, (method)MaxAudioGraphObject, "audio.object", A_CANT, 0); class_addmethod(c, (method)PackDsp, "dsp", A_CANT, 0); class_addmethod(c, (method)PackDsp64, "dsp64", A_CANT, 0); class_addmethod(c, (method)PackAssist, "assist", A_CANT, 0); class_addmethod(c, (method)object_obex_dumpout, "dumpout", A_CANT, 0); class_dspinit(c); class_register(_sym_box, c); sInClass = c; return 0; }
TTErr wrapAsMaxAudioGraph(TTSymbolPtr ttClassName, char* maxClassName, WrappedClassPtr* c, WrappedClassOptionsPtr options) { TTObject* o = NULL; TTValue v; TTUInt16 numChannels = 1; WrappedClass* wrappedMaxClass = NULL; common_symbols_init(); TTAudioGraphInit(); if(!wrappedMaxClasses) wrappedMaxClasses = hashtab_new(0); wrappedMaxClass = new WrappedClass; wrappedMaxClass->maxClassName = gensym(maxClassName); wrappedMaxClass->maxClass = class_new( maxClassName, (method)wrappedClass_new, (method)wrappedClass_free, sizeof(WrappedInstance), (method)0L, A_GIMME, 0); wrappedMaxClass->ttClassName = ttClassName; wrappedMaxClass->validityCheck = NULL; wrappedMaxClass->validityCheckArgument = NULL; wrappedMaxClass->options = options; wrappedMaxClass->maxAttrNamesToTTAttrNames = hashtab_new(0); // Create a temporary instance of the class so that we can query it. TTObjectInstantiate(ttClassName, &o, numChannels); o->getMessageNames(v); for(TTUInt16 i=0; i<v.getSize(); i++){ TTSymbolPtr name = NULL; v.get(i, &name); if(name == TT("updateMaxNumChannels") || name == TT("updateSr")) continue; // don't expose these attributes to Max users class_addmethod(wrappedMaxClass->maxClass, (method)wrappedClass_anything, (char*)name->getCString(), A_GIMME, 0); } o->getAttributeNames(v); for (TTUInt16 i=0; i<v.getSize(); i++) { TTSymbolPtr name = NULL; TTAttributePtr attr = NULL; SymbolPtr maxType = _sym_long; TTCString nameCString = NULL; SymbolPtr nameMaxSymbol = NULL; TTUInt32 nameSize = 0; v.get(i, &name); if(name == TT("maxNumChannels") || name == TT("processInPlace")) continue; // don't expose these attributes to Max users o->findAttribute(name, &attr); if (attr->type == kTypeFloat32) maxType = _sym_float32; else if (attr->type == kTypeFloat64) maxType = _sym_float64; else if (attr->type == kTypeSymbol || attr->type == kTypeString) maxType = _sym_symbol; // convert first letter to lower-case if it isn't already nameSize = name->getString().length(); nameCString = new char[nameSize+1]; strncpy_zero(nameCString, name->getCString(), nameSize+1); if (nameCString[0]>64 && nameCString[0]<91) nameCString[0] += 32; nameMaxSymbol = gensym(nameCString); hashtab_store(wrappedMaxClass->maxAttrNamesToTTAttrNames, nameMaxSymbol, ObjectPtr(name)); class_addattr(wrappedMaxClass->maxClass, attr_offset_new(nameCString, maxType, 0, (method)wrappedClass_attrGet, (method)wrappedClass_attrSet, NULL)); // Add display styles for the Max 5 inspector if (attr->type == kTypeBoolean) CLASS_ATTR_STYLE(wrappedMaxClass->maxClass, (char*)name->getCString(), 0, "onoff"); if (name == TT("fontFace")) CLASS_ATTR_STYLE(wrappedMaxClass->maxClass, "fontFace", 0, "font"); } TTObjectRelease(&o); class_addmethod(wrappedMaxClass->maxClass, (method)MaxAudioGraphReset, "audio.reset", A_CANT, 0); class_addmethod(wrappedMaxClass->maxClass, (method)MaxAudioGraphSetup, "audio.setup", A_CANT, 0); class_addmethod(wrappedMaxClass->maxClass, (method)MaxAudioGraphConnect, "audio.connect", A_OBJ, A_LONG, 0); class_addmethod(wrappedMaxClass->maxClass, (method)object_obex_dumpout, "dumpout", A_CANT, 0); class_addmethod(wrappedMaxClass->maxClass, (method)wrappedClass_assist, "assist", A_CANT, 0L); class_addmethod(wrappedMaxClass->maxClass, (method)stdinletinfo, "inletinfo", A_CANT, 0); class_register(_sym_box, wrappedMaxClass->maxClass); if (c) *c = wrappedMaxClass; hashtab_store(wrappedMaxClasses, wrappedMaxClass->maxClassName, ObjectPtr(wrappedMaxClass)); return kTTErrNone; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { TTAudioGraphInit(); wrapAsMaxAudioGraph(TT("array"), "jcom.array≈", NULL); return wrapAsMaxAudioGraph(TT("array"), "array≈", NULL); }
int TTCLASSWRAPPERMAX_EXPORT main(void) { TTAudioGraphInit(); wrapAsMaxAudioGraph(TT("limiter"), "jcom.limiter≈", NULL); return 0; }
int TTCLASSWRAPPERMAX_EXPORT main(void) { TTAudioGraphInit(); wrapAsMaxAudioGraph(TT("audiounit"), "j.audiounit=", NULL); return 0; }
int main(void) { TTAudioGraphInit(); return wrapAsMaxAudioGraph(TT("Overdrive"), "jcom.overdrive≈", NULL); }
int TTCLASSWRAPPERMAX_EXPORT main(void) { TTAudioGraphInit(); wrapAsMaxAudioGraph(TT("pulsesub"), "jcom.pulsesub≈", NULL); return 0; }