From af0a9de91583557786cdfeca37c36b8e5656fb23 Mon Sep 17 00:00:00 2001 From: Davide Morelli Date: Sat, 14 Jan 2006 02:34:17 +0000 Subject: outlet ready, multi-instance, split assembly in 2 svn path=/trunk/externals/clr/; revision=4401 --- clr.c | 175 ++++++++++++++++++++++++++++++++++------------- external/External.cs | 43 +++++++++--- external/external.csproj | 12 ++-- external/pd.cs | 172 ---------------------------------------------- pd/AssemblyInfo.cs | 58 ++++++++++++++++ pd/Atom.cs | 28 ++++++++ pd/pd.cs | 151 ++++++++++++++++++++++++++++++++++++++++ pd/pd.csproj | 105 ++++++++++++++++++++++++++++ pd/pd.sln | 21 ++++++ test-clr.pd | 56 ++++++--------- 10 files changed, 548 insertions(+), 273 deletions(-) delete mode 100755 external/pd.cs create mode 100755 pd/AssemblyInfo.cs create mode 100755 pd/Atom.cs create mode 100755 pd/pd.cs create mode 100755 pd/pd.csproj create mode 100755 pd/pd.sln 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; ioutlets[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; iimage, "PureData", "Atom"); + MonoClass *c = mono_class_from_name (x->imagePureData, "PureData", "Atom"); atoms = mono_array_new (x->domain, c, argc); for (j=0; jlength == 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; nl_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 + @@ -93,11 +98,6 @@ SubType = "Code" BuildAction = "Compile" /> - diff --git a/external/pd.cs b/external/pd.cs deleted file mode 100755 index 87478ae..0000000 --- a/external/pd.cs +++ /dev/null @@ -1,172 +0,0 @@ -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 class pd - { - [MethodImplAttribute (MethodImplOptions.InternalCall)] - private extern static void RegisterSelector (IntPtr x, string sel, string met, int type); - // function called by the user - public static void AddSelector(IntPtr x, string sel, string met, ParametersType type) - { - RegisterSelector (x, sel, met, (int) type); - } - - // 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) - { - ToOutlet (x, outlet, atoms.Length, atoms); - } - - // create an outlet - [MethodImplAttribute (MethodImplOptions.InternalCall)] - private extern static void CreateOutlet (IntPtr x, int type); - // function called by the user - public static void AddOutlet(IntPtr x, ParametersType type) - { - CreateOutlet (x, (int) type); - } - - // create an inlet - [MethodImplAttribute (MethodImplOptions.InternalCall)] - private extern static void CreateInlet (IntPtr x, string selector, int type); - // function called by the user - public static void AddInlet(IntPtr x, string selector, ParametersType type) - { - CreateInlet (x, selector, (int) type); - } - - [MethodImplAttribute (MethodImplOptions.InternalCall)] - public extern static void PostMessage (string message); - - [MethodImplAttribute (MethodImplOptions.InternalCall)] - public extern static void ErrorMessage (string message); - - - /* - // simplyfied atom - typedef struct atom_simple atom_simple; - typedef enum - { - A_S_NULL=0, - A_S_FLOAT=1, - A_S_SYMBOL=2, - } t_atomtype_simple; - typedef struct atom_simple - { - t_atomtype_simple a_type; - union{ - float float_value; - MonoString *string_value; - } stuff; - }; - */ - } - 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; - - typedef struct _symbol - { - char *s_name; - struct _class **s_thing; - struct _symbol *s_next; - } t_symbol; - - EXTERN_STRUCT _array; - #define t_array struct _array - - - - #define GP_NONE 0 - #define GP_GLIST 1 - #define GP_ARRAY 2 - - typedef struct _gstub - { - union - { - struct _glist *gs_glist; - struct _array *gs_array; - } gs_un; - int gs_which; - int gs_refcount; - } t_gstub; - - typedef struct _gpointer - { - union - { - struct _scalar *gp_scalar; - union word *gp_w; - } gp_un; - int gp_valid; - t_gstub *gp_stub; - } t_gpointer; - - typedef union word - { - t_float w_float; - t_symbol *w_symbol; - t_gpointer *w_gpointer; - t_array *w_array; - struct _glist *w_list; - int w_index; - } t_word; - - typedef enum - { - A_NULL, - A_FLOAT, - A_SYMBOL, - A_POINTER, - A_SEMI, - A_COMMA, - A_DEFFLOAT, - A_DEFSYM, - A_DOLLAR, - A_DOLLSYM, - A_GIMME, - A_CANT - } t_atomtype; - - #define A_DEFSYMBOL A_DEFSYM - - typedef struct _atom - { - t_atomtype a_type; - union word a_w; - } t_atom; - */ - -} 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\. 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/pd/pd.cs b/pd/pd.cs new file mode 100755 index 0000000..a94b9f1 --- /dev/null +++ b/pd/pd.cs @@ -0,0 +1,151 @@ +using System; +using System.Runtime.CompilerServices; // for extern import + + + +namespace PureData +{ + public enum ParametersType {None = 0, Float=1, Symbol=2, List=3, Bang=4}; + + public class pd + { + [MethodImplAttribute (MethodImplOptions.InternalCall)] + private extern static void RegisterSelector (IntPtr x, string sel, string met, int type); + // function called by the user + public static void AddSelector(IntPtr x, string sel, string met, ParametersType type) + { + RegisterSelector (x, sel, met, (int) type); + } + + // TODO + // send stuff to an outlet + [MethodImplAttribute (MethodImplOptions.InternalCall)] + 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); + } + + // create an outlet + [MethodImplAttribute (MethodImplOptions.InternalCall)] + private extern static void CreateOutlet (IntPtr x, int type); + // function called by the user + public static void AddOutlet(IntPtr x, ParametersType type) + { + CreateOutlet (x, (int) type); + } + + // create an inlet + [MethodImplAttribute (MethodImplOptions.InternalCall)] + private extern static void CreateInlet (IntPtr x, string selector, int type); + // function called by the user + public static void AddInlet(IntPtr x, string selector, ParametersType type) + { + CreateInlet (x, selector, (int) type); + } + + [MethodImplAttribute (MethodImplOptions.InternalCall)] + public extern static void PostMessage (string message); + + [MethodImplAttribute (MethodImplOptions.InternalCall)] + public extern static void ErrorMessage (string message); + + + /* + // simplyfied atom + typedef struct atom_simple atom_simple; + typedef enum + { + A_S_NULL=0, + A_S_FLOAT=1, + A_S_SYMBOL=2, + } t_atomtype_simple; + typedef struct atom_simple + { + t_atomtype_simple a_type; + union{ + float float_value; + MonoString *string_value; + } stuff; + }; + */ + } + + + /* + typedef float t_floatarg; + + typedef struct _symbol + { + char *s_name; + struct _class **s_thing; + struct _symbol *s_next; + } t_symbol; + + EXTERN_STRUCT _array; + #define t_array struct _array + + + + #define GP_NONE 0 + #define GP_GLIST 1 + #define GP_ARRAY 2 + + typedef struct _gstub + { + union + { + struct _glist *gs_glist; + struct _array *gs_array; + } gs_un; + int gs_which; + int gs_refcount; + } t_gstub; + + typedef struct _gpointer + { + union + { + struct _scalar *gp_scalar; + union word *gp_w; + } gp_un; + int gp_valid; + t_gstub *gp_stub; + } t_gpointer; + + typedef union word + { + t_float w_float; + t_symbol *w_symbol; + t_gpointer *w_gpointer; + t_array *w_array; + struct _glist *w_list; + int w_index; + } t_word; + + typedef enum + { + A_NULL, + A_FLOAT, + A_SYMBOL, + A_POINTER, + A_SEMI, + A_COMMA, + A_DEFFLOAT, + A_DEFSYM, + A_DOLLAR, + A_DOLLSYM, + A_GIMME, + A_CANT + } t_atomtype; + + #define A_DEFSYMBOL A_DEFSYM + + typedef struct _atom + { + t_atomtype a_type; + union word a_w; + } t_atom; + */ + +} 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 @@ + + + + + + + + + + + + + + + + + + + + + + + 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; -- cgit v1.2.1