Designing Sound in SuperCollider/Bubbles

Fig 35.5: producing a repeating but random-seeming pattern of triggers
First we'll create a reusable synthdef that outputs triggers (but not sound):

Fig 35.9: four bubble systems, simply triggered at random.
Note, instead of using the "bubbletrigs" synth (which is a direct port of the pd example) we could use Patterns to trigger bubble synths. This is a different model for resource management: instead of having four always-running synths which re-trigger to create a new bubble, we create one synth whenever we need a bubble, and it frees itself after.

This next one's a bit more complex - we do as the book does and make smaller bubbles have (a) higher pitch (b) lower volume (c) shorter duration. To connect these values together we define a "sizefactor" and use Pkey to reuse it in each of the args.