Tone.GrainPlayer
↳ EXTENDS ToneTone.GrainPlayer implements granular synthesis. Granular Synthesis enables you to adjust pitch and playback rate independently. The grainSize is the amount of time each small chunk of audio is played for and the overlap is the amount of crossfading transition time between successive grains.
CONSTRUCTOR
new Tone.GrainPlayer (url
, [ callback
]
)
url
The url to load, or the Tone.Buffer to play.
type:
String
or
Tone.Buffer
callback
The callback to invoke after the url is loaded.
type:
function
optional
DEFAULTS
{
onload
:
Tone.noOp
,
overlap
:
0.1
,
grainSize
:
0.2
,
drift
:
0
,
playbackRate
:
1
,
detune
:
0
,
loop
:
false
,
loopStart
:
0
,
loopEnd
:
0
,
reverse
:
false
}
Members
.grainSize
↝ Time #The size of each chunk of audio that the buffer is chopped into and played back at.