Nice! But I wonder if the syntax should be reversed to better line
up with the yield statements? With yield, the receiver is returned,
but with this version of id, the argument to it is returned
199.yield;
189.yield;
200.idle(6);
(Routine { 100.do { |i| i.yield } }).idle(6);
345.yeild;
This seems a little clearer to me... but that may just be me. Either
way - I think this is great!
Josh
On Dec 15, 2008, at 5:09 PM, Julian Rohrhuber wrote:
I've added the message idle to SimpleNumber.
This is how it works:
// for 6 seconds, return 200, then continue
(
r = Routine {
199.yield;
189.yield;
6.idle(200);
199.yield;
189.yield;
};
fork {
loop {
r.value.postln;
1.wait;
}
}
);
// the value can also be a stream or a function
(
r = Routine {
199.yield;
189.yield;
6.idle(Routine { 100.do { |i| i.yield } });
199.yield;
189.yield;
};
fork {
loop {
r.value.postln;
1.wait;
}
}
);
objections / ideas ?
--
.
_______________________________________________
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/
******************************************
/* Joshua D. Parmenter
http://www.realizedsound.net/josh/
“Every composer – at all times and in all cases – gives his own
interpretation of how modern society is structured: whether actively
or passively, consciously or unconsciously, he makes choices in this
regard. He may be conservative or he may subject himself to
continual renewal; or he may strive for a revolutionary, historical
or social palingenesis." - Luigi Nono
*/
_______________________________________________
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/