logo       

Re: NRT options Part II: msg#00159

audio.supercollider.devel

Subject: Re: NRT options Part II


On Aug 18, 2004, at 7:31 PM, Joshua Parmenter wrote:

<x-tad-smaller> if(duration.notNil,
{finallist = </x-tad-smaller><x-tad-smaller>Array</x-tad-smaller><x-tad-smaller>.new;
list.do{</x-tad-smaller><x-tad-smaller>|i|</x-tad-smaller><x-tad-smaller> if(i[0] <= duration, { finallist = finallist.add(i)})};
finallist.sort({</x-tad-smaller><x-tad-smaller>arg</x-tad-smaller><x-tad-smaller> a, b; a[0] < b[0]});
finallist = finallist.add([duration, [</x-tad-smaller><x-tad-smaller>\c_set</x-tad-smaller><x-tad-smaller>, 0, 0]])},
{finallist = list});

</x-tad-smaller>

It is not very modular to do this here.
The principle of "once and only once" says only implement functionality in one place: http://c2.com/cgi/wiki?OnceAndOnlyOnce
So you should call out to the section method to do this work, and not replicate the functionality here.


--
--- james mccartney james-M9HdPQXNfxq9Zq0HfjR8jw@xxxxxxxxxxxxxxxx <http://www.audiosynth.com>
SuperCollider - a real time audio synthesis programming language_______________________________________________
sc-dev mailing list
sc-dev-Ayv8T2snMLBt9CRQqspbbg@xxxxxxxxxxxxxxxx
http://www.create.ucsb.edu/mailman/listinfo/sc-dev
<Prev in Thread] Current Thread [Next in Thread>
Google Custom Search

News | FAQ | advertise