aboutsummaryrefslogtreecommitdiff
path: root/externals
diff options
context:
space:
mode:
authorThomas Grill <xovo@users.sourceforge.net>2002-12-05 05:36:32 +0000
committerThomas Grill <xovo@users.sourceforge.net>2002-12-05 05:36:32 +0000
commit60ee6bb60b11bbfbccf56f335c9c6213e6daa79d (patch)
tree99b0c72c60aeba5d1a0489aae9edd16f371d965c /externals
parentbbd9d289d152f6ef085dec680f0b1611c29f0e32 (diff)
""
svn path=/trunk/; revision=278
Diffstat (limited to 'externals')
-rw-r--r--externals/grill/deljoin/deljoin.dsp4
-rw-r--r--externals/grill/delsplit/delsplit.dsp4
-rw-r--r--externals/grill/flext/flext.cwbin200817 -> 202097 bytes
-rw-r--r--externals/grill/flext/flext.dsp12
-rw-r--r--externals/grill/flext/make-files.txt2
-rw-r--r--externals/grill/flext/make-inc.pd-msvc2
-rw-r--r--externals/grill/flext/makefile.pd-bcc2
-rw-r--r--externals/grill/flext/makefile.pd-cygwin2
-rw-r--r--externals/grill/flext/makefile.pd-darwin2
-rw-r--r--externals/grill/flext/makefile.pd-linux2
-rw-r--r--externals/grill/flext/readme.txt8
-rw-r--r--externals/grill/flext/source/flatom.cpp7
-rw-r--r--externals/grill/flext/source/flatom_pr.cpp10
-rw-r--r--externals/grill/flext/source/flattr.cpp2
-rw-r--r--externals/grill/flext/source/flbase.cpp10
-rw-r--r--externals/grill/flext/source/flbase.h35
-rw-r--r--externals/grill/flext/source/flbuf.cpp44
-rw-r--r--externals/grill/flext/source/flclass.h30
-rwxr-xr-xexternals/grill/flext/source/flcwmax-x-thr.h1
-rw-r--r--externals/grill/flext/source/flcwmax.h22
-rw-r--r--externals/grill/flext/source/fldsp.cpp32
-rw-r--r--externals/grill/flext/source/fldsp.h8
-rw-r--r--externals/grill/flext/source/flext.cpp101
-rw-r--r--externals/grill/flext/source/flext.h9
-rw-r--r--externals/grill/flext/source/flinternal.h7
-rwxr-xr-xexternals/grill/flext/source/fllib.cpp59
-rwxr-xr-xexternals/grill/flext/source/flmspbuffer.h2
-rw-r--r--externals/grill/flext/source/flout.cpp28
-rwxr-xr-xexternals/grill/flext/source/flprefix.h159
-rw-r--r--externals/grill/flext/source/flsndobj.cpp3
-rw-r--r--externals/grill/flext/source/flsndobj.h8
-rw-r--r--externals/grill/flext/source/flstdc.h98
-rw-r--r--externals/grill/flext/source/flsupport.cpp12
-rw-r--r--externals/grill/flext/source/flsupport.h17
-rw-r--r--externals/grill/flext/source/flthr.cpp40
-rw-r--r--externals/grill/flext/source/flutil.cpp32
-rwxr-xr-xexternals/grill/flext/source/flxlet.cpp4
-rwxr-xr-xexternals/grill/flext/tutorial/adv1/main.cpp6
-rw-r--r--externals/grill/flext/tutorial/attr1/attr1.dsp2
-rw-r--r--externals/grill/flext/tutorial/attr2/attr2.dsp2
-rw-r--r--externals/grill/flext/tutorial/attr2/main.cpp8
-rw-r--r--externals/grill/flext/tutorial/lib1/lib1.dsp14
-rw-r--r--externals/grill/flext/tutorial/signal2/main.cpp8
-rw-r--r--externals/grill/pool/pool.dsp4
-rw-r--r--externals/grill/pool/pool.h4
-rw-r--r--externals/grill/prepend/prepend.dsp4
-rw-r--r--externals/grill/py/py.cwbin88197 -> 55947 bytes
-rw-r--r--externals/grill/py/py.dsp8
-rw-r--r--externals/grill/py/source/clmeth.cpp10
-rw-r--r--externals/grill/py/source/main.cpp6
-rw-r--r--externals/grill/py/source/main.h7
-rw-r--r--externals/grill/py/source/modmeth.cpp20
-rw-r--r--externals/grill/py/source/py.cpp2
-rw-r--r--externals/grill/py/source/pyext.cpp12
-rw-r--r--externals/grill/py/source/pyext.h2
-rw-r--r--externals/grill/vasp/build-pd-msvc.bat4
-rw-r--r--externals/grill/vasp/changes.txt9
-rwxr-xr-xexternals/grill/vasp/makefile.pd-darwin2
-rw-r--r--externals/grill/vasp/makefile.pd-linux2
-rw-r--r--externals/grill/vasp/makefile.pd-msvc2
-rw-r--r--externals/grill/vasp/pd-ex/granular2.pd129
-rw-r--r--externals/grill/vasp/source/arg.cpp69
-rw-r--r--externals/grill/vasp/source/arg.h8
-rw-r--r--externals/grill/vasp/source/buflib.cpp1
-rw-r--r--externals/grill/vasp/source/classes.cpp67
-rw-r--r--externals/grill/vasp/source/classes.h80
-rw-r--r--externals/grill/vasp/source/env.cpp15
-rw-r--r--externals/grill/vasp/source/env.h2
-rw-r--r--externals/grill/vasp/source/main.cpp5
-rw-r--r--externals/grill/vasp/source/main.h8
-rwxr-xr-xexternals/grill/vasp/source/obj_chns.cpp5
-rw-r--r--externals/grill/vasp/source/obj_frames.cpp12
-rw-r--r--externals/grill/vasp/source/obj_imm.cpp7
-rw-r--r--externals/grill/vasp/source/obj_offs.cpp6
-rw-r--r--externals/grill/vasp/source/obj_part.cpp14
-rw-r--r--externals/grill/vasp/source/obj_peaks.cpp5
-rw-r--r--externals/grill/vasp/source/obj_q.cpp3
-rw-r--r--externals/grill/vasp/source/obj_radio.cpp3
-rw-r--r--externals/grill/vasp/source/obj_size.cpp13
-rw-r--r--externals/grill/vasp/source/obj_split.cpp5
-rw-r--r--externals/grill/vasp/source/obj_sync.cpp2
-rw-r--r--externals/grill/vasp/source/obj_vasp.cpp4
-rw-r--r--externals/grill/vasp/source/obj_vecs.cpp6
-rw-r--r--externals/grill/vasp/source/opbase.cpp1
-rw-r--r--externals/grill/vasp/source/opparam.cpp11
-rw-r--r--externals/grill/vasp/source/ops_arith.cpp1
-rw-r--r--externals/grill/vasp/source/ops_assign.cpp7
-rw-r--r--externals/grill/vasp/source/ops_carith.cpp1
-rw-r--r--externals/grill/vasp/source/ops_cmp.cpp1
-rw-r--r--externals/grill/vasp/source/ops_cplx.cpp1
-rw-r--r--externals/grill/vasp/source/ops_dft.cpp1
-rw-r--r--externals/grill/vasp/source/ops_feature.cpp11
-rw-r--r--externals/grill/vasp/source/ops_flt.cpp1
-rw-r--r--externals/grill/vasp/source/ops_gate.cpp1
-rw-r--r--externals/grill/vasp/source/ops_gen.cpp1
-rw-r--r--externals/grill/vasp/source/ops_qminmax.cpp1
-rw-r--r--externals/grill/vasp/source/ops_rearr.cpp11
-rw-r--r--externals/grill/vasp/source/ops_resmp.cpp12
-rw-r--r--externals/grill/vasp/source/ops_search.cpp12
-rw-r--r--externals/grill/vasp/source/ops_trnsc.cpp1
-rw-r--r--externals/grill/vasp/source/ops_wnd.cpp1
-rw-r--r--externals/grill/vasp/source/opvecs.cpp1
-rw-r--r--externals/grill/vasp/source/util.cpp11
-rw-r--r--externals/grill/vasp/source/vasp.cpp24
-rw-r--r--externals/grill/vasp/source/vasp.h4
-rw-r--r--externals/grill/vasp/source/vbuffer.cpp11
-rw-r--r--externals/grill/vasp/source/vecblk.cpp11
-rw-r--r--externals/grill/vasp/vasp.cwbin142172 -> 142172 bytes
-rw-r--r--externals/grill/vasp/vasp.dsp8
-rw-r--r--externals/grill/xsample/readme.txt2
-rw-r--r--externals/grill/xsample/source/groove.cpp12
-rw-r--r--externals/grill/xsample/source/main.cpp8
-rw-r--r--externals/grill/xsample/source/main.h6
-rw-r--r--externals/grill/xsample/source/play.cpp12
-rw-r--r--externals/grill/xsample/source/record.cpp12
-rw-r--r--externals/grill/xsample/source/xsample.dsp12
116 files changed, 972 insertions, 665 deletions
diff --git a/externals/grill/deljoin/deljoin.dsp b/externals/grill/deljoin/deljoin.dsp
index d26f95ce..b40b6189 100644
--- a/externals/grill/deljoin/deljoin.dsp
+++ b/externals/grill/deljoin/deljoin.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" /D "DELJOIN_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -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" /D "DELJOIN_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\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 /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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/delsplit/delsplit.dsp b/externals/grill/delsplit/delsplit.dsp
index 66657bcb..f8e2da93 100644
--- a/externals/grill/delsplit/delsplit.dsp
+++ b/externals/grill/delsplit/delsplit.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" /D "DELSPLIT_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -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" /D "DELSPLIT_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\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 /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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/flext.cw b/externals/grill/flext/flext.cw
index 8c9bbb41..460009be 100644
--- a/externals/grill/flext/flext.cw
+++ b/externals/grill/flext/flext.cw
Binary files differ
diff --git a/externals/grill/flext/flext.dsp b/externals/grill/flext/flext.dsp
index 54d1377b..1de1cb26 100644
--- a/externals/grill/flext/flext.dsp
+++ b/externals/grill/flext/flext.dsp
@@ -43,7 +43,7 @@ RSC=rc.exe
# PROP Intermediate_Dir "pd-msvc\s"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /YX /FD /c
-# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "NOPTHREAD" /YX /FD /c
+# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /YX"flext.h" /FD /c
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
# ADD RSC /l 0xc07 /d "NDEBUG"
BSC32=bscmake.exe
@@ -66,7 +66,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "pd-msvc\sd"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GX /ZI /Od /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "NOPTHREAD" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /FR /YX"flext.h" /FD /GZ /c
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
# ADD RSC /l 0xc07 /d "_DEBUG"
BSC32=bscmake.exe
@@ -89,7 +89,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "pd-msvc\td"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "_DEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /FR /YX"flext.h" /FD /GZ /c
# ADD BASE RSC /l 0xc07 /d "_DEBUG"
# ADD RSC /l 0xc07 /d "_DEBUG"
BSC32=bscmake.exe
@@ -112,7 +112,7 @@ LIB32=link.exe -lib
# PROP Intermediate_Dir "pd-msvc\t"
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "." /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\packs\sndobj\include" /D "WIN32" /D "NDEBUG" /D "_MBCS" /D "_LIB" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /YX"flext.h" /FD /c
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
# ADD RSC /l 0xc07 /d "NDEBUG"
BSC32=bscmake.exe
@@ -212,6 +212,10 @@ SOURCE=.\source\flout.cpp
# End Source File
# Begin Source File
+SOURCE=.\source\flprefix.h
+# End Source File
+# Begin Source File
+
SOURCE=.\source\flsndobj.cpp
# End Source File
# Begin Source File
diff --git a/externals/grill/flext/make-files.txt b/externals/grill/flext/make-files.txt
index 623cd1f9..cb60d388 100644
--- a/externals/grill/flext/make-files.txt
+++ b/externals/grill/flext/make-files.txt
@@ -1,5 +1,5 @@
SRCS=flbase.cpp flext.cpp flbuf.cpp fldsp.cpp fllib.cpp flxlet.cpp flattr.cpp flsupport.cpp \
flutil.cpp flatom.cpp flatom_pr.cpp flthr.cpp flout.cpp
-HDRS=flstdc.h flbase.h flclass.h fldefs.h flext.h flsupport.h fldsp.h flinternal.h
+HDRS=flprefix.h flstdc.h flbase.h flclass.h fldefs.h flext.h flsupport.h fldsp.h flinternal.h
SRCS_SNDOBJ=flsndobj.cpp
HDRS_SNDOBJ=flsndobj.h
diff --git a/externals/grill/flext/make-inc.pd-msvc b/externals/grill/flext/make-inc.pd-msvc
index 56870d42..04ade4a2 100644
--- a/externals/grill/flext/make-inc.pd-msvc
+++ b/externals/grill/flext/make-inc.pd-msvc
@@ -17,7 +17,7 @@ INCPATH=$(INCPATH) /I$(SNDOBJ)
!endif
# compiler definitions and flags
-DEFS=/DPD /DNT
+DEFS=/DFLEXT_SYS=2
CFLAGS=/GR- /GX- /GD /G6
OFLAGS=/Ox
diff --git a/externals/grill/flext/makefile.pd-bcc b/externals/grill/flext/makefile.pd-bcc
index 4f67e07b..eece2120 100644
--- a/externals/grill/flext/makefile.pd-bcc
+++ b/externals/grill/flext/makefile.pd-bcc
@@ -26,7 +26,7 @@ INCPATH=$(INCPATH) -I$(SNDOBJ)
!endif
# compiler definitions and flags
-DEFS=-DPD -DNT -DNOPTHREAD
+DEFS=-DFLEXT_SYS=2
CFLAGS=-6 -O2 -OS -ff -tWD
diff --git a/externals/grill/flext/makefile.pd-cygwin b/externals/grill/flext/makefile.pd-cygwin
index 0c3c503f..5209c02c 100644
--- a/externals/grill/flext/makefile.pd-cygwin
+++ b/externals/grill/flext/makefile.pd-cygwin
@@ -18,7 +18,7 @@ include $(CONFIG)
# compiler+linker stuff
INCLUDES=$(PDPATH)/src $(SNDOBJ)
-FLAGS=-DPD -DNT -DNOPTHREAD
+FLAGS=-DFLEXT_SYS=2
CFLAGS=-O6 -mcpu=pentiumpro
CFLAGS_D=-mcpu=pentiumpro -g
CFLAGS_T=-DFLEXT_THREADS
diff --git a/externals/grill/flext/makefile.pd-darwin b/externals/grill/flext/makefile.pd-darwin
index 71aa0e31..d2b94560 100644
--- a/externals/grill/flext/makefile.pd-darwin
+++ b/externals/grill/flext/makefile.pd-darwin
@@ -14,7 +14,7 @@ include $(CONFIG)
# compiler+linker stuff
INCLUDES=$(PDPATH) $(SNDOBJ)
-FLAGS=-DPD -Dunix -DMACOSX -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes # -maltivec
+FLAGS=-DFLEXT_SYS=2 -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes # -maltivec
CFLAGS=-O6
CFLAGS_D=-g -Wshadow
CFLAGS_T=-DFLEXT_THREADS
diff --git a/externals/grill/flext/makefile.pd-linux b/externals/grill/flext/makefile.pd-linux
index 373ab895..21863ab3 100644
--- a/externals/grill/flext/makefile.pd-linux
+++ b/externals/grill/flext/makefile.pd-linux
@@ -14,7 +14,7 @@ include $(CONFIG)
# compiler+linker stuff
INCLUDES=$(PDPATH) $(SNDOBJ)
-FLAGS=-DPD
+FLAGS=-DFLEXT_SYS=2
CFLAGS=-O6 -mcpu=pentiumpro
CFLAGS_D=-mcpu=pentiumpro -g
CFLAGS_T=-DFLEXT_THREADS
diff --git a/externals/grill/flext/readme.txt b/externals/grill/flext/readme.txt
index e877acc0..a0dd1df7 100644
--- a/externals/grill/flext/readme.txt
+++ b/externals/grill/flext/readme.txt
@@ -97,8 +97,12 @@ Version history:
0.4.1:
- fixed crash issue in flext_dsp when there are NO signal inlets or outlets defined
(this is possibly only a problem for the signal2 tutorial example)
-- added flext::GetType(t_atom &)
-- added flext::ZeroMem
+- added flext::GetType(t_atom &), flext::ZeroMem
+- put the clock_delay for the message queue inside the thread-locked area
+- BACKWARDS-INCOMPATIBLE CHANGE: flext_base::m_methodmain and flext_base::m_method_ have got
+ const modifiers.... these virtual methods are used rarely (except for example in py/pyext)
+- now MUCH cleaner platform identification... FLEXT_SYS,FLEXT_OS,FLEXT_CPU definitions
+- also FLEXT_DEBUG for debug build
0.4.0:
- the use of the const keyword is enforced (e.g. the preferred type for symbols is now "const t_symbol *")
diff --git a/externals/grill/flext/source/flatom.cpp b/externals/grill/flext/source/flatom.cpp
index b7ba4524..0efb79f4 100644
--- a/externals/grill/flext/source/flatom.cpp
+++ b/externals/grill/flext/source/flatom.cpp
@@ -14,6 +14,13 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
+t_atom *flext::CopyList(int argc,const t_atom *argv)
+{
+ int i;
+ t_atom *dst = new t_atom[argc];
+ for(i = 0; i < argc; ++i) CopyAtom(dst+i,argv+i);
+ return dst;
+}
flext::AtomList::AtomList(int argc,const t_atom *argv):
cnt(0),lst(NULL)
diff --git a/externals/grill/flext/source/flatom_pr.cpp b/externals/grill/flext/source/flatom_pr.cpp
index 808f0543..44b43bbf 100644
--- a/externals/grill/flext/source/flatom_pr.cpp
+++ b/externals/grill/flext/source/flatom_pr.cpp
@@ -30,19 +30,19 @@ void flext::PrintAtom(const t_atom &a,char *buf)
case A_NULL:
break;
case A_FLOAT:
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
if(a.a_w.w_float == (int)a.a_w.w_float)
STD::sprintf(buf,"%i",(int)GetFloat(a));
else
#endif
STD::sprintf(buf,"%f",GetFloat(a));
break;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
case A_LONG:
STD::sprintf(buf,"%i",GetInt(a));
break;
#endif
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
case A_POINTER:
STD::sprintf(buf,"%x",GetPointer(a));
break;
@@ -50,7 +50,7 @@ void flext::PrintAtom(const t_atom &a,char *buf)
case A_SYMBOL:
strcpy(buf,GetString(a));
break;
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
default:
ERRINTERNAL();
#endif
@@ -76,7 +76,7 @@ bool flext::ScanAtom(t_atom &a,const char *buf)
switch(s) {
case 0: // integer
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
SetInt(a,atol(tmp));
break;
#endif
diff --git a/externals/grill/flext/source/flattr.cpp b/externals/grill/flext/source/flattr.cpp
index 2739ae11..44dc0d28 100644
--- a/externals/grill/flext/source/flattr.cpp
+++ b/externals/grill/flext/source/flattr.cpp
@@ -15,7 +15,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
#include <string.h>
-#ifdef MAXMSP
+#ifdef __MWERKS__
#define STD std
#else
#define STD
diff --git a/externals/grill/flext/source/flbase.cpp b/externals/grill/flext/source/flbase.cpp
index 5a2e5f0a..b321fbf1 100644
--- a/externals/grill/flext/source/flbase.cpp
+++ b/externals/grill/flext/source/flbase.cpp
@@ -14,7 +14,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\remark This is all derived from GEM by Mark Danks
*/
-#include "flbase.h"
+#include "flext.h"
#include "flinternal.h"
#include <string.h>
@@ -41,9 +41,9 @@ flext_obj :: flext_obj()
, procattr(m_holdattr)
, init_ok(true)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
m_canvas = canvas_getcurrent();
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
m_canvas = (t_patcher *)gensym("#P")->s_thing;
x_obj->curinlet = 0;
#endif
@@ -58,7 +58,7 @@ flext_obj :: ~flext_obj() {}
void flext_obj::DefineHelp(t_class *c,const char *ref,const char *dir,bool addtilde)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
char tmp[256];
if(dir) {
strcpy(tmp,dir);
@@ -70,7 +70,7 @@ void flext_obj::DefineHelp(t_class *c,const char *ref,const char *dir,bool addti
strcpy(tmp,ref);
::class_sethelpsymbol(c,gensym(const_cast<char *>(tmp)));
#else
- // no solution for MaxMSP yet
+ // no solution for Max/MSP yet
#endif
}
diff --git a/externals/grill/flext/source/flbase.h b/externals/grill/flext/source/flbase.h
index cf973a41..0c8e8e7e 100644
--- a/externals/grill/flext/source/flbase.h
+++ b/externals/grill/flext/source/flbase.h
@@ -44,13 +44,13 @@ struct FLEXT_EXT flext_hdr
*/
t_sigobj obj;
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
//! PD only: float signal holder for pd
float defsig;
#endif
-#if defined(MAXMSP)
- //! MaxMSP only: current inlet used by proxy objects
+#if FLEXT_SYS == FLEXT_SYS_MAX
+ //! Max/MSP only: current inlet used by proxy objects
long curinlet;
#endif
@@ -142,10 +142,10 @@ class flext_obj:
//! Get the class name (as a symbol)
const t_symbol *thisNameSym() const { return m_name; }
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
//! Get the class pointer
t_class *thisClass() { return (t_class *)((t_object *)(x_obj))->te_g.g_pd; }
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
//! Get the class pointer
t_class *thisClass() { return (t_class *)(((t_tinyobject *)x_obj)->t_messlist-1); }
#endif
@@ -159,7 +159,7 @@ class flext_obj:
*/
/*! Overloaded new memory allocation method
- \warning MaxMSP (or MacOS) allows only 16K in overdrive mode!
+ \warning Max/MSP (or MacOS) allows only 16K in overdrive mode!
*/
void *operator new(size_t bytes);
//! Overloaded delete method
@@ -276,6 +276,10 @@ class flext_obj:
#define FLEXT_ATTRIBUTES \
\
0
+
+
+#elif FLEXT_ATTRIBUTES != 0 && FLEXT_ATTRIBUTES != 1
+#error "FLEXT_ATTRIBUTES must be 0 or 1"
#endif
// ----------------------------------------
@@ -337,10 +341,12 @@ cl##_tilde_setup()
// specify that to define the library itself
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
#define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT void NAME##_setup() { flext_obj::lib_init(#NAME,SETUPFUN,FLEXT_ATTRIBUTES); }
-#else // MAXMSP
+#elif FLEXT_SYS == FLEXT_SYS_MAX
#define REAL_LIB_SETUP(NAME,SETUPFUN) extern "C" FLEXT_EXT int main() { flext_obj::lib_init(#NAME,SETUPFUN,FLEXT_ATTRIBUTES); return 0; }
+#else
+#error
#endif
@@ -351,11 +357,14 @@ cl##_tilde_setup()
#define FLEXT_EXP_1
#define FLEXT_EXP(LIB) FLEXT_EXP_##LIB
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
#define FLEXT_OBJ_SETUP_0(NEW_CLASS,DSP)
-#else // MAXMSP
+#elif FLEXT_SYS == FLEXT_SYS_MAX
#define FLEXT_OBJ_SETUP_0(NEW_CLASS,DSP) extern "C" FLEXT_EXT int main() { FLEXT_STPF(NEW_CLASS,DSP)(); return 0; }
+#else
+#error
#endif
+
#define FLEXT_OBJ_SETUP_1(NEW_CLASS,DSP)
#define FLEXT_OBJ_SETUP(NEW_CLASS,DSP,LIB) FLEXT_OBJ_SETUP_##LIB(NEW_CLASS,DSP)
@@ -374,12 +383,14 @@ cl##_tilde_setup()
#define FLEXTTYPE_t_float A_FLOAT
#define CALLBTYPE_t_float t_float
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
#define FLEXTTYPE_int A_FLOAT
#define CALLBTYPE_int float
-#else
+#elif FLEXT_SYS == FLEXT_SYS_MAX
#define FLEXTTYPE_int A_INT
#define CALLBTYPE_int int
+#else
+#error
#endif
#define FLEXTTYPE_t_symptr A_SYMBOL
diff --git a/externals/grill/flext/source/flbuf.cpp b/externals/grill/flext/source/flbuf.cpp
index dc5704c0..91ac8ce6 100644
--- a/externals/grill/flext/source/flbuf.cpp
+++ b/externals/grill/flext/source/flbuf.cpp
@@ -14,11 +14,11 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
#include "flmspbuffer.h" // include inofficial buffer.h
#endif
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
#define DIRTY_INTERVAL 0 // buffer dirty check in msec
#endif
@@ -28,7 +28,7 @@ flext::buffer::buffer(const t_symbol *bn,bool delayed):
sym(NULL),data(NULL),
chns(0),frames(0)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
arr = NULL;
interval = DIRTY_INTERVAL;
isdirty = false;
@@ -41,7 +41,7 @@ flext::buffer::buffer(const t_symbol *bn,bool delayed):
flext::buffer::~buffer()
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
clock_free(tick);
#endif
}
@@ -64,7 +64,7 @@ int flext::buffer::Set(const t_symbol *s,bool nameonly)
if(valid) ret = -1;
}
else if(!nameonly) {
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
int frames1;
t_sample *data1;
@@ -88,7 +88,7 @@ int flext::buffer::Set(const t_symbol *s,bool nameonly)
if(data != data1) { data = data1; if(!ret) ret = 1; }
chns = 1;
}
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
if(sym->s_thing) {
const _buffer *p = (const _buffer *)sym->s_thing;
@@ -97,7 +97,7 @@ int flext::buffer::Set(const t_symbol *s,bool nameonly)
if(valid) ret = -1;
}
else {
-#ifdef DEBUG
+#ifdef FLEXT_DEBUG
post("%s: buffer object '%s' - valid:%i samples:%i channels:%i frames:%i",thisName(),bufname->s_name,p->b_valid,p->b_frames,p->b_nchans,p->b_frames);
#endif
if(data != p->b_samples) { data = p->b_samples; if(!ret) ret = 1; }
@@ -109,6 +109,8 @@ int flext::buffer::Set(const t_symbol *s,bool nameonly)
error("buffer: symbol '%s' not defined", sym->s_name);
if(valid) ret = -1;
}
+#else
+#error
#endif
}
@@ -119,7 +121,7 @@ bool flext::buffer::Update()
{
if(!Ok()) return false;
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
int frames1;
t_sample *data1;
if(!garray_getfloatarray(arr, &frames1, &data1)) {
@@ -135,7 +137,7 @@ bool flext::buffer::Update()
}
else
return false;
-#else // MAXMSP
+#elif FLEXT_SYS == FLEXT_SYS_MAX
if(!sym->s_thing)
return false;
else {
@@ -149,15 +151,17 @@ bool flext::buffer::Update()
else
return false;
}
+#else
+#error
#endif
}
void flext::buffer::Frames(int fr,bool keep)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
::garray_resize(arr,(float)fr);
Update();
-#else
+#elif FLEXT_SYS == FLEXT_SYS_MAX
t_sample *tmp = NULL;
int sz = frames;
if(fr < sz) sz = fr;
@@ -187,11 +191,13 @@ void flext::buffer::Frames(int fr,bool keep)
BlockMoveData(tmp,data,sizeof(t_sample)*sz);
delete[] tmp;
}
+#else
+#error
#endif
}
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
void flext::buffer::SetRefrIntv(float intv)
{
interval = intv;
@@ -200,15 +206,17 @@ void flext::buffer::SetRefrIntv(float intv)
ticking = false;
}
}
-#else
+#elif FLEXT_SYS == FLEXT_SYS_MAX
void flext::buffer::SetRefrIntv(float) {}
+#else
+#error
#endif
void flext::buffer::Dirty(bool force)
{
if(sym) {
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
if((!ticking) && (interval || force)) {
ticking = true;
cb_tick(this); // immediately redraw
@@ -217,7 +225,7 @@ void flext::buffer::Dirty(bool force)
if(force) clock_delay(tick,0);
isdirty = true;
}
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
if(sym->s_thing) {
_buffer *p = (_buffer *)sym->s_thing;
@@ -231,15 +239,17 @@ void flext::buffer::Dirty(bool force)
else {
error("buffer: symbol '%s' not defined",sym->s_name);
}
+#else
+#error
#endif
}
}
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
void flext::buffer::cb_tick(buffer *b)
{
if(b->arr) garray_redraw(b->arr);
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
else error("buffer: array is NULL");
#endif
diff --git a/externals/grill/flext/source/flclass.h b/externals/grill/flext/source/flclass.h
index 8c14e6b8..12efeb82 100644
--- a/externals/grill/flext/source/flclass.h
+++ b/externals/grill/flext/source/flclass.h
@@ -79,7 +79,7 @@ public:
//! called on patcher load (not on mere object creation!)
virtual void m_loadbang() {}
- //! quickhelp for inlets/outlets (gets called in MaxMSP only)
+ //! quickhelp for inlets/outlets (gets called in Max/MSP only)
virtual void m_assist(long /*msg*/,long /*arg*/,char * /*s*/) {}
/*! \brief Called for every incoming message.
@@ -87,12 +87,12 @@ public:
\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);
+ virtual bool m_methodmain(int inlet,const t_symbol *s,int argc,const t_atom *argv);
/*! \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);
+ virtual bool m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv);
//! @} FLEXT_C_VIRTUAL
@@ -325,10 +325,12 @@ public:
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
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(inlet,"float",(methfun)m,a_int,a_null); } // single float
-#else
+#elif FLEXT_SYS == FLEXT_SYS_MAX
void AddMethod(int inlet,bool (*m)(flext_base *,int &)) { AddMethod(inlet,"int",(methfun)m,a_int,a_null); } // single float
+#else
+#error
#endif
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
@@ -341,7 +343,7 @@ public:
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
+ //! Set Max/MSP style of distributing list elements over (message) inlets
void SetDist(bool d = true) { distmsgs = d; }
//! @} FLEXT_C_ADDMETHOD
@@ -353,7 +355,7 @@ public:
@{
*/
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
//! Bind object to a symbol
bool Bind(const t_symbol *s) { pd_bind(&thisHdr()->ob_pd,const_cast<t_symbol *>(s)); return true; }
//! Unbind object from a symbol
@@ -616,9 +618,9 @@ private:
float ft;
int it;
t_symbol *st;
- #ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
t_gpointer *pt;
- #endif
+#endif
void *vt;
};
@@ -665,7 +667,7 @@ private:
class qmsg;
qmsg *qhead,*qtail;
t_qelem *qclk;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
t_clock *yclk;
static void YTick(flext_base *th);
#endif
@@ -673,11 +675,11 @@ private:
static void QTick(flext_base *th);
void Queue(qmsg *m);
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
// proxy object (for additional inlets) stuff
struct px_object;
friend struct px_object;
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
typedef object px_object;
static void cb_px_float(t_class *c,float f);
static void cb_px_int(t_class *c,int v);
@@ -692,6 +694,8 @@ private:
static void cb_px_in7(t_class *c,int v);
static void cb_px_in8(t_class *c,int v);
static void cb_px_in9(t_class *c,int v);
+#else
+#error
#endif
static void cb_px_anything(t_class *c,const t_symbol *s,int argc,t_atom *argv);
@@ -712,7 +716,7 @@ private:
static void cb_help(t_class *c);
static void cb_loadbang(t_class *c);
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
static void cb_assist(t_class *c,void *b,long msg,long arg,char *s);
#endif
};
diff --git a/externals/grill/flext/source/flcwmax-x-thr.h b/externals/grill/flext/source/flcwmax-x-thr.h
index a5f105a2..205dbd1f 100755
--- a/externals/grill/flext/source/flcwmax-x-thr.h
+++ b/externals/grill/flext/source/flcwmax-x-thr.h
@@ -14,7 +14,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define _FLEXT_CW_MAX_X_THR_H
#define FLEXT_THREADS
-#define _POSIX_THREADS
/*
old CodeWarrior version (<= 6) don't have sigset_t defined which
diff --git a/externals/grill/flext/source/flcwmax.h b/externals/grill/flext/source/flcwmax.h
index 184803ff..d637d0cc 100644
--- a/externals/grill/flext/source/flcwmax.h
+++ b/externals/grill/flext/source/flcwmax.h
@@ -16,33 +16,17 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __MWERKS__
#error "This header file is for CodeWarrior only."
#endif
+
+#define FLEXT_SYS 1
#ifndef _CW_NOPRECOMP
#include <MacHeaders.h>
#endif
#if __option(sym) || !__option(opt_dead_code)
- #define _DEBUG
-#endif
-
-#ifdef MAXMSP
- #pragma message("#define MAXMSP is deprecated, use #define FLEXT_SYS_MAX instead")
-#else
- #define FLEXT_SYS_MAX
- // this is deprecated (but still necessary)
- #define MAXMSP
+ #define FLEXT_DEBUG
#endif
-#if __POWERPC__
- #define FLEXT_PLATFORM_MAC
-#elif __INTEL__
- #define FLEXT_PLATFORM_WIN
- // this is necessary for Cycling headers when compiling for Windows
- #define WIN_VERSION 1
-#else
- #error "Target platform not supported."
-#endif
-
/* #define _LOG */
#endif
diff --git a/externals/grill/flext/source/fldsp.cpp b/externals/grill/flext/source/fldsp.cpp
index d1079286..f5a5d94e 100644
--- a/externals/grill/flext/source/fldsp.cpp
+++ b/externals/grill/flext/source/fldsp.cpp
@@ -22,31 +22,31 @@ WARRANTIES, see the file, "license.txt," in this distribution.
void flext_dsp::Setup(t_class *c)
{
-#ifdef PD
-// CLASS_MAINSIGNALIN(c,flext_hdr,defsig);
-#elif defined(MAXMSP)
+#if FLEXT_SYS == FLEXT_SYS_MAX
// dsp_initclass();
dsp_initboxclass();
#endif
add_dsp(c,cb_dsp);
-#ifndef MAXMSP
- add_method1(c,cb_enable,"enable",A_FLINT);
+#if FLEXT_SYS != FLEXT_SYS_MAX
+ add_method1(c,cb_enable,"enable",A_FLOAT);
#endif
}
flext_dsp::flext_dsp():
-#ifndef MAXMSP
+#if FLEXT_SYS != FLEXT_SYS_MAX
dspon(true),
#endif
srate(sys_getsr()), // should we set it?
blksz(sys_getblksize()),
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
chnsin(sys_get_inchannels()),
chnsout(sys_get_outchannels()),
-#else // MAXMSP
+#elif FLEXT_SYS == FLEXT_SYS_MAX
chnsin(sys_getch()),
chnsout(sys_getch()),
+#else
+#error
#endif
invecs(NULL),outvecs(NULL)
{}
@@ -62,7 +62,7 @@ flext_dsp::~flext_dsp()
t_int *flext_dsp::dspmeth(t_int *w)
{
flext_dsp *obj = (flext_dsp *)w[1];
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
if(!obj->thisHdr()->z_disabled)
#else
if(obj->dspon)
@@ -73,10 +73,10 @@ t_int *flext_dsp::dspmeth(t_int *w)
void flext_dsp::m_dsp(int /*n*/,t_sample *const * /*insigs*/,t_sample *const * /*outsigs*/) {}
-void flext_dsp::m_signal(int n,t_sample *const * /*insigs*/,t_sample *const *outsigs)
+void flext_dsp::m_signal(int n,t_sample *const * /*insigs*/,t_sample *const *outs)
{
for(int i = 0; i < CntOutSig(); ++i)
- memset(outsigs[i],0,n*sizeof(*outsigs[i]));
+ memset(outs[i],0,n*sizeof(*outs[i]));
}
void flext_dsp::cb_dsp(t_class *c,t_signal **sp)
@@ -89,11 +89,13 @@ void flext_dsp::cb_dsp(t_class *c,t_signal **sp)
obj->srate = sp[0]->s_sr;
obj->blksz = sp[0]->s_n; // is this guaranteed to be the same as sys_getblksize() ?
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
obj->chnsin = sys_get_inchannels();
obj->chnsout = sys_get_outchannels();
-#else // MAXMSP
+#elif FLEXT_SYS == FLEXT_SYS_MAX
obj->chnsin = obj->chnsout = sys_getch();
+#else
+#error
#endif
// store in and out signal vectors
@@ -113,8 +115,8 @@ void flext_dsp::cb_dsp(t_class *c,t_signal **sp)
dsp_add((t_dspmethod)dspmeth,2,obj,sp[0]->s_n);
}
-#ifndef MAXMSP
-void flext_dsp::cb_enable(t_class *c,t_flint on) { thisObject(c)->m_enable(on != 0); }
+#if FLEXT_SYS != FLEXT_SYS_MAX
+void flext_dsp::cb_enable(t_class *c,t_float on) { thisObject(c)->m_enable(on != 0); }
void flext_dsp::m_enable(bool en) { dspon = en; }
#endif
diff --git a/externals/grill/flext/source/fldsp.h b/externals/grill/flext/source/fldsp.h
index 56959c72..b1fbe23d 100644
--- a/externals/grill/flext/source/fldsp.h
+++ b/externals/grill/flext/source/fldsp.h
@@ -83,9 +83,9 @@ public:
*/
virtual void m_signal(int n,t_sample *const *insigs,t_sample *const *outsigs);
-#ifndef MAXMSP
+#if FLEXT_SYS != FLEXT_SYS_MAX
/*! \brief called with "enable" message: pauses/resumes dsp
- \note PD only - implicitely defined in MaxMSP
+ \note PD only - implicitely defined in Max/MSP
*/
virtual void m_enable(bool on);
#endif
@@ -132,8 +132,8 @@ private:
// callback functions
static void cb_dsp(t_class *c,t_signal **s);
-#ifndef MAXMSP
- static void cb_enable(t_class *c,t_flint on);
+#if FLEXT_SYS != FLEXT_SYS_MAX
+ static void cb_enable(t_class *c,t_float on);
bool dspon;
#endif
diff --git a/externals/grill/flext/source/flext.cpp b/externals/grill/flext/source/flext.cpp
index 85f3da6e..dedf7c49 100644
--- a/externals/grill/flext/source/flext.cpp
+++ b/externals/grill/flext/source/flext.cpp
@@ -20,7 +20,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
// === proxy class for flext_base ============================
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
static t_class *px_class;
@@ -54,7 +54,7 @@ void flext_base::cb_px_ft ## IX(t_class *c,float v) { \
#define ADD_IN_FT(IX) \
add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT)
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
void flext_base::cb_px_anything(t_class *c,const t_symbol *s,int argc,t_atom *argv)
{
@@ -97,7 +97,9 @@ void flext_base::cb_px_ft ## IX(t_class *c,float v) { long &ci = ((flext_hdr *)t
add_method1(c,cb_px_in ## IX,"in" #IX,A_INT); \
add_method1(c,cb_px_ft ## IX,"ft" #IX,A_FLOAT)
-#endif // MAXMSP
+#else
+#error // Other system
+#endif
DEF_IN_FT(1)
@@ -135,7 +137,7 @@ flext_base::flext_base():
#endif
qhead = qtail = NULL;
qclk = (t_qelem *)(qelem_new(this,(t_method)QTick));
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
yclk = (t_clock *)(clock_new(this,(t_method)YTick));
#endif
@@ -149,7 +151,7 @@ flext_base::~flext_base()
shouldexit = true;
for(int wi = 0; thrhead && wi < 100; ++wi) Sleep(0.01f);
-#ifdef _POSIX_THREADS
+//#ifdef _POSIX_THREADS
qmutex.Lock(); // Lock message queue
tlmutex.Lock();
// timeout -> hard termination
@@ -161,16 +163,16 @@ flext_base::~flext_base()
}
tlmutex.Unlock();
qmutex.Unlock();
-#else
-#pragma message ("No tread cancelling")
-#endif
+//#else
+//#pragma message ("No tread cancelling")
+//#endif
#endif
// send remaining pending messages
while(qhead) QTick(this);
qelem_free((t_qelem *)qclk);
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
clock_free((object *)yclk);
#endif
@@ -181,16 +183,16 @@ flext_base::~flext_base()
if(inlets) {
for(int ix = 0; ix < incnt; ++ix)
if(inlets[ix]) {
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
pd_free(&inlets[ix]->obj.ob_pd);
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
freeobject((object *)inlets[ix]);
#endif
}
delete[] inlets;
}
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
// if(insigs) dsp_free(thisHdr());
if(insigs) dsp_freebox(thisHdr());
#endif
@@ -203,30 +205,13 @@ flext_base::~flext_base()
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 Creation of inlets/outlets can't be done upon declaration, as Max/MSP needs creation
\remark in reverse.
*/
bool flext_base::Init()
{
-// if(!flext_obj::Init()) return false;
-
bool ok = true;
-/*
- if(inlets) {
- for(int ix = 0; ix < incnt; ++ix)
- if(inlets[ix]) {
-#ifdef PD
- pd_free(&inlets[ix]->obj.ob_pd);
-#elif defined(MAXMSP)
- freeobject(inlets[ix]);
-#endif
- }
- delete[] inlets;
- inlets = NULL;
- }
-*/
-
// ----------------------------------
// create inlets
// ----------------------------------
@@ -246,7 +231,7 @@ bool flext_base::Init()
for(i = 0; i < incnt; ++i) inlets[i] = NULL;
// type info is now in list array
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
{
int cnt = 0;
@@ -317,7 +302,7 @@ bool flext_base::Init()
incnt = cnt;
}
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
{
int ix,cnt;
// count leftmost signal inlets
@@ -370,6 +355,8 @@ bool flext_base::Init()
// dsp_setup(thisHdr(),insigs); // signal inlets
dsp_setupbox(thisHdr(),insigs); // signal inlets
}
+#else
+#error
#endif
delete[] list;
@@ -384,8 +371,8 @@ bool flext_base::Init()
outcnt = outsigs = 0;
-#ifdef MAXMSP
- // for MAXMSP the rightmost outlet has to be created first
+#if FLEXT_SYS == FLEXT_SYS_MAX
+ // for Max/MSP the rightmost outlet has to be created first
if(procattr)
outattr = (outlet *)newout_anything(&x_obj->obj);
#endif
@@ -405,10 +392,12 @@ bool flext_base::Init()
outlets = new outlet *[outcnt];
// type info is now in list array
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
for(int ix = 0; ix < outcnt; ++ix)
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
for(int ix = outcnt-1; ix >= 0; --ix)
+#else
+#error
#endif
{
switch(list[ix]) {
@@ -431,7 +420,7 @@ bool flext_base::Init()
case xlet::tp_any:
outlets[ix] = (outlet *)newout_anything(&x_obj->obj);
break;
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
default:
ERRINTERNAL();
ok = false;
@@ -443,7 +432,7 @@ bool flext_base::Init()
}
if(procattr) {
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
// attribute dump outlet is the last one
outattr = (outlet *)newout_anything(&x_obj->obj);
#endif
@@ -464,21 +453,23 @@ void flext_base::Setup(t_class *c)
{
add_method(c,cb_help,"help");
add_loadbang(c,cb_loadbang);
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
add_assist(c,cb_assist);
#endif
// proxy for extra inlets
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
add_anything(c,cb_px_anything); // for leftmost inlet
px_class = class_new(gensym("flext_base proxy"),NULL,NULL,sizeof(px_object),CLASS_PD|CLASS_NOINLET, A_NULL);
add_anything(px_class,px_object::px_method); // for other inlets
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
add_bang(c,cb_px_bang);
add_method1(c,cb_px_int,"int",A_INT);
add_method1(c,cb_px_float,"float",A_FLOAT);
add_methodG(c,cb_px_anything,"list");
add_anything(c,cb_px_anything);
+#else
+#error
#endif
// setup non-leftmost ints and floats
@@ -496,7 +487,7 @@ void flext_base::Setup(t_class *c)
void flext_base::cb_help(t_class *c) { thisObject(c)->m_help(); }
void flext_base::cb_loadbang(t_class *c) { thisObject(c)->m_loadbang(); }
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
void flext_base::cb_assist(t_class *c,void * /*b*/,long msg,long arg,char *s) { thisObject(c)->m_assist(msg,arg,s); }
#endif
@@ -509,7 +500,7 @@ void flext_base::m_help()
/*! \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)
+bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,const t_atom *argv)
{
static bool trap = false;
bool ret = false;
@@ -524,10 +515,10 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
LOG4("found method tag %s: inlet=%i, symbol=%s, argc=%i",m->tag->s_name,inlet,s->s_name,argc);
if(m->argc == 1 && m->args[0] == a_list) {
- ret = ((methfun_V)m->fun)(this,argc,argv);
+ ret = ((methfun_V)m->fun)(this,argc,const_cast<t_atom *>(argv));
}
else if(m->argc == 1 && m->args[0] == a_any) {
- ret = ((methfun_A)m->fun)(this,s,argc,argv);
+ ret = ((methfun_A)m->fun)(this,s,argc,const_cast<t_atom *>(argv));
}
else if(argc == m->argc) {
int ix;
@@ -558,7 +549,7 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
if(ok) LOG2("symbol arg %i = %s",ix,GetString(aargs[ix].st));
break;
}
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
case a_pointer: {
if(IsPointer(argv[ix])) aargs[ix].pt = GetPointer(argv[ix]);
else ok = false;
@@ -594,11 +585,11 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
// any
LOG4("found any method for %s: inlet=%i, symbol=%s, argc=%i",m->tag->s_name,inlet,s->s_name,argc);
- ret = ((methfun_A)m->fun)(this,s,argc,argv);
+ ret = ((methfun_A)m->fun)(this,s,argc,const_cast<t_atom *>(argv));
}
}
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
// If float message is not explicitly handled: try int handler instead
if(!ret && argc == 1 && s == sym_float && !trap) {
t_atom fl;
@@ -620,14 +611,14 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
// If float or int message is not explicitly handled: try list handler instead
if(!ret && !trap && argc == 1 && (s == sym_float
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
|| s == sym_int
#endif
)) {
t_atom list;
if(s == sym_float)
SetFloat(list,GetFloat(argv[0]));
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
else if(s == sym_int)
SetInt(list,GetInt(argv[0]));
#endif
@@ -655,7 +646,7 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
if(IsFloat(argv[i])) sym = sym_float;
else if(IsInt(argv[i])) sym = sym_int;
else if(IsSymbol(argv[i])) sym = sym_symbol;
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
else if(IsPointer(argv[i])) sym = sym_pointer; // can pointer atoms occur here?
#endif
if(sym) {
@@ -675,9 +666,9 @@ bool flext_base::m_methodmain(int inlet,const t_symbol *s,int argc,t_atom *argv)
return ret; // true if appropriate handler was found and called
}
-bool flext_base::m_method_(int inlet,const t_symbol *s,int argc,t_atom *argv)
+bool flext_base::m_method_(int inlet,const t_symbol *s,int argc,const t_atom *argv)
{
-//#ifdef _DEBUG
+//#ifdef FLEXT_DEBUG
post("%s: message unhandled - inlet:%i args:%i symbol:%s",thisName(),inlet,argc,s?s->s_name:"");
//#endif
return false;
@@ -763,12 +754,12 @@ void flext_base::AddMethod(int inlet,const char *tag,methfun fun,metharg tp,...)
va_start(marker,tp);
metharg a = tp;
for(int ix = 0; ix < argc; ++ix) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
if(a == a_list && ix > 0) {
ERRINTERNAL();
}
#endif
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
if(a == a_pointer && flext_base::compatibility) {
post("Pointer arguments are not allowed in compatibility mode");
}
diff --git a/externals/grill/flext/source/flext.h b/externals/grill/flext/source/flext.h
index 4933c91d..1e72daa5 100644
--- a/externals/grill/flext/source/flext.h
+++ b/externals/grill/flext/source/flext.h
@@ -30,14 +30,17 @@ WARRANTIES, see the file, "license.txt," in this distribution.
//! @}
+
+// determine System/OS/CPU
+#include "flprefix.h"
+
#ifdef FLEXT_THREADS
extern "C" {
-#include <pthread.h>
-#include <sched.h>
+ #include <pthread.h>
+ #include <sched.h>
}
#endif
-
// include all the flext interface definitions
#include "fldefs.h"
diff --git a/externals/grill/flext/source/flinternal.h b/externals/grill/flext/source/flinternal.h
index 6df1129c..09b8cbd1 100644
--- a/externals/grill/flext/source/flinternal.h
+++ b/externals/grill/flext/source/flinternal.h
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Definitions for internal flext usage
\internal
- Here, a few shortcuts for common MaxMSP or PD library calls and type definitions
+ Here, a few shortcuts for common Max/MSP or PD library calls and type definitions
are declared
*/
@@ -22,7 +22,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flstdc.h"
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
#define object_new(clss) pd_new(clss)
#define object_free(obj) pd_free(&(obj).ob_pd)
@@ -62,7 +62,8 @@ typedef t_perfroutine t_dspmethod;
#define qelem_set clock_set
#define qelem_unset clock_unset
-#elif defined(MAXMSP)
+
+#elif FLEXT_SYS == FLEXT_SYS_MAX
/*
typedef void _inlet;
diff --git a/externals/grill/flext/source/fllib.cpp b/externals/grill/flext/source/fllib.cpp
index 3328ac9b..2f4e8e59 100755
--- a/externals/grill/flext/source/fllib.cpp
+++ b/externals/grill/flext/source/fllib.cpp
@@ -19,11 +19,16 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define ALIASDEL ','
#define ALIASSLASHES ":/\\"
-#ifdef MAXMSP
+#if FLEXT_OS == FLEXT_OS_MACOS
#define ALIASSLASH ':'
-#elif defined(NT)
- #define ALIASSLASH '/'
+#elif FLEXT_OS == FLEXT_OS_WIN
+ #if FLEXT_SYS == FLEXT_SYS_PD
+ #define ALIASSLASH '/'
+ #else
+ #error "Undefined"
+ #endif
#else
+ // default to "/"
#define ALIASSLASH '/'
#endif
@@ -146,16 +151,16 @@ libname *libname::find(const t_symbol *s) {
return l;
}
-// for MAXMSP, the library is represented by a special object (class) registered at startup
+// for Max/MSP, the library is represented by a special object (class) registered at startup
// all objects in the library are clones of that library object - they share the same class
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
static t_class *lib_class = NULL;
static const t_symbol *lib_name = NULL;
#endif
void flext_obj::lib_init(const char *name,void setupfun(),bool attr)
{
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
lib_name = MakeSymbol(name);
::setup(
(t_messlist **)&lib_class,
@@ -171,7 +176,7 @@ void flext_obj::obj_add(bool lib,bool dsp,bool attr,const char *idname,const cha
// get first possible object name
const t_symbol *nsym = MakeSymbol(extract(names));
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
if(dsp) chktilde(GetString(nsym));
#endif
@@ -179,24 +184,26 @@ void flext_obj::obj_add(bool lib,bool dsp,bool attr,const char *idname,const cha
// set dynamic class pointer
t_class **cl =
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
lib?&lib_class:
#endif
new t_class *;
// register object class
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
*cl = ::class_new(
(t_symbol *)nsym,
(t_newmethod)obj_new,(t_method)obj_free,
sizeof(flext_hdr),0,A_GIMME,A_NULL);
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
if(!lib) {
::setup(
(t_messlist **)cl,
(t_newmethod)obj_new,(t_method)obj_free,
sizeof(flext_hdr),NULL,A_GIMME,A_NULL);
}
+#else
+#error
#endif
// make new dynamic object
@@ -241,15 +248,17 @@ void flext_obj::obj_add(bool lib,bool dsp,bool attr,const char *idname,const cha
libname *l = new libname(MakeSymbol(c),lo);
libname::add(l);
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
if(ix > 0)
// in PD the first name is already registered with class creation
::class_addcreator((t_newmethod)obj_new,(t_symbol *)l->name,A_GIMME,A_NULL);
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
if(ix > 0 || lib)
- // in MaxMSP the first alias gets its name from the name of the object file,
+ // in Max/MSP the first alias gets its name from the name of the object file,
// unless it is a library (then the name can be different)
::alias(const_cast<char *>(c));
+#else
+#error
#endif
}
@@ -275,14 +284,14 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv)
}
if(lo->argc >= 0) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
if(lo->argc > FLEXT_MAXNEWARGS) { ERRINTERNAL(); ok = false; }
#endif
if(argc == lo->argc) {
for(int i = 0; /*ok &&*/ i < lo->argc; ++i) {
switch(lo->argv[i]) {
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
case A_INT:
if(flext::IsInt(argv[i])) args[i] = argv[i];
else if(flext::IsFloat(argv[i])) flext::SetInt(args[i],(int)flext::GetFloat(argv[i]));
@@ -311,10 +320,12 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv)
}
if(ok) {
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
obj = (flext_hdr *)::pd_new(lo->clss);
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
obj = (flext_hdr *)::newobject(lo->clss);
+#else
+#error
#endif
flext_obj::m_holder = obj;
flext_obj::m_holdname = l->name;
@@ -331,7 +342,7 @@ 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 &&
+ ok = obj->data &&
// check constructor exit flag
obj->data->InitOk();
@@ -354,10 +365,10 @@ flext_hdr *flext_obj::obj_new(const t_symbol *s,int _argc_,t_atom *argv)
}
}
}
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
else
-#ifdef MAXMSP
- // in MaxMSP an object with the name of the library exists, even if not explicitely declared!
+#if FLEXT_SYS == FLEXT_SYS_MAX
+ // in Max/MSP an object with the name of the library exists, even if not explicitely declared!
if(s != lib_name)
#endif
error("Class %s not found in library!",s->s_name);
@@ -378,10 +389,10 @@ void flext_obj::obj_free(flext_hdr *hdr)
// now call object destructor and deallocate
l->obj->freefun(hdr);
}
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
else
-#ifdef MAXMSP
- // in MaxMSP an object with the name of the library exists, even if not explicitely declared!
+#if FLEXT_SYS == FLEXT_SYS_MAX
+ // in Max/MSP an object with the name of the library exists, even if not explicitely declared!
if(name != lib_name)
#endif
error("Class %s not found in library!",name);
diff --git a/externals/grill/flext/source/flmspbuffer.h b/externals/grill/flext/source/flmspbuffer.h
index 4a8ffe69..9a18499d 100755
--- a/externals/grill/flext/source/flmspbuffer.h
+++ b/externals/grill/flext/source/flmspbuffer.h
@@ -16,7 +16,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
The latter is not easily found so i included the original file buffer.h with flext
*/
-#if defined(MAXMSP) && !defined(__FLEXT_MSPBUFFER_H)
+#if (FLEXT_SYS == FLEXT_SYS_MAX) && !defined(__FLEXT_MSPBUFFER_H)
#define __FLEXT_MSPBUFFER_H
enum {
diff --git a/externals/grill/flext/source/flout.cpp b/externals/grill/flext/source/flout.cpp
index db225bd5..16a6ea29 100644
--- a/externals/grill/flext/source/flout.cpp
+++ b/externals/grill/flext/source/flout.cpp
@@ -16,7 +16,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flinternal.h"
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
#define CRITON() short state = lockout_set(1)
#define CRITOFF() lockout_set(state)
#else
@@ -92,7 +92,7 @@ void flext_base::qmsg::Add(qmsg *o)
}
*/
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
void flext_base::YTick(flext_base *th)
{
clock_delay(th->yclk,0);
@@ -105,20 +105,21 @@ void flext_base::YTick(flext_base *th)
void flext_base::QTick(flext_base *th)
{
-#ifdef DEBUG
+#ifdef FLEXT_THREADS
+
+#ifdef FLEXT_DEBUG
if(!th->IsSystemThread()) {
error("flext - Queue tick called by wrong thread!");
return;
}
#endif
-#ifdef FLEXT_THREADS
th->qmutex.Lock();
#endif
while(th->qhead) {
qmsg *m = th->qhead;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
short state = lockout_set(1);
#endif
@@ -129,12 +130,12 @@ void flext_base::QTick(flext_base *th)
case qmsg::tp_sym: th->ToOutSymbol(m->out,m->_sym); break;
case qmsg::tp_list: th->ToOutList(m->out,m->_list.argc,m->_list.argv); break;
case qmsg::tp_any: th->ToOutAnything(m->out,m->_any.s,m->_any.argc,m->_any.argv); break;
-#ifdef DEBUG
+#ifdef FLEXT_DEBUG
default: ERRINTERNAL();
#endif
}
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
lockout_set(state);
#endif
@@ -156,15 +157,16 @@ void flext_base::Queue(qmsg *m)
if(qtail) qtail->nxt = m;
else qhead = m;
qtail = m;
-#ifdef FLEXT_THREADS
- qmutex.Unlock();
-#endif
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
clock_delay(qclk,0);
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
clock_delay(yclk,0);
#else
- #error "To implement!"
+#error
+#endif
+
+#ifdef FLEXT_THREADS
+ qmutex.Unlock();
#endif
}
diff --git a/externals/grill/flext/source/flprefix.h b/externals/grill/flext/source/flprefix.h
index 973a6966..34debe69 100755
--- a/externals/grill/flext/source/flprefix.h
+++ b/externals/grill/flext/source/flprefix.h
@@ -23,32 +23,36 @@ WARRANTIES, see the file, "license.txt," in this distribution.
// definitions for FLEXT_OS
#define FLEXT_OS_UNKNOWN 0
#define FLEXT_OS_WIN 1
-#define FLEXT_OS_MACOS9 2
-#define FLEXT_OS_MACOSX 3
-#define FLEXT_OS_LINUX 4
-#define FLEXT_OS_IRIX 5
+#define FLEXT_OS_MACOS 2
+#define FLEXT_OS_LINUX 3
+#define FLEXT_OS_IRIX 4
// definitions for FLEXT_CPU
#define FLEXT_CPU_UNKNOWN 0
#define FLEXT_CPU_INTEL 1
#define FLEXT_CPU_PPC 2
#define FLEXT_CPU_MIPS 3
+#define FLEXT_CPU_ALPHA 4
+
// Old definitions
#if defined(MAXMSP)
#define FLEXT_SYS FLEXT_SYS_MAX
- #undef MAXMSP
+// #undef MAXMSP
#elif defined(PD)
#define FLEXT_SYS FLEXT_SYS_PD
- #undef PD
- #undef NT
+// #undef PD
+// #undef NT
+#endif
+
+#if defined(_DEBUG)
+ #define FLEXT_DEBUG
#endif
// Definition of supported real-time systems
#if FLEXT_SYS == FLEXT_SYS_MAX
#elif FLEXT_SYS == FLEXT_SYS_PD
- #define PD
#else
#error "System must be defined by either FLEXT_SYS_MAX or FLEXT_SYS_PD"
#endif
@@ -57,47 +61,156 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#if defined(_MSC_VER)
// Microsoft C++
+ #ifndef FLEXT_CPU
+ #if defined(_M_IX86)
+ #define FLEXT_CPU FLEXT_CPU_INTEL
+ #elif defined(_M_PPC)
+ #define FLEXT_CPU FLEXT_CPU_PPC
+ #elif defined(_M_MRX000)
+ #define FLEXT_CPU FLEXT_CPU_MIPS
+ #elif defined(_M_ALPHA)
+ #define FLEXT_CPU FLEXT_CPU_ALPHA
+ #else
+ #define FLEXT_CPU FLEXT_CPU_UNKNOWN
+ #endif
+ #endif
+
+ #ifndef FLEXT_OS
+ #if defined(_WIN32)
+ #define FLEXT_OS FLEXT_OS_WIN
+ #else
+ #define FLEXT_OS FLEXT_OS_UNKNOWN
+ #endif
+ #endif
+
+#elif defined(__BORLANDC__)
+ // Borland C++
+
+ #ifndef FLEXT_CPU
+ #define FLEXT_CPU FLEXT_CPU_INTEL
+ #endif
+ #ifndef FLEXT_OS
+ #define FLEXT_OS FLEXT_OS_WIN
+ #endif
+
#elif defined(__MWERKS__)
// Metrowerks CodeWarrior
- #if defined(__INTEL__)
- #define FLEXT_CPU FLEXT_CPU_INTEL
- #elif defined(__POWERPC__)
- #define FLEXT_CPU FLEXT_CPU_PPC
- #elif defined(__MIPS__)
- #define FLEXT_CPU FLEXT_CPU_MIPS
- #elif defined(__POWERPC__)
- #define FLEXT_CPU FLEXT_CPU_UNKNOWN
+ #ifndef FLEXT_CPU
+ #if defined(__INTEL__)
+ #define FLEXT_CPU FLEXT_CPU_INTEL
+ #elif defined(__POWERPC__)
+ #define FLEXT_CPU FLEXT_CPU_PPC
+ #elif defined(__MIPS__)
+ #define FLEXT_CPU FLEXT_CPU_MIPS
+ #else
+ #define FLEXT_CPU FLEXT_CPU_UNKNOWN
+ #endif
+ #endif
+
+ #ifndef FLEXT_OS
+ #if defined(macintosh)
+ #define FLEXT_OS FLEXT_OS_MACOS
+ #elif defined(__INTEL__)
+ // assume Windows
+ #define FLEXT_OS FLEXT_OS_WIN
+ #else
+ #define FLEXT_OS FLEXT_OS_UNKNOWN
+ #endif
#endif
#elif defined(__GNUG__)
// GNU C++
+ #ifndef FLEXT_CPU
+ #if defined(_X86_) || defined(__i386__) || defined(__i586__) || defined(__i686__)
+ #define FLEXT_CPU FLEXT_CPU_INTEL
+ #elif defined(__POWERPC__)
+ #define FLEXT_CPU FLEXT_CPU_PPC
+ #elif defined(__MIPS__)
+ #define FLEXT_CPU FLEXT_CPU_MIPS
+ #else
+ #define FLEXT_CPU FLEXT_CPU_UNKNOWN
+ #endif
+ #endif
+
+ #ifndef FLEXT_OS
+ #if defined(linux) || defined(__linux__)
+ #define FLEXT_OS FLEXT_OS_LINUX
+ #elif defined(__CYGWIN__) || defined(__CYGWIN32__)
+ #define FLEXT_OS FLEXT_OS_WIN
+ #elif defined(__APPLE__) && defined(__MACH__)
+ #define FLEXT_OS FLEXT_OS_MACOS
+ // how about IRIX??
+ #else
+ #define FLEXT_OS FLEXT_OS_UNKNOWN
+ #endif
+ #endif
+
+#elif defined(__MRC__) && defined(MPW_CPLUS)
+ // Apple MPW MrCpp
+ #if __MRC__ < 0x500
+ #error Apple MPW MrCpp v.5.0.0 or better compiler required
+ #endif
+
+ #ifndef FLEXT_CPU
+ #if defined(__POWERPC__)
+ #define FLEXT_CPU FLEXT_CPU_PPC
+ #else
+ #define FLEXT_CPU FLEXT_CPU_UNKNOWN
+ #endif
+ #endif
+
+ #ifndef FLEXT_OS
+ #if defined(macintosh)
+ #define FLEXT_OS FLEXT_OS_MACOS
+ #else
+ #define FLEXT_OS FLEXT_OS_UNKNOWN
+ #endif
+ #endif
+
#endif
#if FLEXT_OS == FLEXT_OS_WIN
+// #pragma message("Compiling for Windows")
+
#if FLEXT_SYS == FLEXT_SYS_MAX
- #define WIN_VERSION 1
+// #define WIN_VERSION 1
#elif FLEXT_SYS == FLEXT_SYS_PD
- #define NT
+// #define PD
+// #define NT
#endif
#elif FLEXT_OS == FLEXT_OS_LINUX
- #if FLEXT_SYS == FLEXT_SYS_MAX
+// #pragma message("Compiling for Linux")
+
+ #if FLEXT_SYS == FLEXT_SYS_PD
+// #define PD
+ #else
#error "Flext SYS/OS combination unknown"
#endif
#elif FLEXT_OS == FLEXT_OS_IRIX
- #if FLEXT_SYS == FLEXT_SYS_MAX
+// #pragma message("Compiling for Irix")
+
+ #if FLEXT_SYS == FLEXT_SYS_PD
+// #define PD
+ #else
#error "Flext SYS/OS combination unknown"
#endif
-#elif FLEXT_OS == FLEXT_OS_MACOS9
+#elif FLEXT_OS == FLEXT_OS_MACOS
+// #pragma message("Compiling for MacOS")
+
#if FLEXT_SYS == FLEXT_SYS_PD
- #error "Flext SYS/OS combination unknown"
+// #define PD
#endif
-#elif FLEXT_OS == FLEXT_OS_MACOSX
#else
#error "Operating system could not be determined"
#endif
+#if FLEXT_SYS == FLEXT_SYS_MAX
+// #pragma message("Compiling for Max/MSP")
+#elif FLEXT_SYS == FLEXT_SYS_PD
+// #pragma message("Compiling for PD")
+#endif
#endif
diff --git a/externals/grill/flext/source/flsndobj.cpp b/externals/grill/flext/source/flsndobj.cpp
index 1965b86b..e377b4a7 100644
--- a/externals/grill/flext/source/flsndobj.cpp
+++ b/externals/grill/flext/source/flsndobj.cpp
@@ -1,6 +1,6 @@
+#include "flext.h"
#include "flsndobj.h"
-//namespace flext {
flext_sndobj::flext_sndobj():
inobjs(0),outobjs(0),
@@ -103,5 +103,4 @@ short flext_sndobj::Outlet::Write()
else return 0;
}
-//} // namespace flext
diff --git a/externals/grill/flext/source/flsndobj.h b/externals/grill/flext/source/flsndobj.h
index f68054ed..30099404 100644
--- a/externals/grill/flext/source/flsndobj.h
+++ b/externals/grill/flext/source/flsndobj.h
@@ -10,9 +10,13 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#define FLEXT_SNDOBJ
#include "flext.h"
+
+#ifndef FLEXT_THREADS
+#define NOPTHREAD
+#endif
#include <SndObj/AudioDefs.h>
+#undef NOPTHREAD
-//namespace flext {
class flext_sndobj:
public flext_dsp
@@ -78,6 +82,4 @@ private:
int blsz;
};
-//} // namespace flext
-
#endif
diff --git a/externals/grill/flext/source/flstdc.h b/externals/grill/flext/source/flstdc.h
index 4031dda1..bf0ddd23 100644
--- a/externals/grill/flext/source/flstdc.h
+++ b/externals/grill/flext/source/flstdc.h
@@ -9,7 +9,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
/*! \file flstdc.h
- \brief Definitions to unite MaxMSP and PD notions
+ \brief Definitions to unite Max/MSP and PD notions
This file contains a few definitions to unite a few of the notions that
once drifted apart in Max and PD. It is not elegant but helps.
@@ -18,49 +18,36 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __FLEXT_STDC_H
#define __FLEXT_STDC_H
-// Be sure that one target is defined
-#if !defined(PD) && !defined(MAXMSP)
-#error Either PD or MAXMSP must be defined
-#endif
-
-// Do some compiler checking
-#if defined(__MRC__) && __MRC__ < 0x500
-#error Apple MPW MrCpp v.5.0.0 or better compiler required
-#endif
-
-
// PD stuff
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
/* PD definitions start here */
#ifdef _MSC_VER
-#pragma warning (push)
-#pragma warning (disable:4091)
-#endif
-
-#ifdef __cplusplus
-extern "C" {
+ #pragma warning (push)
+ #pragma warning (disable:4091 4005)
#endif
-// Include the relevant PD header files
-#ifdef _DEBUG
-#include <m_imp.h> // for easier debugging
-#else
-#include <m_pd.h>
+#if FLEXT_OS == FLEXT_OS_WIN
+#define NT
#endif
-#ifdef __cplusplus
+extern "C" {
+ // Include the relevant PD header files
+ #ifdef FLEXT_DEBUG
+ #include <m_imp.h> // for easier debugging
+ #else
+ #include <m_pd.h>
+ #endif
}
-#endif
#ifdef _MSC_VER
-#pragma warning (pop)
+ #pragma warning (pop)
#endif
#ifdef cabs
-#undef cabs // this is defined in m_pd.h (clashes with math.h)
+#undef cabs // this is defined in m_pd.h (clashes with math.h in MacOSX)
#endif
typedef t_object t_sigobj;
@@ -77,37 +64,36 @@ typedef t_clock t_qelem;
#define A_FLINT A_FLOAT
#define A_DEFFLINT A_DEFFLOAT
-// MAX stuff
-#elif defined(MAXMSP)
-/* MaxMSP definitions start here */
+#elif FLEXT_SYS == FLEXT_SYS_MAX
-#ifndef __MRC__
-#define powerc
-#endif
-#define __MOTO__ 0
+/* Max/MSP definitions start here */
-// Include the relevant MaxMSP header files
+// Include the relevant Max/MSP header files
-#include <MacTypes.h>
+#if FLEXT_OS == FLEXT_OS_MACOS
+ #ifndef __MRC__
+ #define powerc
+ #endif
+ #define __MOTO__ 0
+
+ #include <MacTypes.h>
+#elif FLEXT_OS == FLEXT_OS_WIN
+ #define WIN_VERSION 1
+#endif
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"
-//#include "z_atom.h"
+ #include "ext.h"
+ #include "ext_user.h"
+ #include "z_dsp.h"
}
-typedef t_pxbox t_sigobj; // that's the all-in-one object type of MaxMSP (not very memory-efficent, i guess)
+#undef WIN_VERSION
+
+
+typedef t_pxbox t_sigobj; // that's the all-in-one object type of Max/MSP (not very memory-efficent, i guess)
typedef t_patcher t_canvas;
typedef t_int t_flint;
@@ -128,7 +114,6 @@ typedef void t_binbuf;
#define clock_free(tick) freeobject((object *)tick)
#define A_NULL A_NOTHING
-//#define A_FLINT A_INT
#define A_DEFFLINT A_DEFLONG
#ifndef A_INT
@@ -165,7 +150,7 @@ typedef void t_binbuf;
#endif
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
#define ASSERT(b) ((void)(!(b)?(error("Assertion failed: " #b " - in " __FILE__ " line %i",(int)__LINE__),0):0))
#else
#define ASSERT(b) ((void)0)
@@ -176,15 +161,10 @@ typedef void t_binbuf;
/* Set the right calling convention (and exporting) for the OS */
-#if defined(NT)
-#define FLEXT_EXT __declspec(dllexport)
+#ifdef _MSC_VER
+ #define FLEXT_EXT __declspec(dllexport)
#else // other OS's
-#define FLEXT_EXT
+ #define FLEXT_EXT
#endif
#endif
-
-
-
-
-
diff --git a/externals/grill/flext/source/flsupport.cpp b/externals/grill/flext/source/flsupport.cpp
index 854fe871..85ebae79 100644
--- a/externals/grill/flext/source/flsupport.cpp
+++ b/externals/grill/flext/source/flsupport.cpp
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief flext support functions and classes.
*/
-#include "flsupport.h"
+#include "flext.h"
const t_symbol *flext::sym_float = NULL;
const t_symbol *flext::sym_symbol = NULL;
@@ -22,13 +22,13 @@ const t_symbol *flext::sym_anything = NULL;
const t_symbol *flext::sym_pointer = NULL;
const t_symbol *flext::sym_int = NULL;
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
const t_symbol *flext::sym_signal = NULL;
#endif
void flext::Setup()
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
sym_anything = &s_anything;
sym_pointer = &s_pointer;
sym_float = &s_float;
@@ -36,19 +36,21 @@ void flext::Setup()
sym_bang = &s_bang;
sym_list = &s_list;
sym_signal = &s_signal;
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
sym_int = gensym("int");
sym_float = gensym("float");
sym_symbol = gensym("symbol");
sym_bang = gensym("bang");
sym_list = gensym("list");
sym_anything = gensym("anything");
+#else
+#error
#endif
}
void flext::GetAString(const t_atom &a,char *buf,int szbuf)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
atom_string(const_cast<t_atom *>(&a),buf,szbuf);
#else
if(IsSymbol(a)) sprintf(buf,GetString(a));
diff --git a/externals/grill/flext/source/flsupport.h b/externals/grill/flext/source/flsupport.h
index 022aaae9..08036ff5 100644
--- a/externals/grill/flext/source/flsupport.h
+++ b/externals/grill/flext/source/flsupport.h
@@ -17,10 +17,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flstdc.h"
-#ifdef FLEXT_THREADS
-#include <pthread.h>
-#endif
-
class FLEXT_EXT flext {
/*! \defgroup FLEXT_SUPPORT Flext support class
@@ -90,7 +86,7 @@ public:
const t_symbol *sym;
t_sample *data;
int chns,frames;
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
t_garray *arr;
float interval;
bool isdirty,ticking;
@@ -155,8 +151,7 @@ public:
*/
static const t_symbol *sym_pointer;
-#ifdef PD
-
+#if FLEXT_SYS == FLEXT_SYS_PD
/*! \brief Symbol constant for "signal"
\note PD only
*/
@@ -195,7 +190,7 @@ public:
//! Check whether the atom is a symbol
static bool IsSymbol(const t_atom &a) { return a.a_type == A_SYMBOL; }
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
//! Access the symbol value (without type check)
static t_symbol *GetSymbol(const t_atom &a) { return a.a_w.w_symbol; }
//! Set the atom to represent a symbol
@@ -228,7 +223,7 @@ public:
//! Check for an boolean and get its value
static bool GetABool(const t_atom &a) { return GetAInt(a) != 0; }
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
//! Check for a float and get its value
static float GetAFloat(const t_atom &a) { return IsFloat(a)?GetFloat(a):0; }
@@ -252,7 +247,7 @@ public:
//! Set the atom to represent a pointer
static void SetPointer(t_atom &a,void *p) { a.a_type = A_POINTER; a.a_w.w_gpointer = (t_gpointer *)p; }
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
//! Check for a float and get its value
static float GetAFloat(const t_atom &a) { return IsFloat(a)?GetFloat(a):(IsInt(a)?GetInt(a):0); }
@@ -273,6 +268,8 @@ public:
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); }
+#else
+#error
#endif
// --- atom list stuff -------------------------------------------
diff --git a/externals/grill/flext/source/flthr.cpp b/externals/grill/flext/source/flthr.cpp
index 2a3ad3df..f23eb38f 100644
--- a/externals/grill/flext/source/flthr.cpp
+++ b/externals/grill/flext/source/flthr.cpp
@@ -12,25 +12,22 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Implementation of the flext thread functionality.
*/
-#ifdef FLEXT_THREADS
-
#include "flext.h"
#include "flinternal.h"
-#ifdef MAXMSP
-#define SCHEDTICK 1
-#endif
+#ifdef FLEXT_THREADS
-#ifdef NT
+#if FLEXT_OS == FLEXT_OS_WIN
#include <windows.h>
#endif
+
#include <errno.h>
bool flext_base::StartThread(void *(*meth)(thr_params *p),thr_params *p,char *methname)
{
static bool init = false;
static pthread_attr_t attr;
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
if(!p) {
ERRINTERNAL();
return false;
@@ -55,8 +52,6 @@ bool flext_base::StartThread(void *(*meth)(thr_params *p),thr_params *p,char *me
pthread_setschedparam(id,policy,&parm);
}
-// post("Create thread");
-
pthread_t thrid;
int ret = pthread_create (&thrid,&attr,(void *(*)(void *))meth,p);
@@ -65,7 +60,7 @@ bool flext_base::StartThread(void *(*meth)(thr_params *p),thr_params *p,char *me
pthread_setschedparam(id,policy,&parm);
if(ret) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
error((char *)(ret == EAGAIN?"%s - Unsufficient resources to launch thread!":"%s - Could not launch method!"),methname);
#endif
error((char *)("%s - Could not launch method!"),methname);
@@ -73,14 +68,8 @@ bool flext_base::StartThread(void *(*meth)(thr_params *p),thr_params *p,char *me
delete p;
return false;
}
- else {
-#ifdef MAXMSP
- sched_yield();
-#endif
-// post("Create thread: OK");
-
+ else
return true;
- }
}
bool flext_base::PushThread()
@@ -96,7 +85,7 @@ bool flext_base::PushThread()
thrtail = nt;
{
-#ifdef NT
+#if FLEXT_OS == FLEXT_OS_WIN
// set detached thread to lower priority class
DWORD err;
HANDLE thr = GetCurrentThread();
@@ -128,9 +117,6 @@ bool flext_base::PushThread()
tlmutex.Unlock();
-#ifdef MAXMSP
- clock_delay(yclk,0);
-#endif
return true;
}
@@ -157,7 +143,7 @@ void flext_base::PopThread()
delete ti;
}
else {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("%s - INTERNAL ERROR: Thread not found!",thisName());
#endif
}
@@ -175,7 +161,7 @@ bool flext_base::ChangePriority(int dp,thrid_t id)
sched_param parm;
int policy;
if(pthread_getschedparam(id,&policy,&parm) < 0) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("flext - failed to get parms");
#endif
return false;
@@ -183,7 +169,7 @@ bool flext_base::ChangePriority(int dp,thrid_t id)
else {
parm.sched_priority += dp;
if(pthread_setschedparam(id,policy,&parm) < 0) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("flext - failed to change priority");
#endif
return false;
@@ -198,7 +184,7 @@ int flext_base::GetPriority(thrid_t id)
sched_param parm;
int policy;
if(pthread_getschedparam(id,&policy,&parm) < 0) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("flext - failed to get parms");
#endif
return -1;
@@ -212,7 +198,7 @@ bool flext_base::SetPriority(int p,thrid_t id)
sched_param parm;
int policy;
if(pthread_getschedparam(id,&policy,&parm) < 0) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("flext - failed to get parms");
#endif
return false;
@@ -220,7 +206,7 @@ bool flext_base::SetPriority(int p,thrid_t id)
else {
parm.sched_priority = p;
if(pthread_setschedparam(id,policy,&parm) < 0) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("flext - failed to change priority");
#endif
return false;
diff --git a/externals/grill/flext/source/flutil.cpp b/externals/grill/flext/source/flutil.cpp
index 5307b820..2a65aaf6 100644
--- a/externals/grill/flext/source/flutil.cpp
+++ b/externals/grill/flext/source/flutil.cpp
@@ -15,34 +15,18 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include "flext.h"
#include <string.h>
-#ifdef NT
+#if FLEXT_OS == FLEXT_OS_WIN
#include <windows.h>
-#endif
-
-#ifdef MAXMSP
+#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || defined(__GNUC__)
+#include <unistd.h>
+#elif FLEXT_OS == FLEXT_OS_MACOS
#include <Timer.h>
#include <Threads.h>
#endif
-#ifdef unix
-#include <unistd.h>
-#endif
-
-t_atom *flext::CopyList(int argc,const t_atom *argv)
-{
- int i;
- t_atom *dst = new t_atom[argc];
- for(i = 0; i < argc; ++i) CopyAtom(dst+i,argv+i);
- return dst;
-}
-
void flext::CopyMem(void *dst,const void *src,int bytes)
{
-#ifdef macintosh
- BlockMoveData(src,dst,bytes);
-#else
memcpy(dst,src,bytes);
-#endif
}
void flext::ZeroMem(void *dst,int bytes)
@@ -52,9 +36,11 @@ void flext::ZeroMem(void *dst,int bytes)
void flext::Sleep(float s)
{
-#ifdef NT
+#if FLEXT_OS == FLEXT_OS_WIN
::Sleep((long)(s*1000));
-#elif defined(MAXMSP)
+#elif FLEXT_OS == FLEXT_OS_LINUX || FLEXT_OS == FLEXT_OS_IRIX || defined(__GNUC__)
+ usleep((long)(s*1000000));
+#elif FLEXT_OS == FLEXT_OS_MACOS
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,6 +50,6 @@ void flext::Sleep(float s)
YieldToAnyThread(); // should we really yield?
}
#else
- usleep((long)(s*1000000));
+#error
#endif
}
diff --git a/externals/grill/flext/source/flxlet.cpp b/externals/grill/flext/source/flxlet.cpp
index 881769da..c360daf3 100755
--- a/externals/grill/flext/source/flxlet.cpp
+++ b/externals/grill/flext/source/flxlet.cpp
@@ -17,7 +17,6 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <string.h>
#include <stdarg.h>
-//namespace flext {
flext_base::xlet::xlet(type t,const char *d):
tp(t),nxt(NULL)
@@ -60,7 +59,7 @@ unsigned long flext_base::XletCode(xlet::type tp,...)
int cnt = 0;
xlet::type *args = NULL,arg = tp;
for(; arg; ++cnt) {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
if(cnt > 9) {
error("%s - Too many in/outlets defined - truncated to 9",thisName());
break;
@@ -85,4 +84,3 @@ void flext_base::AddOutlets(unsigned long code)
for(; code; code /= 10) AddOutlet((xlet::type)(code%10));
}
-//} // namespace flext
diff --git a/externals/grill/flext/tutorial/adv1/main.cpp b/externals/grill/flext/tutorial/adv1/main.cpp
index 9b8acb79..7e1047ce 100755
--- a/externals/grill/flext/tutorial/adv1/main.cpp
+++ b/externals/grill/flext/tutorial/adv1/main.cpp
@@ -12,8 +12,8 @@ This is an example of a simplified prepend object
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
-#error You need at least flext version 0.4.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
+#error You need at least flext version 0.4.1
#endif
@@ -85,7 +85,7 @@ void adv1::m_any(const t_symbol *s,int argc,t_atom *argv)
// if anything is no "list" or "float" then append it to result list
if(s != sym_list && s != sym_float
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
&& s != sym_int // in Max integers are system data types
#endif
)
diff --git a/externals/grill/flext/tutorial/attr1/attr1.dsp b/externals/grill/flext/tutorial/attr1/attr1.dsp
index 725b55ab..478e1015 100644
--- a/externals/grill/flext/tutorial/attr1/attr1.dsp
+++ b/externals/grill/flext/tutorial/attr1/attr1.dsp
@@ -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/attr1.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/attr1.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "attr1 - Win32 Debug"
diff --git a/externals/grill/flext/tutorial/attr2/attr2.dsp b/externals/grill/flext/tutorial/attr2/attr2.dsp
index f93781ba..d95a55ab 100644
--- a/externals/grill/flext/tutorial/attr2/attr2.dsp
+++ b/externals/grill/flext/tutorial/attr2/attr2.dsp
@@ -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/attr2.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/attr2.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "attr2 - Win32 Debug"
diff --git a/externals/grill/flext/tutorial/attr2/main.cpp b/externals/grill/flext/tutorial/attr2/main.cpp
index f02a6014..b1536117 100644
--- a/externals/grill/flext/tutorial/attr2/main.cpp
+++ b/externals/grill/flext/tutorial/attr2/main.cpp
@@ -21,8 +21,8 @@ This is an example of an object doing various float operations
#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
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
+#error You need at least flext version 0.4.1
#endif
#include <math.h>
@@ -137,7 +137,7 @@ void attr2::m_trigger(float f)
}
break;
case op_pow: res = (float)pow(f,arg); break;
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
default: ERRINTERNAL(); // operation not defined
#endif
}
@@ -158,7 +158,7 @@ void attr2::opget(const t_symbol *&s) const
case op_mul: s = sym_mul; break;
case op_div: s = sym_div; break;
case op_pow: s = sym_pow; break;
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
default: ERRINTERNAL(); // operation not defined
#endif
}
diff --git a/externals/grill/flext/tutorial/lib1/lib1.dsp b/externals/grill/flext/tutorial/lib1/lib1.dsp
index 82656d07..b661aeb4 100644
--- a/externals/grill/flext/tutorial/lib1/lib1.dsp
+++ b/externals/grill/flext/tutorial/lib1/lib1.dsp
@@ -5,17 +5,17 @@
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=lib1 - Win32 Debug
-!MESSAGE Dies ist kein gŸltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fŸhren Sie den Befehl
+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "lib1.mak".
!MESSAGE
-!MESSAGE Sie kšnnen beim AusfŸhren von NMAKE eine Konfiguration angeben
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "lib1.mak" CFG="lib1 - Win32 Debug"
!MESSAGE
-!MESSAGE FŸr die Konfiguration stehen zur Auswahl:
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "lib1 - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE "lib1 - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
@@ -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/lib1.dll" /libpath:"..\..\pd-msvc"
+# ADD LINK32 kernel32.lib user32.lib pd.lib flext-pdwin.lib /nologo /dll /machine:I386 /out:"../pd-msvc/lib1.dll" /libpath:"..\..\pd-msvc"
!ELSEIF "$(CFG)" == "lib1 - 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 3876a0ca..661625b2 100644
--- a/externals/grill/flext/tutorial/signal2/main.cpp
+++ b/externals/grill/flext/tutorial/signal2/main.cpp
@@ -36,9 +36,6 @@ public:
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);
-
private:
FLEXT_CALLBACK(m_bang); // callback for method "m_bang"
};
@@ -70,8 +67,3 @@ void signal2::m_bang()
ToOutInt(3,ChannelsOut());
}
-/*
-void signal2::m_signal(int, float *const *, float *const *)
-{
-}
-*/
diff --git a/externals/grill/pool/pool.dsp b/externals/grill/pool/pool.dsp
index 0c39ebb3..6614fc03 100644
--- a/externals/grill/pool/pool.dsp
+++ b/externals/grill/pool/pool.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" /D "POOL_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -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" /D "POOL_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\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 /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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/pool/pool.h b/externals/grill/pool/pool.h
index 3c698b1f..348a4127 100644
--- a/externals/grill/pool/pool.h
+++ b/externals/grill/pool/pool.h
@@ -13,8 +13,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
-#error You need at least flext version 0.4.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
+#error You need at least flext version 0.4.1
#endif
#include <iostream.h>
diff --git a/externals/grill/prepend/prepend.dsp b/externals/grill/prepend/prepend.dsp
index 505bdb9a..ec6d1099 100644
--- a/externals/grill/prepend/prepend.dsp
+++ b/externals/grill/prepend/prepend.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" /D "PREPEND_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /YX /FD /c
+# ADD CPP /nologo /W3 /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -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" /D "PREPEND_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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/py/py.cw b/externals/grill/py/py.cw
index f5f6fc7f..0327d7a3 100644
--- a/externals/grill/py/py.cw
+++ b/externals/grill/py/py.cw
Binary files differ
diff --git a/externals/grill/py/py.dsp b/externals/grill/py/py.dsp
index 8171624c..d6613064 100644
--- a/externals/grill/py/py.dsp
+++ b/externals/grill/py/py.dsp
@@ -45,7 +45,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" /D "PY_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /W3 /GR- /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /YX /FD /c
+# ADD CPP /nologo /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -71,7 +71,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" /D "PY_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /GR /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -98,7 +98,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /GR /GX /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /YX /FD /c
-# ADD CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c
+# ADD CPP /nologo /MT /W3 /GR /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -125,7 +125,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /W3 /Gm /GR /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /FR /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /D "FLEXT_THREADS" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /I "C:\Programme\prog\Python22\include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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/py/source/clmeth.cpp b/externals/grill/py/source/clmeth.cpp
index 0a30d1f7..283f52e9 100644
--- a/externals/grill/py/source/clmeth.cpp
+++ b/externals/grill/py/source/clmeth.cpp
@@ -230,7 +230,6 @@ PyObject *pyext::pyext_tocanvas(PyObject *,PyObject *args)
if(self && PyInstance_Check(self)) {
pyext *ext = GetThis(self);
-#ifdef PD
I sz = PySequence_Size(args);
PyObject *val;
BL tp = sz == 2 && PySequence_Check(PyTuple_GetItem(args,1));
@@ -245,13 +244,13 @@ PyObject *pyext::pyext_tocanvas(PyObject *,PyObject *args)
t_glist *gl = ext->thisCanvas(); //canvas_getcurrent();
t_class **cl = (t_pd *)gl;
if(cl) {
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
pd_forwardmess(cl,lst->Count(),lst->Atoms());
#else
- #pragma message ("Send is not implemented")
+#pragma message ("Send is not implemented")
#endif
}
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
else
post("pyext - no parent canvas?!");
#endif
@@ -262,9 +261,6 @@ PyObject *pyext::pyext_tocanvas(PyObject *,PyObject *args)
if(lst) delete lst;
if(!tp) Py_DECREF(val);
-#else
-#pragma message ("Not implemented for MaxMSP")
-#endif
}
}
diff --git a/externals/grill/py/source/main.cpp b/externals/grill/py/source/main.cpp
index 2522ff51..a0e77cef 100644
--- a/externals/grill/py/source/main.cpp
+++ b/externals/grill/py/source/main.cpp
@@ -181,7 +181,7 @@ V py::ReloadModule()
V py::GetModulePath(const C *mod,C *dir,I len)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
// uarghh... pd doesn't show it's path for extra modules
C *name;
@@ -191,7 +191,9 @@ V py::GetModulePath(const C *mod,C *dir,I len)
// if dir is current working directory... name points to dir
if(dir == name) strcpy(dir,".");
-#elif defined(MAXMSP)
+#elif FLEXT_SYS == FLEXT_SYS_MAX
+ // how do i get the path in Max/MSP?
+#else
*dir = 0;
#endif
}
diff --git a/externals/grill/py/source/main.h b/externals/grill/py/source/main.h
index b4096819..eaa9f7b6 100644
--- a/externals/grill/py/source/main.h
+++ b/externals/grill/py/source/main.h
@@ -13,12 +13,13 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <flext.h>
#include <Python.h>
-#ifndef NT
+
+#if FLEXT_OS == FLEXT_LINUX || FLEXT_OS == FLEXT_IRIX
#include <unistd.h>
#endif
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
-#error You need at least flext version 0.4.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
+#error You need at least flext version 0.4.1
#endif
#define PY__VERSION "0.1.1"
diff --git a/externals/grill/py/source/modmeth.cpp b/externals/grill/py/source/modmeth.cpp
index b7d2cab0..50d4ac81 100644
--- a/externals/grill/py/source/modmeth.cpp
+++ b/externals/grill/py/source/modmeth.cpp
@@ -101,20 +101,26 @@ PyObject *py::py_blocksize(PyObject *self,PyObject *args)
PyObject *py::py_inchannels(PyObject *self,PyObject *args)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
I ch = sys_get_inchannels();
-#else // MAXMSP
+#elif FLEXT_SYS == FLEXT_SYS_MAX
I ch = sys_getch(); // not functioning
+#else
+#pragma message("Not implemented!")
+ ch = 0;
#endif
return PyLong_FromLong(ch);
}
PyObject *py::py_outchannels(PyObject *self,PyObject *args)
{
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
I ch = sys_get_outchannels();
-#else // MAXMSP
+#elif FLEXT_SYS == FLEXT_SYS_MAX
I ch = sys_getch(); // not functioning
+#else
+#pragma message("Not implemented!")
+ ch = 0;
#endif
return PyLong_FromLong(ch);
}
@@ -139,13 +145,13 @@ PyObject *py::py_send(PyObject *,PyObject *args)
// t_class **cl = (t_class **)GetBound(recv);
t_class **cl = (t_class **)recv->s_thing;
if(cl) {
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
pd_forwardmess(cl,lst->Count(),lst->Atoms());
#else
- #pragma message ("Send is not implemented")
+#pragma message ("Send is not implemented")
#endif
}
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
else
post("py/pyext - Receiver doesn't exist");
#endif
diff --git a/externals/grill/py/source/py.cpp b/externals/grill/py/source/py.cpp
index eff88daf..f6127716 100644
--- a/externals/grill/py/source/py.cpp
+++ b/externals/grill/py/source/py.cpp
@@ -218,7 +218,7 @@ V pyobj::m_help()
{
post("");
post("py %s - python script object, (C)2002 Thomas Grill",PY__VERSION);
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("compiled on " __DATE__ " " __TIME__);
#endif
diff --git a/externals/grill/py/source/pyext.cpp b/externals/grill/py/source/pyext.cpp
index 4df12c37..8bff5913 100644
--- a/externals/grill/py/source/pyext.cpp
+++ b/externals/grill/py/source/pyext.cpp
@@ -85,7 +85,7 @@ pyext::pyext(I argc,const t_atom *argv):
// init script module
if(argc >= 1) {
C dir[1024];
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
// add dir of current patch to path
strcpy(dir,GetString(canvas_getdir(thisCanvas())));
AddToPath(dir);
@@ -93,7 +93,7 @@ pyext::pyext(I argc,const t_atom *argv):
strcpy(dir,GetString(canvas_getcurrentdir()));
AddToPath(dir);
#else
- #pragma message("Adding current dir to path is not implemented")
+#pragma message("Adding current dir to path is not implemented")
#endif
GetModulePath(GetString(argv[0]),dir,sizeof(dir));
@@ -298,7 +298,7 @@ V pyext::m_doc_()
-BL pyext::m_method_(I n,const t_symbol *s,I argc,t_atom *argv)
+BL pyext::m_method_(I n,const t_symbol *s,I argc,const t_atom *argv)
{
if(pyobj && n >= 1) {
return callwork(n,s,argc,argv);
@@ -314,7 +314,7 @@ V pyext::m_help()
{
post("");
post("pyext %s - python script object, (C)2002 Thomas Grill",PY__VERSION);
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("compiled on " __DATE__ " " __TIME__);
#endif
@@ -351,7 +351,7 @@ PyObject *pyext::call(const C *meth,I inlet,const t_symbol *s,I argc,const t_ato
else {
ret = PyEval_CallObject(pmeth, pargs);
if (ret == NULL) // function not found resp. arguments not matching
-#if 1 //def _DEBUG
+#if 1 //def FLEXT_DEBUG
PyErr_Print();
#else
PyErr_Clear();
@@ -371,7 +371,7 @@ PyObject *pyext::call(const C *meth,I inlet,const t_symbol *s,I argc,const t_ato
V pyext::work_wrapper(V *data)
{
++thrcount;
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
if(!data)
post("%s - no data!",thisName());
else
diff --git a/externals/grill/py/source/pyext.h b/externals/grill/py/source/pyext.h
index f0baf310..d804d825 100644
--- a/externals/grill/py/source/pyext.h
+++ b/externals/grill/py/source/pyext.h
@@ -39,7 +39,7 @@ public:
I Outlets() const { return outlets; }
protected:
- BL m_method_(I n,const t_symbol *s,I argc,t_atom *argv);
+ virtual BL m_method_(I n,const t_symbol *s,I argc,const t_atom *argv);
BL work(I n,const t_symbol *s,I argc,const t_atom *argv);
diff --git a/externals/grill/vasp/build-pd-msvc.bat b/externals/grill/vasp/build-pd-msvc.bat
new file mode 100644
index 00000000..d6187f08
--- /dev/null
+++ b/externals/grill/vasp/build-pd-msvc.bat
@@ -0,0 +1,4 @@
+@echo --- Building with MS Visual C++ ---
+
+nmake -f makefile.pd-msvc clean
+nmake -f makefile.pd-msvc
diff --git a/externals/grill/vasp/changes.txt b/externals/grill/vasp/changes.txt
index dea15217..e0ecafd3 100644
--- a/externals/grill/vasp/changes.txt
+++ b/externals/grill/vasp/changes.txt
@@ -4,6 +4,15 @@ Version history:
- FIX: bug in vasp.frames* ... wrong argument
- FIX: another bug in resize of immediate buffers
- CHANGE: immediates will be initialized to zero, also upon resize to a larger size (by default, later make this optional)
+- ADD: attributes for all basic parameters: ref,to,arg, update,detach,prior (loglvl,argchk,unit later)
+- ADD: vasp.channel,vasp.vector - attribute "index"
+- ADD: vasp.frames,vasp.frames+,vasp.offset,vasp.offset+,vasp.size,vasp.size+,vasp.imm - attribute "frames"
+- ADD: vasp.frames*,vasp.frames/,vasp.size*,vasp.size/ - attribute "factor"
+- ADD: vasp.part - attribute "parts"
+- ADD: vasp.peaks? - attribute "peaks"
+- ADD: vasp.shift,vasp.xshift - attribute "fill"
+- ADD: vasp.tilt,vasp.xtilt - attributes "fill","inter"
+- ADD: vasp.offset=,vasp.frames= - attributes "dir","slope"
0.1.1:
- FIX: bug in resize of immediate buffers
diff --git a/externals/grill/vasp/makefile.pd-darwin b/externals/grill/vasp/makefile.pd-darwin
index 58fe8c93..713ad0fd 100755
--- a/externals/grill/vasp/makefile.pd-darwin
+++ b/externals/grill/vasp/makefile.pd-darwin
@@ -17,7 +17,7 @@ FLEXTLIB=$(FLEXTPATH)/flext_t.a
# compiler stuff
INCLUDES=$(PDPATH)
-FLAGS=-DPD -Dunix -DMACOSX -DFLEXT_THREADS
+FLAGS=-DFLEXT_SYS=2 -DFLEXT_THREADS
CFLAGS=-O6 -Wno-unused -Wno-parentheses -Wno-switch -Wstrict-prototypes # -maltivec
LIBS=m
LDFLAGS=-bundle -bundle_loader $(PD)
diff --git a/externals/grill/vasp/makefile.pd-linux b/externals/grill/vasp/makefile.pd-linux
index 8fcb7526..5c156ebe 100644
--- a/externals/grill/vasp/makefile.pd-linux
+++ b/externals/grill/vasp/makefile.pd-linux
@@ -15,7 +15,7 @@ FLEXTLIB=$(FLEXTPATH)/flext_t.a
# compiler stuff
INCLUDES=$(PDPATH)
-FLAGS=-DPD -DFLEXT_THREADS
+FLAGS=-DFLEXT_SYS=2 -DFLEXT_THREADS
CFLAGS=-O6 -mcpu=pentiumpro -fmove-all-movables -frerun-loop-opt -finline-functions # -funroll-loops
#CFLAGS=-O6 -mcpu=pentium3 -msse -mfpmath=sse -fmove-all-movables -frerun-loop-opt -finline-functions # -funroll-loops
diff --git a/externals/grill/vasp/makefile.pd-msvc b/externals/grill/vasp/makefile.pd-msvc
index 349900f5..9f55ea1a 100644
--- a/externals/grill/vasp/makefile.pd-msvc
+++ b/externals/grill/vasp/makefile.pd-msvc
@@ -15,7 +15,7 @@ LIBPATH=/LIBPATH:"$(MSVCPATH)\lib" /LIBPATH:"$(PDPATH)\bin" /LIBPATH:"$(FLEXTPAT
LIBS=pd.lib pthreadVC.lib flext_t-pdwin.lib
# compiler definitions and flags
-DEFS=/DPD /DNT /DFLEXT_THREADS
+DEFS=/DFLEXT_SYS=2 /DFLEXT_THREADS
CFLAGS=/GR /GX- /GD /G6 /Ox /MT
diff --git a/externals/grill/vasp/pd-ex/granular2.pd b/externals/grill/vasp/pd-ex/granular2.pd
index 5dea43a7..a065c25c 100644
--- a/externals/grill/vasp/pd-ex/granular2.pd
+++ b/externals/grill/vasp/pd-ex/granular2.pd
@@ -1,9 +1,9 @@
-#N canvas 64 38 704 556 10;
+#N canvas 30 24 706 558 10;
#N canvas 0 0 450 300 graph34 0;
#X array insert 128 float 0;
#X coords 0 1 127 -1 200 140 1;
#X restore 96 73 graph;
-#N canvas 339 256 521 450 player 0;
+#N canvas 339 256 523 452 player 0;
#X obj 228 372 tabplay~ schnipparray;
#X obj 228 396 throw~ toex;
#X obj 208 45 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
@@ -65,42 +65,17 @@
#X restore 204 294 pd player;
#X obj 204 339 catch~ toex;
#X obj 204 403 dac~;
-#X floatatom 98 423 0 0 0 0 - - -;
-#X obj 98 383 nbx 5 14 -1e+037 1e+037 0 1 empty empty empty 0 -6 0
-10 -24198 -1 -1 0.13 256;
-#X text 98 365 density;
-#X obj 98 445 s \$0-density;
+#X floatatom 51 318 0 0 0 0 - - -;
+#X obj 51 278 nbx 5 14 -1e+037 1e+037 0 1 empty empty empty 0 -6 0
+10 -24198 -1 -1 18.13 256;
+#X text 51 260 density;
+#X obj 51 340 s \$0-density;
#X obj 204 275 tgl 15 0 empty empty start/stop 0 -6 0 8 -24198 -1 -1
0 1;
#X floatatom 241 430 0 0 0 0 - - -;
#X obj 241 407 env~ 32768;
-#N canvas 202 187 287 226 inside 0;
+#N canvas 202 187 293 232 inside 0;
#X obj 88 151 table positions;
-#N canvas 259 48 514 364 create_schippler 0;
-#X msg 155 114 vasp insert;
-#X obj 155 182 vasp.u;
-#X obj 155 138 vasp.osc 6.4;
-#X msg 66 114 vasp insert;
-#X obj 66 162 vasp.u;
-#X msg 293 113 vasp insert;
-#X obj 293 161 vasp.u;
-#X obj 293 137 vasp.osc 2;
-#X text 56 71 create various samples to insert;
-#X msg 63 216 vasp insert;
-#X obj 63 261 vasp.u;
-#X obj 63 239 vasp.window;
-#X obj 66 138 vasp.osc 128;
-#X obj 155 160 vasp.*!window lin;
-#X connect 0 0 2 0;
-#X connect 2 0 13 0;
-#X connect 3 0 12 0;
-#X connect 5 0 7 0;
-#X connect 7 0 6 0;
-#X connect 9 0 11 0;
-#X connect 11 0 10 0;
-#X connect 12 0 4 0;
-#X connect 13 0 1 0;
-#X restore 40 47 pd create_schippler;
#N canvas 136 160 532 356 inserter 0;
#X obj 48 55 r \$0-part;
#X text 50 33 after a sample-part is played \, next step is calculated
@@ -281,12 +256,47 @@
#X connect 4 0 1 0;
#X connect 5 0 2 0;
#X restore 41 95 pd init;
-#X restore 436 220 pd inside;
+#N canvas 409 43 522 372 create_schnippl 0;
+#X msg 155 114 vasp insert;
+#X obj 155 182 vasp.u;
+#X obj 155 138 vasp.osc 6.4;
+#X msg 66 114 vasp insert;
+#X obj 66 162 vasp.u;
+#X msg 293 113 vasp insert;
+#X obj 293 161 vasp.u;
+#X obj 293 137 vasp.osc 2;
+#X msg 63 216 vasp insert;
+#X obj 63 261 vasp.u;
+#X obj 63 239 vasp.window;
+#X obj 66 138 vasp.osc 128;
+#X obj 155 160 vasp.*!window lin;
+#X msg 273 230 vasp insert;
+#X obj 273 292 vasp.u;
+#X obj 273 251 vasp.osc 2;
+#X obj 273 271 vasp.*xwindow hamming;
+#X obj 355 230 nbx 5 14 -1e+037 1e+037 0 0 empty empty empty 0 -6 0
+10 -24198 -1 -1 28 256;
+#X text 56 71 create various slices to insert;
+#X connect 0 0 2 0;
+#X connect 2 0 12 0;
+#X connect 3 0 11 0;
+#X connect 5 0 7 0;
+#X connect 7 0 6 0;
+#X connect 8 0 10 0;
+#X connect 10 0 9 0;
+#X connect 11 0 4 0;
+#X connect 12 0 1 0;
+#X connect 13 0 15 0;
+#X connect 15 0 16 0;
+#X connect 16 0 14 0;
+#X connect 17 0 15 1;
+#X restore 40 47 pd create_schnippl;
+#X restore 53 489 pd inside;
#X obj 322 271 vsl 15 100 0 1 0 1 empty empty volume 0 -8 0 8 -24198
--1 -1 5400 1;
+-1 -1 3400 1;
#X obj 204 374 *~ 0.2;
#X text 332 464 needs the zexy library and vasp;
-#X obj 98 402 * 0.0001;
+#X obj 51 297 * 0.0001;
#N canvas 0 0 478 359 glaetten 0;
#X floatatom 225 70 5 0 0 0 - - -;
#X floatatom 242 130 5 0 0 0 - - -;
@@ -318,39 +328,6 @@
#X connect 8 0 15 0;
#X connect 16 0 0 0;
#X restore 482 362 pd glaetten;
-#N canvas 0 0 471 365 sequence 0;
-#X obj 82 115 metro 500;
-#X obj 82 93 tgl 15 0 empty empty empty 0 -6 0 8 -262144 -1 -1 0 1
-;
-#X obj 86 184 sel 1 2 3 4;
-#X obj 52 290 line;
-#X obj 116 145 + 1;
-#X obj 82 144 0;
-#X msg 188 215 0;
-#X floatatom 130 81 5 0 0 0 - - -;
-#X msg 204 245 60 100;
-#X msg 36 248 120 10;
-#X msg 89 246 30 100;
-#X msg 141 246 100 10;
-#X obj 53 323 outlet;
-#X connect 0 0 5 0;
-#X connect 1 0 0 0;
-#X connect 2 0 9 0;
-#X connect 2 1 10 0;
-#X connect 2 2 11 0;
-#X connect 2 3 6 0;
-#X connect 2 3 8 0;
-#X connect 3 0 12 0;
-#X connect 4 0 5 1;
-#X connect 5 0 4 0;
-#X connect 5 0 2 0;
-#X connect 6 0 5 1;
-#X connect 7 0 0 1;
-#X connect 8 0 3 0;
-#X connect 9 0 3 0;
-#X connect 10 0 3 0;
-#X connect 11 0 3 0;
-#X restore 77 342 pd sequence;
#X obj 482 320 soundfiler;
#X obj 482 278 openpanel;
#X msg 482 299 read -resize \$1 insert;
@@ -362,6 +339,10 @@
#X text 506 251 load sample to insert;
#X text 332 478 be careful with high density \, with large files costs
a lot of cpu and glitches can appear;
+#X msg 481 211 \; pd-create_schnippl vis 1;
+#X obj 481 189 bng 15 250 50 0 empty empty empty 0 -6 0 8 -24198 -1
+-1;
+#X text 509 188 create samples to insert;
#X connect 2 0 13 0;
#X connect 4 0 7 0;
#X connect 5 0 15 0;
@@ -372,9 +353,9 @@ a lot of cpu and glitches can appear;
#X connect 13 0 3 1;
#X connect 13 0 10 0;
#X connect 15 0 4 0;
-#X connect 17 0 5 0;
-#X connect 18 0 22 0;
-#X connect 19 0 20 0;
+#X connect 17 0 21 0;
+#X connect 18 0 19 0;
+#X connect 19 0 17 0;
#X connect 20 0 18 0;
-#X connect 21 0 19 0;
-#X connect 22 0 16 0;
+#X connect 21 0 16 0;
+#X connect 26 0 25 0;
diff --git a/externals/grill/vasp/source/arg.cpp b/externals/grill/vasp/source/arg.cpp
index 89a6729c..696558cf 100644
--- a/externals/grill/vasp/source/arg.cpp
+++ b/externals/grill/vasp/source/arg.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+
+*/
+
+#include "main.h"
#include "arg.h"
//#include <math.h>
#include "classes.h"
@@ -5,7 +16,7 @@
Argument::Argument(): tp(tp_none),nxt(NULL) {}
Argument::~Argument() { ClearAll(); }
-Argument &Argument::Parse(I argc,t_atom *argv)
+Argument &Argument::Parse(I argc,const t_atom *argv)
{
if(argc == 0)
Clear();
@@ -47,6 +58,56 @@ Argument &Argument::Parse(I argc,t_atom *argv)
return *this;
}
+V Argument::MakeList(flext::AtomList &ret)
+{
+ switch(tp) {
+ case tp_none:
+ ret();
+ break;
+ case tp_list:
+ ret = *dt.atoms;
+ break;
+ case tp_vasp:
+ dt.v->MakeList(ret);
+ break;
+ case tp_env:
+ dt.env->MakeList(ret);
+ break;
+ case tp_vx: {
+ I d = dt.vx->Dim();
+ ret(d+1);
+ flext::SetSymbol(ret[0],vasp_base::sym_vector);
+ for(I i = 0; i < d; ++i)
+ flext::SetFloat(ret[i+1],(*dt.vx)[i]);
+ break;
+ }
+ case tp_cx:
+ ret(3);
+ flext::SetSymbol(ret[0],vasp_base::sym_complex);
+ flext::SetFloat(ret[1],dt.cx->real);
+ flext::SetFloat(ret[2],dt.cx->imag);
+ break;
+ case tp_int:
+ ret(1);
+ flext::SetInt(ret[0],dt.i);
+ break;
+ case tp_float:
+ ret(1);
+ flext::SetFloat(ret[0],dt.f);
+ break;
+ case tp_double: {
+ F f = (F)dt.d;
+ ret(3);
+ flext::SetSymbol(ret[0],vasp_base::sym_double);
+ flext::SetFloat(ret[1],f);
+ flext::SetFloat(ret[2],dt.d-f);
+ break;
+ }
+ default:
+ ERRINTERNAL();
+ }
+}
+
Argument &Argument::Clear()
{
@@ -73,7 +134,7 @@ Argument &Argument::Clear()
case tp_double:
break;
default:
- error("Argument: Internal error - type unknown!");
+ ERRINTERNAL();
}
tp = tp_none;
return *this;
@@ -100,7 +161,7 @@ Argument &Argument::SetEnv(Env *e)
return *this;
}
-Argument &Argument::SetList(I argc,t_atom *argv)
+Argument &Argument::SetList(I argc,const t_atom *argv)
{
if(tp != tp_none) Clear();
dt.atoms = new flext::AtomList(argc,argv); tp = tp_list;
@@ -202,7 +263,7 @@ Argument &Argument::AddVasp(Vasp *v) { Argument *a = new Argument; a->SetVasp(v)
Argument &Argument::AddEnv(Env *e) { Argument *a = new Argument; a->SetEnv(e); return Add(a); }
-Argument &Argument::AddList(I argc,t_atom *argv) { Argument *a = new Argument; a->SetList(argc,argv); return Add(a); }
+Argument &Argument::AddList(I argc,const t_atom *argv) { Argument *a = new Argument; a->SetList(argc,argv); return Add(a); }
Argument &Argument::AddI(I i) { Argument *a = new Argument; a->SetI(i); return Add(a); }
diff --git a/externals/grill/vasp/source/arg.h b/externals/grill/vasp/source/arg.h
index d6ebc378..bda3ef01 100644
--- a/externals/grill/vasp/source/arg.h
+++ b/externals/grill/vasp/source/arg.h
@@ -25,13 +25,13 @@ public:
Argument();
~Argument();
- Argument &Parse(I argc,t_atom *argv);
+ Argument &Parse(I argc,const t_atom *argv);
Argument &Clear();
Argument &ClearAll();
Argument &SetVasp(Vasp *v);
Argument &SetEnv(Env *e);
- Argument &SetList(I argc,t_atom *argv);
+ Argument &SetList(I argc,const t_atom *argv);
Argument &SetI(I i);
Argument &SetR(F f);
Argument &SetR(D d);
@@ -45,7 +45,7 @@ public:
Argument &AddVasp(Vasp *v);
Argument &AddEnv(Env *e);
- Argument &AddList(I argc,t_atom *argv);
+ Argument &AddList(I argc,const t_atom *argv);
Argument &AddI(I i);
Argument &AddR(F f);
Argument &AddR(D d);
@@ -86,6 +86,8 @@ public:
const VX &GetVector() const { return *dt.vx; }
VX GetAVector() const;
+ V MakeList(flext::AtomList &ret);
+
protected:
enum {
tp_none,tp_vasp,tp_env,tp_list,tp_int,tp_float,tp_double,tp_cx,tp_vx
diff --git a/externals/grill/vasp/source/buflib.cpp b/externals/grill/vasp/source/buflib.cpp
index 36bc90c7..03c2944e 100644
--- a/externals/grill/vasp/source/buflib.cpp
+++ b/externals/grill/vasp/source/buflib.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "buflib.h"
#include <stdio.h>
diff --git a/externals/grill/vasp/source/classes.cpp b/externals/grill/vasp/source/classes.cpp
index 46d07147..582f5959 100644
--- a/externals/grill/vasp/source/classes.cpp
+++ b/externals/grill/vasp/source/classes.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
//#include <stdarg.h>
@@ -38,15 +39,19 @@ vasp_base::vasp_base():
unit(xsu_sample),loglvl(0)
{
FLEXT_ADDMETHOD_(0,"radio",m_radio);
- FLEXT_ADDMETHOD_(0,"argchk",m_argchk);
- FLEXT_ADDMETHOD_(0,"loglvl",m_loglvl);
- FLEXT_ADDMETHOD_E(0,"unit",m_unit);
+
+// LATER!
+/*
+ FLEXT_ADDATTR_VAR1("argchk",argchk);
+ FLEXT_ADDATTR_VAR1("loglvl",loglvl);
+ FLEXT_ADDATTR_VAR1_E("unit",unit);
+*/
}
vasp_base::~vasp_base() {}
-V vasp_base::m_radio(I argc,t_atom *argv)
+V vasp_base::m_radio(I argc,const t_atom *argv)
{
if(argc > 0 && IsSymbol(argv[0])) {
// send command to self!
@@ -59,11 +64,11 @@ V vasp_base::m_radio(I argc,t_atom *argv)
post("%s - radio message invalid",thisName());
}
-
+/*
V vasp_base::m_unit(xs_unit u) { unit = u; }
V vasp_base::m_argchk(BL chk) { argchk = chk; }
V vasp_base::m_loglvl(I lvl) { loglvl = lvl; }
-
+*/
BL vasp_base::ToOutVasp(I oix,Vasp &v)
{
@@ -89,13 +94,19 @@ vasp_op::vasp_op(BL op)
FLEXT_ADDBANG(0,m_dobang);
FLEXT_ADDMETHOD_(0,"vasp",m_vasp);
FLEXT_ADDMETHOD_(0,"set",m_set);
- if(op) FLEXT_ADDMETHOD_(0,"to",m_to);
+// if(op) FLEXT_ADDMETHOD_(0,"to",m_to);
- FLEXT_ADDMETHOD_(0,"update",m_update);
+ FLEXT_ADDATTR_VAR("ref",m_getref,m_setref);
+ if(op) FLEXT_ADDATTR_VAR("to",m_getto,m_setto);
- FLEXT_ADDMETHOD_(0,"detach",m_detach);
FLEXT_ADDMETHOD_(0,"stop",m_stop);
- FLEXT_ADDMETHOD_(0,"prior",m_prior);
+
+ FLEXT_ADDATTR_VAR("update",m_getupd,m_setupd);
+
+#ifdef FLEXT_THREADS
+ FLEXT_ADDATTR_VAR1("detach",detach);
+ FLEXT_ADDATTR_VAR1("prior",prior);
+#endif
}
V vasp_op::m_dobang()
@@ -108,7 +119,7 @@ V vasp_op::m_dobang()
m_bang();
}
-I vasp_op::m_set(I argc,t_atom *argv)
+I vasp_op::m_set(I argc,const t_atom *argv)
{
Vasp arg(argc,argv);
@@ -128,13 +139,14 @@ I vasp_op::m_set(I argc,t_atom *argv)
return 0;
}
-V vasp_op::m_vasp(I argc,t_atom *argv)
+V vasp_op::m_vasp(I argc,const t_atom *argv)
{
m_set(argc,argv);
m_dobang();
}
-V vasp_op::m_to(I argc,t_atom *argv)
+
+V vasp_op::m_to(I argc,const t_atom *argv)
{
Vasp to(argc,argv);
@@ -146,7 +158,7 @@ V vasp_op::m_to(I argc,t_atom *argv)
dst = to;
}
-V vasp_op::m_update(I argc,t_atom *argv)
+V vasp_op::m_update(I argc,const t_atom *argv)
{
if(argc == 0)
ref.Refresh();
@@ -158,6 +170,8 @@ V vasp_op::m_update(I argc,t_atom *argv)
}
}
+
+/*
V vasp_op::m_detach(BL thr)
{
#ifdef FLEXT_THREADS
@@ -171,6 +185,7 @@ V vasp_op::m_prior(I p)
prior = p;
#endif
}
+*/
V vasp_op::m_stop() {}
@@ -204,7 +219,7 @@ V vasp_tx::m_bang()
delete ret;
}
else {
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("%s - no valid return",thisName());
#endif
}
@@ -246,7 +261,7 @@ Vasp *vasp_unop::tx_work()
///////////////////////////////////////////////////////////////////////////
-vasp_binop::vasp_binop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode):
+vasp_binop::vasp_binop(I argc,const t_atom *argv,const Argument &def,BL op,UL outcode):
vasp_tx(op)
{
a_list(argc,argv);
@@ -265,9 +280,11 @@ vasp_binop::vasp_binop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode)
FLEXT_ADDMETHOD_(1,"complex",a_complex);
FLEXT_ADDMETHOD_(1,"vector",a_vector);
FLEXT_ADDMETHOD_(1,"radio",a_radio);
+
+ FLEXT_ADDATTR_VAR("arg",m_getarg,m_setarg);
}
-V vasp_binop::a_list(I argc,t_atom *argv)
+V vasp_binop::a_list(I argc,const t_atom *argv)
{
if(argc) {
arg.Parse(argc,argv);
@@ -282,7 +299,7 @@ V vasp_binop::a_list(I argc,t_atom *argv)
}
}
-V vasp_binop::a_vasp(I argc,t_atom *argv)
+V vasp_binop::a_vasp(I argc,const t_atom *argv)
{
Vasp *v = new Vasp(argc,argv);
if(v->Ok()) {
@@ -297,7 +314,7 @@ V vasp_binop::a_vasp(I argc,t_atom *argv)
}
}
-V vasp_binop::a_env(I argc,t_atom *argv)
+V vasp_binop::a_env(I argc,const t_atom *argv)
{
Env *bp = new Env(argc,argv);
if(bp->Ok()) {
@@ -314,7 +331,7 @@ V vasp_binop::a_env(I argc,t_atom *argv)
V vasp_binop::a_float(F v) { arg.SetR(v); }
-V vasp_binop::a_double(I argc,t_atom *argv)
+V vasp_binop::a_double(I argc,const t_atom *argv)
{
if(
(argc == 1 && CanbeFloat(argv[0])) ||
@@ -331,7 +348,7 @@ V vasp_binop::a_double(I argc,t_atom *argv)
V vasp_binop::a_int(I v) { arg.SetI(v); }
-V vasp_binop::a_complex(I argc,t_atom *argv)
+V vasp_binop::a_complex(I argc,const t_atom *argv)
{
if(
(argc == 1 && CanbeFloat(argv[0])) ||
@@ -346,7 +363,7 @@ V vasp_binop::a_complex(I argc,t_atom *argv)
post("%s - invalid complex argument (ignored)",thisName());
}
-V vasp_binop::a_vector(I argc,t_atom *argv)
+V vasp_binop::a_vector(I argc,const t_atom *argv)
{
error("%s - vector type not implemented",thisName());
}
@@ -366,7 +383,7 @@ Vasp *vasp_binop::tx_work(const Argument &arg)
///////////////////////////////////////////////////////////////////////////
-vasp_anyop::vasp_anyop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode):
+vasp_anyop::vasp_anyop(I argc,const t_atom *argv,const Argument &def,BL op,UL outcode):
vasp_tx(op)
{
a_list(argc,argv);
@@ -379,9 +396,11 @@ vasp_anyop::vasp_anyop(I argc,t_atom *argv,const Argument &def,BL op,UL outcode)
FLEXT_ADDMETHOD(1,a_list);
FLEXT_ADDMETHOD_(1,"vasp",a_list);
FLEXT_ADDMETHOD_(1,"radio",a_radio);
+
+ FLEXT_ADDATTR_VAR("arg",m_getarg,m_setarg);
}
-V vasp_anyop::a_list(I argc,t_atom *argv)
+V vasp_anyop::a_list(I argc,const t_atom *argv)
{
if(argc) {
arg.SetList(argc,argv);
diff --git a/externals/grill/vasp/source/classes.h b/externals/grill/vasp/source/classes.h
index 5344f585..d6a31413 100644
--- a/externals/grill/vasp/source/classes.h
+++ b/externals/grill/vasp/source/classes.h
@@ -37,12 +37,13 @@ protected:
vasp_base();
virtual ~vasp_base();
- virtual V m_radio(I argc,t_atom *argv); // commands for all
+ virtual V m_radio(I argc,const t_atom *argv); // commands for all
+/*
V m_argchk(BL chk); // precheck argument on arrival
V m_loglvl(I lvl); // noise level of log messages
V m_unit(xs_unit u); // unit command
-
+*/
BL refresh; // immediate graphics refresh?
BL argchk; // pre-operation argument feasibility check
xs_unit unit; // time units
@@ -57,9 +58,9 @@ private:
FLEXT_CALLBACK_V(m_radio)
- FLEXT_CALLBACK_B(m_argchk)
- FLEXT_CALLBACK_I(m_loglvl)
- FLEXT_CALLBACK_1(m_unit,xs_unit)
+ FLEXT_ATTRVAR_B(argchk)
+ FLEXT_ATTRVAR_I(loglvl)
+ FLEXT_ATTRVAR_E(unit,xs_unit)
};
@@ -73,18 +74,26 @@ protected:
virtual V m_dobang(); // bang method
- virtual V m_vasp(I argc,t_atom *argv); // trigger
- virtual I m_set(I argc,t_atom *argv); // non trigger
- virtual V m_to(I argc,t_atom *argv); // set destination
- V m_detach(BL thr); // detached thread
- virtual V m_prior(I dp); // thread priority +-
+ virtual V m_vasp(I argc,const t_atom *argv); // trigger
+ virtual I m_set(I argc,const t_atom *argv); // non trigger
+ virtual V m_to(I argc,const t_atom *argv); // set destination
+// V m_detach(BL thr); // detached thread
+// virtual V m_prior(I dp); // thread priority +-
virtual V m_stop(); // stop working
- virtual V m_update(I argc = 0,t_atom *argv = NULL); // graphics update
+ virtual V m_update(I argc = 0,const t_atom *argv = NULL); // graphics update
+
+ V m_setupd(const AtomList &l) { m_update(l.Count(),l.Atoms()); }
+ V m_getupd(AtomList &l) { l(1); SetBool(l[0],refresh); }
// destination vasp
Vasp ref,dst;
+ V m_setref(const AtomList &l) { m_set(l.Count(),l.Atoms()); }
+ V m_getref(AtomList &l) { ref.MakeList(l); }
+ V m_setto(const AtomList &l) { m_to(l.Count(),l.Atoms()); }
+ V m_getto(AtomList &l) { dst.MakeList(l); }
+
FLEXT_CALLBACK_V(m_to)
FLEXT_CALLBACK(m_dobang)
@@ -106,11 +115,18 @@ protected:
#endif
FLEXT_CALLBACK_V(m_vasp)
FLEXT_CALLBACK_V(m_set)
- FLEXT_CALLBACK_V(m_update)
- FLEXT_CALLBACK_B(m_detach)
- FLEXT_CALLBACK_I(m_prior)
+
+ FLEXT_CALLVAR_V(m_getref,m_setref)
+ FLEXT_CALLVAR_V(m_getto,m_setto)
+
FLEXT_CALLBACK(m_stop)
+ FLEXT_CALLVAR_V(m_getupd,m_setupd)
+#ifdef FLEXT_THREADS
+ FLEXT_ATTRVAR_B(detach)
+ FLEXT_ATTRVAR_I(prior)
+#endif
+
private:
virtual V m_bang() = 0; // do! and output current Vasp
};
@@ -160,25 +176,28 @@ class vasp_binop:
FLEXT_HEADER(vasp_binop,vasp_tx)
protected:
- vasp_binop(I argc,t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
+ vasp_binop(I argc,const t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
// assignment functions
- virtual V a_list(I argc,t_atom *argv);
- /*virtual*/ V a_vasp(I argc,t_atom *argv);
- /*virtual*/ V a_env(I argc,t_atom *argv);
+ virtual V a_list(I argc,const t_atom *argv);
+ /*virtual*/ V a_vasp(I argc,const t_atom *argv);
+ /*virtual*/ V a_env(I argc,const t_atom *argv);
/*virtual*/ V a_float(F f);
/*virtual*/ V a_int(I f);
- /*virtual*/ V a_double(I argc,t_atom *argv);
- /*virtual*/ V a_complex(I argc,t_atom *argv);
- /*virtual*/ V a_vector(I argc,t_atom *argv);
+ /*virtual*/ V a_double(I argc,const t_atom *argv);
+ /*virtual*/ V a_complex(I argc,const t_atom *argv);
+ /*virtual*/ V a_vector(I argc,const t_atom *argv);
- V a_radio(I,t_atom *) {}
+ V a_radio(I,const t_atom *) {}
virtual Vasp *x_work();
virtual Vasp *tx_work(const Argument &arg);
Argument arg;
+ V m_setarg(const AtomList &l) { a_list(l.Count(),l.Atoms()); }
+ V m_getarg(AtomList &l) { arg.MakeList(l); }
+
private:
FLEXT_CALLBACK_V(a_list)
FLEXT_CALLBACK_V(a_vasp)
@@ -189,6 +208,8 @@ private:
FLEXT_CALLBACK_V(a_complex)
FLEXT_CALLBACK_V(a_vector)
FLEXT_CALLBACK_V(a_radio)
+
+ FLEXT_CALLVAR_V(m_getarg,m_setarg)
};
@@ -200,21 +221,26 @@ class vasp_anyop:
FLEXT_HEADER(vasp_anyop,vasp_tx)
protected:
- vasp_anyop(I argc,t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
+ vasp_anyop(I argc,const t_atom *argv,const Argument &def = Argument(),BL withto = false,UL outcode = 0);
// assignment functions
- virtual V a_list(I argc,t_atom *argv);
+ virtual V a_list(I argc,const t_atom *argv);
- V a_radio(I,t_atom *) {}
+ V a_radio(I,const t_atom *) {}
virtual Vasp *x_work();
virtual Vasp *tx_work(const Argument &arg);
Argument arg;
+ V m_setarg(const AtomList &l) { a_list(l.Count(),l.Atoms()); }
+ V m_getarg(AtomList &l) { arg.MakeList(l); }
+
private:
FLEXT_CALLBACK_V(a_list)
FLEXT_CALLBACK_V(a_radio)
+
+ FLEXT_CALLVAR_V(m_getarg,m_setarg)
};
@@ -243,7 +269,7 @@ class vasp_ ## op: \
{ \
FLEXT_HEADER(vasp_##op,vasp_binop) \
public: \
- vasp_##op(I argc,t_atom *argv): vasp_binop(argc,argv,def,to) {} \
+ vasp_##op(I argc,const t_atom *argv): vasp_binop(argc,argv,def,to) {} \
protected: \
virtual Vasp *tx_work(const Argument &arg) \
{ \
@@ -261,7 +287,7 @@ class vasp_ ## op: \
{ \
FLEXT_HEADER(vasp_##op,vasp_anyop) \
public: \
- vasp_##op(I argc,t_atom *argv): vasp_anyop(argc,argv,def,to) {} \
+ vasp_##op(I argc,const t_atom *argv): vasp_anyop(argc,argv,def,to) {} \
protected: \
virtual Vasp *tx_work(const Argument &arg) \
{ \
diff --git a/externals/grill/vasp/source/env.cpp b/externals/grill/vasp/source/env.cpp
index f846a227..010f888e 100644
--- a/externals/grill/vasp/source/env.cpp
+++ b/externals/grill/vasp/source/env.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "env.h"
#include "classes.h"
#include "util.h"
@@ -58,12 +59,12 @@ BL Env::ChkArgs(I argc,const t_atom *argv)
if(v && v == vasp_base::sym_env) ix++; // if it is "env" ignore it
while(argc > ix) {
- // check for position
+ // check for value
if(flext::CanbeFloat(argv[ix])) ix++;
else
return false;
- // check for value
+ // check for position
if(argc > ix)
if(flext::CanbeFloat(argv[ix])) ix++;
else
@@ -73,7 +74,15 @@ BL Env::ChkArgs(I argc,const t_atom *argv)
return true;
}
-
+V Env::MakeList(flext::AtomList &ret) const
+{
+ ret(cnt*2+1);
+ flext::SetSymbol(ret[0],vasp_base::sym_env);
+ for(I i = 0; i < cnt; ++i) {
+ flext::SetFloat(ret[i*2+1],val[i]);
+ flext::SetFloat(ret[i*2+2],pos[i]);
+ }
+}
V Env::Clear()
{
diff --git a/externals/grill/vasp/source/env.h b/externals/grill/vasp/source/env.h
index e9f8dae7..5b00ffae 100644
--- a/externals/grill/vasp/source/env.h
+++ b/externals/grill/vasp/source/env.h
@@ -23,6 +23,8 @@ public:
static BL ChkArgs(I argc,const t_atom *argv);
+ V MakeList(flext::AtomList &ret) const;
+
V Clear();
BL Ok() const { return cnt && pos != NULL && val != NULL; }
diff --git a/externals/grill/vasp/source/main.cpp b/externals/grill/vasp/source/main.cpp
index 15525aac..1603d107 100644
--- a/externals/grill/vasp/source/main.cpp
+++ b/externals/grill/vasp/source/main.cpp
@@ -8,10 +8,11 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
-const C *VASP_VERSION = "0.1.2pre2";
+const C *VASP_VERSION = "0.1.2pre6";
V lib_setup()
{
@@ -20,7 +21,7 @@ V lib_setup()
post(" VASP modular %s ",VASP_VERSION);
post(" vector assembling signal processor ");
post(" (C)2002 Thomas Grill ");
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post(" DEBUG BUILD - " __DATE__ " " __TIME__);
#endif
post("");
diff --git a/externals/grill/vasp/source/main.h b/externals/grill/vasp/source/main.h
index 0fad36d8..f8680dab 100644
--- a/externals/grill/vasp/source/main.h
+++ b/externals/grill/vasp/source/main.h
@@ -11,6 +11,9 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#ifndef __VASP_H
#define __VASP_H
+// enable attributes
+#define FLEXT_ATTRIBUTES 1
+
#include <flext.h>
#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
@@ -52,7 +55,7 @@ class vector;
typedef vector VX;
#endif
-#ifdef PD
+#if FLEXT_SYS == FLEXT_SYS_PD
// buffers are never interleaved - special optimizations may occur
// attention: possibly obsolete when immediate file access is implemented
#define VASP_CHN1
@@ -76,6 +79,9 @@ public:
I Dim() const { return dim; }
F *Data() { return data; }
const F *Data() const { return data; }
+
+ F operator [](I ix) const { return data[ix]; }
+ F &operator [](I ix) { return data[ix]; }
protected:
I dim; F *data;
};
diff --git a/externals/grill/vasp/source/obj_chns.cpp b/externals/grill/vasp/source/obj_chns.cpp
index 1cd15c30..facfe5fe 100755
--- a/externals/grill/vasp/source/obj_chns.cpp
+++ b/externals/grill/vasp/source/obj_chns.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -38,9 +39,9 @@ public:
AddInAnything(2);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_ix);
+ FLEXT_ADDATTR_VAR("index",ix,m_ix);
}
V m_ix(I i) { ix = i; }
@@ -59,6 +60,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_ix);
+ FLEXT_CALLSET_I(m_ix);
+ FLEXT_ATTRGET_I(ix);
};
FLEXT_LIB_V("vasp, vasp.channel vasp.c",vasp_channel)
diff --git a/externals/grill/vasp/source/obj_frames.cpp b/externals/grill/vasp/source/obj_frames.cpp
index fb618e51..c50d5019 100644
--- a/externals/grill/vasp/source/obj_frames.cpp
+++ b/externals/grill/vasp/source/obj_frames.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -31,7 +32,7 @@ class vasp_frames:
FLEXT_HEADER(vasp_frames,vasp_tx)
public:
- vasp_frames(I argc,t_atom *argv):
+ vasp_frames(I argc,t_atom *argv,BL abs = true):
frms(0),setf(false)
{
if(argc && CanbeFloat(argv[0]))
@@ -43,9 +44,9 @@ public:
AddInAnything();
AddInFloat();
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_arg);
+ if(abs) FLEXT_ADDATTR_VAR("frames",frms,m_arg);
}
virtual V m_arg(F f)
@@ -68,6 +69,8 @@ protected:
private:
FLEXT_CALLBACK_F(m_arg);
+ FLEXT_CALLSET_I(m_arg);
+ FLEXT_ATTRGET_I(frms);
};
FLEXT_LIB_V("vasp, vasp.frames vasp.f",vasp_frames)
@@ -128,9 +131,10 @@ class vasp_mframes:
public:
vasp_mframes(I argc,t_atom *argv):
- vasp_frames(argc,argv)
+ vasp_frames(argc,argv,false)
{
if(argc && CanbeFloat(argv[0])) m_arg(GetAFloat(argv[0]));
+ FLEXT_ADDATTR_VAR("factor",factor,m_arg);
}
virtual Vasp *x_work()
@@ -150,6 +154,8 @@ public:
protected:
F factor;
+ FLEXT_CALLSET_F(m_arg);
+ FLEXT_ATTRGET_F(factor);
};
FLEXT_LIB_V("vasp, vasp.frames* vasp.f*",vasp_mframes)
diff --git a/externals/grill/vasp/source/obj_imm.cpp b/externals/grill/vasp/source/obj_imm.cpp
index d1ca5da0..9ea9791a 100644
--- a/externals/grill/vasp/source/obj_imm.cpp
+++ b/externals/grill/vasp/source/obj_imm.cpp
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Definitions for immediate vasps
*/
-
+#include "main.h"
#include "classes.h"
#include "util.h"
#include "buflib.h"
@@ -48,10 +48,9 @@ public:
AddInAnything();
AddInInt();
AddOutAnything();
- SetupInOut();
- FLEXT_ADDMETHOD_(0,"frames",m_frames);
FLEXT_ADDMETHOD(1,m_frames);
+ FLEXT_ADDATTR_VAR("frames",frms,m_frames);
}
V m_frames(I n) { frms = n; }
@@ -97,6 +96,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_frames)
+ FLEXT_CALLSET_I(m_frames);
+ FLEXT_ATTRGET_I(frms);
};
FLEXT_LIB_V("vasp, vasp.imm vasp.!",vasp_imm)
diff --git a/externals/grill/vasp/source/obj_offs.cpp b/externals/grill/vasp/source/obj_offs.cpp
index e424056f..07bf1982 100644
--- a/externals/grill/vasp/source/obj_offs.cpp
+++ b/externals/grill/vasp/source/obj_offs.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -43,9 +44,9 @@ public:
AddInAnything();
AddInFloat();
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_offs);
+ FLEXT_ADDATTR_VAR("frames",offs,m_offs);
}
V m_offs(F o)
@@ -68,6 +69,8 @@ protected:
private:
FLEXT_CALLBACK_F(m_offs);
+ FLEXT_CALLSET_I(m_offs);
+ FLEXT_ATTRGET_I(offs);
};
FLEXT_LIB_V("vasp, vasp.offset vasp.o",vasp_offset)
@@ -138,7 +141,6 @@ public:
AddInAnything();
// AddOutAnything();
AddOutFloat();
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/obj_part.cpp b/externals/grill/vasp/source/obj_part.cpp
index 2b0aa256..f1ecf354 100644
--- a/externals/grill/vasp/source/obj_part.cpp
+++ b/externals/grill/vasp/source/obj_part.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -40,14 +41,14 @@ public:
AddInAnything(2);
AddOutAnything(2);
- SetupInOut();
FLEXT_ADDMETHOD_(1,"list",m_part);
+ FLEXT_ADDATTR_VAR("parts",m_getpart,m_setpart);
}
~vasp_part() { if(part) delete[] part; }
- V m_part(I argc,t_atom *argv)
+ V m_part(I argc,const t_atom *argv)
{
if(part) delete[] part; parts = 0;
part = new I[argc];
@@ -62,6 +63,14 @@ public:
}
}
+ V m_getpart(AtomList &ret)
+ {
+ ret(parts);
+ for(I i = 0; i < parts; ++i) SetInt(ret[i],part[i]);
+ }
+
+ V m_setpart(const AtomList &ret) { m_part(ret.Count(),ret.Atoms()); }
+
virtual V m_bang()
{
if(!ref.Ok()) {
@@ -95,6 +104,7 @@ protected:
I parts,*part;
FLEXT_CALLBACK_V(m_part)
+ FLEXT_CALLVAR_V(m_getpart,m_setpart);
};
FLEXT_LIB_V("vasp, vasp.part",vasp_part)
diff --git a/externals/grill/vasp/source/obj_peaks.cpp b/externals/grill/vasp/source/obj_peaks.cpp
index 1c1a218d..bade1ff1 100644
--- a/externals/grill/vasp/source/obj_peaks.cpp
+++ b/externals/grill/vasp/source/obj_peaks.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
#include <math.h>
@@ -44,9 +45,9 @@ public:
AddInAnything();
AddInInt();
AddOutAnything(2);
- SetupInOut();
FLEXT_ADDMETHOD(1,m_peaks);
+ FLEXT_ADDATTR_VAR("peaks",peaks,m_peaks);
}
V m_peaks(I n) { peaks = n; }
@@ -104,6 +105,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_peaks);
+ FLEXT_CALLSET_I(m_peaks);
+ FLEXT_ATTRGET_I(peaks);
};
FLEXT_LIB_V("vasp, vasp.peaks?",vasp_qpeaks)
diff --git a/externals/grill/vasp/source/obj_q.cpp b/externals/grill/vasp/source/obj_q.cpp
index f0465109..c3f86ca5 100644
--- a/externals/grill/vasp/source/obj_q.cpp
+++ b/externals/grill/vasp/source/obj_q.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -35,7 +36,6 @@ public:
{
AddInAnything();
AddOutList();
- SetupInOut();
}
virtual V m_bang()
@@ -86,7 +86,6 @@ public:
{
AddInAnything();
AddOutList(2);
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/obj_radio.cpp b/externals/grill/vasp/source/obj_radio.cpp
index 7b0608e3..d0c2452e 100644
--- a/externals/grill/vasp/source/obj_radio.cpp
+++ b/externals/grill/vasp/source/obj_radio.cpp
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief objects for radio messages.
*/
-
+#include "main.h"
#include "classes.h"
@@ -35,7 +35,6 @@ public:
{
AddInAnything();
AddOutAnything(2);
- SetupInOut();
FLEXT_ADDMETHOD(0,m_any);
}
diff --git a/externals/grill/vasp/source/obj_size.cpp b/externals/grill/vasp/source/obj_size.cpp
index 9a535e60..6c38184c 100644
--- a/externals/grill/vasp/source/obj_size.cpp
+++ b/externals/grill/vasp/source/obj_size.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -32,7 +33,7 @@ class vasp_size:
FLEXT_HEADER(vasp_size,vasp_tx)
public:
- vasp_size(I argc,t_atom *argv):
+ vasp_size(I argc,t_atom *argv,BL abs = true):
size(0),sets(false)
{
if(argc >= 1 && CanbeFloat(argv[0]))
@@ -43,9 +44,9 @@ public:
AddInAnything();
AddInFloat();
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_arg);
+ if(abs) FLEXT_ADDATTR_VAR("frames",size,m_arg);
}
virtual V m_arg(F s)
@@ -68,6 +69,8 @@ protected:
private:
FLEXT_CALLBACK_F(m_arg);
+ FLEXT_CALLSET_I(m_arg);
+ FLEXT_ATTRGET_I(size);
};
FLEXT_LIB_V("vasp, vasp.size vasp.s",vasp_size)
@@ -128,9 +131,10 @@ class vasp_msize:
public:
vasp_msize(I argc,t_atom *argv):
- vasp_size(argc,argv)
+ vasp_size(argc,argv,false)
{
if(argc && CanbeFloat(argv[0])) m_arg(GetAFloat(argv[0]));
+ FLEXT_ADDATTR_VAR("factor",factor,m_arg);
}
virtual Vasp *x_work()
@@ -150,6 +154,8 @@ public:
protected:
R factor;
+ FLEXT_CALLSET_F(m_arg);
+ FLEXT_ATTRGET_F(factor);
};
FLEXT_LIB_V("vasp, vasp.size* vasp.s*",vasp_msize)
@@ -217,7 +223,6 @@ public:
AddInAnything();
// AddOutAnything();
AddOutFloat();
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/obj_split.cpp b/externals/grill/vasp/source/obj_split.cpp
index 42921d2a..5cb40889 100644
--- a/externals/grill/vasp/source/obj_split.cpp
+++ b/externals/grill/vasp/source/obj_split.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -45,7 +46,6 @@ public:
AddInAnything();
AddOutAnything(cnt+1);
- SetupInOut();
}
virtual V m_bang()
@@ -115,7 +115,6 @@ public:
AddInAnything(cnt);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD_(0,"reset",m_reset);
}
@@ -185,7 +184,6 @@ public:
AddInAnything();
AddOutAnything(n);
AddOutBang();
- SetupInOut();
}
virtual V m_bang()
@@ -248,7 +246,6 @@ public:
AddInAnything(2);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD_(0,"reset",m_reset);
FLEXT_ADDMETHOD_(1,"vasp",m_add);
diff --git a/externals/grill/vasp/source/obj_sync.cpp b/externals/grill/vasp/source/obj_sync.cpp
index 35f81409..6dcd1bd2 100644
--- a/externals/grill/vasp/source/obj_sync.cpp
+++ b/externals/grill/vasp/source/obj_sync.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -51,7 +52,6 @@ public:
AddInAnything(cnt);
AddOutAnything(cnt);
- SetupInOut();
FLEXT_ADDMETHOD_(0,"reset",m_reset);
diff --git a/externals/grill/vasp/source/obj_vasp.cpp b/externals/grill/vasp/source/obj_vasp.cpp
index 3b52d253..ba91a7c5 100644
--- a/externals/grill/vasp/source/obj_vasp.cpp
+++ b/externals/grill/vasp/source/obj_vasp.cpp
@@ -12,7 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief basic vasp objects.
*/
-
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -72,7 +72,7 @@ FLEXT_LIB_V("vasp, vasp",vasp_v)
\param inlet set - vasp to be stored (and not immediately output)
\retval outlet vasp
- \note In MaxMSP only necessary when buffer is in another window.
+ \note In Max/MSP only necessary when buffer is in another window.
*/
class vasp_update:
public vasp_tx
diff --git a/externals/grill/vasp/source/obj_vecs.cpp b/externals/grill/vasp/source/obj_vecs.cpp
index fd24d273..3c0db9f5 100644
--- a/externals/grill/vasp/source/obj_vecs.cpp
+++ b/externals/grill/vasp/source/obj_vecs.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
@@ -42,9 +43,9 @@ public:
AddInAnything(2);
AddOutAnything();
- SetupInOut();
FLEXT_ADDMETHOD(1,m_ix);
+ FLEXT_ADDATTR_VAR("index",ix,m_ix);
}
V m_ix(I i) { ix = i; }
@@ -58,6 +59,8 @@ protected:
private:
FLEXT_CALLBACK_I(m_ix);
+ FLEXT_CALLSET_I(m_ix);
+ FLEXT_ATTRGET_I(ix);
};
FLEXT_LIB_V("vasp, vasp.vector vasp.n",vasp_vector)
@@ -88,7 +91,6 @@ public:
AddInAnything();
// AddOutAnything();
AddOutInt();
- SetupInOut();
}
virtual V m_bang()
diff --git a/externals/grill/vasp/source/opbase.cpp b/externals/grill/vasp/source/opbase.cpp
index 2ea9a13c..df4150f1 100644
--- a/externals/grill/vasp/source/opbase.cpp
+++ b/externals/grill/vasp/source/opbase.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "opbase.h"
#include "opdefs.h"
diff --git a/externals/grill/vasp/source/opparam.cpp b/externals/grill/vasp/source/opparam.cpp
index 9925e4dd..6bf42b5e 100644
--- a/externals/grill/vasp/source/opparam.cpp
+++ b/externals/grill/vasp/source/opparam.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+
+*/
+
+#include "main.h"
#include "opparam.h"
//#include <math.h>
diff --git a/externals/grill/vasp/source/ops_arith.cpp b/externals/grill/vasp/source/ops_arith.cpp
index 5d62e2c6..6faa1aad 100644
--- a/externals/grill/vasp/source/ops_arith.cpp
+++ b/externals/grill/vasp/source/ops_arith.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_arith.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_assign.cpp b/externals/grill/vasp/source/ops_assign.cpp
index 96061ce9..a8033bb9 100644
--- a/externals/grill/vasp/source/ops_assign.cpp
+++ b/externals/grill/vasp/source/ops_assign.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_assign.h"
#include "opdefs.h"
@@ -64,9 +65,9 @@ class vasp_copy:
FLEXT_HEADER(vasp_copy,vasp_anyop)
public:
- vasp_copy(I argc,t_atom *argv): vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_any,0)) {}
+ vasp_copy(I argc,const t_atom *argv): vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_any,0)) {}
- virtual V m_to(I,t_atom *) { post("s - destination vasp is ignored!",thisName()); }
+ virtual V m_to(I,const t_atom *) { post("s - destination vasp is ignored!",thisName()); }
virtual Vasp *do_copy(OpParam &p,Vasp &dst) { return VaspOp::m_copy(p,ref,dst); }
@@ -97,7 +98,7 @@ class vasp_ccopy:
FLEXT_HEADER(vasp_ccopy,vasp_copy)
public:
- vasp_ccopy(I argc,t_atom *argv): vasp_copy(argc,argv) {}
+ vasp_ccopy(I argc,const t_atom *argv): vasp_copy(argc,argv) {}
virtual Vasp *do_copy(OpParam &p,Vasp &dst) { return VaspOp::m_ccopy(p,ref,dst); }
diff --git a/externals/grill/vasp/source/ops_carith.cpp b/externals/grill/vasp/source/ops_carith.cpp
index b2464ab2..cf00b439 100644
--- a/externals/grill/vasp/source/ops_carith.cpp
+++ b/externals/grill/vasp/source/ops_carith.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_carith.h"
#include "ops_assign.h"
#include "opdefs.h"
diff --git a/externals/grill/vasp/source/ops_cmp.cpp b/externals/grill/vasp/source/ops_cmp.cpp
index 2f632a54..fe4bd60a 100644
--- a/externals/grill/vasp/source/ops_cmp.cpp
+++ b/externals/grill/vasp/source/ops_cmp.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cmp.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_cplx.cpp b/externals/grill/vasp/source/ops_cplx.cpp
index 70f8c6e2..5311b2db 100644
--- a/externals/grill/vasp/source/ops_cplx.cpp
+++ b/externals/grill/vasp/source/ops_cplx.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cplx.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_dft.cpp b/externals/grill/vasp/source/ops_dft.cpp
index a83d80fc..dec49a26 100644
--- a/externals/grill/vasp/source/ops_dft.cpp
+++ b/externals/grill/vasp/source/ops_dft.cpp
@@ -23,6 +23,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
In-place transformation is only possible for stride=1
*/
+#include "main.h"
#include "ops_dft.h"
#include <math.h>
#include <string.h>
diff --git a/externals/grill/vasp/source/ops_feature.cpp b/externals/grill/vasp/source/ops_feature.cpp
index cb0f57c5..ede711e2 100644
--- a/externals/grill/vasp/source/ops_feature.cpp
+++ b/externals/grill/vasp/source/ops_feature.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_feature.h"
#include "oploop.h"
#include "util.h"
@@ -141,7 +142,9 @@ class vasp_peaks:
FLEXT_HEADER(vasp_peaks,vasp_anyop)
public:
- vasp_peaks(I argc,t_atom *argv): vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_float,0)) {}
+ vasp_peaks(I argc,const t_atom *argv):
+ vasp_anyop(argc,argv,VASP_ARG(),true,XletCode(xlet::tp_float,0))
+ {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_peaks(p,ref,&dst); }
@@ -170,7 +173,7 @@ class vasp_valleys:
{
FLEXT_HEADER(vasp_valleys,vasp_peaks)
public:
- vasp_valleys(I argc,t_atom *argv): vasp_peaks(argc,argv) {}
+ vasp_valleys(I argc,const t_atom *argv): vasp_peaks(argc,argv) {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_valleys(p,ref,&dst); }
};
FLEXT_LIB_V("vasp, vasp.valleys",vasp_valleys)
@@ -181,7 +184,7 @@ class vasp_rpeaks:
{
FLEXT_HEADER(vasp_rpeaks,vasp_peaks)
public:
- vasp_rpeaks(I argc,t_atom *argv): vasp_peaks(argc,argv) {}
+ vasp_rpeaks(I argc,const t_atom *argv): vasp_peaks(argc,argv) {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_rpeaks(p,ref,&dst); }
};
FLEXT_LIB_V("vasp, vasp.rpeaks",vasp_rpeaks)
@@ -192,7 +195,7 @@ class vasp_rvalleys:
{
FLEXT_HEADER(vasp_rvalleys,vasp_peaks)
public:
- vasp_rvalleys(I argc,t_atom *argv): vasp_peaks(argc,argv) {}
+ vasp_rvalleys(I argc,const t_atom *argv): vasp_peaks(argc,argv) {}
virtual Vasp *do_peaks(OpParam &p) { return VaspOp::m_rvalleys(p,ref,&dst); }
};
FLEXT_LIB_V("vasp, vasp.rvalleys",vasp_rvalleys)
diff --git a/externals/grill/vasp/source/ops_flt.cpp b/externals/grill/vasp/source/ops_flt.cpp
index 64fb74ca..7784b081 100644
--- a/externals/grill/vasp/source/ops_flt.cpp
+++ b/externals/grill/vasp/source/ops_flt.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_flt.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_gate.cpp b/externals/grill/vasp/source/ops_gate.cpp
index f8f9b3e3..97faf682 100644
--- a/externals/grill/vasp/source/ops_gate.cpp
+++ b/externals/grill/vasp/source/ops_gate.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cmp.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_gen.cpp b/externals/grill/vasp/source/ops_gen.cpp
index eec81701..f45be684 100644
--- a/externals/grill/vasp/source/ops_gen.cpp
+++ b/externals/grill/vasp/source/ops_gen.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_gen.h"
#include "util.h"
#include <math.h>
diff --git a/externals/grill/vasp/source/ops_qminmax.cpp b/externals/grill/vasp/source/ops_qminmax.cpp
index 05c0e8b5..adcb15d2 100644
--- a/externals/grill/vasp/source/ops_qminmax.cpp
+++ b/externals/grill/vasp/source/ops_qminmax.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_cmp.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_rearr.cpp b/externals/grill/vasp/source/ops_rearr.cpp
index 2aa69aa2..bee58c56 100644
--- a/externals/grill/vasp/source/ops_rearr.cpp
+++ b/externals/grill/vasp/source/ops_rearr.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_rearr.h"
#include "oploop.h"
#include "oppermute.h"
@@ -101,11 +102,11 @@ class vasp_shift:
FLEXT_HEADER(vasp_shift,vasp_anyop)
public:
- vasp_shift(I argc,t_atom *argv):
+ vasp_shift(I argc,const t_atom *argv):
vasp_anyop(argc,argv,VASP_ARG_I(0),true),
fill(xsf_zero)
{
- FLEXT_ADDMETHOD_E(0,"fill",m_fill);
+ FLEXT_ADDATTR_VAR1_E("fill",fill);
}
enum xs_fill {
@@ -113,8 +114,6 @@ public:
xsf_none = 0,xsf_zero,xsf_edge
};
- V m_fill(xs_fill f) { fill = f; }
-
virtual Vasp *do_shift(OpParam &p) { return VaspOp::m_shift(p,ref,arg,&dst); }
virtual Vasp *tx_work(const Argument &arg)
@@ -132,7 +131,7 @@ protected:
xs_fill fill;
private:
- FLEXT_CALLBACK_1(m_fill,xs_fill)
+ FLEXT_ATTRVAR_E(fill,xs_fill)
};
FLEXT_LIB_V("vasp, vasp.shift",vasp_shift)
@@ -143,7 +142,7 @@ class vasp_xshift:
FLEXT_HEADER(vasp_xshift,vasp_shift)
public:
- vasp_xshift(I argc,t_atom *argv): vasp_shift(argc,argv) {}
+ vasp_xshift(I argc,const t_atom *argv): vasp_shift(argc,argv) {}
virtual Vasp *do_shift(OpParam &p) { return VaspOp::m_xshift(p,ref,arg,&dst); }
diff --git a/externals/grill/vasp/source/ops_resmp.cpp b/externals/grill/vasp/source/ops_resmp.cpp
index fbeabc07..cb51dbac 100644
--- a/externals/grill/vasp/source/ops_resmp.cpp
+++ b/externals/grill/vasp/source/ops_resmp.cpp
@@ -12,6 +12,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
\brief Routines for resampling
*/
+#include "main.h"
#include "ops_resmp.h"
@@ -207,8 +208,8 @@ public:
vasp_anyop(argc,argv,VASP_ARG_R(1),true),
fill(xtf_zero),inter(xti_4p)
{
- FLEXT_ADDMETHOD_E(0,"fill",m_fill);
- FLEXT_ADDMETHOD_E(0,"inter",m_inter);
+ FLEXT_ADDATTR_VAR1_E("fill",fill);
+ FLEXT_ADDATTR_VAR1_E("inter",inter);
}
enum xt_fill {
@@ -221,9 +222,6 @@ public:
xti_inpl = 0,xti_none,xti_lin,xti_4p
};
- V m_fill(xt_fill f) { fill = f; }
- V m_inter(xt_inter m) { inter = m; }
-
virtual Vasp *do_shift(OpParam &p) { return VaspOp::m_tilt(p,ref,arg,&dst); }
virtual Vasp *tx_work(const Argument &arg)
@@ -243,8 +241,8 @@ protected:
xt_inter inter;
private:
- FLEXT_CALLBACK_1(m_fill,xt_fill)
- FLEXT_CALLBACK_1(m_inter,xt_inter)
+ FLEXT_ATTRVAR_E(fill,xt_fill)
+ FLEXT_ATTRVAR_E(inter,xt_inter)
};
FLEXT_LIB_V("vasp, vasp.tilt",vasp_tilt)
diff --git a/externals/grill/vasp/source/ops_search.cpp b/externals/grill/vasp/source/ops_search.cpp
index 7afc84c2..4202a77c 100644
--- a/externals/grill/vasp/source/ops_search.cpp
+++ b/externals/grill/vasp/source/ops_search.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_search.h"
#include "util.h"
#include "oploop.h"
@@ -134,8 +135,8 @@ public:
vasp_anyop(argc,argv,VASP_ARG_R(0),false,XletCode(xlet::tp_float,0)),
slope(0),dir(0)
{
- FLEXT_ADDMETHOD_I(0,"dir",m_dir);
- FLEXT_ADDMETHOD_I(0,"slope",m_slope);
+ FLEXT_ADDATTR_VAR1("dir",dir);
+ FLEXT_ADDATTR_VAR1("slope",slope);
}
virtual Vasp *do_work(OpParam &p) = 0;
@@ -151,15 +152,12 @@ public:
return ret;
}
- V m_dir(I d) { dir = d; }
- V m_slope(I sl) { slope = sl; }
-
protected:
I dir,slope;
private:
- FLEXT_CALLBACK_I(m_dir)
- FLEXT_CALLBACK_I(m_slope)
+ FLEXT_ATTRVAR_I(dir)
+ FLEXT_ATTRVAR_I(slope)
};
diff --git a/externals/grill/vasp/source/ops_trnsc.cpp b/externals/grill/vasp/source/ops_trnsc.cpp
index 1b26f204..ac4cea1f 100644
--- a/externals/grill/vasp/source/ops_trnsc.cpp
+++ b/externals/grill/vasp/source/ops_trnsc.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_trnsc.h"
#include "opdefs.h"
#include "util.h"
diff --git a/externals/grill/vasp/source/ops_wnd.cpp b/externals/grill/vasp/source/ops_wnd.cpp
index 232649aa..daee3a9e 100644
--- a/externals/grill/vasp/source/ops_wnd.cpp
+++ b/externals/grill/vasp/source/ops_wnd.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "ops_wnd.h"
#include "oploop.h"
#include <math.h>
diff --git a/externals/grill/vasp/source/opvecs.cpp b/externals/grill/vasp/source/opvecs.cpp
index 0e476682..1a226eb3 100644
--- a/externals/grill/vasp/source/opvecs.cpp
+++ b/externals/grill/vasp/source/opvecs.cpp
@@ -13,6 +13,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "opbase.h"
#include "classes.h"
#include "vecblk.h"
diff --git a/externals/grill/vasp/source/util.cpp b/externals/grill/vasp/source/util.cpp
index c487e3d1..417b74c2 100644
--- a/externals/grill/vasp/source/util.cpp
+++ b/externals/grill/vasp/source/util.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+
+*/
+
+#include "main.h"
#include "util.h"
#include <math.h>
diff --git a/externals/grill/vasp/source/vasp.cpp b/externals/grill/vasp/source/vasp.cpp
index 35bbc5a2..efb3b7a6 100644
--- a/externals/grill/vasp/source/vasp.cpp
+++ b/externals/grill/vasp/source/vasp.cpp
@@ -8,6 +8,7 @@ WARRANTIES, see the file, "license.txt," in this distribution.
*/
+#include "main.h"
#include "classes.h"
#include "util.h"
#include "buflib.h"
@@ -233,24 +234,31 @@ VBuffer *Vasp::Buffer(I ix) const
}
// generate Vasp list of buffer references
-flext::AtomList *Vasp::MakeList(BL withvasp)
+V Vasp::MakeList(flext::AtomList &ret,BL withvasp) const
{
I voffs = withvasp?1:0;
I needed = voffs+1+Vectors()*3;
- flext::AtomList *ret = new flext::AtomList(needed);
+ ret(needed);
if(withvasp)
- flext::SetSymbol((*ret)[0],vasp_base::sym_vasp); // VASP
+ flext::SetSymbol(ret[0],vasp_base::sym_vasp); // VASP
- flext::SetInt((*ret)[voffs],frames); // frames
+ flext::SetInt(ret[voffs],frames); // frames
for(I ix = 0; ix < Vectors(); ++ix) {
- Ref &r = Vector(ix);
- flext::SetSymbol((*ret)[voffs+1+ix*3],r.Symbol().Symbol()); // buf
- flext::SetInt((*ret)[voffs+2+ix*3],r.Offset()); // offs
- flext::SetInt((*ret)[voffs+3+ix*3],r.Channel()); // chn
+ const Ref &r = Vector(ix);
+ flext::SetSymbol(ret[voffs+1+ix*3],r.Symbol().Symbol()); // buf
+ flext::SetInt(ret[voffs+2+ix*3],r.Offset()); // offs
+ flext::SetInt(ret[voffs+3+ix*3],r.Channel()); // chn
}
+}
+
+// generate Vasp list of buffer references
+flext::AtomList *Vasp::MakeList(BL withvasp) const
+{
+ flext::AtomList *ret = new flext::AtomList;
+ MakeList(*ret,withvasp);
return ret;
}
diff --git a/externals/grill/vasp/source/vasp.h b/externals/grill/vasp/source/vasp.h
index ab4530c7..94e1ad73 100644
--- a/externals/grill/vasp/source/vasp.h
+++ b/externals/grill/vasp/source/vasp.h
@@ -125,7 +125,9 @@ public:
VBuffer *ImBuffer() const { return Buffer(1); }
// prepare and reference t_atom list for output
- flext::AtomList *MakeList(BL withvasp = true);
+ V MakeList(flext::AtomList &ret,BL withvasp = true) const;
+ // prepare and reference t_atom list for output
+ flext::AtomList *MakeList(BL withvasp = true) const;
// make a graphical update of all buffers in vasp
V Refresh();
diff --git a/externals/grill/vasp/source/vbuffer.cpp b/externals/grill/vasp/source/vbuffer.cpp
index 137e066c..0308358f 100644
--- a/externals/grill/vasp/source/vbuffer.cpp
+++ b/externals/grill/vasp/source/vbuffer.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+
+*/
+
+#include "main.h"
#include "vbuffer.h"
#include "buflib.h"
diff --git a/externals/grill/vasp/source/vecblk.cpp b/externals/grill/vasp/source/vecblk.cpp
index 1efc3981..8310cc2f 100644
--- a/externals/grill/vasp/source/vecblk.cpp
+++ b/externals/grill/vasp/source/vecblk.cpp
@@ -1,3 +1,14 @@
+/*
+
+VASP modular - vector assembling signal processor / objects for Max/MSP and PD
+
+Copyright (c) 2002 Thomas Grill (xovo@gmx.net)
+For information on usage and redistribution, and for a DISCLAIMER OF ALL
+WARRANTIES, see the file, "license.txt," in this distribution.
+
+*/
+
+#include "main.h"
#include "vecblk.h"
//#include <math.h>
diff --git a/externals/grill/vasp/vasp.cw b/externals/grill/vasp/vasp.cw
index 467cbc7a..04843f6c 100644
--- a/externals/grill/vasp/vasp.cw
+++ b/externals/grill/vasp/vasp.cw
Binary files differ
diff --git a/externals/grill/vasp/vasp.dsp b/externals/grill/vasp/vasp.dsp
index 3c586d6b..754c3d32 100644
--- a/externals/grill/vasp/vasp.dsp
+++ b/externals/grill/vasp/vasp.dsp
@@ -45,7 +45,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" /D "VASP_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /G6 /W3 /O2 /Ob2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /YX /FD /c
+# ADD CPP /nologo /G6 /W3 /O2 /Ob2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /D FLEXT_ATTRIBUTES=1 /YX"main.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
@@ -72,7 +72,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" /D "VASP_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /D "VASP_COMPACT" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /D "VASP_COMPACT" /D FLEXT_ATTRIBUTES=1 /FR /YX"main.h" /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"
@@ -99,7 +99,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MTd /W3 /Gm /GR /GX /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /FR /YX /FD /GZ /c
-# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /D "FLEXT_THREADS" /D "VASP_COMPACT" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /MTd /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /D "VASP_COMPACT" /D FLEXT_ATTRIBUTES=1 /FR /YX"main.h" /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"
@@ -126,7 +126,7 @@ LINK32=link.exe
# PROP Ignore_Export_Lib 0
# PROP Target_Dir ""
# ADD BASE CPP /nologo /MT /W3 /GR /GX /O2 /Ob2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /YX /FD /c
-# ADD CPP /nologo /G6 /MT /W3 /O2 /Ob2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "PD" /D "NT" /D "FLEXT_THREADS" /YX /FD /c
+# ADD CPP /nologo /G6 /MT /W3 /O2 /Ob2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /D "FLEXT_THREADS" /D FLEXT_ATTRIBUTES=1 /YX"main.h" /FD /c
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /win32
# ADD BASE RSC /l 0xc07 /d "NDEBUG"
diff --git a/externals/grill/xsample/readme.txt b/externals/grill/xsample/readme.txt
index cf678085..74095a30 100644
--- a/externals/grill/xsample/readme.txt
+++ b/externals/grill/xsample/readme.txt
@@ -76,7 +76,7 @@ Version history:
- xgroove~, xrecord~: introduced a loop/end bang outlet
- added MaxMSP buffer resize recognition
- xgroove~: introduced a crossfading loop zone
-- adapted source for flext 0.4.0
+- adapted source for flext 0.4.1
0.2.4:
- according to flext 0.2.3 changed sample type to t_sample (S)
diff --git a/externals/grill/xsample/source/groove.cpp b/externals/grill/xsample/source/groove.cpp
index e5a0eaf5..b4748a6f 100644
--- a/externals/grill/xsample/source/groove.cpp
+++ b/externals/grill/xsample/source/groove.cpp
@@ -31,7 +31,7 @@ public:
virtual BL Init();
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
virtual V m_assist(L msg,L arg,C *s);
#endif
@@ -139,7 +139,7 @@ xgroove::xgroove(I argc,const t_atom *argv):
bidir(1)
{
I argi = 0;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
if(argc > argi && CanbeInt(argv[argi])) {
outchns = GetAInt(argv[argi]);
argi++;
@@ -150,7 +150,7 @@ xgroove::xgroove(I argc,const t_atom *argv):
buf = new buffer(GetSymbol(argv[argi]),true);
argi++;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
// oldstyle command line?
if(argi == 1 && argc == 2 && CanbeInt(argv[argi])) {
outchns = GetAInt(argv[argi]);
@@ -621,11 +621,11 @@ V xgroove::s_dsp()
V xgroove::m_help()
{
post("%s - part of xsample objects, version " XSAMPLE_VERSION,thisName());
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("compiled on " __DATE__ " " __TIME__);
#endif
post("(C) Thomas Grill, 2001-2002");
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
post("Arguments: %s [channels=1] [buffer]",thisName());
#else
post("Arguments: %s [buffer]",thisName());
@@ -671,7 +671,7 @@ V xgroove::m_print()
post("");
}
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
V xgroove::m_assist(long msg, long arg, char *s)
{
switch(msg) {
diff --git a/externals/grill/xsample/source/main.cpp b/externals/grill/xsample/source/main.cpp
index 85fea90d..30aad069 100644
--- a/externals/grill/xsample/source/main.cpp
+++ b/externals/grill/xsample/source/main.cpp
@@ -23,7 +23,7 @@ V lib_setup()
FLEXT_DSP_SETUP(xplay);
FLEXT_DSP_SETUP(xgroove);
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
finder_addclass((C *)"MSP Sampling",(C *)"xgroove~");
finder_addclass((C *)"MSP Sampling",(C *)"xplay~");
finder_addclass((C *)"MSP Sampling",(C *)"xrecord~");
@@ -38,10 +38,10 @@ FLEXT_LIB_SETUP(xsample,lib_setup)
xsample::xsample():
buf(NULL),
-#ifdef PD
- unitmode(xsu_sample), // PD defaults to samples
-#else
+#if FLEXT_SYS == FLEXT_SYS_MAX
unitmode(xsu_ms), // Max/MSP defaults to milliseconds
+#else
+ unitmode(xsu_sample), // PD defaults to samples
#endif
sclmode(xss_unitsinbuf),
curmin(0),curmax(1<<30)
diff --git a/externals/grill/xsample/source/main.h b/externals/grill/xsample/source/main.h
index 5467bc1d..c50f8dd6 100644
--- a/externals/grill/xsample/source/main.h
+++ b/externals/grill/xsample/source/main.h
@@ -16,8 +16,8 @@ WARRANTIES, see the file, "license.txt," in this distribution.
#include <flext.h>
-#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 400)
-#error You need at least flext version 0.4.0
+#if !defined(FLEXT_VERSION) || (FLEXT_VERSION < 401)
+#error You need at least flext version 0.4.1
#endif
@@ -217,7 +217,7 @@ private:
const I IOCHNS = _IOCHNS_ < 0?MIN(iochns,BCHNS):MIN(_IOCHNS_,BCHNS)
#else
// no template optimization
- #ifdef PD // only mono buffers
+ #if FLEXT_SYS == FLEXT_SYS_PD // only mono buffers
#define SIGCHNS(BCHNS,bchns,IOCHNS,iochns) \
const I BCHNS = 1; \
const I IOCHNS = MIN(iochns,BCHNS)
diff --git a/externals/grill/xsample/source/play.cpp b/externals/grill/xsample/source/play.cpp
index 6a84548f..3b934ecb 100644
--- a/externals/grill/xsample/source/play.cpp
+++ b/externals/grill/xsample/source/play.cpp
@@ -26,7 +26,7 @@ public:
virtual BL Init();
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
virtual V m_assist(L msg,L arg,C *s);
#endif
@@ -57,7 +57,7 @@ V xplay::setup(t_class *)
xplay::xplay(I argc,const t_atom *argv)
{
I argi = 0;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
if(argc > argi && CanbeInt(argv[argi])) {
outchns = GetAInt(argv[argi]);
argi++;
@@ -68,7 +68,7 @@ xplay::xplay(I argc,const t_atom *argv)
buf = new buffer(GetSymbol(argv[argi]),true);
argi++;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
// oldstyle command line?
if(argi == 1 && argc == 2 && CanbeInt(argv[argi])) {
outchns = GetAInt(argv[argi]);
@@ -101,11 +101,11 @@ BL xplay::Init()
V xplay::m_help()
{
post("%s - part of xsample objects, version " XSAMPLE_VERSION,thisName());
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("compiled on " __DATE__ " " __TIME__);
#endif
post("(C) Thomas Grill, 2001-2002");
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
post("Arguments: %s [channels=1] [buffer]",thisName());
#else
post("Arguments: %s [buffer]",thisName());
@@ -137,7 +137,7 @@ V xplay::m_print()
}
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
V xplay::m_assist(L msg,L arg,C *s)
{
switch(msg) {
diff --git a/externals/grill/xsample/source/record.cpp b/externals/grill/xsample/source/record.cpp
index 869ca3d2..052bcc06 100644
--- a/externals/grill/xsample/source/record.cpp
+++ b/externals/grill/xsample/source/record.cpp
@@ -26,7 +26,7 @@ public:
virtual BL Init();
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
virtual V m_assist(L msg,L arg,C *s);
#endif
@@ -113,7 +113,7 @@ xrecord::xrecord(I argc,const t_atom *argv):
inchns(1)
{
I argi = 0;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
if(argc > argi && CanbeInt(argv[argi])) {
inchns = GetAInt(argv[argi]);
argi++;
@@ -124,7 +124,7 @@ xrecord::xrecord(I argc,const t_atom *argv):
buf = new buffer(GetSymbol(argv[argi]),true);
argi++;
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
// oldstyle command line?
if(argi == 1 && argc == 2 && CanbeInt(argv[argi])) {
inchns = GetAInt(argv[argi]);
@@ -418,11 +418,11 @@ V xrecord::s_dsp()
V xrecord::m_help()
{
post("%s - part of xsample objects, version " XSAMPLE_VERSION,thisName());
-#ifdef _DEBUG
+#ifdef FLEXT_DEBUG
post("compiled on " __DATE__ " " __TIME__);
#endif
post("(C) Thomas Grill, 2001-2002");
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
post("Arguments: %s [channels=1] [buffer]",thisName());
#else
post("Arguments: %s [buffer]",thisName());
@@ -465,7 +465,7 @@ V xrecord::m_print()
}
-#ifdef MAXMSP
+#if FLEXT_SYS == FLEXT_SYS_MAX
V xrecord::m_assist(L msg,L arg,C *s)
{
switch(msg) {
diff --git a/externals/grill/xsample/source/xsample.dsp b/externals/grill/xsample/source/xsample.dsp
index 161c0264..838d709d 100644
--- a/externals/grill/xsample/source/xsample.dsp
+++ b/externals/grill/xsample/source/xsample.dsp
@@ -5,17 +5,17 @@
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
CFG=xsample - Win32 Debug
-!MESSAGE Dies ist kein gŸltiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
-!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und fŸhren Sie den Befehl
+!MESSAGE Dies ist kein gültiges Makefile. Zum Erstellen dieses Projekts mit NMAKE
+!MESSAGE verwenden Sie den Befehl "Makefile exportieren" und führen Sie den Befehl
!MESSAGE
!MESSAGE NMAKE /f "xsample.mak".
!MESSAGE
-!MESSAGE Sie kšnnen beim AusfŸhren von NMAKE eine Konfiguration angeben
+!MESSAGE Sie können beim Ausführen von NMAKE eine Konfiguration angeben
!MESSAGE durch Definieren des Makros CFG in der Befehlszeile. Zum Beispiel:
!MESSAGE
!MESSAGE NMAKE /f "xsample.mak" CFG="xsample - Win32 Debug"
!MESSAGE
-!MESSAGE FŸr die Konfiguration stehen zur Auswahl:
+!MESSAGE Für die Konfiguration stehen zur Auswahl:
!MESSAGE
!MESSAGE "xsample - Win32 Release" (basierend auf "Win32 (x86) Dynamic-Link Library")
!MESSAGE "xsample - Win32 Debug" (basierend auf "Win32 (x86) Dynamic-Link Library")
@@ -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" /D "XSAMPLE_EXPORTS" /YX /FD /c
-# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /YX /FD /c
+# ADD CPP /nologo /G6 /W3 /O2 /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"
@@ -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" /D "XSAMPLE_EXPORTS" /YX /FD /GZ /c
-# ADD CPP /nologo /G6 /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D "NT" /D "PD" /FR /YX /FD /GZ /c
+# ADD CPP /nologo /G6 /W3 /Gm /ZI /Od /I "c:\programme\audio\pd\src" /I "f:\prog\max\flext\source" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /D "_USRDLL" /D FLEXT_SYS=2 /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"