In support of the p5_sc library, which provides the ability to communicate with SuperCollider's synthesis server from Processing, I've developed and amassed a series of basic helper functions ported from SC's client library. These provide frequently-used operations when interfacing between control and audio-generation objects, including:
- converting MIDI note values to cps
- random number generation with nonuniform distribution
- value clipping
- mapping between value ranges (linear and exponential)
- support for Spec objects, including a global named Spec register
It's undocumented, besides code comments, but hopefully useful.
Download sc_utils here.