aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavide Morelli <morellid@users.sourceforge.net>2006-01-14 02:34:17 +0000
committerDavide Morelli <morellid@users.sourceforge.net>2006-01-14 02:34:17 +0000
commitaf0a9de91583557786cdfeca37c36b8e5656fb23 (patch)
tree8ed7ba356a7bff2e6218aaecb703ad46f970623d
parentca171c73936072e5be30444440b45d3fcf65b68b (diff)
outlet ready, multi-instance, split assembly in 2
svn path=/trunk/externals/clr/; revision=4401
-rwxr-xr-xclr.c175
-rwxr-xr-xexternal/External.cs43
-rwxr-xr-xexternal/external.csproj12
-rwxr-xr-xpd/AssemblyInfo.cs58
-rwxr-xr-xpd/Atom.cs28
-rwxr-xr-xpd/pd.cs (renamed from external/pd.cs)29
-rwxr-xr-xpd/pd.csproj105
-rwxr-xr-xpd/pd.sln21
-rwxr-xr-xtest-clr.pd56
9 files changed, 401 insertions, 126 deletions
diff --git a/clr.c b/clr.c
index cce99b9..3ab4aca 100755
--- a/clr.c
+++ b/clr.c
@@ -54,20 +54,10 @@ typedef struct atom_simple
{
//t_atomtype_simple a_type;
int a_type;
- //MonoString *a_type;
- //union{
- float float_value;
- MonoString *string_value;
- //} stuff;
-};
+ float float_value;
+ MonoString *string_value;
-/*
-typedef struct atom_simple
-{
- int a;
- int b;
};
-*/
static t_class *clr_class;
@@ -75,12 +65,15 @@ typedef struct _clr
{
t_object x_obj; // myself
t_outlet *l_out;
+ t_symbol *assemblyname;
+ t_symbol *filename;
+ int loaded;
// mono stuff
MonoDomain *domain;
- MonoAssembly *assembly;
+ MonoAssembly *assembly, *assemblyPureData;
MonoObject *obj;
- MonoImage *image;
- MonoMethod *method, *setUp;
+ MonoImage *image, *imagePureData;
+ MonoMethod *method, *setUp, *manageBang, *manageSymbol, *manageFloat, *manageList;
MonoClass *klass;
int n;
@@ -96,35 +89,40 @@ typedef struct _clr
static void mono_clean(t_clr *x)
{
// clean up stuff
- mono_jit_cleanup (x->domain);
-
+ //mono_jit_cleanup (x->domain);
+ //mono_domain_free(x->domain);
}
void registerMonoMethod(void *x, MonoString *selectorString, MonoString *methodString, int type);
void createInlet(void *x1, MonoString *selectorString, int type);
void createOutlet(void *x1, int type);
-void out2outlet(void *x1, int outlet, int atoms_length, atom_simple *atoms);
+void out2outlet(void *x1, int outlet, int atoms_length, MonoArray *array);
void post2pd(MonoString *mesString);
void error2pd(MonoString *mesString);
+static void mono_initialize()
+{
+ mono_jit_init ("PureData");
+}
+
// load the variables and init mono
static void mono_load(t_clr *x)
{
// const char *file="D:\\Davide\\cygwin\\home\\Davide\\externalTest1.dll";
- const char *file="PureData.dll";
+ //const char *file="External.dll";
MonoMethod *m = NULL, *ctor = NULL, *fail = NULL, *mvalues;
gpointer iter;
gpointer args [1];
int val;
int i;
- double rnd;
- int random_name_int;
- char random_name_str[256];
- srand( (unsigned)time( NULL ) );
- rnd = rand()/((double)RAND_MAX + 1);
- random_name_int =(int) (rnd * RAND_MAX);
- sprintf(random_name_str, "%s-%i",file, random_name_int);
+
+
+ if (x->loaded == 0)
+ {
+ error("assembly not specified");
+ return;
+ }
// prepare the selectors list
for (i=0; i<MAX_SELECTORS; i++)
@@ -136,24 +134,18 @@ static void mono_load(t_clr *x)
for (i=0; i<MAX_OUTLETS; i++)
{
x->outlets[i].outlet_pointer = 0;
- }
-
-printf("will load %s, random_name %s\n", file, random_name_str);
+ }
//mono_set_dirs (NULL, NULL);
//mono_config_parse (NULL);
- x->domain = mono_jit_init (random_name_str);
+ //mono_jit_init (random_name_str);
+ x->domain = mono_domain_get();
- // add mono to C hooks
- mono_add_internal_call ("PureData.pd::RegisterSelector", registerMonoMethod);
- mono_add_internal_call ("PureData.pd::ToOutlet", out2outlet);
- mono_add_internal_call ("PureData.pd::PostMessage", post2pd);
- mono_add_internal_call ("PureData.pd::ErrorMessage", error2pd);
- mono_add_internal_call ("PureData.pd::CreateOutlet", createOutlet);
- mono_add_internal_call ("PureData.pd::CreateInlet", createInlet);
+ x->assembly = mono_domain_assembly_open (x->domain, x->filename->s_name);
+
+ x->assemblyPureData = mono_domain_assembly_open (x->domain, "PureData.dll");
- x->assembly = mono_domain_assembly_open (x->domain, file);
if (!x->assembly)
{
error("clr: assembly not found!");
@@ -161,8 +153,10 @@ printf("will load %s, random_name %s\n", file, random_name_str);
x->image = mono_assembly_get_image (x->assembly);
+ x->imagePureData = mono_assembly_get_image (x->assemblyPureData);
+
- x->klass = mono_class_from_name (x->image, "PureData", "External");
+ x->klass = mono_class_from_name (x->image, "PureData", x->assemblyname->s_name);
if (!x->klass) {
error("Can't find MyType in assembly %s\n", mono_image_get_filename (x->image));
//exit (1);
@@ -254,6 +248,36 @@ void clr_free(t_clr *x)
mono_clean(x);
}
+static void clr_bang(t_clr *x)
+{
+ if (x->manageBang)
+ {
+ mono_runtime_invoke (x->manageBang, x->obj, NULL, NULL);
+ }
+}
+
+static void clr_symbol(t_clr *x, t_symbol *sl)
+{
+ gpointer args [1];
+ MonoString *strmono;
+ strmono = mono_string_new (x->domain, sl->s_name);
+ args[0] = &strmono;
+ if (x->manageSymbol)
+ {
+ mono_runtime_invoke (x->manageSymbol, x->obj, args, NULL);
+ }
+}
+
+static void clr_float(t_clr *x, float f)
+{
+ gpointer args [1];
+ args [0] = &f;
+ if (x->manageFloat)
+ {
+ mono_runtime_invoke (x->manageFloat, x->obj, args, NULL);
+ }
+}
+
// here i look for the selector and call the right mono method
void clr_manage_list(t_clr *x, t_symbol *sl, int argc, t_atom *argv)
{
@@ -263,7 +287,7 @@ void clr_manage_list(t_clr *x, t_symbol *sl, int argc, t_atom *argv)
int i;
// first i extract the first atom which should be a symbol
- //post("clr_manage_list, got symbol = %s", sl->s_name);
+post("clr_manage_list, got symbol = %s", sl->s_name);
for (i=0; i<MAX_SELECTORS; i++)
{
@@ -312,7 +336,7 @@ void clr_manage_list(t_clr *x, t_symbol *sl, int argc, t_atom *argv)
sprintf(strfloat, "float");
sprintf(strnull, "null");
atom_array = malloc(sizeof(atom_simple)*argc);
- MonoClass *c = mono_class_from_name (x->image, "PureData", "Atom");
+ MonoClass *c = mono_class_from_name (x->imagePureData, "PureData", "Atom");
atoms = mono_array_new (x->domain, c, argc);
for (j=0; j<argc; j++)
{
@@ -377,7 +401,27 @@ void registerMonoMethod(void *x1, MonoString *selectorString, MonoString *method
return;
}
- post("registerMonoMethod: associating %s to %s", selCstring, metCstring);
+ //post("registerMonoMethod: associating %s to %s", selCstring, metCstring);
+
+ if (selectorString->length == 0)
+ {
+printf("selectorString->length == 0");
+ switch (type)
+ {
+ case 1: // float
+ x->manageFloat = met;
+ break;
+ case 2: // string
+ x->manageSymbol = met;
+ break;
+ case 3: // list
+ x->manageList = met;
+ break;
+ case 4: // bang
+ x->manageBang = met;
+ break;
+ }
+ }
this_selector = MAX_SELECTORS;
for (i = 0; i < MAX_SELECTORS; i++)
@@ -481,14 +525,13 @@ void createOutlet(void *x1, int type)
}
// out to outlet
-void out2outlet(void *x1, int outlet, int atoms_length, atom_simple *atoms)
+void out2outlet(void *x1, int outlet, int atoms_length, MonoArray *array)
{
t_clr *x;
x = (t_clr *)x1;
t_atom *lista;
+ atom_simple *atoms;
int n;
-printf("outlet = %i\n" + outlet);
-printf("atoms_length = %i\n" + atoms_length);
if ((outlet>MAX_OUTLETS) || (outlet<0))
{
error("outlet number out of range, max is %i", MAX_OUTLETS);
@@ -500,8 +543,10 @@ printf("atoms_length = %i\n" + atoms_length);
return;
}
lista = (t_atom *) malloc(sizeof(t_atom) * atoms_length);
+ atoms = (atom_simple *) malloc(sizeof(atom_simple) * atoms_length);
for (n=0; n<atoms_length; n++)
{
+ atoms[n] = mono_array_get(array, atom_simple, n);
char *mesCstring;
switch (atoms[n].a_type)
{
@@ -509,10 +554,10 @@ printf("atoms_length = %i\n" + atoms_length);
SETFLOAT(lista+n, (float) 0);
break;
case A_S_FLOAT:
- mesCstring = mono_string_to_utf8 (atoms[n].string_value);
SETFLOAT(lista+n, (float) atoms[n].float_value);
break;
case A_S_SYMBOL:
+ mesCstring = mono_string_to_utf8 (atoms[n].string_value);
SETSYMBOL(lista+n, gensym(mesCstring));
break;
}
@@ -559,10 +604,32 @@ void *clr_new(t_symbol *s, int argc, t_atom *argv)
t_clr *x = (t_clr *)pd_new(clr_class);
// x->l_out = outlet_new(&x->x_obj, &s_list);
// x->l_out = outlet_new(&x->x_obj, gensym("float"));
+
+ char strtmp[256];
+ x->manageBang = 0;
+ x->manageSymbol = 0;
+ x->manageFloat = 0;
+ x->manageList = 0;
+ if (argc==0)
+ {
+ x->loaded = 0;
+ error("clr: you must provide an assembly as the first argument");
+ return (x);
+ }
+ x->loaded = 1;
+ x->assemblyname = atom_gensym(argv);
+
+ if (argc==1)
+ {
+ // only main class passed
+ // filename by default
+ sprintf(strtmp, "%s.dll", x->assemblyname->s_name);
+ x->filename = atom_gensym(strtmp);
+ }
+ x->filename = atom_gensym(argv+1);
- x->n = 0;
// load mono, init the needed vars
mono_load(x);
@@ -573,9 +640,19 @@ void clr_setup(void)
{
clr_class = class_new(gensym("clr"), (t_newmethod)clr_new,
(t_method)clr_free, sizeof(t_clr), CLASS_DEFAULT, A_GIMME, 0);
- //class_addbang(clr_class, (t_method)clr_bang);
-// ext_class_addbang((t_method) clr_bang);
class_addlist(clr_class, (t_method)clr_manage_list);
+ class_addbang(clr_class, (t_method)clr_bang);
+ class_addsymbol(clr_class, (t_method)clr_symbol);
+ class_addfloat(clr_class, (t_method)clr_float);
+ mono_initialize();
+
+ // add mono to C hooks
+ mono_add_internal_call ("PureData.pd::RegisterSelector", registerMonoMethod);
+ mono_add_internal_call ("PureData.pd::ToOutlet", out2outlet);
+ mono_add_internal_call ("PureData.pd::PostMessage", post2pd);
+ mono_add_internal_call ("PureData.pd::ErrorMessage", error2pd);
+ mono_add_internal_call ("PureData.pd::CreateOutlet", createOutlet);
+ mono_add_internal_call ("PureData.pd::CreateInlet", createInlet);
}
diff --git a/external/External.cs b/external/External.cs
index 820c7ca..ace63a3 100755
--- a/external/External.cs
+++ b/external/External.cs
@@ -1,11 +1,8 @@
using System;
-
namespace PureData
{
-
-
public class External
{
private IntPtr x;
@@ -15,8 +12,6 @@ namespace PureData
x = IntPtr.Zero;
}
-
-
// this function MUST exist
public void SetUp(IntPtr pdClass)
{
@@ -31,16 +26,36 @@ namespace PureData
pd.AddSelector(x, "selFloat", "SelFloat", ParametersType.Float);
pd.AddSelector(x, "selString", "SelString", ParametersType.Symbol);
pd.AddSelector(x, "selGenericList", "SelGenericList", ParametersType.List);
+
+ pd.AddSelector(x, "", "GetBang", ParametersType.Bang);
+ pd.AddSelector(x, "", "GetFloat", ParametersType.Float);
+ pd.AddSelector(x, "", "GetSymbol", ParametersType.Symbol);
+
Console.WriteLine("selectors set");
pd.AddOutlet(x, ParametersType.Float);
pd.AddInlet(x, "selFloat", ParametersType.Float);
}
+ public void GetBang()
+ {
+ pd.PostMessage("GetBang invoked!");
+ }
-
+ public void GetFloat(float f)
+ {
+ pd.PostMessage("GetFloat invoked with " + f);
+ }
+
+ public void GetSymbol(ref string s)
+ {
+ pd.PostMessage("GetSymbol invoked with " + s);
+ }
+
public void Sel1()
{
pd.PostMessage("Sel1 invoked!");
+ Atom [] a= new Atom[2];
+
}
public void Sel2()
@@ -48,10 +63,12 @@ namespace PureData
pd.PostMessage("Sel2 invoked!");
// testing outlets
- Atom[] atoms = new Atom[2];
- atoms[0] = new Atom("ciao");
- atoms[1] = new Atom(1.5f);
- pd.ToOutlet(x, 0, atoms.Length, atoms);
+ Atom[] atoms = new Atom[4];
+ atoms[0] = new Atom(1.5f);
+ atoms[1] = new Atom("ciao");
+ atoms[2] = new Atom(2.5f);
+ atoms[3] = new Atom("hello");
+ pd.SendToOutlet(x, 0, atoms);
}
@@ -69,6 +86,7 @@ namespace PureData
public void SelGenericList(Atom [] list)
{
+ Atom [] ret = new Atom[list.Length];
for (int i = 0; i<list.Length; i++)
{
Atom a = (Atom) list[i];
@@ -82,15 +100,18 @@ namespace PureData
case (AtomType.Float):
{
pd.PostMessage("" + a.float_value);
+ ret[i] = new Atom(a.float_value * 2);
break;
}
case (AtomType.Symbol):
{
+ ret[i] = new Atom(a.string_value + "-lo-giuro");
pd.PostMessage(a.string_value);
break;
}
}
- }
+ }
+ pd.SendToOutlet(x, 0, ret);
}
diff --git a/external/external.csproj b/external/external.csproj
index 417f6aa..536e73d 100755
--- a/external/external.csproj
+++ b/external/external.csproj
@@ -9,7 +9,7 @@
<Settings
ApplicationIcon = ""
AssemblyKeyContainerName = ""
- AssemblyName = "PureData"
+ AssemblyName = "External"
AssemblyOriginatorKeyFile = ""
DefaultClientScript = "JScript"
DefaultHTMLPageLayout = "Grid"
@@ -79,6 +79,11 @@
AssemblyName = "System.Xml"
HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
/>
+ <Reference
+ Name = "PureData"
+ AssemblyName = "PureData"
+ HintPath = "PureData.dll"
+ />
</References>
</Build>
<Files>
@@ -93,11 +98,6 @@
SubType = "Code"
BuildAction = "Compile"
/>
- <File
- RelPath = "pd.cs"
- SubType = "Code"
- BuildAction = "Compile"
- />
</Include>
</Files>
</CSHARP>
diff --git a/pd/AssemblyInfo.cs b/pd/AssemblyInfo.cs
new file mode 100755
index 0000000..74d5e94
--- /dev/null
+++ b/pd/AssemblyInfo.cs
@@ -0,0 +1,58 @@
+using System.Reflection;
+using System.Runtime.CompilerServices;
+
+//
+// Le informazioni generali relative a un assembly sono controllate dal seguente
+// insieme di attributi. Per modificare le informazioni associate a un assembly
+// occorre quindi modificare i valori di questi attributi.
+//
+[assembly: AssemblyTitle("PureData")]
+[assembly: AssemblyDescription("bridge between C sharp externals and pd")]
+[assembly: AssemblyConfiguration("")]
+[assembly: AssemblyCompany("")]
+[assembly: AssemblyProduct("")]
+[assembly: AssemblyCopyright("Davide Morelli")]
+[assembly: AssemblyTrademark("")]
+[assembly: AssemblyCulture("")]
+
+//
+// Le informazioni sulla versione di un assembly sono costituite dai seguenti quattro valori:
+//
+// Numero di versione principale
+// Numero di versione secondario
+// Numero revisione
+// Numero build
+//
+// È possibile specificare tutti i valori o impostare come predefiniti i valori Numero revisione e Numero build
+// utilizzando l'asterisco (*) come illustrato di seguito:
+
+[assembly: AssemblyVersion("1.0.*")]
+
+//
+// Per firmare l'assembly è necessario specificare una chiave da utilizzare.
+// Fare riferimento alla documentazione di Microsoft .NET Framework per ulteriori informazioni sulla firma degli assembly.
+//
+// Utilizzare gli attributi elencati di seguito per verificare la chiave utilizzata per la firma.
+//
+// Note:
+// (*) Se non è specificata alcuna chiave, non sarà possibile firmare l'assembly.
+// (*) KeyName fa riferimento a una chiave installata nel provider di servizi di
+// crittografia (CSP) sul computer in uso. KeyFile fa riferimento a un file che contiene
+// una chiave.
+// (*) Se entrambi i valori KeyFile e KeyName sono specificati, si
+// verificherà il seguente processo:
+// (1) Se KeyName è presente in CSP, verrà utilizzata tale chiave.
+// (2) Se KeyName non esiste e KeyFile esiste, la chiave
+// di KeyFile verrà installata nel CSP e utilizzata.
+// (*) Per creare un KeyFile, è possibile utilizzare l'utilità sn.exe (Strong Name).
+// Quando si specifica il KeyFile, il percorso dovrà essere
+// relativo alla directory di output del progetto, ovvero
+// %Project Directory%\obj\<configuration>. Se ad esempio il KeyFile si
+// trova nella directory del progetto, occorre specificare l'attributo AssemblyKeyFile
+// come [assembly: AssemblyKeyFile("..\\..\\mykey.snk")]
+// (*) La firma ritardata è un'opzione avanzata. Vedere la documentazione di Microsoft
+// .NET Framework per ulteriori informazioni.
+//
+[assembly: AssemblyDelaySign(false)]
+[assembly: AssemblyKeyFile("")]
+[assembly: AssemblyKeyName("")]
diff --git a/pd/Atom.cs b/pd/Atom.cs
new file mode 100755
index 0000000..7e0affa
--- /dev/null
+++ b/pd/Atom.cs
@@ -0,0 +1,28 @@
+using System;
+using System.Runtime.InteropServices; // for structures
+
+namespace PureData
+{
+ public enum AtomType {Null = 0, Float=1, Symbol=2, List=3, Bang=4};
+
+ //[StructLayout (LayoutKind.Explicit)]
+ [StructLayout (LayoutKind.Sequential)]
+ public struct Atom
+ {
+ public AtomType type;
+ public float float_value;
+ public string string_value;
+ public Atom(float f)
+ {
+ this.type = AtomType.Float;
+ this.float_value = f;
+ this.string_value = "float";
+ }
+ public Atom(string s)
+ {
+ this.type = AtomType.Symbol;
+ this.float_value = 0;
+ this.string_value = s;
+ }
+ }
+} \ No newline at end of file
diff --git a/external/pd.cs b/pd/pd.cs
index 87478ae..a94b9f1 100755
--- a/external/pd.cs
+++ b/pd/pd.cs
@@ -1,11 +1,11 @@
using System;
using System.Runtime.CompilerServices; // for extern import
-using System.Runtime.InteropServices; // for structures
+
namespace PureData
{
- public enum ParametersType {None = 0, Float=1, Symbol=2, List=3};
+ public enum ParametersType {None = 0, Float=1, Symbol=2, List=3, Bang=4};
public class pd
{
@@ -20,8 +20,8 @@ namespace PureData
// TODO
// send stuff to an outlet
[MethodImplAttribute (MethodImplOptions.InternalCall)]
- public extern static void ToOutlet (IntPtr x, int outlet, int atoms_length, [In, Out] Atom [] atoms);
- public static void SendToOutlet (IntPtr x, int outlet, [In, Out] Atom [] atoms)
+ private extern static void ToOutlet (IntPtr x, int outlet, int atoms_length, Atom [] atoms);
+ public static void SendToOutlet (IntPtr x, int outlet, Atom [] atoms)
{
ToOutlet (x, outlet, atoms.Length, atoms);
}
@@ -70,28 +70,7 @@ namespace PureData
};
*/
}
- public enum AtomType {Null = 0, Float=1, Symbol=2, List=3};
- //[StructLayout (LayoutKind.Explicit)]
- [StructLayout (LayoutKind.Sequential)]
- public struct Atom
- {
- public AtomType type;
- public float float_value;
- public string string_value;
- public Atom(float f)
- {
- this.type = AtomType.Float;
- this.float_value = f;
- this.string_value = "float";
- }
- public Atom(string s)
- {
- this.type = AtomType.Symbol;
- this.float_value = 0;
- this.string_value = s;
- }
- }
/*
typedef float t_floatarg;
diff --git a/pd/pd.csproj b/pd/pd.csproj
new file mode 100755
index 0000000..915ac50
--- /dev/null
+++ b/pd/pd.csproj
@@ -0,0 +1,105 @@
+<VisualStudioProject>
+ <CSHARP
+ ProjectType = "Local"
+ ProductVersion = "7.10.3077"
+ SchemaVersion = "2.0"
+ ProjectGuid = "{FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}"
+ >
+ <Build>
+ <Settings
+ ApplicationIcon = ""
+ AssemblyKeyContainerName = ""
+ AssemblyName = "PureData"
+ AssemblyOriginatorKeyFile = ""
+ DefaultClientScript = "JScript"
+ DefaultHTMLPageLayout = "Grid"
+ DefaultTargetSchema = "IE50"
+ DelaySign = "false"
+ OutputType = "Library"
+ PreBuildEvent = ""
+ PostBuildEvent = ""
+ RootNamespace = "PureData"
+ RunPostBuildEvent = "OnBuildSuccess"
+ StartupObject = ""
+ >
+ <Config
+ Name = "Debug"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "DEBUG;TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "true"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "false"
+ OutputPath = "bin\Debug\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ <Config
+ Name = "Release"
+ AllowUnsafeBlocks = "false"
+ BaseAddress = "285212672"
+ CheckForOverflowUnderflow = "false"
+ ConfigurationOverrideFile = ""
+ DefineConstants = "TRACE"
+ DocumentationFile = ""
+ DebugSymbols = "false"
+ FileAlignment = "4096"
+ IncrementalBuild = "false"
+ NoStdLib = "false"
+ NoWarn = ""
+ Optimize = "true"
+ OutputPath = "bin\Release\"
+ RegisterForComInterop = "false"
+ RemoveIntegerChecks = "false"
+ TreatWarningsAsErrors = "false"
+ WarningLevel = "4"
+ />
+ </Settings>
+ <References>
+ <Reference
+ Name = "System"
+ AssemblyName = "System"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.dll"
+ />
+ <Reference
+ Name = "System.Data"
+ AssemblyName = "System.Data"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll"
+ />
+ <Reference
+ Name = "System.XML"
+ AssemblyName = "System.Xml"
+ HintPath = "..\..\..\..\..\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.XML.dll"
+ />
+ </References>
+ </Build>
+ <Files>
+ <Include>
+ <File
+ RelPath = "AssemblyInfo.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "Atom.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ <File
+ RelPath = "pd.cs"
+ SubType = "Code"
+ BuildAction = "Compile"
+ />
+ </Include>
+ </Files>
+ </CSHARP>
+</VisualStudioProject>
+
diff --git a/pd/pd.sln b/pd/pd.sln
new file mode 100755
index 0000000..2d4a44b
--- /dev/null
+++ b/pd/pd.sln
@@ -0,0 +1,21 @@
+Microsoft Visual Studio Solution File, Format Version 8.00
+Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "pd", "pd.csproj", "{FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}"
+ ProjectSection(ProjectDependencies) = postProject
+ EndProjectSection
+EndProject
+Global
+ GlobalSection(SolutionConfiguration) = preSolution
+ Debug = Debug
+ Release = Release
+ EndGlobalSection
+ GlobalSection(ProjectConfiguration) = postSolution
+ {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Debug.ActiveCfg = Debug|.NET
+ {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Debug.Build.0 = Debug|.NET
+ {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Release.ActiveCfg = Release|.NET
+ {FFBC9D2E-1FB7-4E82-B5DC-46B31F8A58A2}.Release.Build.0 = Release|.NET
+ EndGlobalSection
+ GlobalSection(ExtensibilityGlobals) = postSolution
+ EndGlobalSection
+ GlobalSection(ExtensibilityAddIns) = postSolution
+ EndGlobalSection
+EndGlobal
diff --git a/test-clr.pd b/test-clr.pd
index e2a754d..0135d44 100755
--- a/test-clr.pd
+++ b/test-clr.pd
@@ -1,44 +1,30 @@
-#N canvas 0 0 742 490 12;
-#X obj 97 383 clr;
-#X obj 105 80 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
+#N canvas 73 31 623 538 12;
+#X obj 115 402 clr External External.dll;
+#X obj 122 51 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1
-1;
-#X msg 239 110 1 2 3;
-#X msg 238 136 sel3 a b c;
-#X msg 236 176 selFloat 0.5;
-#X msg 247 221 selString ciao;
-#X msg 247 263 selList 1 2 3;
-#X msg 344 161 selFloat \$1;
-#X obj 344 121 hsl 128 15 1 2 0 0 empty empty empty -2 -6 0 8 -262144
+#X floatatom 138 70 5 0 0 0 - - -;
+#X symbolatom 153 93 10 0 0 0 - - -;
+#X text 219 66 simple messages;
+#X msg 200 130 sel1;
+#X msg 214 153 sel2;
+#X text 261 142 selectors;
+#X msg 223 196 selFloat \$1;
+#X obj 226 177 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
-#X floatatom 360 142 5 0 0 0 - - -;
-#X msg 242 59 sel1;
-#X msg 240 87 sel2;
-#X obj 428 260 hsl 128 15 1 2 0 0 empty empty empty -2 -6 0 8 -262144
+#X obj 325 354 hsl 128 15 0 127 0 0 empty empty empty -2 -6 0 8 -262144
-1 -1 0 1;
-#X text 424 239 2nd inlet mapped to selFloat;
-#X obj 71 429 print a;
-#X msg 239 297 selStringList abba baab caac dede;
-#X msg 240 319 selStringList ego filose;
-#X msg 239 342 selFloatList 1.1 2.2 3.3 4.4;
-#X msg 239 364 selFloatList 0.001 1000;
-#X msg 238 409 selGenericList abaco 1.1;
-#X msg 239 387 selGenericList 0.001 abaco 1000 poroppoppero;
+#X text 322 333 mapped to selFloat;
+#X msg 245 274 selGenericList 12 a 0.5 b;
+#X text 244 252 complex list;
+#X obj 114 432 print;
+#X text 204 433 arguments: Class name \, Filename;
#X connect 0 0 14 0;
#X connect 1 0 0 0;
#X connect 2 0 0 0;
#X connect 3 0 0 0;
-#X connect 4 0 0 0;
#X connect 5 0 0 0;
#X connect 6 0 0 0;
-#X connect 7 0 0 0;
-#X connect 8 0 7 0;
-#X connect 8 0 9 0;
-#X connect 10 0 0 0;
-#X connect 11 0 0 0;
-#X connect 12 0 0 1;
-#X connect 15 0 0 0;
-#X connect 16 0 0 0;
-#X connect 17 0 0 0;
-#X connect 18 0 0 0;
-#X connect 19 0 0 0;
-#X connect 20 0 0 0;
+#X connect 8 0 0 0;
+#X connect 9 0 8 0;
+#X connect 10 0 0 1;
+#X connect 12 0 0 0;