GameOfLife/Unit-Lib — pull request #43 by miguel-negrao (2014-05-16 15:20:55+00:00)
Title: A couple of commits

Hi Wouter,

I have a couple of commits up for discussion. The two main features are recursive UGroups and UBus. I implemented UBus in the spirit of UGroup. Each UBus is identified by a symbol, the bus is allocated at prepare time and it is freed when the unit is disposed. It is to be used with args which have a PositiveIntegerSpec. UBus is handy for sending audio to and from UChains using UGroup. Example:

```
(
Udef.loadOnInit = true;
Udef(\test, { Out.ar(\bus.kr(0), SinOsc.ar([440,880])*0.1) }).setSpec(\bus, PositiveIntegerSpec() );
Udef(\out2, { Out.ar(0, In.ar(\bus.kr(0),2)) }).setSpec(\bus, PositiveIntegerSpec() );
)

(
x = UScore(
UChain( [\test, [\bus, UBus(\a,2) ]] ).ugroup_('default'),
UChain( [\out2, [\bus, UBus(\a,2)]]).ugroup_('default').addAction_(\addToTail)
);
x.prepareAndStart
)
```

The rest are cosmetic improvements.