Update of /cvsroot/pure-data/externals/clr/test In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22039/clr/test
Added Files: AssemblyInfo.cs test-help.pd test.cs test.csproj Log Message: adapted to PD version 0.40 better handler flexibility and argument checking added Zmölnigs counter example
--- NEW FILE: test.cs --- using System;
public class test: PureData.External { PureData.Atom[] args;
float farg;
public test(PureData.AtomList args) { Post("Test.ctor "+args.ToString());
// that's the way to store args (don't just copy an AtomList instance!!) this.args = (PureData.Atom[])args;
// AddInlet(s_list,new PureData.Symbol("list2")); AddInlet(); AddInlet(ref farg); AddInlet(); AddOutletBang(); }
// this function MUST exist // returns void or ClassType private static ClassType Setup(test obj) { AddMethod(0,new Method(obj.MyBang)); AddMethod(0,new MethodFloat(obj.MyFloat)); AddMethod(0,new MethodSymbol(obj.MySymbol)); AddMethod(0,new MethodList(obj.MyList)); AddMethod(0,"set",new MethodAnything(obj.MySet)); AddMethod(0,"send",new MethodAnything(obj.MySend)); AddMethod(0,new MethodAnything(obj.MyAnything)); AddMethod(1,new MethodFloat(obj.MyFloat1)); AddMethod(1,new MethodAnything(obj.MyAny1));
Post("Test.Main"); return ClassType.Default; }
protected virtual void MyBang() { Post("Test-BANG "+farg.ToString()); Outlet(0); }
protected virtual void MyFloat(float f) { Post("Test-FLOAT "+f.ToString()); Outlet(0,f); }
protected virtual void MyFloat1(float f) { Post("Test-FLOAT1 "+f.ToString()); }
protected virtual void MyAny1(int ix,PureData.Symbol s,PureData.AtomList l) { Post(ix.ToString()+": Test-ANY1 "+l.ToString()); }
protected virtual void MySymbol(PureData.Symbol s) { Post("Test-SYMBOL "+s.ToString()); Outlet(0,s); }
protected virtual void MyList(PureData.AtomList l) { Post("Test-LIST "+l.ToString()); Outlet(0,l); }
protected virtual void MySet(int ix,PureData.Symbol s,PureData.AtomList l) { Post("Test-SET "+l.ToString()); Outlet(0,new PureData.Symbol("set"),l); }
protected virtual void MySend(int ix,PureData.Symbol s,PureData.AtomList l) { Send(new PureData.Symbol("receiver"),l); Send(new PureData.Symbol("receiver2"),(PureData.Atom[])l); }
protected virtual void MyAnything(int ix,PureData.Symbol s,PureData.AtomList l) { Post(ix.ToString()+": Test-("+s.ToString()+") "+l.ToString()); Outlet(0,s,l); } }
--- NEW FILE: test-help.pd --- #N canvas 617 153 850 617 12; #X floatatom 125 51 5 0 0 0 - - -; #X symbolatom 320 81 10 0 0 0 - - -; #X msg 536 45 msg one 2 three; #X obj 22 24 loadbang; #X floatatom 213 26 5 0 0 0 - - -; #X msg 213 52 1 $1 3; #X msg 318 14 symbol abc; #X msg 328 42 symbol d3f; #X obj 21 54 bng 15 250 50 0 empty empty empty 0 -6 0 8 -262144 -1 -1; #X msg 535 82 set 1 7 8; #X msg 533 135 list; #X msg 532 164 list 1; #X msg 533 193 list abc; #X msg 528 251 list s e c o n d; #X obj 152 495 print OUT; #X floatatom 530 321 5 0 0 0 - - -; #X floatatom 229 112 5 0 0 0 - - -; #X msg 228 136 send $1 b c; #X obj 407 497 print RECV1; #X obj 406 463 r receiver; #X obj 554 465 r receiver2; #X obj 555 499 print RECV2; #X floatatom 526 362 5 0 0 0 - - -; #X symbolatom 578 364 10 0 0 0 - - -; #X text 585 318 passive - bang to see; #X text 676 366 active; #X msg 526 386 1 2 3; #X floatatom 528 275 5 0 0 0 - - -; #X msg 589 386 turalu; #X msg 578 274 heyho; #X obj 151 443 test a b 5; #X connect 0 0 30 0; #X connect 1 0 30 0; #X connect 2 0 30 0; #X connect 3 0 8 0; #X connect 4 0 5 0; #X connect 5 0 30 0; #X connect 6 0 1 0; #X connect 7 0 1 0; #X connect 8 0 30 0; #X connect 9 0 30 0; #X connect 10 0 30 0; #X connect 11 0 30 0; #X connect 12 0 30 0; #X connect 13 0 30 1; #X connect 15 0 30 2; #X connect 16 0 17 0; #X connect 17 0 30 0; #X connect 19 0 18 0; #X connect 20 0 21 0; #X connect 22 0 30 3; #X connect 23 0 30 3; #X connect 26 0 30 3; #X connect 27 0 30 1; #X connect 28 0 30 3; #X connect 29 0 30 1; #X connect 30 0 14 0;
--- NEW FILE: test.csproj --- <VisualStudioProject> <CSHARP ProjectType = "Local" ProductVersion = "7.10.3077" SchemaVersion = "2.0" ProjectGuid = "{6CED2448-6407-4AF7-95B6-932D8118AF3D}" > <Build> <Settings ApplicationIcon = "" AssemblyKeyContainerName = "" AssemblyName = "Test" AssemblyOriginatorKeyFile = "" DefaultClientScript = "JScript" DefaultHTMLPageLayout = "Grid" DefaultTargetSchema = "IE50" DelaySign = "false" OutputType = "Library" PreBuildEvent = "" PostBuildEvent = "" RootNamespace = "Test" 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" /> <Reference Name = "PureData" Project = "{0015D5E7-B0FB-4F06-B334-225447D1F992}" Package = "{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}" /> </References> </Build> <Files> <Include> <File RelPath = "AssemblyInfo.cs" SubType = "Code" BuildAction = "Compile" /> <File RelPath = "test.cs" SubType = "Code" BuildAction = "Compile" /> </Include> </Files> </CSHARP> </VisualStudioProject>
--- NEW FILE: AssemblyInfo.cs --- (This appears to be a binary file; contents omitted.)