samaaron/sonic-pi — pull request #247 by xavriley (2014-11-25 15:36:42+00:00)
Title: WIP: Added pitch shifting to sample playback

Added the ability for samples to be played back by a granular synth - in
this case warp1:ar from SuperCollider.

This gives users the ability to change the pitch of a sample without
changing the length of time it takes to playback. The new ability is
controlled by a `pitch` param, the presence of which indicates to Sonic
Pi to use a new kind of sample player.

Additional arguments for sample include:

* overlaps - the number of simultaneous grains
* window_size - the duration of a grain (in seconds I think)
* rand - the placement of a grain around a pointer as it moves through the buffer. 0 = no randomness, 1 = totally random