[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[sc-dev] SF.net SVN: supercollider:[8222] trunk/build/SCClassLibrary/JITLib/various/ Fdef.sc
Revision: 8222
http://supercollider.svn.sourceforge.net/supercollider/?rev=8222&view=rev
Author: jrhb
Date: 2008-12-20 15:59:03 +0000 (Sat, 20 Dec 2008)
Log Message:
-----------
re-implement Maybe stream embedding
Modified Paths:
--------------
trunk/build/SCClassLibrary/JITLib/various/Fdef.sc
Modified: trunk/build/SCClassLibrary/JITLib/various/Fdef.sc
===================================================================
--- trunk/build/SCClassLibrary/JITLib/various/Fdef.sc 2008-12-20 15:10:13 UTC (rev 8221)
+++ trunk/build/SCClassLibrary/JITLib/various/Fdef.sc 2008-12-20 15:59:03 UTC (rev 8222)
@@ -55,6 +55,22 @@
^this.composeNAryOp(selector, args)
}
+ // streams and patterns
+
+ embedInStream { arg inval;
+ ^Prout { arg inval;
+ var curVal, str;
+ var outval;
+ while {
+ if(curVal !== value) { str = value.asStream; curVal = value };
+ outval = str.next(inval);
+ outval.notNil
+ } {
+ inval = outval.yield;
+ }
+ }.embedInStream(inval)
+ }
+
// math
composeUnaryOp { arg aSelector;
^UnaryOpFunctionProxy.new(aSelector, this)
@@ -122,6 +138,9 @@
if(verbose and: { exception.isKindOf(Exception)} ) {
("Error or incomplete specification" + exception.errorString).postln;
};
+ /* if(exception.isKindOf(this.class).not) {
+ Exception.throw;
+ }*/
// remove again
callers.pop;
current = previous;
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
_______________________________________________
sc-dev mailing list
info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-dev/
search: https://listarc.bham.ac.uk/lists/sc-dev/search/