aboutsummaryrefslogtreecommitdiff
path: root/externals/grill
diff options
context:
space:
mode:
Diffstat (limited to 'externals/grill')
-rw-r--r--externals/grill/flext/source/flatom.cpp109
-rw-r--r--externals/grill/flext/source/flattr.cpp17
-rw-r--r--externals/grill/flext/source/flbase.cpp2
-rw-r--r--externals/grill/flext/source/flbase.h190
-rw-r--r--externals/grill/flext/source/flclass.h277
-rw-r--r--externals/grill/flext/source/fldefs.h499
-rw-r--r--externals/grill/flext/source/fldoxygen.h200
-rw-r--r--externals/grill/flext/source/fldsp.cpp2
-rw-r--r--externals/grill/flext/source/fldsp.h12
-rw-r--r--externals/grill/flext/source/flext.cpp55
-rw-r--r--externals/grill/flext/source/flext.h4
-rw-r--r--externals/grill/flext/source/flinternal.h2
-rwxr-xr-xexternals/grill/flext/source/fllib.cpp15
-rw-r--r--externals/grill/flext/source/flout.cpp59
-rw-r--r--externals/grill/flext/source/flstdc.h33
-rw-r--r--externals/grill/flext/source/flsupport.h131
-rw-r--r--externals/grill/flext/source/flthr.cpp9
-rw-r--r--externals/grill/flext/source/flutil.cpp6
-rwxr-xr-xexternals/grill/flext/tutorial/adv1/adv1.cwbin98601 -> 64204 bytes
-rw-r--r--externals/grill/flext/tutorial/adv1/adv1.dsp6
-rwxr-xr-xexternals/grill/flext/tutorial/adv1/main.cpp3
-rw-r--r--externals/grill/flext/tutorial/build-pd-bcc.bat12
-rw-r--r--externals/grill/flext/tutorial/build-pd-linux.sh11
-rw-r--r--externals/grill/flext/tutorial/build-pd-msvc.bat3
-rw-r--r--externals/grill/flext/tutorial/config-pd-linux.txt11
-rw-r--r--externals/grill/flext/tutorial/makefile.pd-cygwin2
-rw-r--r--externals/grill/flext/tutorial/makefile.pd-linux13
-rwxr-xr-xexternals/grill/flext/tutorial/maxmsp/ex-adv1bin265 -> 535 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/maxmsp/ex-signal1bin331 -> 740 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/maxmsp/ex-signal2bin410 -> 708 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/maxmsp/ex-simple1bin404 -> 725 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/maxmsp/ex-simple2bin303 -> 668 bytes
-rwxr-xr-xexternals/grill/flext/tutorial/maxmsp/ex-simple3bin381 -> 657 bytes
-rw-r--r--externals/grill/flext/tutorial/pd/ex-adv1.pd26
-rw-r--r--externals/grill/flext/tutorial/pd/ex-signal1.pd39
-rw-r--r--externals/grill/flext/tutorial/pd/ex-signal2.pd40
-rw-r--r--externals/grill/flext/tutorial/pd/ex-simple1.pd26
-rw-r--r--externals/grill/flext/tutorial/pd/ex-simple2.pd32
-rw-r--r--externals/grill/flext/tutorial/pd/ex-simple3.pd40
-rw-r--r--externals/grill/flext/tutorial/pd/ex-thread1.pd73
-rw-r--r--externals/grill/flext/tutorial/pd/ex-thread2.pd59
-rw-r--r--externals/grill/flext/tutorial/readme.txt15
-rw-r--r--externals/grill/flext/tutorial/signal1/main.cpp8
-rw-r--r--externals/grill/flext/tutorial/signal1/signal1.cwbin102333 -> 64204 bytes
-rw-r--r--externals/grill/flext/tutorial/signal1/signal1.dsp6
-rw-r--r--externals/grill/flext/tutorial/signal2/main.cpp13
-rw-r--r--externals/grill/flext/tutorial/signal2/signal2.cwbin104217 -> 64204 bytes
-rw-r--r--externals/grill/flext/tutorial/signal2/signal2.dsp6
-rwxr-xr-xexternals/grill/flext/tutorial/simple1/main.cpp8
-rwxr-xr-xexternals/grill/flext/tutorial/simple1/simple1.cwbin94211 -> 64204 bytes
-rw-r--r--externals/grill/flext/tutorial/simple1/simple1.dsp6
-rwxr-xr-xexternals/grill/flext/tutorial/simple2/main.cpp7
-rwxr-xr-xexternals/grill/flext/tutorial/simple2/simple2.cwbin98601 -> 64204 bytes
-rw-r--r--externals/grill/flext/tutorial/simple2/simple2.dsp6
-rw-r--r--externals/grill/flext/tutorial/simple3/main.cpp7
-rw-r--r--externals/grill/flext/tutorial/simple3/simple3.cwbin102333 -> 64204 bytes
-rw-r--r--externals/grill/flext/tutorial/simple3/simple3.dsp6
-rw-r--r--externals/grill/flext/tutorial/thread1/main.cpp10
-rw-r--r--externals/grill/flext/tutorial/thread1/thread1.dsp6
-rw-r--r--externals/grill/flext/tutorial/thread2/main.cpp10
-rw-r--r--externals/grill/flext/tutorial/thread2/thread2.dsp6
-rw-r--r--externals/grill/flext/tutorial/tutorial.dsw48
62 files changed, 1523 insertions, 663 deletions
diff --git a/externals/grill/flext/source/flatom.cpp b/externals/grill/flext/source/flatom.cpp
index 705fc9e6..b7ba4524 100644
--- a/externals/grill/flext/source/flatom.cpp
+++ b/externals/grill/flext/source/flatom.cpp
@@ -14,63 +14,46 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
-//namespace flext {
flext::AtomList::AtomList(int argc,const t_atom *argv):
- lst(NULL),cnt(0)
+ cnt(0),lst(NULL)
{
operator()(argc,argv);
}
flext::AtomList::AtomList(const AtomList &a):
- lst(NULL),cnt(0)
+ cnt(0),lst(NULL)
{
operator =(a);
}
flext::AtomList::~AtomList() { Clear(); }
-flext::AtomList &flext::AtomList::operator()(int argc,const t_atom *argv)
+flext::AtomList &flext::AtomList::Set(int argc,const t_atom *argv,int offs,bool resize)
{
- if(lst && cnt != argc) { delete[] lst; lst = NULL; cnt = 0; }
+ int ncnt = argc+offs;
+ if(resize && lst && cnt != ncnt) { delete[] lst; lst = NULL; cnt = 0; }
- if(argc) {
- cnt = argc;
- lst = new t_atom[cnt];
+ if(ncnt) {
+ if(!lst) lst = new t_atom[cnt = ncnt];
if(argv) {
- for(int i = 0; i < argc; ++i) SetAtom(lst[i],argv[i]);
-/*
- {
- switch(lst[i].a_type = argv[i].a_type) {
- case A_FLOAT:
- lst[i].a_w.w_float = argv[i].a_w.w_float;
- break;
-#ifdef MAXMSP
- case A_LONG:
- lst[i].a_w.w_int = argv[i].a_w.w_int;
- break;
-#endif
- case A_SYMBOL:
- lst[i].a_w.w_symbol = argv[i].a_w.w_symbol;
- break;
-#ifdef PD
- case A_POINTER:
- lst[i].a_w.w_gpointer = argv[i].a_w.w_gpointer;
- break;
-#endif
- default:
- post("AtomList - atom type (%i) not supported",lst[i].a_type);
- lst[i].a_type = A_NULL;
- break;
- }
- }
-*/
+ for(int i = 0; i < argc; ++i) SetAtom(lst[offs+i],argv[i]);
}
}
return *this;
}
+int flext::AtomList::Get(t_atom *argv,int mxsz) const
+{
+ int argc = Count();
+ if(mxsz >= 0 && argc > mxsz) argc = mxsz;
+
+ for(int i = 0; i < argc; ++i) SetAtom(argv[i],lst[i]);
+
+ return argc;
+}
+
flext::AtomList &flext::AtomList::Append(const t_atom &a)
{
@@ -87,15 +70,17 @@ flext::AtomList &flext::AtomList::Append(const t_atom &a)
flext::AtomList &flext::AtomList::Append(int argc,const t_atom *argv)
{
- t_atom *nlst = new t_atom[cnt+argc];
- int i;
- for(i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]);
- for(i = 0; i < argc; ++i) SetAtom(nlst[cnt+i],argv[i]);
-
- if(lst) delete[] lst;
- lst = nlst;
- cnt += argc;
-
+ if(argc) {
+ t_atom *nlst = new t_atom[cnt+argc];
+ int i;
+ for(i = 0; i < cnt; ++i) SetAtom(nlst[i],lst[i]);
+ if(argv)
+ for(i = 0; i < argc; ++i) SetAtom(nlst[cnt+i],argv[i]);
+
+ if(lst) delete[] lst;
+ lst = nlst;
+ cnt += argc;
+ }
return *this;
}
@@ -114,15 +99,18 @@ flext::AtomList &flext::AtomList::Prepend(const t_atom &a)
flext::AtomList &flext::AtomList::Prepend(int argc,const t_atom *argv)
{
- t_atom *nlst = new t_atom[cnt+argc];
- int i;
- for(i = 0; i < argc; ++i) SetAtom(nlst[i],argv[i]);
- for(i = 0; i < cnt; ++i) SetAtom(nlst[argc+i],lst[i]);
-
- if(lst) delete[] lst;
- lst = nlst;
- cnt += argc;
-
+ if(argc) {
+ t_atom *nlst = new t_atom[cnt+argc];
+ int i;
+
+ if(argv)
+ for(i = 0; i < argc; ++i) SetAtom(nlst[i],argv[i]);
+ for(i = 0; i < cnt; ++i) SetAtom(nlst[argc+i],lst[i]);
+
+ if(lst) delete[] lst;
+ lst = nlst;
+ cnt += argc;
+ }
return *this;
}
@@ -136,4 +124,17 @@ flext::AtomList flext::AtomList::GetPart(int offs,int len) const
return AtomList(len,Atoms()+offs);
}
-//} // namespace flext
+
+flext::AtomAnything::AtomAnything(const t_symbol *h,int argc,const t_atom *argv):
+ AtomList(argc,argv),hdr(h?h:MakeSymbol(""))
+{}
+
+flext::AtomAnything::AtomAnything(const char *h,int argc,const t_atom *argv):
+ AtomList(argc,argv),hdr(MakeSymbol(h))
+{}
+
+flext::AtomAnything::AtomAnything(const AtomAnything &a):
+ AtomList(a),hdr(a.hdr)
+{}
+
+
diff --git a/externals/grill/flext/source/flattr.cpp b/externals/grill/flext/source/flattr.cpp
index 20b06e41..2739ae11 100644
--- a/externals/grill/flext/source/flattr.cpp
+++ b/externals/grill/flext/source/flattr.cpp
@@ -14,7 +14,12 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
#include <string.h>
-#include <stdio.h>
+
+#ifdef MAXMSP
+#define STD std
+#else
+#define STD
+#endif
flext_base::attritem::attritem(const t_symbol *t,const t_symbol *gt,metharg tp,methfun gf,methfun sf):
tag(t),gtag(gt),argtp(tp),gfun(gf),sfun(sf),nxt(NULL)
@@ -40,8 +45,8 @@ void flext_base::AddAttrItem(attritem *m)
void flext_base::AddAttrib(const char *attr,metharg tp,methfun gfun,methfun sfun)
{
if(procattr) {
- char tmp[1024];
- sprintf(tmp,"get%s",attr);
+ char tmp[256] = "get";
+ strcpy(tmp+3,attr);
AddAttrItem(new attritem(MakeSymbol(attr),MakeSymbol(tmp),tp,gfun,sfun));
AddMethod(0,attr,(methfun)cb_SetAttrib,a_any,a_null);
@@ -80,7 +85,7 @@ bool flext_base::ListAttrib()
attritem *a = attrhead;
for(int i = 0; i < attrcnt; ++i,a = a->nxt) SetSymbol(la[i],a->tag);
- ToOutAnything(outattr,thisTag(),la.Count(),la.Atoms());
+ ToOutAnything(outattr,MakeSymbol("attributes"),la.Count(),la.Atoms());
return true;
}
else
@@ -135,7 +140,7 @@ bool flext_base::SetAttrib(const t_symbol *tag,int argc,const t_atom *argv)
post("%s - attribute %s has no get method",thisName(),GetString(tag));
}
else
- error("%s - %s: attribute not found",thisName(),tag);
+ error("%s - %s: attribute not found",thisName(),GetString(tag));
return true;
}
@@ -184,7 +189,7 @@ bool flext_base::GetAttrib(const t_symbol *tag,int argc,const t_atom *argv)
post("%s - attribute %s has no set method",thisName(),GetString(tag));
}
else
- error("%s - %s: attribute not found",thisName(),tag);
+ error("%s - %s: attribute not found",thisName(),GetString(tag));
return true;
}
diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp
index 97fed291..5a2e5f0a 100644
--- a/externals/grill/flext/source/flbase.cpp
+++ b/externals/grill/flext/source/flbase.cpp
@@ -27,6 +27,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
flext_hdr *flext_obj::m_holder = NULL;
const t_symbol *flext_obj::m_holdname = NULL;
bool flext_obj::m_holdattr = false;
+int flext_obj::m_holdaargc = 0;
+const t_atom *flext_obj::m_holdaargv = NULL;
bool flext_obj::process_attributes = false;
/////////////////////////////////////////////////////////
diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h
index f3f8b647..21f96aaf 100644
--- a/externals/grill/flext/source/flbase.h
+++ b/externals/grill/flext/source/flbase.h
@@ -27,8 +27,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
class flext_obj;
// ----------------------------------------------------------------------------
-/*! \struct flext_hdr
- \brief The obligatory PD or Max/MSP object header
+/*! \brief The obligatory PD or Max/MSP object header
\internal
This is in a separate struct to assure that obj is the very first thing.
@@ -39,8 +38,13 @@ class flext_obj;
struct FLEXT_EXT flext_hdr
{
+ /*! \defgroup FLEXT_OBJHEADER Actual PD or Max/MSP object
+ \internal
+ @{
+ */
+
/*! \brief The obligatory object header
- MUST reside at memory offset 0 (no virtual table possible)
+ \note MUST reside at memory offset 0 (no virtual table possible)
*/
t_sigobj obj;
@@ -54,17 +58,16 @@ struct FLEXT_EXT flext_hdr
long curinlet;
#endif
- /*! \brief This points to flext object class
- This points to the actual polymorphic C++ class
+ /*! \brief This points to the actual polymorphic C++ class
*/
flext_obj *data;
+
+ //! @} FLEXT_OBJHEADER
};
// ----------------------------------------------------------------------------
-/*! \class flext_obj
- \brief The mother of base classes for all flext externs
- \internal
+/*! \brief The mother of base classes for all flext external objects
Each extern which is written in C++ needs to use the #defines at the
end of this header file.
@@ -77,6 +80,7 @@ struct FLEXT_EXT flext_hdr
One of the defines like
FLEXT_NEW(NEW_CLASS)
+ or
FLEXT_NEW_2(NEW_CLASS, float, float)
should be the first thing in your implementation file.
@@ -85,69 +89,123 @@ struct FLEXT_EXT flext_hdr
*/
// ----------------------------------------------------------------------------
-class FLEXT_EXT flext_obj:
+class flext_obj:
public flext
{
public:
- // --- overloading of new/delete memory allocation methods ----
- // MaxMSP allows only 16K in overdrive mode!
+ /*! \defgroup FLEXT_OBJCLASS Object base class
+ @{
+ */
+// --- creation -------------------------------------------------------
- void *operator new(size_t bytes);
- void operator delete(void *blk);
-
- #ifndef __MRC__ // doesn't allow new[] overloading?!
- void *operator new[](size_t bytes) { return operator new(bytes); }
- void operator delete[](void *blk) { operator delete(blk); }
- #endif
-
- // these are aligned
- static void *NewAligned(size_t bytes,int bitalign = 128);
- static void FreeAligned(void *blk);
-
- // ---------------------
+ /*! \defgroup FLEXT_O_CREATION Creation/Destruction functionality
+ @{
+ */
//! Constructor
flext_obj();
//! Destructor
virtual ~flext_obj() = 0;
-
+
+ /*! \brief Signal a construction problem
+ \note This should only be used in the constructor. Object creation will be aborted.
+ */
+ void InitProblem() { init_ok = false; }
+
+ /*! \brief Enable/disable attribute procession (default = false)
+ \note Use that in the static class setup function (also library setup function)
+ */
+ static void ProcessAttributes(bool attr) { process_attributes = attr; }
+
+ //! Virtual function called at creation time (but after the constructor)
+ // this also guarantees that there are no instances of flext_obj
+ virtual bool Init() = 0;
+
+ //! Virtual function called at destruction (before the destructor)
+ virtual void Exit() {}
+
+ //! @} FLEXT_O_CREATION
+
+// --- info -------------------------------------------------------
+
+ /*! \defgroup FLEXT_O_INFO Get various information
+ @{
+ */
+
//! Get the object's canvas
- t_canvas *thisCanvas() { return(m_canvas); }
+ t_canvas *thisCanvas() { return(m_canvas); }
+ //! Get the PD or Max/MSP object
t_sigobj *thisHdr() { return &x_obj->obj; }
+ //! Get the PD or Max/MSP object
const t_sigobj *thisHdr() const { return &x_obj->obj; }
+ //! Get the class name (as a string)
const char *thisName() const { return GetString(m_name); }
+ //! Get the class name (as a symbol)
const t_symbol *thisNameSym() const { return m_name; }
#ifdef PD
+ //! Get the class pointer
t_class *thisClass() { return (t_class *)((t_object *)(x_obj))->te_g.g_pd; }
#elif defined(MAXMSP)
+ //! Get the class pointer
t_class *thisClass() { return (t_class *)(((t_tinyobject *)x_obj)->t_messlist-1); }
#endif
- void InitProblem() { init_ok = false; }
+ //! @} FLEXT_O_INFO
- static void ProcessAttributes(bool attr) { process_attributes = attr; }
+// --- memory -------------------------------------------------------
- // this also guarantees that there are no instances of flext_obj
- virtual bool Init() = 0;
- virtual void Exit() {}
+ /*! \defgroup FLEXT_O_MEMORY Memory allocation functions
+ @{
+ */
+
+ /*! Overloaded new memory allocation method
+ \warning MaxMSP (or MacOS) allows only 16K in overdrive mode!
+ */
+ void *operator new(size_t bytes);
+ //! Overloaded delete method
+ void operator delete(void *blk);
+ #ifndef __MRC__ // doesn't allow new[] overloading?!
+ void *operator new[](size_t bytes) { return operator new(bytes); }
+ void operator delete[](void *blk) { operator delete(blk); }
+ #endif
+
+ //! Get an aligned memory block
+ static void *NewAligned(size_t bytes,int bitalign = 128);
+ //! Free an aligned memory block
+ static void FreeAligned(void *blk);
+
+ //! @} FLEXT_O_MEMORY
+
// --- help -------------------------------------------------------
- /*! \defgroup FLEXT_C_HELP Flext help/assistance functionality
+ /*! \defgroup FLEXT_O_HELP Help/assistance functionality
+ \remark This is still PD only
+ @{
+ */
- @{
+ /*! Define the help reference symbol for a class
+ \internal
*/
-
static void DefineHelp(t_class *c,const char *ref,const char *dir = NULL,bool addtilde = false);
+
+ //! Define the help reference symbol for a class
void DefineHelp(const char *ref,const char *dir = NULL,bool addtilde = false) { DefineHelp(thisClass(),ref,dir,addtilde); }
- //! @}
+ //! @}
+// --- internal stuff -------------------------------------------------------
+
+ /*! \defgroup FLEXT_O_INTERNAL Internal stuff
+ \internal
+ @{
+ */
+
protected:
//! The object header
@@ -178,7 +236,10 @@ class FLEXT_EXT flext_obj:
//! Hold object's name during construction
static const t_symbol *m_holdname;
+ //! Holders for attribute procession flag
static bool m_holdattr;
+ static int m_holdaargc;
+ static const t_atom *m_holdaargv;
//! The object's name in the patcher
const t_symbol *m_name;
@@ -186,14 +247,15 @@ class FLEXT_EXT flext_obj:
//! Check whether construction was successful
bool InitOk() const { return init_ok; }
- //@{
- //! Definitions for library objects
-
+ // Definitions for library objects
static void lib_init(const char *name,void setupfun(),bool attr);
static void obj_add(bool lib,bool dsp,bool attr,const char *idname,const char *names,void setupfun(t_class *),flext_obj *(*newfun)(int,t_atom *),void (*freefun)(flext_hdr *),int argtp1,...);
static flext_hdr *obj_new(const t_symbol *s,int argc,t_atom *argv);
static void obj_free(flext_hdr *o);
- //@}
+
+ //! @} FLEXT_O_INTERNAL
+
+ //! @} FLEXT_OBJCLASS
};
@@ -211,7 +273,13 @@ class FLEXT_EXT flext_obj:
#ifndef FLEXT_ATTRIBUTES
-#define FLEXT_ATTRIBUTES 0
+/*! \brief Switch for global attribute processing
+ \note Should be set to 1 or 0 (or not be defined)
+ \ingroup FLEXT_DEFS
+*/
+#define FLEXT_ATTRIBUTES \
+\
+0
#endif
// ----------------------------------------
@@ -242,8 +310,8 @@ static void __free__(flext_hdr *hdr) \
static void __setup__(t_class *classPtr) \
{ PARENT_CLASS::__setup__(classPtr); \
NEW_CLASS::SETUPFUN(classPtr); } \
-protected: \
-static inline NEW_CLASS *thisObject(void *c) { return FLEXT_CAST<NEW_CLASS *>(((flext_hdr *)c)->data); }
+protected: \
+static inline NEW_CLASS *thisObject(void *c) { return FLEXT_CAST<NEW_CLASS *>(((flext_hdr *)c)->data); }
// generate name of dsp/non-dsp setup function
@@ -261,24 +329,22 @@ static inline NEW_CLASS *thisObject(void *c) { return FLEXT_CAST<NEW_CLASS *>(((
// these can be used in library setup functions
// to register the individual objects in the library
-#define FLEXT_SETUP(cl) \
+#define REAL_SETUP_0(cl) \
extern void cl##_setup(); \
cl##_setup()
-#define FLEXT_DSP_SETUP(cl) \
+#define REAL_SETUP_1(cl) \
extern void cl##_tilde_setup(); \
cl##_tilde_setup()
-// deprecated
-#define FLEXT_TILDE_SETUP FLEXT_DSP_SETUP
-
+#define REAL_SETUP(cl,DSP) REAL_SETUP_##DSP(cl)
// specify that to define the library itself
#ifdef PD
-#define FLEXT_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT void NAME##_setup() { flext_obj::lib_init(#NAME,SETUPFUN,FLEXT_ATTRIBUTES); }
+#define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT void NAME##_setup() { flext_obj::lib_init(#NAME,SETUPFUN,FLEXT_ATTRIBUTES); }
#else // MAXMSP
-#define FLEXT_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT int main() { flext_obj::lib_init(#NAME,SETUPFUN,FLEXT_ATTRIBUTES); return 0; }
+#define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT int main() { flext_obj::lib_init(#NAME,SETUPFUN,FLEXT_ATTRIBUTES); return 0; }
#endif
@@ -312,8 +378,6 @@ cl##_tilde_setup()
#define FLEXTTYPE_t_float A_FLOAT
#define CALLBTYPE_t_float t_float
-//* #define FLEXTTYPE_t_flint A_FLINT
-
#ifdef PD
#define FLEXTTYPE_int A_FLOAT
#define CALLBTYPE_int float
@@ -341,7 +405,6 @@ cl##_tilde_setup()
#define REAL_NEW(NAME,NEW_CLASS,DSP,LIB) \
-FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) \
flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
{ \
return new NEW_CLASS; \
@@ -349,10 +412,10 @@ flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,A_NULL); \
-}
+} \
+FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
#define REAL_NEW_V(NAME,NEW_CLASS,DSP,LIB) \
-FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) \
flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
{ \
return new NEW_CLASS(argc,argv); \
@@ -360,10 +423,10 @@ flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,&NEW_CLASS::__free__,A_GIMME,A_NULL); \
-}
+} \
+FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
#define REAL_NEW_1(NAME,NEW_CLASS,DSP,LIB, TYPE1) \
-FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) \
flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1)); \
@@ -371,10 +434,10 @@ flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),A_NULL); \
-}
+} \
+FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
#define REAL_NEW_2(NAME,NEW_CLASS,DSP,LIB, TYPE1,TYPE2) \
-FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) \
flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2)); \
@@ -382,10 +445,10 @@ flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),A_NULL); \
-}
+} \
+FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
#define REAL_NEW_3(NAME,NEW_CLASS,DSP,LIB, TYPE1, TYPE2, TYPE3) \
-FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) \
flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3)); \
@@ -393,10 +456,10 @@ flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),A_NULL); \
-}
+} \
+FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
#define REAL_NEW_4(NAME,NEW_CLASS,DSP,LIB, TYPE1,TYPE2, TYPE3, TYPE4) \
-FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) \
flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
{ \
return new NEW_CLASS(ARGCAST(argv[0],TYPE1),ARGCAST(argv[1],TYPE2),ARGCAST(argv[2],TYPE3),ARGCAST(argv[3],TYPE4)); \
@@ -404,7 +467,8 @@ flext_obj *NEW_CLASS::__init__(int argc,t_atom *argv) \
FLEXT_EXP(LIB) void FLEXT_STPF(NEW_CLASS,DSP)() \
{ \
flext_obj::obj_add(LIB,DSP,FLEXT_ATTRIBUTES,#NEW_CLASS,NAME,NEW_CLASS::__setup__,NEW_CLASS::__init__,NEW_CLASS::__free__,FLEXTTP(TYPE1),FLEXTTP(TYPE2),FLEXTTP(TYPE3),FLEXTTP(TYPE4),A_NULL); \
-}
+} \
+FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB)
// Shortcuts for method arguments:
diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h
index 5c67dde9..f9b3deec 100644
--- a/externals/grill/flext/source/flclass.h
+++ b/externals/grill/flext/source/flclass.h
@@ -52,10 +52,12 @@ class flext_base:
friend class flext_obj;
+ /*! \defgroup FLEXT_CLASS Flext base class
+ @{
+ */
public:
- /*! \defgroup FLEXT_C_BASE Flext basic class functionality
-
+ /*! \defgroup FLEXT_C_BASE Basic class functionality
@{
*/
@@ -67,9 +69,11 @@ public:
*/
static bool compatibility;
+//! @} FLEXT_C_BASE
+
// --- inheritable virtual methods --------------------------------
- /*! \defgroup FLEXT_C_VIRTUAL Flext virtual base class functions
+ /*! \defgroup FLEXT_C_VIRTUAL Virtual base class functions
@{
*/
@@ -80,19 +84,22 @@ public:
//! called on patcher load (not on mere object creation!)
virtual void m_loadbang() {}
- //! quickhelp for inlets/outlets (gets calles in MaxMSP only)
+ //! quickhelp for inlets/outlets (gets called in MaxMSP only)
virtual void m_assist(long /*msg*/,long /*arg*/,char * /*s*/) {}
/*! \brief Called for every incoming message.
All method handling is done in there
\return True if a handler was found and called
+ \todo Once, there should be a const modifier for argv
*/
virtual bool m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv);
- //! called for every unhandled message (by m_methodmain)
+ /*! \brief Called for every unhandled message (by m_methodmain)
+ \todo Once, there should be a const modifier for argv
+ */
virtual bool m_method_(int inlet,const t_symbol *s,int argc,t_atom *argv);
-//! @}
+//! @} FLEXT_C_VIRTUAL
// --- inlet/outlet stuff -----------------------------------------
@@ -100,7 +107,10 @@ public:
/*! \defgroup FLEXT_C_INOUT Flext in-/outlet functions
\note These must be called in the class' constructor
\note All (also default) inlets must be defined
+ @{
+ */
+ /*! \defgroup FLEXT_C_IO_ADD Announce in-/outlet functions
@{
*/
@@ -109,50 +119,68 @@ public:
// void AddInDef() { AddInlet(xlet::tp_def,1); }
/*! \brief Add inlet(s) for anythings
- That's the one to choose for the left-most (first) inlet unless it's a signal inlet.
+ \remark That's the one to choose for the left-most (first) inlet unless it's a signal inlet.
*/
- void AddInAnything(int m = 1) { AddInlet(xlet::tp_any,m); } // leftmost or via proxy
- void AddInAnything(const char *desc,int m = 1) { AddInlet(xlet::tp_any,m,desc); } // leftmost or via proxy
+ void AddInAnything(int m = 1) { AddInlet(xlet::tp_any,m); }
+ /*! \brief Add inlet(s) for anythings (with description)
+ \remark That's the one to choose for the left-most (first) inlet unless it's a signal inlet.
+ */
+ void AddInAnything(const char *desc,int m = 1) { AddInlet(xlet::tp_any,m,desc); }
//! Add inlet(s) for floats
void AddInFloat(int m = 1) { AddInlet(xlet::tp_float,m); }
+ //! Add inlet(s) for floats (with description)
void AddInFloat(const char *desc,int m = 1) { AddInlet(xlet::tp_float,m,desc); }
- //! Add inlet(s) for ints
+ //! Add inlet(s) for integers
void AddInInt(int m = 1) { AddInlet(xlet::tp_int,m); }
+ //! Add inlet(s) for integers (with description)
void AddInInt(const char *desc,int m = 1) { AddInlet(xlet::tp_int,m,desc); }
//! Add inlet(s) for symbols
void AddInSymbol(int m = 1) { AddInlet(xlet::tp_sym,m); }
+ //! Add inlet(s) for symbol (with description)
void AddInSymbol(const char *desc,int m = 1) { AddInlet(xlet::tp_sym,m,desc); }
//! Add inlet(s) for bang
void AddInBang(int m = 1) { AddInlet(xlet::tp_sym,m); }
+ //! Add inlet(s) for bangs (with description)
void AddInBang(const char *desc,int m = 1) { AddInlet(xlet::tp_sym,m,desc); }
//! Add inlet(s) for lists
- void AddInList(int m = 1) { AddInlet(xlet::tp_list,m); } // via proxy
- void AddInList(const char *desc,int m = 1) { AddInlet(xlet::tp_list,m,desc); } // via proxy
+ void AddInList(int m = 1) { AddInlet(xlet::tp_list,m); }
+ //! Add inlet(s) for lists (with description)
+ void AddInList(const char *desc,int m = 1) { AddInlet(xlet::tp_list,m,desc); }
//! Add outlet(s) for anythings
void AddOutAnything(int m = 1) { AddOutlet(xlet::tp_any,m); }
+ //! Add outlet(s) for anythings (with description)
void AddOutAnything(const char *desc,int m = 1) { AddOutlet(xlet::tp_any,m,desc); }
//! Add outlet(s) for floats
void AddOutFloat(int m = 1) { AddOutlet(xlet::tp_float,m); }
+ //! Add outlet(s) for floats (with description)
void AddOutFloat(const char *desc,int m = 1) { AddOutlet(xlet::tp_float,m,desc); }
- //! Add outlet(s) for ints
+ //! Add outlet(s) for integers
void AddOutInt(int m = 1) { AddOutlet(xlet::tp_int,m); }
+ //! Add outlet(s) for integers (with description)
void AddOutInt(const char *desc,int m = 1) { AddOutlet(xlet::tp_int,m,desc); }
//! Add outlet(s) for symbols
void AddOutSymbol(int m = 1) { AddOutlet(xlet::tp_sym,m); }
+ //! Add outlet(s) for symbols (with description)
void AddOutSymbol(const char *desc,int m = 1) { AddOutlet(xlet::tp_sym,m,desc); }
//! Add outlet(s) for bangs
void AddOutBang(int m = 1) { AddOutlet(xlet::tp_sym,m); }
+ //! Add outlet(s) for bangs (with description)
void AddOutBang(const char *desc,int m = 1) { AddOutlet(xlet::tp_sym,m,desc); }
//! Add outlet(s) for lists
void AddOutList(int m = 1) { AddOutlet(xlet::tp_list,m); }
+ //! Add outlet(s) for lists (with description)
void AddOutList(const char *desc,int m = 1) { AddOutlet(xlet::tp_list,m,desc); }
- /*! \brief Set up inlets and outlets
- \note this is deprecated... inlets and outlets are now set up automatically
- */
+ //! \deprecated inlets and outlets are now set up automatically
bool SetupInOut() { return true; }
+ //! @} FLEXT_C_IO_ADD
+
+ /*! \defgroup FLEXT_C_IO_MISC Miscellanous in-/outlet functionality
+ @{
+ */
+
//! Get number of inlets
int CntIn() const { return incnt; }
//! Get number of outlets
@@ -162,75 +190,121 @@ public:
//! Get number of signal outlets
int CntOutSig() const { return outsigs; }
-
class outlet;
-// class AtomList;
-// class AtomAnything;
//! Retrieve currently processed message tag (NULL if no message processing)
const t_symbol *thisTag() const { return curtag; }
- //! Get pointer to outlet (_after_ calling setup_inout()!)
- outlet *GetOut(int ix) { return (outlets && ix < outcnt)?outlets[ix]:NULL; }
+ //! Get pointer to outlet (not in the constructor!)
+ outlet *GetOut(int ix) const { return (outlets && ix < outcnt)?outlets[ix]:NULL; }
+
+ //! Get pointer to attribute outlet
+ outlet *GetOutAttr() const { return outattr; }
+
+ //! @} FLEXT_C_IO_MISC
+
+ /*! \defgroup FLEXT_C_IO_OUT Output data to inlets/outlets
+ @{
+ */
// output messages
- void ToOutBang(outlet *o);
+ //! Output bang (to appointed outlet)
+ void ToOutBang(outlet *o) const;
//! Output bang (index n starts with 0)
- void ToOutBang(int n) { outlet *o = GetOut(n); if(o) ToOutBang(o); }
+ void ToOutBang(int n) const { outlet *o = GetOut(n); if(o) ToOutBang(o); }
- void ToOutFloat(outlet *o,float f);
+ //! Output float (to appointed outlet)
+ void ToOutFloat(outlet *o,float f) const;
//! Output float (index n starts with 0)
- void ToOutFloat(int n,float f) { outlet *o = GetOut(n); if(o) ToOutFloat(o,f); }
+ void ToOutFloat(int n,float f) const { outlet *o = GetOut(n); if(o) ToOutFloat(o,f); }
- void ToOutInt(outlet *o,int f);
- //! Output int (index n starts with 0)
- void ToOutInt(int n,int f) { outlet *o = GetOut(n); if(o) ToOutInt(o,f); }
+ //! Output integer (to appointed outlet)
+ void ToOutInt(outlet *o,int f) const;
+ //! Output integer (index n starts with 0)
+ void ToOutInt(int n,int f) const { outlet *o = GetOut(n); if(o) ToOutInt(o,f); }
- void ToOutSymbol(outlet *o,const t_symbol *s);
+ //! Output symbol (to appointed outlet)
+ void ToOutSymbol(outlet *o,const t_symbol *s) const;
//! Output symbol (index n starts with 0)
- void ToOutSymbol(int n,const t_symbol *s) { outlet *o = GetOut(n); if(o) ToOutSymbol(o,s); }
-
- void ToOutString(outlet *o,const char *s) { ToOutSymbol(o,MakeSymbol(s)); }
- //! Output string (index n starts with 0)
- void ToOutString(int n,const char *s) { outlet *o = GetOut(n); if(o) ToOutString(o,s); }
-
- void ToOutList(outlet *o,int argc,const t_atom *argv);
+ void ToOutSymbol(int n,const t_symbol *s) const { outlet *o = GetOut(n); if(o) ToOutSymbol(o,s); }
+ //! Output string aka symbol (to appointed outlet)
+ void ToOutString(outlet *o,const char *s) const { ToOutSymbol(o,MakeSymbol(s)); }
+ //! Output string aka symbol (index n starts with 0)
+ void ToOutString(int n,const char *s) const { outlet *o = GetOut(n); if(o) ToOutString(o,s); }
+
+ //! Output list (to appointed outlet)
+ void ToOutList(outlet *o,int argc,const t_atom *argv) const;
//! Output list (index n starts with 0)
- void ToOutList(int n,int argc,const t_atom *argv) { outlet *o = GetOut(n); if(o) ToOutList(o,argc,argv); }
+ void ToOutList(int n,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) ToOutList(o,argc,argv); }
//! Output list (index n starts with 0)
- void ToOutList(int n,const AtomList &list) { ToOutList(n,list.Count(),list.Atoms()); }
+ void ToOutList(int n,const AtomList &list) const { ToOutList(n,list.Count(),list.Atoms()); }
- void ToOutAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv);
+ //! Output anything (to appointed outlet)
+ void ToOutAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv) const;
//! Output anything (index n starts with 0)
- void ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) { outlet *o = GetOut(n); if(o) ToOutAnything(o,const_cast<t_symbol *>(s),argc,argv); }
+ void ToOutAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) ToOutAnything(o,const_cast<t_symbol *>(s),argc,argv); }
//! Output anything (index n starts with 0)
- void ToOutAnything(int n,const AtomAnything &any) { ToOutAnything(n,any.Header(),any.Count(),any.Atoms()); }
+ void ToOutAnything(int n,const AtomAnything &any) const { ToOutAnything(n,any.Header(),any.Count(),any.Atoms()); }
- void ToQueueBang(outlet *o);
- void ToQueueBang(int n) { outlet *o = GetOut(n); if(o) ToQueueBang(o); }
- void ToQueueFloat(outlet *o,float f);
- void ToQueueFloat(int n,float f) { outlet *o = GetOut(n); if(o) ToQueueFloat(o,f); }
- void ToQueueInt(outlet *o,int f);
- void ToQueueInt(int n,int f) { outlet *o = GetOut(n); if(o) ToQueueInt(o,f); }
- void ToQueueSymbol(outlet *o,const t_symbol *s);
- void ToQueueSymbol(int n,const t_symbol *s) { outlet *o = GetOut(n); if(o) ToQueueSymbol(o,s); }
- void ToQueueString(int n,const char *s) { ToQueueSymbol(n,MakeSymbol(s)); }
- void ToQueueList(outlet *o,int argc,const t_atom *argv);
- void ToQueueList(int n,int argc,const t_atom *argv) { outlet *o = GetOut(n); if(o) ToQueueList(o,argc,argv); }
- void ToQueueList(int n,const AtomList &list) { ToQueueList(n,list.Count(),list.Atoms()); }
- void ToQueueAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv);
- void ToQueueAnything(int n,const t_symbol *s,int argc,const t_atom *argv) { outlet *o = GetOut(n); if(o) ToQueueAnything(o,s,argc,argv); }
- void ToQueueAnything(int n,const AtomAnything &any) { ToQueueAnything(n,any.Header(),any.Count(),any.Atoms()); }
-
-//! @}
+ //! @} FLEXT_C_IO_OUT
+
+ /*! \defgroup FLEXT_C_IO_QUEUE Low-priority output of data to inlets/outlets
+ @{
+ */
+
+ //! Output bang (to appointed outlet)
+ void ToQueueBang(outlet *o) const;
+ //! Output bang (index n starts with 0)
+ void ToQueueBang(int n) const { outlet *o = GetOut(n); if(o) ToQueueBang(o); }
+
+ //! Output float (to appointed outlet)
+ void ToQueueFloat(outlet *o,float f) const;
+ //! Output float (index n starts with 0)
+ void ToQueueFloat(int n,float f) const { outlet *o = GetOut(n); if(o) ToQueueFloat(o,f); }
+
+ //! Output integer (to appointed outlet)
+ void ToQueueInt(outlet *o,int f) const;
+ //! Output integer (index n starts with 0)
+ void ToQueueInt(int n,int f) const { outlet *o = GetOut(n); if(o) ToQueueInt(o,f); }
+
+ //! Output symbol (to appointed outlet)
+ void ToQueueSymbol(outlet *o,const t_symbol *s) const;
+ //! Output symbol (index n starts with 0)
+ void ToQueueSymbol(int n,const t_symbol *s) const { outlet *o = GetOut(n); if(o) ToQueueSymbol(o,s); }
+ //! Output string aka symbol (to appointed outlet)
+ void ToQueueString(outlet *o,const char *s) const { ToQueueSymbol(o,MakeSymbol(s)); }
+ //! Output string aka symbol (to appointed outlet)
+ void ToQueueString(int n,const char *s) const { ToQueueSymbol(n,MakeSymbol(s)); }
+
+ //! Output list (to appointed outlet)
+ void ToQueueList(outlet *o,int argc,const t_atom *argv) const;
+ //! Output list (to appointed outlet)
+ void ToQueueList(outlet *o,const AtomList &list) const { ToQueueList(o,list.Count(),list.Atoms()); }
+ //! Output list (index n starts with 0)
+ void ToQueueList(int n,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) ToQueueList(o,argc,argv); }
+ //! Output list (index n starts with 0)
+ void ToQueueList(int n,const AtomList &list) const { ToQueueList(n,list.Count(),list.Atoms()); }
+
+ //! Output anything (to appointed outlet)
+ void ToQueueAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv) const;
+ //! Output anything (to appointed outlet)
+ void ToQueueAnything(outlet *o,const AtomAnything &any) const { ToQueueAnything(o,any.Header(),any.Count(),any.Atoms()); }
+ //! Output anything (index n starts with 0)
+ void ToQueueAnything(int n,const t_symbol *s,int argc,const t_atom *argv) const { outlet *o = GetOut(n); if(o) ToQueueAnything(o,s,argc,argv); }
+ //! Output anything (index n starts with 0)
+ void ToQueueAnything(int n,const AtomAnything &any) const { ToQueueAnything(n,any.Header(),any.Count(),any.Atoms()); }
+
+//! @} FLEXT_C_IO_QUEUE
+
+//! @} FLEXT_C_INOUT
// --- message handling -------------------------------------------
enum metharg {
a_null = 0,
- a_float,a_int,
+ a_float,a_int,
a_symbol,a_pointer,
a_list,a_any,
a_LIST,a_ANY
@@ -238,9 +312,8 @@ public:
typedef bool (*methfun)(flext_base *c);
- /*! \defgroup FLEXT_C_ADDMETHOD Flext method handling
+ /*! \defgroup FLEXT_C_ADDMETHOD Method handling
\internal
-
@{
*/
@@ -248,9 +321,12 @@ public:
void AddMethod(int inlet,const char *tag,methfun fun,metharg tp,...);
void AddMethod(int inlet,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(inlet,"list",(methfun)m,a_list,a_null); }
+ void AddMethod(int inlet,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(inlet,"list",(methfun)m,a_list,a_null); }
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *)) { AddMethod(inlet,tag,(methfun)m,a_null); } // pure method
- void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *,int,t_atom *)) { AddMethod(inlet,"anything",(methfun)m,a_any,a_null); } // anything
+ void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(inlet,"anything",(methfun)m,a_any,a_null); } // anything
+ void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(inlet,"anything",(methfun)m,a_any,a_null); } // anything
void AddMethod(int inlet,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(inlet,"symbol",(methfun)m,a_symbol,a_null); } // single symbol
+ void AddMethod(int inlet,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(inlet,"symbol",(methfun)m,a_symbol,a_null); } // single symbol
void AddMethod(int inlet,bool (*m)(flext_base *,float &)) { AddMethod(inlet,"float",(methfun)m,a_float,a_null); } // single float
void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &)) { AddMethod(inlet,"list",(methfun)m,a_float,a_float,a_null); } // list of 2 floats
void AddMethod(int inlet,bool (*m)(flext_base *,float &,float &,float &)) { AddMethod(inlet,"list",(methfun)m,a_float,a_float,a_float,a_null); } // list of 3 floats
@@ -262,18 +338,26 @@ public:
void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &)) { AddMethod(inlet,"list",(methfun)m,a_int,a_int,a_null); } // list of 2 floats
void AddMethod(int inlet,bool (*m)(flext_base *,int &,int &,int &)) { AddMethod(inlet,"list",(methfun)m,a_int,a_int,a_int,a_null); } // list of 3 floats
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,t_atom *)) { AddMethod(inlet,tag,(methfun)m,a_list,a_null); } // method+gimme
- void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,t_atom *)) { AddMethod(inlet,tag,(methfun)m,a_any,a_null); } // method+gimme
+ void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int,const t_atom *)) { AddMethod(inlet,tag,(methfun)m,a_list,a_null); } // method+gimme
+ void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *,int,t_atom *)) { AddMethod(inlet,tag,(methfun)m,a_any,a_null); } // method+gimme
+ void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *,int,const t_atom *)) { AddMethod(inlet,tag,(methfun)m,a_any,a_null); } // method+gimme
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,t_symbol *&)) { AddMethod(inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol
+ void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,const t_symbol *&)) { AddMethod(inlet,tag,(methfun)m,a_symbol,a_null); } // method+symbol
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,float &)) { AddMethod(inlet,tag,(methfun)m,a_float,a_null); } // method+float
void AddMethod(int inlet,const char *tag,bool (*m)(flext_base *,int &)) { AddMethod(inlet,tag,(methfun)m,a_int,a_null); } // method+int
//! Set MaxMSP style of distributing list elements over (message) inlets
void SetDist(bool d = true) { distmsgs = d; }
-//! @}
+//! @} FLEXT_C_ADDMETHOD
// --- bind/unbind ---------------------------------------
+ /*! \defgroup FLEXT_C_BIND Methods for binding a flext class to a symbol
+
+ @{
+ */
+
#ifdef PD
//! Bind object to a symbol
bool Bind(const t_symbol *s) { pd_bind(&thisHdr()->ob_pd,const_cast<t_symbol *>(s)); return true; }
@@ -301,10 +385,12 @@ public:
static t_class **GetBound(const t_symbol *s) { return (t_class **)s->s_thing; }
*/
+//! @} FLEXT_C_BIND
+
// --- thread stuff -----------------------------------------------
#ifdef FLEXT_THREADS
- /*! \defgroup FLEXT_C_THREAD Flext thread handling
+ /*! \defgroup FLEXT_C_THREAD Thread handling
@{
*/
@@ -343,7 +429,7 @@ public:
#endif // FLEXT_THREADS
-//! @}
+//! @} FLEXT_C_THREAD
// xxx internal stuff xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
@@ -352,6 +438,10 @@ protected:
// --- thread stuff -----------------------------------------------
#ifdef FLEXT_THREADS
+
+ /*! \brief Thread parameters
+ \internal
+ */
class thr_params
{
public:
@@ -373,19 +463,35 @@ protected:
} *var;
};
+ /*! \brief This represents an entry to the list of active method threads
+ \internal
+ */
class thr_entry
{
public:
thr_entry(pthread_t id = pthread_self()): thrid(id),nxt(NULL) {}
+ //! \brief Check if this class represents the current thread
bool Is(pthread_t id = pthread_self()) const { return pthread_equal(thrid,id) != 0; }
pthread_t thrid;
thr_entry *nxt;
};
- static bool StartThread(void *(*)(thr_params *p),thr_params *p,char *methname);
+ /*! \brief Start a method thread
+ \internal
+ */
+ static bool StartThread(void *(*meth)(thr_params *p),thr_params *p,char *methname);
+
+ /*! \brief Add current thread to list of active threads
+ \return true on success
+ \internal
+ */
bool PushThread();
+
+ /*! \brief Remove current thread from list of active threads
+ \internal
+ */
void PopThread();
#endif
@@ -397,10 +503,12 @@ protected:
// inlets and outlets
/*! \brief Set up inlets and outlets
+ \ingroup FLEXT_C_INOUT
\return True on successful creation of all inlets and outlets
*/
virtual bool Init();
+ //! \brief This represents either an inlet or outlet
struct xlet {
enum type {
tp_none = 0,
@@ -417,37 +525,53 @@ protected:
xlet *nxt;
};
- /*! \addtogroup FLEXT_C_ATTR
-
+ /*! \defgroup FLEXT_C_ATTR Attribute handling methods
@{
*/
void AddAttrib(const char *attr,bool (*get)(flext_base *,float &),bool (*set)(flext_base *,float &)) { AddAttrib(attr,a_float,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,int &),bool (*set)(flext_base *,int &)) { AddAttrib(attr,a_int,(methfun)get,(methfun)set); }
+ void AddAttrib(const char *attr,bool (*get)(flext_base *,const t_symbol *&),bool (*set)(flext_base *,const t_symbol *&)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,t_symbol *&),bool (*set)(flext_base *,t_symbol *&)) { AddAttrib(attr,a_symbol,(methfun)get,(methfun)set); }
void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomList *&),bool (*set)(flext_base *,AtomList *&)) { AddAttrib(attr,a_LIST,(methfun)get,(methfun)set); }
+ void AddAttrib(const char *attr,bool (*get)(flext_base *,AtomAnything *&),bool (*set)(flext_base *,AtomAnything *&)) { AddAttrib(attr,a_ANY,(methfun)get,(methfun)set); }
-//! @}
+//! @} FLEXT_C_ATTR
/*! \addtogroup FLEXT_C_INOUT
-
@{
*/
+ //! \brief get a code for a list of inlets or outlets
unsigned long XletCode(xlet::type tp = xlet::tp_none,...); // end list with 0 (= tp_none) !!
- void AddInlets(unsigned long code); // use XletCode to get code value
+ /*! \brief Add some inlets by a special code representing the types
+ \remark use XletCode function to get code value
+ */
+ void AddInlets(unsigned long code);
+
+ //! \brief Add one or more inlet(s)
void AddInlet(xlet::type tp,int mult = 1,const char *desc = NULL) { AddXlet(tp,mult,desc,inlist); }
- void AddOutlets(unsigned long code); // use XletCode to get code value
+
+ /*! \brief Add some inlets by a special code representing the types
+ \remark use XletCode function to get code value
+ */
+ void AddOutlets(unsigned long code);
+
+ //! \brief Add one or more outlet(s)
void AddOutlet(xlet::type tp,int mult = 1,const char *desc = NULL) { AddXlet(tp,mult,desc,outlist); }
+ //! \brief Set the description of an indexed inlet
void DescInlet(int ix,const char *desc) { DescXlet(ix,desc,inlist); }
+
+ //! \brief Set the description of an indexed outlet
void DescOutlet(int ix,const char *desc) { DescXlet(ix,desc,outlist); }
-//! @}
+//! @} FLEXT_C_INOUT
// method handling
+ //! \brief This represents an item of the method list
class methitem {
public:
methitem(int inlet,const t_symbol *t);
@@ -464,8 +588,7 @@ protected:
methitem *nxt;
};
-// const methitem *FindMethItem(int inlet,const t_symbol *tag,const methitem *st);
-
+ //! \brief This represents an item of the attribute list
class attritem {
public:
attritem(const t_symbol *tag,const t_symbol *gtag,metharg tp,methfun gfun,methfun sfun);
@@ -478,6 +601,8 @@ protected:
attritem *nxt;
};
+//! @} FLEXT_CLASS
+
private:
static void Setup(t_class *c);
diff --git a/externals/grill/flext/source/fldefs.h b/externals/grill/flext/source/fldefs.h
index f92232f9..b670bf76 100644
--- a/externals/grill/flext/source/fldefs.h
+++ b/externals/grill/flext/source/fldefs.h
@@ -16,15 +16,23 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __FLEXT_DEFS_H
#define __FLEXT_DEFS_H
-#ifdef FLEXT_GUI
+/*! \defgroup FLEXT_DEFS Definitions for basic flext functionality
+ @{
+*/
+
+/*! \brief Switch for compilation of derived virtual classes
+ \remark These need dynamic type casts (and RTTI, naturally)
+ \ingroup FLEXT_GLOBALS
+*/
+#ifdef FLEXT_VIRT
#define FLEXT_CAST dynamic_cast
#else
#define FLEXT_CAST static_cast
#endif
-/*! \defgroup FLEXT_HEADER Flext class header
- One (and only one!) of these definitions is compulsory for the class declaration.
- It has to be placed somewhere in the class definition (not necessarily in a public section).
+/*! \defgroup FLEXT_D_HEADER Flext class header
+ \note One (and only one!) of these definitions is compulsory for the class declaration.
+ \note It has to be placed somewhere in the class definition (not necessarily in a public section).
@{
*/
@@ -43,35 +51,38 @@ FLEXT_REALHDR(NEW_CLASS, PARENT_CLASS)
\param SETUPFUN setup function, of type "void (*setupfn)(t_class *)"
The setup function is called after class creation. It corresponds to the
- original "object_setup" function, apart from the
- fact that all necessary class initializations have already been taken care by flext.
+ original PD "[object]_setup" function, apart from the
+ fact that all necessary class initializations have already been taken care of by flext.
The setup function can e.g. be used for a message to the console upon first creation of an object.
- The object's t_class* data can be accessed by the static function thisClass()
*/
#define FLEXT_HEADER_S(NEW_CLASS, PARENT_CLASS, SETUPFUN)\
\
FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS, SETUPFUN)
-//! @}
+//! @} FLEXT_D_HEADER
// ====================================================================================
-/*! \defgroup FLEXT_NEW Flext class instantiation
- Makes an actual instance of a class.
+/*! \defgroup FLEXT_D_INSTANCE Class instantiation
*/
-/*! \defgroup FLEXT_NEW_DSP Flext dsp class instantiation
+
+/*! \defgroup FLEXT_D_NEW Stand-alone class instantiation
+ Makes an actual instance of a stand-alone class.
+*/
+
+/*! \defgroup FLEXT_D_NEW_DSP Dsp class instantiation
Makes an actual instance of a dsp (aka "tilde") class (with signal processing).
*/
-/*! \defgroup FLEXT_LIB Flext library class instantiation
+/*! \defgroup FLEXT_D_LIB Library class instantiation
Makes an actual instance of a class which is part of an object library (and not stand-alone).
*/
-/*! \defgroup FLEXT_LIB_DSP Flext dsp library class instantiation
+/*! \defgroup FLEXT_D_LIB_DSP Dsp library class instantiation
Makes an actual instance of a dsp (aka "tilde") class with signal processing
which is part of an object library (and not stand-alone).
*/
@@ -79,8 +90,8 @@ FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS, SETUPFUN)
// NO ARGUMENTS
// ----------------------------------------
-/*! Implementation of a flext class with no arguments
- \ingroup FLEXT_NEW
+/*! \brief Implementation of a flext class with no arguments
+ \ingroup FLEXT_D_NEW
\param NAME the object's actual name(s) as a string (like "*", "trigger", "noise~", etc.)
\param NEW_CLASS the object's C++ class name
*/
@@ -88,22 +99,22 @@ FLEXT_REALHDR_S(NEW_CLASS, PARENT_CLASS, SETUPFUN)
\
REAL_NEW(NAME,NEW_CLASS,0,0)
-/*! Implementation of a flext dsp class with no arguments
- \ingroup FLEXT_NEW_DSP
+/*! \brief Implementation of a flext dsp class with no arguments
+ \ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,1,0)
-/*! Implementation of a flext class (part of a library) with no arguments
- \ingroup FLEXT_LIB
+/*! \brief Implementation of a flext class (part of a library) with no arguments
+ \ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB(NAME,NEW_CLASS) \
\
REAL_NEW(NAME,NEW_CLASS,0,1)
-/*! Implementation of a flext dsp class (part of a library) with no arguments
- \ingroup FLEXT_LIB_DSP
+/*! \brief Implementation of a flext dsp class (part of a library) with no arguments
+ \ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP(NAME,NEW_CLASS) \
\
@@ -113,93 +124,61 @@ REAL_NEW(NAME,NEW_CLASS,1,1)
// VARIABLE ARGUMENT LIST
// ----------------------------------------
-/*! Implementation of a flext class with a variable argument list
- \ingroup FLEXT_NEW
+/*! \brief Implementation of a flext class with a variable argument list
+ \ingroup FLEXT_D_NEW
*/
#define FLEXT_NEW_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS,0,0) \
-/*! Implementation of a flext tilde class with a variable argument list
- \ingroup FLEXT_NEW_DSP
+/*! \brief Implementation of a flext dsp class with a variable argument list
+ \ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS,1,0) \
-/*! Implementation of a flext class (part of a library) with a variable argument list
- \ingroup FLEXT_LIB
+/*! \brief Implementation of a flext class (part of a library) with a variable argument list
+ \ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS, 0,1)
-/*! Implementation of a flext tilde class (part of a library) with a variable argument list
- \ingroup FLEXT_LIB_DSP
+/*! \brief Implementation of a flext dsp class (part of a library) with a variable argument list
+ \ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_V(NAME,NEW_CLASS) \
\
REAL_NEW_V(NAME,NEW_CLASS, 1,1)
-// OBJECT NAME + VARIABLE ARGUMENT LIST
-// ----------------------------------------
-
-/*! Implementation of a flext class with its name and a variable argument list
- \ingroup FLEXT_NEW
-*/
-#define FLEXT_NEW_NV(NAME,NEW_CLASS) \
-\
-REAL_NEW_NV(NAME,NEW_CLASS,0,0) \
-
-/*! Implementation of a flext tilde class with its name and a variable argument list
- \ingroup FLEXT_NEW_DSP
-*/
-#define FLEXT_NEW_DSP_NV(NAME,NEW_CLASS) \
-\
-REAL_NEW_NV(NAME,NEW_CLASS,1,0) \
-
-/*! Implementation of a flext class (part of a library) with its name and a variable argument list
- \ingroup FLEXT_LIB
-*/
-#define FLEXT_LIB_NV(NAME,NEW_CLASS) \
-\
-REAL_NEW_NV(NAME,NEW_CLASS, 0,1)
-
-/*! Implementation of a flext tilde class (part of a library) with its name and a variable argument list
- \ingroup FLEXT_LIB_DSP
-*/
-#define FLEXT_LIB_DSP_NV(NAME,NEW_CLASS) \
-\
-REAL_NEW_NV(NAME,NEW_CLASS, 1,1)
-
-
// ONE ARGUMENT
// ----------------------------------------
-/*! Implementation of a flext class with one argument
- \ingroup FLEXT_NEW
+/*! \brief Implementation of a flext class with one argument
+ \ingroup FLEXT_D_NEW
*/
#define FLEXT_NEW_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 0, 0,TYPE) \
-/*! Implementation of a flext tilde class with one argument
- \ingroup FLEXT_NEW_DSP
+/*! \brief Implementation of a flext dsp class with one argument
+ \ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 1, 0,TYPE) \
-/*! Implementation of a flext class (part of a library) with one argument
- \ingroup FLEXT_LIB
+/*! \brief Implementation of a flext class (part of a library) with one argument
+ \ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_1(NAME,NEW_CLASS, TYPE) \
\
REAL_NEW_1(NAME,NEW_CLASS, 0,1,TYPE)
-/*! Implementation of a flext tilde class (part of a library) with one argument
- \ingroup FLEXT_LIB_DSP
+/*! \brief Implementation of a flext dsp class (part of a library) with one argument
+ \ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_1(NAME,NEW_CLASS, TYPE) \
\
@@ -209,29 +188,29 @@ REAL_NEW_1(NAME,NEW_CLASS, 1,1, TYPE)
// TWO ARGUMENTS
// ----------------------------------------
-/*! Implementation of a flext class with 2 arguments
- \ingroup FLEXT_NEW
+/*! \brief Implementation of a flext class with 2 arguments
+ \ingroup FLEXT_D_NEW
*/
#define FLEXT_NEW_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 0,0, TYPE1, TYPE2) \
-/*! Implementation of a flext tilde class with 2 arguments
- \ingroup FLEXT_NEW_DSP
+/*! \brief Implementation of a flext dsp class with 2 arguments
+ \ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 1,0, TYPE1, TYPE2) \
-/*! Implementation of a flext class (part of a library) with 2 arguments
- \ingroup FLEXT_LIB
+/*! \brief Implementation of a flext class (part of a library) with 2 arguments
+ \ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
REAL_NEW_2(NAME,NEW_CLASS, 0,1, TYPE1, TYPE2)
-/*! Implementation of a flext tilde class (part of a library) with 2 arguments
- \ingroup FLEXT_LIB_DSP
+/*! \brief Implementation of a flext dsp class (part of a library) with 2 arguments
+ \ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_2(NAME,NEW_CLASS, TYPE1, TYPE2) \
\
@@ -241,29 +220,29 @@ REAL_NEW_2(NAME,NEW_CLASS, 1,1, TYPE1, TYPE2)
// THREE ARGUMENTS
// ----------------------------------------
-/*! Implementation of a flext class with 3 arguments
- \ingroup FLEXT_NEW
+/*! \brief Implementation of a flext class with 3 arguments
+ \ingroup FLEXT_D_NEW
*/
#define FLEXT_NEW_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 0,0, TYPE1, TYPE2, TYPE3) \
-/*! Implementation of a flext tilde class with 3 arguments
- \ingroup FLEXT_NEW_DSP
+/*! \brief Implementation of a flext dsp class with 3 arguments
+ \ingroup FLEXT_D_NEW_DSP
*/
#define FLEXT_NEW_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 1,0, TYPE1, TYPE2, TYPE3) \
-/*! Implementation of a flext class (part of a library) with 3 arguments
- \ingroup FLEXT_LIB
+/*! \brief Implementation of a flext class (part of a library) with 3 arguments
+ \ingroup FLEXT_D_LIB
*/
#define FLEXT_LIB_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
REAL_NEW_3(NAME,NEW_CLASS, 0,1,TYPE1, TYPE2, TYPE3)
-/*! Implementation of a flext tilde class (part of a library) with 3 arguments
- \ingroup FLEXT_LIB_DSP
+/*! \brief Implementation of a flext dsp class (part of a library) with 3 arguments
+ \ingroup FLEXT_D_LIB_DSP
*/
#define FLEXT_LIB_DSP_3(NAME,NEW_CLASS, TYPE1, TYPE2, TYPE3) \
\
@@ -290,12 +269,41 @@ REAL_NEW_3(NAME,NEW_CLASS, 1,1, TYPE1, TYPE2, TYPE3)
+/*! \defgroup FLEXT_D_LIBRARY Definitions for library objects
+ @{
+*/
+
+/*! \brief Specify that to declare the library itself
+ \note If you have a library this is compulsory (to register all the objects of the library)
+*/
+#define FLEXT_LIB_SETUP(NAME,SETUPFUN) REAL_LIB_SETUP(NAME,SETUPFUN)
+
+/*! \brief Register an object in the library
+ \note This is used in the library setup function
+*/
+#define FLEXT_SETUP(cl) REAL_SETUP(cl,0)
+
+/*! \brief Register a DSP object in the library
+ \note This is used in the library setup function
+*/
+#define FLEXT_DSP_SETUP(cl) REAL_SETUP(cl,1)
+
+//! \deprecated
+#define FLEXT_TILDE_SETUP FLEXT_DSP_SETUP
+
+//! @} FLEXT_D_LIBRARY
+
+
+//! @} FLEXT_D_INSTANCE
// ====================================================================================
+/*! \defgroup FLEXT_D_METHOD Declarations for flext methods
+ @{
+*/
-/*! \defgroup FLEXT_CALLBACK Flext callbacks
+/*! \defgroup FLEXT_D_CALLBACK Declare callbacks for class methods
@{
*/
@@ -306,7 +314,7 @@ static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c) \
//! Set up a method callback for an anything argument
#define FLEXT_CALLBACK_A(M_FUN) \
-static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,const t_symbol *s,int argc,t_atom *argv) \
+static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv) \
{ FLEXT_CAST<thisType *>(c)->M_FUN(s,argc,argv); return true; }
//! Set up a method callback for a variable argument list
@@ -388,15 +396,14 @@ FLEXT_CALLBACK_3(M_FUN,int,int,int)
FLEXT_CALLBACK_1(M_FUN,t_symptr)
-// deprecated
+//! \deprecated
#define FLEXT_CALLBACK_G FLEXT_CALLBACK_V
-//! @}
-
+//! @} FLEXT_D_CALLBACK
-/*! \defgroup FLEXT_THREAD Flext threads
+/*! \defgroup FLEXT_D_THREAD Declare threaded method callbacks
@{
*/
@@ -421,7 +428,7 @@ static void *FLEXT_THR_PRE(M_FUN)(thr_params *p) { \
//! Set up a threaded method callback for an anything argument
#define FLEXT_THREAD_A(M_FUN) \
-static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,const t_symbol *s,int argc,t_atom *argv) { \
+static bool FLEXT_CALL_PRE(M_FUN)(flext_base *c,t_symbol *s,int argc,t_atom *argv) { \
thr_params *p = new thr_params(c); p->set_any(s,argc,argv); \
return StartThread(FLEXT_THR_PRE(M_FUN),p,#M_FUN); \
} \
@@ -654,7 +661,7 @@ FLEXT_THREAD_1(M_FUN,t_symptr)
#endif // FLEXT_THREAD
-//! @}
+//! @} FLEXT_D_THREAD
@@ -662,9 +669,8 @@ FLEXT_THREAD_1(M_FUN,t_symptr)
-/*! \defgroup FLEXT_ADDMETHOD Add flext methods
- These should be the used in the class' constructor
-
+/*! \defgroup FLEXT_D_ADDMETHOD Add flext methods
+ \note These can only be used at class construction time
@{
*/
@@ -765,13 +771,11 @@ FLEXT_ADDMETHOD_2(IX,M_TAG,M_FUN,int,int)
\
FLEXT_ADDMETHOD_3(IX,M_TAG,M_FUN,int,int,int)
-//! @}
+//! @} FLEXT_D_ADDMETHOD
-/*! \defgroup FLEXT_CALLMETHOD Call flext methods manually
- These can only be used in class member functions!
-
+/*! \defgroup FLEXT_D_CALLMETHOD Call flext methods manually
@{
*/
@@ -783,12 +787,12 @@ FLEXT_CALL_PRE(M_FUN)(this)
//! Call a (already defined) method with variable list arguments
#define FLEXT_CALLMETHOD_V(M_FUN,ARGC,ARGV) \
\
-FLEXT_CALL_PRE(M_FUN)(this,ARGC,ARGV)
+FLEXT_CALL_PRE(M_FUN)(this,ARGC,(t_atom *)(ARGV))
//! Call a (already defined) method with anything arguments
#define FLEXT_CALLMETHOD_A(M_FUN,HDR,ARGC,ARGV) \
\
-FLEXT_CALL_PRE(M_FUN)(this,HDR,ARGC,ARGV)
+FLEXT_CALL_PRE(M_FUN)(this,(t_symbol *)(HDR),ARGC,(t_atom *)(ARGV))
//! Call a (already defined) method with a data package (void *)
#define FLEXT_CALLMETHOD_X(M_FUN,DATA) \
@@ -825,88 +829,319 @@ FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3,ARG4)
\
FLEXT_CALL_PRE(M_FUN)(this,ARG1,ARG2,ARG3,ARG4,ARG5)
-//! @}
+//! @} FLEXT_D_CALLMETHOD
+//! @} FLEXT_D_METHOD
-/*! \defgroup FLEXT_DEFATTR flext functions for attribute definition
+/*! \defgroup FLEXT_D_ATTRIB Attribute definition
+ \note These have to reside inside the class declaration
@{
*/
+/*! \brief Declare a attribute set function
+ \internal
+*/
#define FLEXT_CALLSET_(FUN,TP) \
static bool FLEXT_SET_PRE(FUN)(flext_base *c,TP &arg) \
{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; }
+/*! \brief Declare a attribute get function
+ \internal
+*/
#define FLEXT_CALLGET_(FUN,TP) \
static bool FLEXT_GET_PRE(FUN)(flext_base *c,TP &arg) \
{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; }
+/*! \brief Declare an implicite attribute set function
+ \internal
+*/
#define FLEXT_ATTRSET_(VAR,TP) \
static bool FLEXT_SET_PRE(VAR)(flext_base *c,TP &arg) \
{ FLEXT_CAST<thisType *>(c)->VAR = arg; return true; }
+/*! \brief Declare an implicite attribute get function
+ \internal
+*/
#define FLEXT_ATTRGET_(VAR,TP) \
static bool FLEXT_GET_PRE(VAR)(flext_base *c,TP &arg) \
-{ arg = FLEXT_CAST<thisType *>(c)->VAR; return true; }
+{ arg = (TP)FLEXT_CAST<thisType *>(c)->VAR; return true; }
+
+
+/*! \defgroup FLEXT_DA_CALLSET Definition of attribute set handlers
+ @{
+*/
+
+//! Declare a set function for a float attribute
+#define FLEXT_CALLSET_F(SFUN) \
+\
+FLEXT_CALLSET_(SFUN,float)
+
+//! Declare a set function for an integer attribute
+#define FLEXT_CALLSET_I(SFUN) \
+\
+FLEXT_CALLSET_(SFUN,int)
+
+//! Declare a set function for a boolean attribute
+#define FLEXT_CALLSET_B(FUN) \
+static bool FLEXT_SET_PRE(FUN)(flext_base *c,int &arg) \
+{ bool b = arg != 0; FLEXT_CAST<thisType *>(c)->FUN(b); return true; }
+
+//! Declare a set function for an enum attribute
+#define FLEXT_CALLSET_E(SFUN,TP) \
+\
+FLEXT_CALLSET_(SFUN,TP)
-#define FLEXT_CALLSET_F(SFUN) FLEXT_CALLSET_(SFUN,float)
-#define FLEXT_CALLSET_I(SFUN) FLEXT_CALLSET_(SFUN,int)
-#define FLEXT_CALLSET_S(SFUN) FLEXT_CALLSET_(SFUN,t_symptr)
+//! Declare a set function for a symbol attribute
+#define FLEXT_CALLSET_S(FUN) \
+static bool FLEXT_SET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \
+{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; }
+//! Declare a set function for a variable list attribute
#define FLEXT_CALLSET_V(FUN) \
static bool FLEXT_SET_PRE(FUN)(flext_base *c,AtomList *&arg) \
{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; }
-#define FLEXT_CALLGET_F(GFUN) FLEXT_CALLGET_(GFUN,float)
-#define FLEXT_CALLGET_I(GFUN) FLEXT_CALLGET_(GFUN,int)
-#define FLEXT_CALLGET_S(GFUN) FLEXT_CALLGET_(GFUN,t_symptr)
+//! @} FLEXT_DA_CALLSET
+
+/*! \defgroup FLEXT_DA_CALLGET Definition of attribute get handlers
+ @{
+*/
+
+//! Declare a get function for a float attribute
+#define FLEXT_CALLGET_F(GFUN) \
+\
+FLEXT_CALLGET_(GFUN,float)
+
+//! Declare a get function for an integer attribute
+#define FLEXT_CALLGET_I(GFUN) \
+\
+FLEXT_CALLGET_(GFUN,int)
+
+//! Declare a get function for a boolean attribute
+#define FLEXT_CALLGET_B(FUN) \
+static bool FLEXT_GET_PRE(FUN)(flext_base *c,int &arg) \
+{ bool b; FLEXT_CAST<thisType *>(c)->FUN(b); arg = b?1:0; return true; }
+
+//! Declare a get function for an enum attribute
+#define FLEXT_CALLGET_E(GFUN,TP) \
+\
+FLEXT_CALLGET_(GFUN,TP)
+
+//! Declare a get function for a symbol attribute
+#define FLEXT_CALLGET_S(FUN) \
+static bool FLEXT_GET_PRE(FUN)(flext_base *c,const t_symbol *&arg) \
+{ FLEXT_CAST<thisType *>(c)->FUN(arg); return true; }
+//! Declare a get function for a variable list attribute
#define FLEXT_CALLGET_V(FUN) \
static bool FLEXT_GET_PRE(FUN)(flext_base *c,AtomList *&arg) \
{ FLEXT_CAST<thisType *>(c)->FUN(*arg); return true; }
-#define FLEXT_CALLXFER_F(GFUN,SFUN) FLEXT_CALLGET_F(GFUN) FLEXT_CALLSET_F(SFUN)
-#define FLEXT_CALLXFER_I(GFUN,SFUN) FLEXT_CALLGET_I(GFUN) FLEXT_CALLSET_I(SFUN)
-#define FLEXT_CALLXFER_S(GFUN,SFUN) FLEXT_CALLGET_S(GFUN) FLEXT_CALLSET_S(SFUN)
-#define FLEXT_CALLXFER_V(GFUN,SFUN) FLEXT_CALLGET_V(GFUN) FLEXT_CALLSET_V(SFUN)
+//! @} FLEXT_DA_CALLGET
-#define FLEXT_ATTRSET_F(VAR) FLEXT_ATTRSET_(VAR,float)
-#define FLEXT_ATTRSET_I(VAR) FLEXT_ATTRSET_(VAR,int)
-#define FLEXT_ATTRSET_S(VAR) FLEXT_ATTRSET_(VAR,t_symptr)
+/*! \defgroup FLEXT_DA_CALLVAR Definition of attribute transfer handlers (both get and set)
+ @{
+*/
+
+//! Declare both get and set functions for a float attribute
+#define FLEXT_CALLVAR_F(GFUN,SFUN) \
+\
+FLEXT_CALLGET_F(GFUN) FLEXT_CALLSET_F(SFUN)
+
+//! Declare both get and set functions for an integer attribute
+#define FLEXT_CALLVAR_I(GFUN,SFUN) \
+\
+FLEXT_CALLGET_I(GFUN) FLEXT_CALLSET_I(SFUN)
+
+//! Declare both get and set functions for a symbol attribute
+#define FLEXT_CALLVAR_S(GFUN,SFUN) \
+\
+FLEXT_CALLGET_S(GFUN) FLEXT_CALLSET_S(SFUN)
+
+//! Declare both get and set functions for a boolean attribute
+#define FLEXT_CALLVAR_B(GFUN,SFUN) \
+\
+FLEXT_CALLGET_B(GFUN) FLEXT_CALLSET_B(SFUN)
+
+//! Declare both get and set functions for an enum attribute
+#define FLEXT_CALLVAR_E(GFUN,SFUN,TP) \
+\
+FLEXT_CALLGET_E(GFUN,TP) FLEXT_CALLSET_E(SFUN,TP)
+
+//! Declare both get and set functions for a variable list attribute
+#define FLEXT_CALLVAR_V(GFUN,SFUN) \
+\
+FLEXT_CALLGET_V(GFUN) FLEXT_CALLSET_V(SFUN)
+
+//! @} FLEXT_DA_CALLVAR
+
+
+/*! \defgroup FLEXT_DA_ATTRSET Definition of implicite attribute set handlers
+ @{
+*/
+
+//! Declare an implicite set function for a float attribute
+#define FLEXT_ATTRSET_F(VAR) \
+\
+FLEXT_ATTRSET_(VAR,float)
+
+//! Declare an implicite set function for an integer attribute
+#define FLEXT_ATTRSET_I(VAR) \
+\
+FLEXT_ATTRSET_(VAR,int)
+
+//! Declare an implicite set function for a symbol attribute
+#define FLEXT_ATTRSET_S(VAR) \
+\
+FLEXT_ATTRSET_(VAR,t_symptr)
+
+//! Declare an implicite set function for a boolean attribute
+#define FLEXT_ATTRSET_B(VAR) \
+static bool FLEXT_SET_PRE(VAR)(flext_base *c,int &arg) \
+{ FLEXT_CAST<thisType *>(c)->VAR = arg != 0; return true; }
+
+//! Declare an implicite set function for an enum attribute
+#define FLEXT_ATTRSET_E(VAR,TP) \
+\
+FLEXT_ATTRSET_(VAR,TP)
+
+//! Declare an implicite set function for a variable list attribute
#define FLEXT_ATTRSET_V(VAR) \
static bool FLEXT_SET_PRE(VAR)(flext_base *c,AtomList *&arg) \
{ FLEXT_CAST<thisType *>(c)->VAR = *arg; return true; }
-#define FLEXT_ATTRGET_F(VAR) FLEXT_ATTRGET_(VAR,float)
-#define FLEXT_ATTRGET_I(VAR) FLEXT_ATTRGET_(VAR,int)
-#define FLEXT_ATTRGET_S(VAR) FLEXT_ATTRGET_(VAR,t_symptr)
+//! @} FLEXT_DA_ATTRSET
+
+/*! \defgroup FLEXT_DA_ATTRGET Definition of implicite attribute get handlers
+ @{
+*/
+
+//! Declare an implicite get function for a float attribute
+#define FLEXT_ATTRGET_F(VAR) \
+\
+FLEXT_ATTRGET_(VAR,float)
+
+//! Declare an implicite get function for an integer attribute
+#define FLEXT_ATTRGET_I(VAR) \
+\
+FLEXT_ATTRGET_(VAR,int)
+//! Declare an implicite get function for a symbol attribute
+#define FLEXT_ATTRGET_S(VAR) \
+\
+FLEXT_ATTRGET_(VAR,t_symptr)
+
+//! Declare an implicite get function for a boolean attribute
+#define FLEXT_ATTRGET_B(VAR) \
+static bool FLEXT_GET_PRE(VAR)(flext_base *c,int &arg) \
+{ arg = FLEXT_CAST<thisType *>(c)->VAR?1:0; return true; }
+
+//! Declare an implicite get function for an enum attribute
+#define FLEXT_ATTRGET_E(VAR,TP) \
+\
+FLEXT_ATTRGET_(VAR,TP)
+
+//! Declare an implicite get function for a variable list attribute
#define FLEXT_ATTRGET_V(VAR) \
static bool FLEXT_GET_PRE(VAR)(flext_base *c,AtomList *&arg) \
{ *arg = FLEXT_CAST<thisType *>(c)->VAR; return true; }
-#define FLEXT_ATTRXFER_F(VAR) FLEXT_ATTRGET_F(VAR) FLEXT_ATTRSET_F(VAR)
-#define FLEXT_ATTRXFER_I(VAR) FLEXT_ATTRGET_I(VAR) FLEXT_ATTRSET_I(VAR)
-#define FLEXT_ATTRXFER_S(VAR) FLEXT_ATTRGET_S(VAR) FLEXT_ATTRSET_S(VAR)
-#define FLEXT_ATTRXFER_V(VAR) FLEXT_ATTRGET_V(VAR) FLEXT_ATTRSET_V(VAR)
+//! @} FLEXT_DA_ATTRGET
+
+
+/*! \defgroup FLEXT_DA_ATTRVAR Definition of implicite attribute transfer handlers (both get and set)
+ @{
+*/
+
+//! Declare both implicite get and set functions for a float attribute
+#define FLEXT_ATTRVAR_F(VAR) \
+\
+FLEXT_ATTRGET_F(VAR) FLEXT_ATTRSET_F(VAR)
+
+//! Declare both implicite get and set functions for an integer attribute
+#define FLEXT_ATTRVAR_I(VAR) \
+\
+FLEXT_ATTRGET_I(VAR) FLEXT_ATTRSET_I(VAR)
+
+//! Declare both implicite get and set functions for a symbol attribute
+#define FLEXT_ATTRVAR_S(VAR) \
+\
+FLEXT_ATTRGET_S(VAR) FLEXT_ATTRSET_S(VAR)
+
+//! Declare both implicite get and set functions for a boolean attribute
+#define FLEXT_ATTRVAR_B(VAR) \
+\
+FLEXT_ATTRGET_B(VAR) FLEXT_ATTRSET_B(VAR)
+
+//! Declare both implicite get and set functions for an enum attribute
+#define FLEXT_ATTRVAR_E(VAR,TP) \
+\
+FLEXT_ATTRGET_(VAR,TP) FLEXT_ATTRSET_(VAR,TP)
+
+//! Declare both implicite get and set functions for a variable list attribute
+#define FLEXT_ATTRVAR_V(VAR) \
+\
+FLEXT_ATTRGET_V(VAR) FLEXT_ATTRSET_V(VAR)
+
-//! @}
+//! @} FLEXT_DA_ATTRVAR
-/*! \defgroup FLEXT_ADDATTR flext methods for defining attributes
- These can only be used in class member functions!
+/*! \defgroup FLEXT_D_ADDATTR Announce object attributes
+ \note These can only be used at class construction time
@{
*/
-#define FLEXT_ADDATTR_GET(NAME,GFUN) AddAttrib(NAME,(FLEXT_GET_PRE(GFUN)),NULL)
-#define FLEXT_ADDATTR_SET(NAME,SFUN) AddAttrib(NAME,NULL,(FLEXT_SET_PRE(SFUN)))
-#define FLEXT_ADDATTRIB(NAME,FUN) AddAttrib(NAME,(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
+//! Add handler for a gettable attribute
+#define FLEXT_ADDATTR_GET(NAME,GFUN) \
+\
+AddAttrib(NAME,(FLEXT_GET_PRE(GFUN)),NULL)
+
+//! Add handler for a settable attribute
+#define FLEXT_ADDATTR_SET(NAME,SFUN) \
+\
+AddAttrib(NAME,NULL,(FLEXT_SET_PRE(SFUN)))
+
+//! Add handlers for a both get- and settable attribute
+#define FLEXT_ADDATTR_VAR(NAME,GFUN,SFUN) \
+\
+AddAttrib(NAME,(FLEXT_GET_PRE(GFUN)),(FLEXT_SET_PRE(SFUN)))
+
+//! Add handlers for a both get- and settable attribute
+#define FLEXT_ADDATTR_VAR1(NAME,FUN) \
+\
+AddAttrib(NAME,(FLEXT_GET_PRE(FUN)),(FLEXT_SET_PRE(FUN)))
+
+
+//! Add handler for a gettable enum attribute
+#define FLEXT_ADDATTR_GET_E(NAME,GFUN) \
+\
+AddAttrib(NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),NULL)
+
+//! Add handler for a settable enum attribute
+#define FLEXT_ADDATTR_SET_E(NAME,SFUN) \
+\
+AddAttrib(NAME,NULL,(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
+
+//! Add handlers for a both get- and settable enum attribute
+#define FLEXT_ADDATTR_VAR_E(NAME,GFUN,SFUN) \
+\
+AddAttrib(NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(GFUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(SFUN)))
+
+//! Add handlers for a both get- and settable enum attribute
+#define FLEXT_ADDATTR_VAR1_E(NAME,FUN) \
+\
+AddAttrib(NAME,(bool (*)(flext_base *,int &))(FLEXT_GET_PRE(FUN)),(bool (*)(flext_base *,int &))(FLEXT_SET_PRE(FUN)))
+
+//! @} FLEXT_D_ADDATTR
-//! @}
+//! @} FLEXT_D_ATTRIB
+//! @} FLEXT_DEFS
#endif // __FLEXT_DEFS_H
diff --git a/externals/grill/flext/source/fldoxygen.h b/externals/grill/flext/source/fldoxygen.h
index bae97b44..6a04d08b 100644
--- a/externals/grill/flext/source/fldoxygen.h
+++ b/externals/grill/flext/source/fldoxygen.h
@@ -6,17 +6,201 @@
\remark There is no code in here, just documentation stuff.
*/
-/*! \mainpage flext - C++ layer for cross-platform development of PD and Max/MSP objects
+/*!
- \section intro Introduction
+\mainpage flext - a C++ layer for cross-platform development of PD and Max/MSP objects
- This is the introduction
+\section INTRO Introduction
+
+Currently there exist two widely used modular systems for real-time audio that can be
+extended by self-written objects (so called "externals"):<br>
+Max/MSP (http://www.cycling74.com) and Pure Data (http://www.pure-data.org).
+
+Both come with APIs that are not very different, but as well not quite the same.
+Flext seeks to provide a unifying interface for the APIs of those real-time systems while also
+concentrating on making use of the advantages of the object orientation of the C++ language.
+
+Consequently, flext allows to write externals (or libraries of a number of these), that can
+be compiled for both systems (with various compilers on a few platforms) without changes to the
+source code.
+
+The advantages of flext are:
+<ul>
+<li>Identical source code for PD and Max/MSP objects on a number of platforms
+<li>Better readability of code compared to straight C externals
+<li>Faster development, more robust coding
+<li>Sharing of common methods and data by using base classes
+<li>Transparent use of threads for methods
+<li>Libraries of externals in Max/MSP
+<li>More than 3 typed creation arguments possible for Max/MSP
+<li>Any input to any object's inlet (with the exception of signal streams)
+</ul>
+
+Naturally there are some cons, too:
+<ul>
+<li>Introduces a small overhead to speed of message handling
+<li>Overhead in object size (due to possibly unneeded library code)
+</ul>
+
+Currently, flext supports
+<ul>
+<li>PD on Windows with Microsoft Visual C++, Borland C++ and gcc(cygwin) compilers
+<li>PD on Linux with gcc
+<li>PD on Mac OSX with gcc (Project Builder to follow soon)
+<li>Max/MSP on Mac OS9 with Metrowerks CodeWarrior
+</ul>
+
+\section LICENSE License
+
+Flext is covered by the GPL.
+
+flext - C++ layer for Max/MSP and pd (pure data) externals<BR>
+Copyright (C) 2001,2002 Thomas Grill
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.<BR>
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.<BR>
+You should have received a copy of the GNU General Public License
+along with this program; if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+
+In the official flext distribution, the GNU General Public License is
+in the file gpl.txt<BR> Also see the file license.txt for notes on
+referenced works and their license texts.
+
+\section DOWNLOAD Download
+
+Download the latest flext version from http://www.parasitaere-kapazitaeten.net/ext/flext .<br>
+Alternatively, you can check out the cvs version from http://sourceforge.net/projects/pure-data .
+
+\section USAGE Usage
+
+As a developer, you should know the C++ language, how to use a makefile
+and how to steer your compiler.<br>
+So let's come to the point... how does a typical flext object look like?
+
+This is the object "attr1", one of the flext tutorial examples:
+
+\verbatim
+// enable attribute processing
+#define FLEXT_ATTRIBUTES 1
+
+// include flext header
+#include <flext.h>
+
+// check for appropriate flext version
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
+#endif
+\endverbatim
+
+With these lines, all the necessary definitions from the flext package have been included.
+
+\verbatim
+class attr1:
+ public flext_base
+{
+ FLEXT_HEADER(attr1,flext_base)
+\endverbatim
+
+A flext class is simply defined by inheriting from the flext_base (see also \ref FLEXT_CLASS)
+or flext_dsp (see also \ref FLEXT_DSP) classes.
+Additionally some information has to be added using FLEXT_HEADER (see \ref FLEXT_D_HEADER)
+
+\verbatim
+public:
+ // constructor
+ attr1();
+\endverbatim
+
+Normally the constructor takes the creation arguments of an object. Here there are none.
+
+\verbatim
+protected:
+ void m_trigger(float f);
+
+ // stored argument
+ float arg;
+\endverbatim
+
+These are methods and data elements for internal class usage. Flext doesn't know about them
+as long as they are not registered.
+
+\verbatim
+private:
+ // callback for method "m_trigger" (with one float argument)
+ FLEXT_CALLBACK_F(m_trigger);
+
+ // define attribute callbacks for variable "arg" (with GET and SET properties)
+ FLEXT_ATTRVAR_F(arg);
+};
+\endverbatim
+
+For each method that shall be exposed to the realtime-system (for receiving messages) and
+every attribute (for setting and getting values) callbacks have to be set up.
+The functions in the groups "\ref FLEXT_D_CALLBACK" and "\ref FLEXT_D_ATTRIB" allow for their
+convenient definition.
+
+\verbatim
+// instantiate the class
+FLEXT_NEW("attr1",attr1)
+\endverbatim
+
+With FLEXT_NEW the class is instantiated and registered for the real-time system.
+The number of creation arguments and their types must be taken into account here.
+There are several variants depending on whether a message oriented (see \ref FLEXT_D_NEW)
+or a DSP object (see \ref FLEXT_D_NEW_DSP) is created and whether it resides in a object library
+(see \ref FLEXT_D_LIB and \ref FLEXT_D_LIB_DSP).<BR>
+
+\verbatim
+attr1::attr1():
+ arg(0) // initialize argument
+{
+ // define inlets
+ AddInAnything(); // first inlet of type anything (index 0)
+
+ // define outlets
+ AddOutFloat(); // one float outlet (has index 0)
+\endverbatim
+
+Every inlet and outlet that the object shall have has to be registered.
+This is done with the functions in \ref FLEXT_C_IO_ADD.
+
+\verbatim
+ // register methods
+ FLEXT_ADDMETHOD(0,m_trigger); // register method (for floats) "m_trigger" for inlet 0
+
+ FLEXT_ADDATTR_VAR1("arg",arg); // register attribute "arg" with variable arg
+}
+\endverbatim
+
+Likewise, every method (called by a message) (see \ref FLEXT_D_ADDMETHOD) and every
+attribute (see \ref FLEXT_D_ADDATTR) exposed to the system has to be registered.
+
+\verbatim
+void attr1::m_trigger(float f)
+{
+ float res = arg+f;
+
+ // output value to outlet
+ ToOutFloat(0,res); // (0 stands for the outlet index 0)
+}
+\endverbatim
+
+This is a method that is triggered with a message. It does some calculation and then outputs
+a value to an outlet. There are numerous functions (see \ref FLEXT_C_IO_OUT) supporting
+that functionality.
+
+Be sure to work through the examples provided with the flext tutorial. These should give you
+an overview about the possibilities of flext.
+The "\ref modules" link at the top of the page leads to a complete reference
+of flext functions and classes.
- \section install Installation
-
- \subsection step1 Step 1: Opening the box
-
- etc...
*/
#endif
diff --git a/externals/grill/flext/source/fldsp.cpp b/externals/grill/flext/source/fldsp.cpp
index fc5db717..d1079286 100644
--- a/externals/grill/flext/source/fldsp.cpp
+++ b/externals/grill/flext/source/fldsp.cpp
@@ -83,6 +83,8 @@ void flext_dsp::cb_dsp(t_class *c,t_signal **sp)
{
flext_dsp *obj = thisObject(c);
+ if(obj->CntInSig()+obj->CntOutSig() == 0) return;
+
// store current dsp parameters
obj->srate = sp[0]->s_sr;
obj->blksz = sp[0]->s_n; // is this guaranteed to be the same as sys_getblksize() ?
diff --git a/externals/grill/flext/source/fldsp.h b/externals/grill/flext/source/fldsp.h
index 70c88745..56959c72 100644
--- a/externals/grill/flext/source/fldsp.h
+++ b/externals/grill/flext/source/fldsp.h
@@ -31,7 +31,12 @@ class flext_dsp:
public:
-/*! \defgroup FLEXT_C_DSP Flext basic dsp functionality
+/*! \defgroup FLEXT_DSP Flext dsp class
+
+ @{
+*/
+
+/*! \defgroup FLEXT_C_DSP Basic dsp functionality
@{
*/
@@ -57,7 +62,7 @@ public:
// --- inheritable virtual methods --------------------------------
-/*! \defgroup FLEXT_C_VIRTUAL_DSP Flext virtual dsp functions
+/*! \defgroup FLEXT_C_DSP_VIRTUAL Flext virtual dsp functions
@{
*/
@@ -88,7 +93,7 @@ public:
//! @}
-/*! \defgroup FLEXT_C_INOUT_DSP Flext dsp in-/outlet functions
+/*! \defgroup FLEXT_C_DSP_INOUT Flext dsp in-/outlet functions
\note These must be called in the class' constructor
@{
@@ -107,6 +112,7 @@ public:
//! @}
+//! @}
protected:
diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp
index 5ed852c3..82ccdaba 100644
--- a/externals/grill/flext/source/flext.cpp
+++ b/externals/grill/flext/source/flext.cpp
@@ -70,7 +70,7 @@ void flext_base::cb_px_int(t_class *c,int v)
{
// check if inlet allows int type
t_atom atom;
- SETINT(&atom,v);
+ SetInt(atom,v);
cb_px_anything(c,sym_int,1,&atom);
}
@@ -78,7 +78,7 @@ void flext_base::cb_px_float(t_class *c,float v)
{
// check if inlet allows float type
t_atom atom;
- SETFLOAT(&atom,v);
+ SetFloat(atom,v);
cb_px_anything(c,sym_float,1,&atom);
}
@@ -199,15 +199,20 @@ flext_base::~flext_base()
if(attrhead) delete attrhead;
}
-
+/*! This virtual function is created after the object has been created, that is,
+ after the constructor has been processed. It creates the inlets and outlets.
+ \note You can override it in your own class, but be sure to call it,
+ \note otherwise no inlets/outlets will be created
+ \remark Creation of inlets/outlets can't be done upon declaration, as MaxMSP needs creation
+ \remark in reverse.
+*/
bool flext_base::Init()
{
// if(!flext_obj::Init()) return false;
bool ok = true;
-
- incnt = insigs = 0;
+/*
if(inlets) {
for(int ix = 0; ix < incnt; ++ix)
if(inlets[ix]) {
@@ -220,6 +225,13 @@ bool flext_base::Init()
delete[] inlets;
inlets = NULL;
}
+*/
+
+ // ----------------------------------
+ // create inlets
+ // ----------------------------------
+
+ incnt = insigs = 0;
if(inlist) {
xlet *xi;
@@ -363,9 +375,21 @@ bool flext_base::Init()
delete[] list;
}
+/*
if(outlets) { delete[] outlets; outlets = NULL; }
+*/
+ // ----------------------------------
+ // create outlets
+ // ----------------------------------
+
outcnt = outsigs = 0;
+#ifdef MAXMSP
+ // for MAXMSP the rightmost outlet has to be created first
+ if(procattr)
+ outattr = (outlet *)newout_anything(&x_obj->obj);
+#endif
+
if(outlist) {
xlet *xi;
@@ -418,13 +442,24 @@ bool flext_base::Init()
delete[] list;
}
- if(procattr)
+ if(procattr) {
+#ifdef PD
// attribute dump outlet is the last one
outattr = (outlet *)newout_anything(&x_obj->obj);
-
+#endif
+
+ // initialize creation attributes
+ if(m_holdaargc && m_holdaargv)
+ ok = InitAttrib(m_holdaargc,m_holdaargv);
+ }
+
+
return ok;
}
+/*! Set up proxy classes and basic methods at class creation time
+ This ensures that they are processed before the registered flext messages
+*/
void flext_base::Setup(t_class *c)
{
add_method(c,cb_help,"help");
@@ -471,7 +506,9 @@ void flext_base::m_help()
post("%s (using flext " FLEXT_VERSTR ") - compiled on %s %s",thisName(),__DATE__,__TIME__);
}
-
+/*! \brief All the message processing
+ The messages of all the inlets go here and are promoted to the registered callback functions
+*/
bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
{
static bool trap = false;
@@ -700,6 +737,8 @@ void flext_base::AddMethodDef(int inlet,const char *tag)
AddMethItem(new methitem(inlet,tag?MakeSymbol(tag):NULL));
}
+/*! \brief Add a method to the queue
+*/
void flext_base::AddMethod(int inlet,const char *tag,methfun fun,metharg tp,...)
{
methitem *mi = new methitem(inlet,MakeSymbol(tag));
diff --git a/externals/grill/flext/source/flext.h b/externals/grill/flext/source/flext.h
index fd99f253..402a2a93 100644
--- a/externals/grill/flext/source/flext.h
+++ b/externals/grill/flext/source/flext.h
@@ -23,10 +23,10 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
//! \brief flext version number
-#define FLEXT_VERSION 400
+#define FLEXT_VERSION 401
//! \brief flext version string
-#define FLEXT_VERSTR "0.4.0pre"
+#define FLEXT_VERSTR "0.4.1pre"
//! @}
diff --git a/externals/grill/flext/source/flinternal.h b/externals/grill/flext/source/flinternal.h
index 20989b1b..6df1129c 100644
--- a/externals/grill/flext/source/flinternal.h
+++ b/externals/grill/flext/source/flinternal.h
@@ -98,7 +98,7 @@ typedef void t_outlet;
#define newout_flint(clss) outlet_new(clss,"int")
#define newout_list(clss) outlet_new(clss,"list")
#define newout_symbol(clss) outlet_new(clss,"symbol")
-#define newout_anything(clss) outlet_new(clss,"anything")
+#define newout_anything(clss) outlet_new(clss,0)
#define outlet_flint(o,v) outlet_int(o,(int)(v))
#define outlet_symbol(o,s) outlet_anything(o,s,0,NULL)
diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp
index eee94ce5..3328ac9b 100755
--- a/externals/grill/flext/source/fllib.cpp
+++ b/externals/grill/flext/source/fllib.cpp
@@ -331,17 +331,22 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv)
flext_obj::m_holdname = NULL;
flext_obj::m_holdattr = false;
- bool ok = obj->data ||
+ bool ok = obj->data &&
// check constructor exit flag
obj->data->InitOk();
- if(ok && lo->attr && argc < _argc_)
- // set cmdline attributes (this is a flext_base function!)
- ok = ((flext_base *)obj->data)->InitAttrib(_argc_-argc,argv+argc);
+ if(ok) {
+ // store creation args for attribute initialization (inside flext_base::Init())
+ flext_obj::m_holdaargc = _argc_-argc;
+ flext_obj::m_holdaargv = argv+argc;
- if(ok) // call virtual init function
+ // call virtual init function
ok = obj->data->Init();
+ flext_obj::m_holdaargc = 0;
+ flext_obj::m_holdaargv = NULL;
+ }
+
if(!ok) {
// there was some init error, free object
lo->freefun(obj);
diff --git a/externals/grill/flext/source/flout.cpp b/externals/grill/flext/source/flout.cpp
index 3b7c6bd9..db225bd5 100644
--- a/externals/grill/flext/source/flout.cpp
+++ b/externals/grill/flext/source/flout.cpp
@@ -25,19 +25,19 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#endif
#ifndef FLEXT_THREADS
-void flext_base::ToOutBang(outlet *o) { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); }
-void flext_base::ToOutFloat(outlet *o,float f) { CRITON(); outlet_float((t_outlet *)o,f); CRITOFF(); }
-void flext_base::ToOutInt(outlet *o,int f) { CRITON(); outlet_flint((t_outlet *)o,f); CRITOFF(); }
-void flext_base::ToOutSymbol(outlet *o,const t_symbol *s) { CRITON(); outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(s)); CRITOFF(); }
-void flext_base::ToOutList(outlet *o,int argc,const t_atom *argv) { CRITON(); outlet_list((t_outlet *)o,gensym("list"),argc,(t_atom *)argv); CRITOFF(); }
-void flext_base::ToOutAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv) { CRITON(); outlet_anything((t_outlet *)o,const_cast<t_symbol *>(s),argc,(t_atom *)argv); CRITOFF(); }
+void flext_base::ToOutBang(outlet *o) const { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); }
+void flext_base::ToOutFloat(outlet *o,float f) const { CRITON(); outlet_float((t_outlet *)o,f); CRITOFF(); }
+void flext_base::ToOutInt(outlet *o,int f) const { CRITON(); outlet_flint((t_outlet *)o,f); CRITOFF(); }
+void flext_base::ToOutSymbol(outlet *o,const t_symbol *s) const { CRITON(); outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(s)); CRITOFF(); }
+void flext_base::ToOutList(outlet *o,int argc,const t_atom *argv) const { CRITON(); outlet_list((t_outlet *)o,gensym("list"),argc,(t_atom *)argv); CRITOFF(); }
+void flext_base::ToOutAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv) const { CRITON(); outlet_anything((t_outlet *)o,const_cast<t_symbol *>(s),argc,(t_atom *)argv); CRITOFF(); }
#else
-void flext_base::ToOutBang(outlet *o) { if(IsSystemThread()) { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); } else ToQueueBang(o); }
-void flext_base::ToOutFloat(outlet *o,float f) { if(IsSystemThread()) { CRITON(); outlet_float((t_outlet *)o,f); CRITOFF(); } else ToQueueFloat(o,f); }
-void flext_base::ToOutInt(outlet *o,int f) { if(IsSystemThread()) { CRITON(); outlet_flint((t_outlet *)o,f); CRITOFF(); } else ToQueueInt(o,f); }
-void flext_base::ToOutSymbol(outlet *o,const t_symbol *s) { if(IsSystemThread()) { CRITON(); outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(s)); CRITOFF(); } else ToQueueSymbol(o,s); }
-void flext_base::ToOutList(outlet *o,int argc,const t_atom *argv) { if(IsSystemThread()) { CRITON(); outlet_list((t_outlet *)o,gensym("list"),argc,(t_atom *)argv); CRITOFF(); } else ToQueueList(o,argc,(t_atom *)argv); }
-void flext_base::ToOutAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv) { if(IsSystemThread()) { CRITON(); outlet_anything((t_outlet *)o,const_cast<t_symbol *>(s),argc,(t_atom *)argv); CRITOFF(); } else ToQueueAnything(o,s,argc,(t_atom *)argv); }
+void flext_base::ToOutBang(outlet *o) const { if(IsSystemThread()) { CRITON(); outlet_bang((t_outlet *)o); CRITOFF(); } else ToQueueBang(o); }
+void flext_base::ToOutFloat(outlet *o,float f) const { if(IsSystemThread()) { CRITON(); outlet_float((t_outlet *)o,f); CRITOFF(); } else ToQueueFloat(o,f); }
+void flext_base::ToOutInt(outlet *o,int f) const { if(IsSystemThread()) { CRITON(); outlet_flint((t_outlet *)o,f); CRITOFF(); } else ToQueueInt(o,f); }
+void flext_base::ToOutSymbol(outlet *o,const t_symbol *s) const { if(IsSystemThread()) { CRITON(); outlet_symbol((t_outlet *)o,const_cast<t_symbol *>(s)); CRITOFF(); } else ToQueueSymbol(o,s); }
+void flext_base::ToOutList(outlet *o,int argc,const t_atom *argv) const { if(IsSystemThread()) { CRITON(); outlet_list((t_outlet *)o,gensym("list"),argc,(t_atom *)argv); CRITOFF(); } else ToQueueList(o,argc,(t_atom *)argv); }
+void flext_base::ToOutAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv) const { if(IsSystemThread()) { CRITON(); outlet_anything((t_outlet *)o,const_cast<t_symbol *>(s),argc,(t_atom *)argv); CRITOFF(); } else ToQueueAnything(o,s,argc,(t_atom *)argv); }
#endif
@@ -92,6 +92,17 @@ void flext_base::qmsg::Add(qmsg *o)
}
*/
+#ifdef MAXMSP
+void flext_base::YTick(flext_base *th)
+{
+ clock_delay(th->yclk,0);
+ qelem_set(th->qclk);
+#ifdef FLEXT_THREADS
+ sched_yield();
+#endif
+}
+#endif
+
void flext_base::QTick(flext_base *th)
{
#ifdef DEBUG
@@ -157,45 +168,45 @@ void flext_base::Queue(qmsg *m)
#endif
}
-void flext_base::ToQueueBang(outlet *o)
+void flext_base::ToQueueBang(outlet *o) const
{
qmsg *m = new qmsg();
m->SetBang(o);
- Queue(m);
+ const_cast<flext_base &>(*this).Queue(m);
}
-void flext_base::ToQueueFloat(outlet *o,float f)
+void flext_base::ToQueueFloat(outlet *o,float f) const
{
qmsg *m = new qmsg;
m->SetFloat(o,f);
- Queue(m);
+ const_cast<flext_base &>(*this).Queue(m);
}
-void flext_base::ToQueueInt(outlet *o,int f)
+void flext_base::ToQueueInt(outlet *o,int f) const
{
qmsg *m = new qmsg;
m->SetInt(o,f);
- Queue(m);
+ const_cast<flext_base &>(*this).Queue(m);
}
-void flext_base::ToQueueSymbol(outlet *o,const t_symbol *s)
+void flext_base::ToQueueSymbol(outlet *o,const t_symbol *s) const
{
qmsg *m = new qmsg;
m->SetSymbol(o,s);
- Queue(m);
+ const_cast<flext_base &>(*this).Queue(m);
}
-void flext_base::ToQueueList(outlet *o,int argc,const t_atom *argv)
+void flext_base::ToQueueList(outlet *o,int argc,const t_atom *argv) const
{
qmsg *m = new qmsg;
m->SetList(o,argc,argv);
- Queue(m);
+ const_cast<flext_base &>(*this).Queue(m);
}
-void flext_base::ToQueueAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv)
+void flext_base::ToQueueAnything(outlet *o,const t_symbol *s,int argc,const t_atom *argv) const
{
qmsg *m = new qmsg;
m->SetAny(o,s,argc,argv);
- Queue(m);
+ const_cast<flext_base &>(*this).Queue(m);
}
diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h
index 73ce613c..f4e7ea48 100644
--- a/externals/grill/flext/source/flstdc.h
+++ b/externals/grill/flext/source/flstdc.h
@@ -59,6 +59,10 @@ extern "C" {
#pragma warning (pop)
#endif
+#ifdef cabs
+#undef cabs // this is defined in m_pd.h (clashes with math.h)
+#endif
+
typedef t_object t_sigobj;
typedef t_gpointer *t_ptrtype;
@@ -78,10 +82,25 @@ typedef t_clock t_qelem;
/* MaxMSP definitions start here */
+#ifndef __MRC__
+#define powerc
+#endif
+#define __MOTO__ 0
+
+
// Include the relevant MaxMSP header files
+
+#include <MacTypes.h>
+
extern "C"
{
+
#include "ext.h"
+/*
+#include "ext_prefix.h"
+#include "ext_mess.h"
+#include "ext_proto.h"
+*/
//#include "ext_strings.h" // clashes with MPW
#include "ext_user.h"
#include "z_dsp.h"
@@ -96,7 +115,11 @@ typedef t_symbol *t_symptr;
typedef t_symbol *t_symtype;
typedef t_object *t_thing;
+#ifdef MAC_VERSION
+typedef void t_qelem;
+#else
typedef qelem t_qelem;
+#endif
typedef method t_method;
typedef method t_newmethod;
@@ -109,9 +132,17 @@ typedef void t_binbuf;
#define clock_free(tick) freeobject((object *)tick)
#define A_NULL A_NOTHING
-#define A_FLINT A_INT
+//#define A_FLINT A_INT
#define A_DEFFLINT A_DEFLONG
+#ifndef A_INT
+#define A_INT A_LONG
+#endif
+
+#ifndef A_SYMBOL
+#define A_SYMBOL A_SYM
+#endif
+
#endif
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index 148790ae..04d447ed 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -22,11 +22,14 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#endif
class FLEXT_EXT flext {
+
+ /*! \defgroup FLEXT_SUPPORT Flext support class
+ @{
+ */
public:
// --- buffer/array stuff -----------------------------------------
- /*! \defgroup FLEXT_N_BUFFER Flext buffer handling
-
+ /*! \defgroup FLEXT_S_BUFFER Buffer handling
@{
*/
@@ -35,6 +38,7 @@ public:
{
public:
/*! \brief Construct buffer.
+ \param s: symbol name, can be NULL
\param delayed = true: only sets name, needs another Set(NULL) to really initialize the buffer
\remark As externals can be created prior to the buffer objects they are pointing to, initialization should be done at loadbang!
*/
@@ -97,12 +101,34 @@ public:
#endif
};
-//! @}
+//! @} FLEXT_S_BUFFER
-// --- various symbols --------------------------------------------
+// --- utilities --------------------------------------------------
+
+ /*! \defgroup FLEXT_S_UTIL Utility functions
+ @{
+ */
+
+ //! Copy an atom
+ static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; }
+
+ //! Print an atom
+ static void PrintAtom(const t_atom &a,char *buf);
+ //! Scan an atom
+ static bool ScanAtom(t_atom &a,const char *buf);
+
+ //! Copy a list of atoms
+ static t_atom *CopyList(int argc,const t_atom *argv);
+ //! Copy a memory region
+ static void CopyMem(void *dst,const void *src,int bytes);
+ //! Sleep for an amount of time
+ static void Sleep(float s);
- /*! \defgroup FLEXT_N_SYMBOL Flext atom/symbol handling
+//! @} FLEXT_S_UTIL
+// --- various symbols --------------------------------------------
+
+ /*! \defgroup FLEXT_S_ATOM Atom/list handling
@{
*/
@@ -143,27 +169,6 @@ public:
//! Check for symbol and get string
static const char *GetAString(const t_symbol *s) { return s?s->s_name:""; }
-//! @}
-
-// --- utilities --------------------------------------------------
-
- /*! \defgroup FLEXT_C_UTIL Flext utility functions
-
- @{
- */
-
- //! Copy an atom
- static void CopyAtom(t_atom *dst,const t_atom *src) { *dst = *src; }
-
- //! Copy a list of atoms
- static t_atom *CopyList(int argc,const t_atom *argv);
- //! Copy a memory region
- static void CopyMem(void *dst,const void *src,int bytes);
- //! Sleep for an amount of time
- static void Sleep(float s);
-
-//! @}
-
// --- atom stuff ----------------------------------------
//! Set atom from another atom
@@ -185,12 +190,19 @@ public:
//! Check whether the atom is a symbol
static bool IsSymbol(const t_atom &a) { return a.a_type == A_SYMBOL; }
+#ifdef PD
//! Access the symbol value (without type check)
static t_symbol *GetSymbol(const t_atom &a) { return a.a_w.w_symbol; }
- //! Check for a symbol and get its value
- static t_symbol *GetASymbol(const t_atom &a) { return IsSymbol(a)?GetSymbol(a):NULL; } // NULL or empty symbol?
//! Set the atom to represent a symbol
static void SetSymbol(t_atom &a,const t_symbol *s) { a.a_type = A_SYMBOL; a.a_w.w_symbol = const_cast<t_symbol *>(s); }
+#else
+ //! Access the symbol value (without type check)
+ static t_symbol *GetSymbol(const t_atom &a) { return a.a_w.w_sym; }
+ //! Set the atom to represent a symbol
+ static void SetSymbol(t_atom &a,const t_symbol *s) { a.a_type = A_SYMBOL; a.a_w.w_sym = const_cast<t_symbol *>(s); }
+#endif
+ //! Check for a symbol and get its value
+ static t_symbol *GetASymbol(const t_atom &a) { return IsSymbol(a)?GetSymbol(a):NULL; } // NULL or empty symbol?
//! Check whether the atom is a string
static bool IsString(const t_atom &a) { return IsSymbol(a); }
@@ -204,6 +216,8 @@ public:
//! Check whether the atom can be represented as an integer
static bool CanbeInt(const t_atom &a) { return IsFloat(a) || IsInt(a); }
+ //! Set the atom to represent a boolean
+ static void SetBool(t_atom &a,bool v) { SetInt(a,v?1:0); }
//! Check whether the atom can be represented as a boolean
static bool CanbeBool(const t_atom &a) { return CanbeInt(a); }
//! Check for an boolean and get its value
@@ -222,14 +236,16 @@ public:
//! Set the atom to represent a integer (depending on the system)
static void SetInt(t_atom &a,int v) { a.a_type = A_FLOAT; a.a_w.w_float = (float)v; }
- //! Check whether the atom is a pointer
+ //! Check whether the atom strictly is a pointer
static bool IsPointer(const t_atom &a) { return a.a_type == A_POINTER; }
+ //! Check whether the atom can be a pointer
+ static bool CanbePointer(const t_atom &a) { return IsPointer(a); }
//! Access the pointer value (without type check)
static t_gpointer *GetPointer(const t_atom &a) { return a.a_w.w_gpointer; }
//! Check for a pointer and get its value
- static t_gpointer *GetAPointer(const t_atom &a) { return IsPointer(a)?GetPointer(a):NULL; }
+ static void *GetAPointer(const t_atom &a) { return IsPointer(a)?GetPointer(a):NULL; }
//! Set the atom to represent a pointer
- static void SetPointer(t_atom &a,t_gpointer *p) { a.a_type = A_POINTER; a.a_w.w_gpointer = p; }
+ static void SetPointer(t_atom &a,void *p) { a.a_type = A_POINTER; a.a_w.w_gpointer = (t_gpointer *)p; }
#elif defined(MAXMSP)
//! Check for a float and get its value
@@ -240,26 +256,22 @@ public:
//! Access the integer value (without type check)
static int GetInt(const t_atom &a) { return a.a_w.w_long; }
//! Check for an integer and get its value
- static int GetAInt(const t_atom &a) { return IsInt(a)?GetInt(a):(IsFloat(a)?GetFloat(a):0); }
+ static int GetAInt(const t_atom &a) { return IsInt(a)?GetInt(a):(IsFloat(a)?(int)GetFloat(a):0); }
//! Set the atom to represent an integer
static void SetInt(t_atom &a,int v) { a.a_type = A_INT; a.a_w.w_long = v; }
- //! Check whether the atom is a pointer
+ //! Check whether the atom strictly is a pointer
static bool IsPointer(const t_atom &) { return false; }
- //! Access the pointer value (without type check)
- static void *GetPointer(const t_atom &) { return NULL; }
+ //! Check whether the atom can be a pointer
+ static bool CanbePointer(const t_atom &a) { return IsInt(a); }
//! Check for a pointer and get its value
- static void *GetAPointer(const t_atom &) { return NULL; }
-// void SetPointer(t_atom &,void *) {}
+ static void *GetAPointer(const t_atom &a) { return IsInt(a)?(void *)GetInt(a):NULL; }
+ //! Set the atom to represent a pointer
+ static void SetPointer(t_atom &a,void *p) { SetInt(a,(int)p); }
#endif
// --- atom list stuff -------------------------------------------
- /*! \defgroup FLEXT_N_ATOM Flext atom/list handling
-
- @{
- */
-
//! Class representing a list of atoms
class AtomList
{
@@ -275,7 +287,12 @@ public:
AtomList &Clear() { return operator()(); }
//! Set list
- AtomList &operator()(int argc = 0,const t_atom *argv = NULL);
+ AtomList &Set(int argc,const t_atom *argv,int offs = 0,bool resize = false);
+ //! Get list
+ int Get(t_atom *argv,int mxsz = -1) const;
+
+ //! Set list
+ AtomList &operator()(int argc = 0,const t_atom *argv = NULL) { return Set(argc,argv,0,true); }
//! Set list by another AtomList
AtomList &operator =(const AtomList &a) { return operator()(a.Count(),a.Atoms()); }
@@ -294,13 +311,13 @@ public:
//! Append an atom to the list
AtomList &Append(const t_atom &a);
//! Append an atom list to the list
- AtomList &Append(int argc,const t_atom *argv);
+ AtomList &Append(int argc,const t_atom *argv = NULL);
//! Append an atom list to the list
AtomList &Append(const AtomList &a) { return Append(a.Count(),a.Atoms()); }
//! Prepend an atom to the list
AtomList &Prepend(const t_atom &a);
//! Prepend an atom list to the list
- AtomList &Prepend(int argc,const t_atom *argv);
+ AtomList &Prepend(int argc,const t_atom *argv = NULL);
//! Prepend an atom list to the list
AtomList &Prepend(const AtomList &a) { return Prepend(a.Count(),a.Atoms()); }
@@ -321,17 +338,20 @@ public:
{
public:
//! Construct anything
- AtomAnything(const t_symbol *h = NULL,int argc = 0,const t_atom *argv = NULL): AtomList(argc,argv),hdr(h) {}
+ AtomAnything(const t_symbol *h = NULL,int argc = 0,const t_atom *argv = NULL);
//! Construct anything
- AtomAnything(const char *h,int argc = 0,const t_atom *argv = NULL): AtomList(argc,argv),hdr(MakeSymbol(h)) {}
+ AtomAnything(const char *h,int argc = 0,const t_atom *argv = NULL);
//! Construct anything
- AtomAnything(const AtomAnything &a): AtomList(a),hdr(a.hdr) {}
+ AtomAnything(const AtomAnything &a);
//! Clear anything
AtomAnything &Clear() { return operator()(); }
//! Get header symbol of anything
const t_symbol *Header() const { return hdr; }
+
+ //! Set header symbol of anything
+ void Header(const t_symbol *h) { hdr = h; }
//! Set anything
AtomAnything &operator()(const t_symbol *h = NULL,int argc = 0,const t_atom *argv = NULL)
@@ -347,12 +367,12 @@ public:
const t_symbol *hdr;
};
-//! @}
+//! @} FLEXT_S_ATOM
// --- clock stuff ------------------------------------------------
- /*! \defgroup FLEXT_N_CLOCK Flext clock functions
+ /*! \defgroup FLEXT_S_CLOCK Flext clock functions
At the moment there are none
@@ -365,8 +385,7 @@ public:
// --- thread stuff -----------------------------------------------
#ifdef FLEXT_THREADS
- /*! \defgroup FLEXT_N_THREAD Flext thread handling
-
+ /*! \defgroup FLEXT_S_THREAD Flext thread handling
@{
*/
@@ -428,10 +447,16 @@ public:
protected:
pthread_cond_t cond;
};
-//! @}
+//! @} FLEXT_S_THREAD
+
#endif // FLEXT_THREADS
+//! @}
+
protected:
+#ifdef __MRC__
+ friend class flext_obj;
+#endif
static void Setup();
};
diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp
index fd780a1c..705f1631 100644
--- a/externals/grill/flext/source/flthr.cpp
+++ b/externals/grill/flext/source/flthr.cpp
@@ -155,15 +155,6 @@ void flext_base::PopThread()
tlmutex.Unlock();
}
-#ifdef MAXMSP
-void flext_base::YTick(flext_base *th)
-{
- clock_delay(th->yclk,0);
- qelem_set(th->qclk);
- sched_yield();
-}
-#endif
-
flext_base::thrid_t flext_base::GetThreadId()
{
return pthread_self();
diff --git a/externals/grill/flext/source/flutil.cpp b/externals/grill/flext/source/flutil.cpp
index 509c3ab4..284ce35c 100644
--- a/externals/grill/flext/source/flutil.cpp
+++ b/externals/grill/flext/source/flutil.cpp
@@ -28,8 +28,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <unistd.h>
#endif
-//namespace flext {
-
t_atom *flext::CopyList(int argc,const t_atom *argv)
{
int i;
@@ -51,7 +49,7 @@ void flext::Sleep(float s)
{
#ifdef NT
::Sleep((long)(s*1000));
-#elif defined MAXMSP
+#elif defined(MAXMSP)
UnsignedWide tick;
Microseconds(&tick);
double target = tick.hi*((double)(1L<<((sizeof tick.lo)*4))*(double)(1L<<((sizeof tick.lo)*4)))+tick.lo+s*1.e6;
@@ -64,5 +62,3 @@ void flext::Sleep(float s)
usleep((long)(s*1000000));
#endif
}
-
-//} // namespace flext
diff --git a/externals/grill/flext/tutorial/adv1/adv1.cw b/externals/grill/flext/tutorial/adv1/adv1.cw
index bd68d0e8..8b18e78f 100755
--- a/externals/grill/flext/tutorial/adv1/adv1.cw
+++ b/externals/grill/flext/tutorial/adv1/adv1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/adv1/adv1.dsp b/externals/grill/flext/tutorial/adv1/adv1.dsp
index 8917c44e..f857dbf3 100644
--- a/externals/grill/flext/tutorial/adv1/adv1.dsp
+++ b/externals/grill/flext/tutorial/adv1/adv1.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/adv1.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/adv1.dll" /libpath:"..\..\pd-msvc"
# SUBTRACT LINK32 /nodefaultlib
!ELSEIF "$(CFG)" == "adv1 - Win32 Debug"
@@ -70,7 +70,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/adv1/main.cpp b/externals/grill/flext/tutorial/adv1/main.cpp
index f59ebddd..9b8acb79 100755
--- a/externals/grill/flext/tutorial/adv1/main.cpp
+++ b/externals/grill/flext/tutorial/adv1/main.cpp
@@ -47,9 +47,6 @@ adv1::adv1(int argc,t_atom *argv)
AddInAnything(); // one inlet that can receive anything
AddOutAnything(); // one outlet for anything
- // set up inlets and outlets
- SetupInOut();
-
// register method
FLEXT_ADDMETHOD(0,m_any); // register method "m_any" for inlet 0
diff --git a/externals/grill/flext/tutorial/build-pd-bcc.bat b/externals/grill/flext/tutorial/build-pd-bcc.bat
index 5a8e8a57..6b2f5821 100644
--- a/externals/grill/flext/tutorial/build-pd-bcc.bat
+++ b/externals/grill/flext/tutorial/build-pd-bcc.bat
@@ -16,6 +16,14 @@
@make -f ..\makefile.pd-bcc NAME=adv1 SETUPFUNCTION=adv1_setup
@cd ..
+@cd attr1
+@make -f ..\makefile.pd-bcc NAME=attr1 SETUPFUNCTION=attr1_setup
+@cd ..
+
+@cd attr2
+@make -f ..\makefile.pd-bcc NAME=attr2 SETUPFUNCTION=attr2_setup
+@cd ..
+
@cd signal1
@make -f ..\makefile.pd-bcc NAME=signal1~ SETUPFUNCTION=signal1_tilde_setup
@cd ..
@@ -24,4 +32,8 @@
@make -f ..\makefile.pd-bcc NAME=signal2~ SETUPFUNCTION=signal2_tilde_setup
@cd ..
+@cd lib1
+@make -f ..\makefile.pd-bcc NAME=lib1 SETUPFUNCTION=lib1_setup
+@cd ..
+
diff --git a/externals/grill/flext/tutorial/build-pd-linux.sh b/externals/grill/flext/tutorial/build-pd-linux.sh
index bd11c6c4..413650f7 100644
--- a/externals/grill/flext/tutorial/build-pd-linux.sh
+++ b/externals/grill/flext/tutorial/build-pd-linux.sh
@@ -1,4 +1,11 @@
-#!/bin/sh
+#!/bin/sh
-make -f makefile.pd-linux
+. config-pd-linux.txt
+make -f makefile.pd-linux &&
+{
+ if [ $INSTPATH != "" ]; then
+ echo Now install as root
+ su -c "make -f makefile.pd-linux install"
+ fi
+}
diff --git a/externals/grill/flext/tutorial/build-pd-msvc.bat b/externals/grill/flext/tutorial/build-pd-msvc.bat
index f6eb9625..85ad6649 100644
--- a/externals/grill/flext/tutorial/build-pd-msvc.bat
+++ b/externals/grill/flext/tutorial/build-pd-msvc.bat
@@ -4,8 +4,11 @@ nmake /f makefile.pd-msvc NAME=simple1 DIR=simple1
nmake /f makefile.pd-msvc NAME=simple2 DIR=simple2
nmake /f makefile.pd-msvc NAME=simple3 DIR=simple3
nmake /f makefile.pd-msvc NAME=adv1 DIR=adv1
+nmake /f makefile.pd-msvc NAME=attr1 DIR=attr1
+nmake /f makefile.pd-msvc NAME=attr2 DIR=attr2
nmake /f makefile.pd-msvc NAME=signal1~ DIR=signal1
nmake /f makefile.pd-msvc NAME=signal2~ DIR=signal2
nmake /f makefile.pd-msvc NAME=thread1 DIR=thread1
nmake /f makefile.pd-msvc NAME=thread2 DIR=thread2
+nmake /f makefile.pd-msvc NAME=lib1 DIR=lib1
diff --git a/externals/grill/flext/tutorial/config-pd-linux.txt b/externals/grill/flext/tutorial/config-pd-linux.txt
index 3cfb4a9f..3f45b687 100644
--- a/externals/grill/flext/tutorial/config-pd-linux.txt
+++ b/externals/grill/flext/tutorial/config-pd-linux.txt
@@ -3,8 +3,13 @@
# Copyright (c) 2001,2002 Thomas Grill (xovo@gmx.net)
#
+# your c++ compiler (normally g++)
+CXX=g++
+
# where are the PD header files?
-PDPATH=/usr/local/include
+# if it is a system include path (like /usr/local/include)
+# you should leave it blank (as e.g. g++ 3.2 complains about it)
+PDPATH=
# where do the flext libraries reside?
FLEXTPATH=/usr/local/lib/pd/flext
@@ -12,8 +17,6 @@ FLEXTPATH=/usr/local/lib/pd/flext
# where should the examples be built? (relative path)
OUTPATH=./pd-linux
-# install the examples? (yes/no)
-INSTALL=yes
-
# where should the examples be installed?
+# (leave blank to omit installation)
INSTPATH=${FLEXTPATH}/tutorial
diff --git a/externals/grill/flext/tutorial/makefile.pd-cygwin b/externals/grill/flext/tutorial/makefile.pd-cygwin
index b8a48403..5929a701 100644
--- a/externals/grill/flext/tutorial/makefile.pd-cygwin
+++ b/externals/grill/flext/tutorial/makefile.pd-cygwin
@@ -26,7 +26,7 @@ LIBS=m pd
# all the source files from the package
-EXAMPLES=simple1 simple2 simple3 adv1 signal1~ signal2~ # thread1 thread2
+EXAMPLES=simple1 simple2 simple3 adv1 attr1 attr2 signal1~ signal2~ lib1 # thread1 thread2
TARGETS=$(patsubst %,$(OUTPATH)/%.dll,$(EXAMPLES))
diff --git a/externals/grill/flext/tutorial/makefile.pd-linux b/externals/grill/flext/tutorial/makefile.pd-linux
index 5c0a3cbc..7f1528e4 100644
--- a/externals/grill/flext/tutorial/makefile.pd-linux
+++ b/externals/grill/flext/tutorial/makefile.pd-linux
@@ -24,7 +24,7 @@ LIBS=m
# all the source files from the package
-EXAMPLES=simple1 simple2 simple3 adv1 signal1~ signal2~ thread1 thread2
+EXAMPLES=simple1 simple2 simple3 adv1 attr1 attr2 signal1~ signal2~ lib1 thread1 thread2
TARGETS=$(patsubst %,$(OUTPATH)/%.pd_linux,$(EXAMPLES))
@@ -55,3 +55,14 @@ clean:
rm -f $(OUTPATH)/*.o $(TARGETS)
+ifdef INSTPATH
+$(INSTPATH):
+ -mkdir $(INSTPATH)
+
+install:: $(INSTPATH)
+endif
+
+install:: $(patsubst %,$(OUTPATH)/%.pd_linux,$(EXAMPLES))
+ cp $^ $(INSTPATH)
+ chmod 755 $(patsubst %,$(INSTPATH)/%,$(notdir $^))
+ chown root.users $(patsubst %,$(INSTPATH)/%,$(notdir $^))
diff --git a/externals/grill/flext/tutorial/maxmsp/ex-adv1 b/externals/grill/flext/tutorial/maxmsp/ex-adv1
index dc29619b..dbdcf1fb 100755
--- a/externals/grill/flext/tutorial/maxmsp/ex-adv1
+++ b/externals/grill/flext/tutorial/maxmsp/ex-adv1
Binary files differ
diff --git a/externals/grill/flext/tutorial/maxmsp/ex-signal1 b/externals/grill/flext/tutorial/maxmsp/ex-signal1
index ca80fc9f..aa50e2e3 100755
--- a/externals/grill/flext/tutorial/maxmsp/ex-signal1
+++ b/externals/grill/flext/tutorial/maxmsp/ex-signal1
Binary files differ
diff --git a/externals/grill/flext/tutorial/maxmsp/ex-signal2 b/externals/grill/flext/tutorial/maxmsp/ex-signal2
index f7172d01..21c12f88 100755
--- a/externals/grill/flext/tutorial/maxmsp/ex-signal2
+++ b/externals/grill/flext/tutorial/maxmsp/ex-signal2
Binary files differ
diff --git a/externals/grill/flext/tutorial/maxmsp/ex-simple1 b/externals/grill/flext/tutorial/maxmsp/ex-simple1
index efebcce6..133eefe9 100755
--- a/externals/grill/flext/tutorial/maxmsp/ex-simple1
+++ b/externals/grill/flext/tutorial/maxmsp/ex-simple1
Binary files differ
diff --git a/externals/grill/flext/tutorial/maxmsp/ex-simple2 b/externals/grill/flext/tutorial/maxmsp/ex-simple2
index 5515bc98..acc74744 100755
--- a/externals/grill/flext/tutorial/maxmsp/ex-simple2
+++ b/externals/grill/flext/tutorial/maxmsp/ex-simple2
Binary files differ
diff --git a/externals/grill/flext/tutorial/maxmsp/ex-simple3 b/externals/grill/flext/tutorial/maxmsp/ex-simple3
index 62e048b7..7b5acee2 100755
--- a/externals/grill/flext/tutorial/maxmsp/ex-simple3
+++ b/externals/grill/flext/tutorial/maxmsp/ex-simple3
Binary files differ
diff --git a/externals/grill/flext/tutorial/pd/ex-adv1.pd b/externals/grill/flext/tutorial/pd/ex-adv1.pd
index 7ff14d6e..65735a45 100644
--- a/externals/grill/flext/tutorial/pd/ex-adv1.pd
+++ b/externals/grill/flext/tutorial/pd/ex-adv1.pd
@@ -1,14 +1,22 @@
-#N canvas 175 265 667 312 12;
-#X msg 35 31 or two words;
-#X msg 167 31 2 3;
-#X msg 47 252 one 2 3;
-#X obj 85 154 print result;
-#X obj 69 123 adv1 one;
-#X obj 47 224 prepend set;
-#X text 154 216 you can also use "prepend" if "adv1" has already been
-loaded!;
+#N canvas 46 58 586 341 12;
+#X msg 34 92 or two words;
+#X msg 169 93 2 3;
+#X msg 48 291 one 6;
+#X obj 72 213 print result;
+#X obj 49 172 adv1 one;
+#X obj 48 263 prepend set;
+#X text 162 257 you can also use "prepend";
+#X obj 16 8 cnv 15 550 40 empty empty adv1 10 22 32 24 -260818 -1 0
+;
+#X text 175 7 flext tutorial \, (C)2002 Thomas Grill;
+#X text 175 27 http://www.parasitaere-kapazitaeten.net;
+#X text 199 214 watch the console!;
+#X msg 69 121 6;
+#X text 210 110 send the object various messages;
+#X text 160 274 (if adv1 has already been loaded);
#X connect 0 0 4 0;
#X connect 1 0 4 0;
#X connect 4 0 3 0;
#X connect 4 0 5 0;
#X connect 5 0 2 0;
+#X connect 11 0 4 0;
diff --git a/externals/grill/flext/tutorial/pd/ex-signal1.pd b/externals/grill/flext/tutorial/pd/ex-signal1.pd
index 391e33a5..bfa445cd 100644
--- a/externals/grill/flext/tutorial/pd/ex-signal1.pd
+++ b/externals/grill/flext/tutorial/pd/ex-signal1.pd
@@ -1,16 +1,25 @@
-#N canvas 335 232 452 302 10;
-#X obj 233 98 hsl 128 15 0 1 0 0 empty empty empty 20 8 0 8 -260818
+#N canvas 335 232 575 335 12;
+#X obj 137 137 hsl 128 15 0 1 0 0 empty empty empty 20 8 32 8 -261681
-1 -1 0 1;
-#X obj 117 46 osc~ 440;
-#X obj 155 173 *~ 0.6;
-#X obj 147 218 dac~;
-#X obj 184 47 osc~ 880;
-#X floatatom 210 80 5 0 0;
-#X obj 155 139 signal1~;
-#X connect 0 0 6 2;
-#X connect 1 0 6 0;
-#X connect 2 0 3 0;
-#X connect 2 0 3 1;
-#X connect 4 0 6 1;
-#X connect 5 0 6 2;
-#X connect 6 0 2 0;
+#X obj 31 92 osc~ 440;
+#X obj 34 279 dac~;
+#X obj 126 92 osc~ 880;
+#X obj 44 206 signal1~;
+#X obj 16 8 cnv 15 550 40 empty empty signal1 10 22 32 24 -260818 -1
+0;
+#X text 175 8 flext tutorial \, (C)2002 Thomas Grill;
+#X text 175 28 http://www.parasitaere-kapazitaeten.net;
+#X text 276 151 control the mixing;
+#X text 113 241 adjust the volume;
+#X obj 44 240 *~ 0.5;
+#X text 28 73 source 1;
+#X text 128 72 source 2;
+#X obj 135 159 nbx 5 16 0 1 0 0 empty empty empty 0 -6 32 12 -261681
+-1 -1 0 256;
+#X connect 0 0 13 0;
+#X connect 1 0 4 0;
+#X connect 3 0 4 1;
+#X connect 4 0 10 0;
+#X connect 10 0 2 0;
+#X connect 10 0 2 1;
+#X connect 13 0 4 2;
diff --git a/externals/grill/flext/tutorial/pd/ex-signal2.pd b/externals/grill/flext/tutorial/pd/ex-signal2.pd
index cdd7aaea..b26604c4 100644
--- a/externals/grill/flext/tutorial/pd/ex-signal2.pd
+++ b/externals/grill/flext/tutorial/pd/ex-signal2.pd
@@ -1,17 +1,25 @@
-#N canvas 251 267 456 306 12;
-#X obj 89 68 signal2~;
-#X floatatom 52 117 5 0 0;
-#X floatatom 153 120 5 0 0;
-#X floatatom 251 120 5 0 0;
-#X floatatom 345 121 5 0 0;
-#X obj 90 30 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#N canvas 41 125 583 263 12;
+#X obj 81 133 signal2~;
+#X obj 76 88 bng 25 250 50 0 empty empty empty 0 -6 32 8 -261681 -1
-1;
-#X text 29 136 sample rate;
-#X text 136 136 block size;
-#X text 116 29 bang to get audio system parameters;
-#X text 243 137 channels in and out;
-#X connect 0 0 1 0;
-#X connect 0 1 2 0;
-#X connect 0 2 3 0;
-#X connect 0 3 4 0;
-#X connect 5 0 0 0;
+#X text 108 94 bang to get audio system parameters;
+#X text 233 212 channels in and out;
+#X obj 16 8 cnv 15 550 40 empty empty signal2 10 22 32 24 -260818 -1
+0;
+#X text 175 8 flext tutorial \, (C)2002 Thomas Grill;
+#X text 175 28 http://www.parasitaere-kapazitaeten.net;
+#X obj 38 191 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 12
+-228992 -1 -1 0 256;
+#X obj 130 191 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X obj 233 191 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X obj 325 191 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X text 12 211 samplerate;
+#X text 128 211 blocksize;
+#X connect 0 0 7 0;
+#X connect 0 1 8 0;
+#X connect 0 2 9 0;
+#X connect 0 3 10 0;
+#X connect 1 0 0 0;
diff --git a/externals/grill/flext/tutorial/pd/ex-simple1.pd b/externals/grill/flext/tutorial/pd/ex-simple1.pd
index 1be01595..e2872868 100644
--- a/externals/grill/flext/tutorial/pd/ex-simple1.pd
+++ b/externals/grill/flext/tutorial/pd/ex-simple1.pd
@@ -1,10 +1,16 @@
-#N canvas 197 285 460 310 12;
-#X floatatom 85 47 5 0 0;
-#X floatatom 85 142 5 0 0;
-#X msg 22 44 help;
-#X text 137 141 inverse;
-#X text 139 45 input;
-#X obj 85 90 simple1;
-#X connect 0 0 5 0;
-#X connect 2 0 5 0;
-#X connect 5 0 1 0;
+#N canvas 85 178 582 245 12;
+#X msg 29 92 help;
+#X text 203 187 inverse;
+#X text 169 96 input;
+#X obj 113 141 simple1;
+#X obj 16 8 cnv 15 550 40 empty empty simple1 10 22 32 24 -260818 -1
+0;
+#X text 175 8 flext tutorial \, (C)2002 Thomas Grill;
+#X text 175 28 http://www.parasitaere-kapazitaeten.net;
+#X obj 114 96 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 32 12 -261681
+-1 -1 104 256;
+#X obj 112 190 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0.00961538 256;
+#X connect 0 0 3 0;
+#X connect 3 0 8 0;
+#X connect 7 0 3 0;
diff --git a/externals/grill/flext/tutorial/pd/ex-simple2.pd b/externals/grill/flext/tutorial/pd/ex-simple2.pd
index 8074cb13..02ad85a7 100644
--- a/externals/grill/flext/tutorial/pd/ex-simple2.pd
+++ b/externals/grill/flext/tutorial/pd/ex-simple2.pd
@@ -1,13 +1,21 @@
-#N canvas 197 285 454 304 12;
-#X obj 110 96 simple2 3;
-#X floatatom 98 51 5 0 0;
-#X floatatom 199 52 5 0 0;
-#X floatatom 108 150 5 0 0;
-#X msg 11 12 help;
-#X text 90 30 triggering;
-#X text 202 31 non-triggering;
-#X text 196 96 default argument;
-#X connect 0 0 3 0;
+#N canvas 72 265 589 307 12;
+#X obj 111 196 simple2 3;
+#X msg 21 83 help;
+#X text 103 119 triggering;
+#X text 215 120 non-triggering;
+#X text 206 197 default argument;
+#X obj 16 8 cnv 15 550 40 empty empty simple2 10 22 32 24 -260818 -1
+0;
+#X text 174 8 flext tutorial \, (C)2002 Thomas Grill;
+#X text 174 28 http://www.parasitaere-kapazitaeten.net;
+#X text 66 82 print a "help" message (to the console);
+#X obj 110 144 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 32 12 -261681
+-1 -1 0 256;
+#X obj 217 144 nbx 4 16 -999 999 0 0 empty empty empty 0 -6 32 12 -261681
+-1 -1 0 256;
+#X obj 111 239 nbx 7 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X connect 0 0 11 0;
#X connect 1 0 0 0;
-#X connect 2 0 0 1;
-#X connect 4 0 0 0;
+#X connect 9 0 0 0;
+#X connect 10 0 0 1;
diff --git a/externals/grill/flext/tutorial/pd/ex-simple3.pd b/externals/grill/flext/tutorial/pd/ex-simple3.pd
index e2867241..bf58a003 100644
--- a/externals/grill/flext/tutorial/pd/ex-simple3.pd
+++ b/externals/grill/flext/tutorial/pd/ex-simple3.pd
@@ -1,18 +1,22 @@
-#N canvas 329 97 539 308 12;
-#X msg 11 12 help;
-#X msg 123 84 born;
-#X msg 172 85 to;
-#X msg 214 87 hula;
-#X msg 228 168 yeah;
-#X msg 228 130 hula 1;
-#X text 280 169 other symbol;
-#X text 57 12 issue help message;
-#X obj 148 231 simple3;
-#X text 261 88 tag without argument;
-#X text 297 128 tag and argument;
-#X connect 0 0 8 0;
-#X connect 1 0 8 0;
-#X connect 2 0 8 0;
-#X connect 3 0 8 0;
-#X connect 4 0 8 0;
-#X connect 5 0 8 0;
+#N canvas 329 97 583 344 12;
+#X msg 22 87 help;
+#X msg 119 136 born;
+#X msg 168 137 to;
+#X msg 210 139 hula;
+#X msg 224 220 yeah;
+#X msg 224 182 hula 1;
+#X text 276 221 other symbol;
+#X obj 144 283 simple3;
+#X text 257 140 tag without argument;
+#X text 293 180 tag and argument;
+#X text 68 87 print a help message;
+#X obj 16 8 cnv 15 550 40 empty empty simple3 10 22 32 24 -260818 -1
+0;
+#X text 174 8 flext tutorial \, (C)2002 Thomas Grill;
+#X text 174 28 http://www.parasitaere-kapazitaeten.net;
+#X connect 0 0 7 0;
+#X connect 1 0 7 0;
+#X connect 2 0 7 0;
+#X connect 3 0 7 0;
+#X connect 4 0 7 0;
+#X connect 5 0 7 0;
diff --git a/externals/grill/flext/tutorial/pd/ex-thread1.pd b/externals/grill/flext/tutorial/pd/ex-thread1.pd
index 6358406c..67d673db 100644
--- a/externals/grill/flext/tutorial/pd/ex-thread1.pd
+++ b/externals/grill/flext/tutorial/pd/ex-thread1.pd
@@ -1,34 +1,43 @@
-#N canvas 105 266 672 310 12;
-#X obj 54 29 bng 25 250 50 0 empty empty start 0 -6 0 8 -258699 -1
+#N canvas 105 266 700 343 12;
+#X obj 39 91 bng 25 250 50 0 empty empty start 0 -6 32 8 -261681 -1
-1;
-#X floatatom 54 216 8 0 0;
-#X obj 54 182 thread1;
-#X floatatom 145 218 8 0 0;
-#X obj 145 184 thread1;
-#X floatatom 235 219 8 0 0;
-#X obj 235 185 thread1;
-#X floatatom 327 219 8 0 0;
-#X obj 327 185 thread1;
-#X floatatom 420 219 8 0 0;
-#X obj 420 185 thread1;
-#X obj 146 123 delay 200;
-#X obj 235 122 delay 200;
-#X obj 328 124 delay 200;
-#X obj 419 123 delay 200;
-#X text 93 23 click to start;
-#X text 141 41 (if you click twice \, the same thread is started a
+#X obj 39 244 thread1;
+#X obj 130 246 thread1;
+#X obj 220 247 thread1;
+#X obj 312 247 thread1;
+#X obj 405 247 thread1;
+#X obj 131 185 delay 200;
+#X obj 220 184 delay 200;
+#X obj 313 186 delay 200;
+#X obj 404 185 delay 200;
+#X text 78 85 click to start;
+#X text 126 103 (if you click twice \, the same thread is started a
second time);
-#X connect 0 0 2 0;
-#X connect 0 0 11 0;
-#X connect 2 0 1 0;
-#X connect 4 0 3 0;
-#X connect 6 0 5 0;
-#X connect 8 0 7 0;
-#X connect 10 0 9 0;
-#X connect 11 0 4 0;
-#X connect 11 0 12 0;
-#X connect 12 0 6 0;
-#X connect 12 0 13 0;
-#X connect 13 0 8 0;
-#X connect 13 0 14 0;
-#X connect 14 0 10 0;
+#X obj 16 8 cnv 15 550 40 empty empty thread1 10 22 32 24 -260818 -1
+0;
+#X text 175 8 flext tutorial \, (C)2002 Thomas Grill;
+#X text 175 28 http://www.parasitaere-kapazitaeten.net;
+#X obj 39 277 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 12
+-228992 -1 -1 0 256;
+#X obj 131 277 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X obj 221 277 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X obj 311 277 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X obj 406 276 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X connect 0 0 1 0;
+#X connect 0 0 6 0;
+#X connect 1 0 15 0;
+#X connect 2 0 16 0;
+#X connect 3 0 17 0;
+#X connect 4 0 18 0;
+#X connect 5 0 19 0;
+#X connect 6 0 2 0;
+#X connect 6 0 7 0;
+#X connect 7 0 3 0;
+#X connect 7 0 8 0;
+#X connect 8 0 4 0;
+#X connect 8 0 9 0;
+#X connect 9 0 5 0;
diff --git a/externals/grill/flext/tutorial/pd/ex-thread2.pd b/externals/grill/flext/tutorial/pd/ex-thread2.pd
index 26205b8d..cb2e764a 100644
--- a/externals/grill/flext/tutorial/pd/ex-thread2.pd
+++ b/externals/grill/flext/tutorial/pd/ex-thread2.pd
@@ -1,25 +1,32 @@
-#N canvas 116 192 666 304 12;
-#X msg 91 131 stop;
-#X msg 262 135 stop;
-#X obj 206 42 bng 25 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
+#N canvas 116 192 587 332 12;
+#X msg 84 188 stop;
+#X msg 255 192 stop;
+#X obj 199 99 bng 25 250 50 0 empty empty empty 0 -6 32 8 -261681 -1
-1;
-#X obj 298 42 bng 25 250 50 0 empty empty empty 0 -6 0 8 -258699 -1
+#X obj 291 99 bng 25 250 50 0 empty empty empty 0 -6 32 8 -261681 -1
-1;
-#X text 198 21 start;
-#X text 290 20 stop;
-#X msg 46 131 0;
-#X msg 217 135 0;
-#X msg 430 133 stop;
-#X msg 385 133 0;
-#X obj 411 172 thread2 50;
-#X obj 239 172 thread2 15;
-#X obj 73 171 thread2 3;
-#X floatatom 73 205 8 0 0;
-#X floatatom 239 205 8 0 0;
-#X floatatom 411 205 8 0 0;
-#X msg 140 131 text;
-#X msg 309 135 text;
-#X msg 477 133 text;
+#X text 191 78 start;
+#X text 283 77 stop;
+#X msg 39 188 0;
+#X msg 210 192 0;
+#X msg 423 190 stop;
+#X msg 378 190 0;
+#X obj 404 229 thread2 50;
+#X obj 232 229 thread2 15;
+#X obj 66 228 thread2 3;
+#X msg 133 188 text;
+#X msg 302 192 text;
+#X msg 470 190 text;
+#X obj 16 8 cnv 15 550 40 empty empty thread2 10 22 32 24 -260818 -1
+0;
+#X text 174 8 flext tutorial \, (C)2002 Thomas Grill;
+#X text 174 28 http://www.parasitaere-kapazitaeten.net;
+#X obj 65 264 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32 12
+-228992 -1 -1 0 256;
+#X obj 231 265 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
+#X obj 403 267 nbx 5 16 -1e+37 1e+37 0 0 empty empty empty 0 -6 32
+12 -228992 -1 -1 0 256;
#X connect 0 0 12 0;
#X connect 1 0 11 0;
#X connect 2 0 6 0;
@@ -32,9 +39,9 @@
#X connect 7 0 11 0;
#X connect 8 0 10 0;
#X connect 9 0 10 0;
-#X connect 10 0 15 0;
-#X connect 11 0 14 0;
-#X connect 12 0 13 0;
-#X connect 16 0 12 0;
-#X connect 17 0 11 0;
-#X connect 18 0 10 0;
+#X connect 10 0 21 0;
+#X connect 11 0 20 0;
+#X connect 12 0 19 0;
+#X connect 13 0 12 0;
+#X connect 14 0 11 0;
+#X connect 15 0 10 0;
diff --git a/externals/grill/flext/tutorial/readme.txt b/externals/grill/flext/tutorial/readme.txt
index ec05f1a1..fa86a5ce 100644
--- a/externals/grill/flext/tutorial/readme.txt
+++ b/externals/grill/flext/tutorial/readme.txt
@@ -16,21 +16,30 @@ The package should at least compile (and is tested) with the following compilers
pd - Windows:
-------------
-o Borland C++ 5.5 (free): edit "config-pd-bcc.txt" & run "build-pd-bcc.bat"
-
o Microsoft Visual C++ 6: edit "config-pd-msvc.txt" & run "build-pd-msvc.bat"
+o Borland C++ 5.5 (free): edit "config-pd-bcc.txt" & run "build-pd-bcc.bat"
+ (no threading support for that compiler!)
+
o Cygwin: edit "config-pd-cygwin.txt" & run "sh build-pd-cygwin.sh"
+ (no threading support for that compiler!)
pd - linux:
-----------
o GCC: edit "config-pd-linux.txt" & run "sh build-pd-linux.sh"
+pd - MacOSX:
+-----------
+o GCC: edit "config-pd-darwin.txt" & run "sh build-pd-darwin.sh"
+
+
Max/MSP - MacOS 9:
------------------
o Metrowerks CodeWarrior V6: edit & use the several ".cw" project files
-o Apple MPW-PR: edit & use the several "make.mpw" makefiles
+Max/MSP - MacOSX:
+------------------
+... sorry, not yet... would someone please donate me a CodeWarrior V8 ?
----------------------------------------------------------------------------
diff --git a/externals/grill/flext/tutorial/signal1/main.cpp b/externals/grill/flext/tutorial/signal1/main.cpp
index 14818e6f..f745be3b 100644
--- a/externals/grill/flext/tutorial/signal1/main.cpp
+++ b/externals/grill/flext/tutorial/signal1/main.cpp
@@ -5,10 +5,9 @@
// http://iem.kug.ac.at/pd/externals-HOWTO/
#include <flext.h>
-#include <math.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 300)
-#error You need at least flext version 0.3.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
#endif
@@ -40,9 +39,6 @@ class signal1:
AddInFloat(); // 1 float in
AddOutSignal(); // 1 audio out [ == AddOutSignal(1) ]
- SetupInOut(); // set up inlets and outlets.
- // Must be called once!
-
// Now we need to bind the handler function to our
// panning inlet, which is inlet 2 (counting all inlets
// from 0). We want the function "setPan" to get
diff --git a/externals/grill/flext/tutorial/signal1/signal1.cw b/externals/grill/flext/tutorial/signal1/signal1.cw
index f273b763..cb5b5ce5 100644
--- a/externals/grill/flext/tutorial/signal1/signal1.cw
+++ b/externals/grill/flext/tutorial/signal1/signal1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/signal1/signal1.dsp b/externals/grill/flext/tutorial/signal1/signal1.dsp
index 42916c07..707f58ad 100644
--- a/externals/grill/flext/tutorial/signal1/signal1.dsp
+++ b/externals/grill/flext/tutorial/signal1/signal1.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/signal1~.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/signal1~.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "signal1 - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/signal2/main.cpp b/externals/grill/flext/tutorial/signal2/main.cpp
index 1517b536..3876a0ca 100644
--- a/externals/grill/flext/tutorial/signal2/main.cpp
+++ b/externals/grill/flext/tutorial/signal2/main.cpp
@@ -14,8 +14,8 @@ This is an object showing varous parameters of the pd audio system
#include <flext.h>
// check for appropriate flext version
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 300)
-#error You need at least flext version 0.3.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
#endif
@@ -37,7 +37,7 @@ protected:
void m_bang(); // method for bang
// this virtual function is obligatory for objects derived from flext_dsp
- virtual void m_signal(int n, float *const *in, float *const *out);
+// virtual void m_signal(int n, float *const *in, float *const *out);
private:
FLEXT_CALLBACK(m_bang); // callback for method "m_bang"
@@ -57,9 +57,6 @@ signal2::signal2()
AddOutFloat(1);
AddOutInt(3); // although PD knows no int type, flext does!
- // set up inlets and outlets - obligatory!
- SetupInOut();
-
// register methods
FLEXT_ADDBANG(0,m_bang); // register method "m_bang" for bang message into inlet 0
}
@@ -73,8 +70,8 @@ void signal2::m_bang()
ToOutInt(3,ChannelsOut());
}
+/*
void signal2::m_signal(int, float *const *, float *const *)
{
- // do no dsp work
}
-
+*/
diff --git a/externals/grill/flext/tutorial/signal2/signal2.cw b/externals/grill/flext/tutorial/signal2/signal2.cw
index a7b29ba3..f631a7c4 100644
--- a/externals/grill/flext/tutorial/signal2/signal2.cw
+++ b/externals/grill/flext/tutorial/signal2/signal2.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/signal2/signal2.dsp b/externals/grill/flext/tutorial/signal2/signal2.dsp
index c70ae670..6002f7dc 100644
--- a/externals/grill/flext/tutorial/signal2/signal2.dsp
+++ b/externals/grill/flext/tutorial/signal2/signal2.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/signal2~.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/signal2~.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "signal2 - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/simple1/main.cpp b/externals/grill/flext/tutorial/simple1/main.cpp
index 38f12573..5406cc8a 100755
--- a/externals/grill/flext/tutorial/simple1/main.cpp
+++ b/externals/grill/flext/tutorial/simple1/main.cpp
@@ -14,13 +14,14 @@ This is an example of a simple object doing a float inversion
#include <flext.h>
// check for appropriate flext version
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 300)
-#error You need at least flext version 0.3.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
#endif
// define the class that stands for a pd/Max object
// Attention: the class name must be the same as the object name!! (without an eventual ~)
+// Special names are possible with the usage of libraries (see the lib1 tutorial example)
class simple1:
// inherit from basic flext class
@@ -53,9 +54,6 @@ simple1::simple1()
// define outlets:
AddOutFloat(); // add one float outlet (has index 0)
- // set up inlets and outlets - obligatory!
- SetupInOut();
-
// register methods
FLEXT_ADDMETHOD(0,m_float); // register method (for float messages) "m_float" for inlet 0
}
diff --git a/externals/grill/flext/tutorial/simple1/simple1.cw b/externals/grill/flext/tutorial/simple1/simple1.cw
index d8b58eb1..d54fb1ff 100755
--- a/externals/grill/flext/tutorial/simple1/simple1.cw
+++ b/externals/grill/flext/tutorial/simple1/simple1.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/simple1/simple1.dsp b/externals/grill/flext/tutorial/simple1/simple1.dsp
index 281042a2..a40e22f6 100644
--- a/externals/grill/flext/tutorial/simple1/simple1.dsp
+++ b/externals/grill/flext/tutorial/simple1/simple1.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/simple1.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/simple1.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "simple1 - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /Fr /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/simple2/main.cpp b/externals/grill/flext/tutorial/simple2/main.cpp
index 306a953b..f23e1745 100755
--- a/externals/grill/flext/tutorial/simple2/main.cpp
+++ b/externals/grill/flext/tutorial/simple2/main.cpp
@@ -14,8 +14,8 @@ This is an example of a simple object doing a float addition
#include <flext.h>
// check for appropriate flext version
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 300)
-#error You need at least flext version 0.3.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
#endif
@@ -55,9 +55,6 @@ simple2::simple2(float init):
// define outlets
AddOutFloat(); // one float outlet (has index 0)
- // set up inlets and outlets - obligatory!
- SetupInOut();
-
// register methods
FLEXT_ADDMETHOD(0,m_float1); // register method (for floats) "m_float1" for inlet 0
FLEXT_ADDMETHOD(1,m_float2); // register method (for floats) "m_float2" for inlet 1
diff --git a/externals/grill/flext/tutorial/simple2/simple2.cw b/externals/grill/flext/tutorial/simple2/simple2.cw
index 1bc9379f..af75e581 100755
--- a/externals/grill/flext/tutorial/simple2/simple2.cw
+++ b/externals/grill/flext/tutorial/simple2/simple2.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/simple2/simple2.dsp b/externals/grill/flext/tutorial/simple2/simple2.dsp
index 22b75a5e..06e953e0 100644
--- a/externals/grill/flext/tutorial/simple2/simple2.dsp
+++ b/externals/grill/flext/tutorial/simple2/simple2.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/simple2.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/simple2.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "simple2 - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/simple3/main.cpp b/externals/grill/flext/tutorial/simple3/main.cpp
index 5d290f67..b09893ab 100644
--- a/externals/grill/flext/tutorial/simple3/main.cpp
+++ b/externals/grill/flext/tutorial/simple3/main.cpp
@@ -15,8 +15,8 @@ This is an example of an object digesting several "tagged" messages
#include <flext.h>
// check for appropriate flext version
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 300)
-#error You need at least flext version 0.3.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
#endif
class simple3:
@@ -52,9 +52,6 @@ simple3::simple3()
// define inlets
AddInAnything(); // add inlet of type anything (index 0)
- // set up inlets and outlets
- SetupInOut();
-
// register methods
FLEXT_ADDMETHOD_(0,"born",m_tag); // register method for tag "born"
FLEXT_ADDMETHOD_(0,"to",m_tag); // register method for tag "to"
diff --git a/externals/grill/flext/tutorial/simple3/simple3.cw b/externals/grill/flext/tutorial/simple3/simple3.cw
index b29678f7..2b5bfb90 100644
--- a/externals/grill/flext/tutorial/simple3/simple3.cw
+++ b/externals/grill/flext/tutorial/simple3/simple3.cw
Binary files differ
diff --git a/externals/grill/flext/tutorial/simple3/simple3.dsp b/externals/grill/flext/tutorial/simple3/simple3.dsp
index 8390b044..dfc0155b 100644
--- a/externals/grill/flext/tutorial/simple3/simple3.dsp
+++ b/externals/grill/flext/tutorial/simple3/simple3.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../msvc/simple3.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/simple3.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "simple3 - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/thread1/main.cpp b/externals/grill/flext/tutorial/thread1/main.cpp
index 878cef76..72fb1019 100644
--- a/externals/grill/flext/tutorial/thread1/main.cpp
+++ b/externals/grill/flext/tutorial/thread1/main.cpp
@@ -10,15 +10,18 @@ WARRANTIES, see the file, "license.txt," in this distribution.
This shows an example of a method running as a thread
*/
-// define FLEXT_THREADS for thread usage. Flext must also have been compiled with that defined!
+/* define FLEXT_THREADS for thread usage. Flext must also have been compiled with that defined!
+ it's even better to define that as a compiler flag (-D FLEXT_THREADS) for all files of the
+ flext external
+*/
#ifndef FLEXT_THREADS
#define FLEXT_THREADS
#endif
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 301)
-#error You need at least flext version 0.3.1
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
#endif
@@ -47,7 +50,6 @@ thread1::thread1()
{
AddInAnything();
AddOutInt();
- SetupInOut(); // set up inlets and outlets
FLEXT_ADDBANG(0,m_start); // register method
}
diff --git a/externals/grill/flext/tutorial/thread1/thread1.dsp b/externals/grill/flext/tutorial/thread1/thread1.dsp
index 7ef7ca52..4e0ca9f2 100644
--- a/externals/grill/flext/tutorial/thread1/thread1.dsp
+++ b/externals/grill/flext/tutorial/thread1/thread1.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext_t-pdwin.lib pthreadVC.lib /nologo /dll /machine:I386 /out:"../msvc/thread1.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext_t-pdwin.lib pthreadVC.lib /nologo /dll /machine:I386 /out:"../pd-msvc/thread1.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "thread1 - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/thread2/main.cpp b/externals/grill/flext/tutorial/thread2/main.cpp
index ce2a170e..bd6354a2 100644
--- a/externals/grill/flext/tutorial/thread2/main.cpp
+++ b/externals/grill/flext/tutorial/thread2/main.cpp
@@ -10,15 +10,18 @@ WARRANTIES, see the file, "license.txt," in this distribution.
This shows an example of multiple threads and syncing with a thread conditional
*/
-// define FLEXT_THREADS for thread usage. Flext must also have been compiled with that defined!
+/* define FLEXT_THREADS for thread usage. Flext must also have been compiled with that defined!
+ it's even better to define that as a compiler flag (-D FLEXT_THREADS) for all files of the
+ flext external
+*/
#ifndef FLEXT_THREADS
#define FLEXT_THREADS
#endif
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 301)
-#error You need at least flext version 0.3.1
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
+#error You need at least flext version 0.4.0
#endif
@@ -65,7 +68,6 @@ thread2::thread2(int del):
{
AddInAnything();
AddOutInt(2);
- SetupInOut(); // set up inlets and outlets
FLEXT_ADDMETHOD(0,m_start); // register start for integer numbers (floats in PD)
FLEXT_ADDMETHOD_(0,"text",m_text); // register m_text method for "text" tag
diff --git a/externals/grill/flext/tutorial/thread2/thread2.dsp b/externals/grill/flext/tutorial/thread2/thread2.dsp
index da5e149e..e0f6f115 100644
--- a/externals/grill/flext/tutorial/thread2/thread2.dsp
+++ b/externals/grill/flext/tutorial/thread2/thread2.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GR- /GX- /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /O2 /I "..\..\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /YX /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -53,7 +53,7 @@ BSC32=bscmake.exe
# ADD BSC32 /nologo
LINK32=link.exe
# ADD BASE LINK32 kernel32.lib /nologo /dll /machine:I386
-# ADD LINK32 kernel32.lib user32.lib pd.lib flext_t-pdwin.lib pthreadVC.lib /nologo /dll /machine:I386 /out:"../msvc/thread2.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext_t-pdwin.lib pthreadVC.lib /nologo /dll /machine:I386 /out:"../pd-msvc/thread2.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "thread2 - Win32 Debug"
@@ -69,7 +69,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GR- /GX- /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "..\..\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
diff --git a/externals/grill/flext/tutorial/tutorial.dsw b/externals/grill/flext/tutorial/tutorial.dsw
index 5bc8001a..42eddaee 100644
--- a/externals/grill/flext/tutorial/tutorial.dsw
+++ b/externals/grill/flext/tutorial/tutorial.dsw
@@ -19,6 +19,38 @@ Package=<4>
###############################################################################
+Project: "attr1"=.\attr1\attr1.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+ begin source code control
+ attr1
+ .\attr1
+ end source code control
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
+Project: "attr2"=.\attr2\attr2.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+ begin source code control
+ attr2
+ .\attr2
+ end source code control
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "flext"=..\flext.dsp - Package Owner=<4>
Package=<5>
@@ -35,6 +67,22 @@ Package=<4>
###############################################################################
+Project: "lib1"=.\lib1\lib1.dsp - Package Owner=<4>
+
+Package=<5>
+{{{
+ begin source code control
+ lib1
+ .\lib1
+ end source code control
+}}}
+
+Package=<4>
+{{{
+}}}
+
+###############################################################################
+
Project: "signal1"=.\signal1\signal1.dsp - Package Owner=<4>
Package=<5>