By manipulating a few different properties, it’s possible to emulate scratching with a reasonable degree of realism.
In this case, I’ve taken a vocal sample from Tay Zonay’s 2006 Chocolate Rain. I’m going for a “baby scratch” which just involves moving the record back and forth over the same sound—no crossfader control required.
The #scratch track has a basic pattern: the first 16 quarter-beats each play the sample. The second 16 are silent. I've used <repeat-blam> to stop this getting too verbose.
<track-blam to="#scratch" chance="0.6">
<repeat-blam x="16">
<bar-blam s="1"></bar-blam>
</repeat-blam>
<repeat-blam x="16">
<bar-blam s="0"></bar-blam>
</repeat-blam>
</track-blam>
The sample itself is reversed every other time, moving back and forth over the sample.
<blam-blam prop="reverse" value="1|0"></blam-blam>
The effect is humanized in a number of ways. Firstly, note the chance="0.6" attribution on <track-blam>. This creates gaps/pauses, as if the turntablist is improvising a rhythm. The length is also fluctuated—because sometimes you might stop dead while still over part of the sound.
<blam-blam prop="length" value="0.0625~0.15"></blam-blam>
Finally, an LFO performs a continuous permutation of the sample pitch (via the detune prop). The speed of each scratching motion would not be regular or stable.
<lfo-blam prop="detune" gain="700" beats="0.7"></lfo-blam>
You can make the scratches sound sloppier or sharper using the speed slider. Imagine smoother or jerkier wrist motions.
A second instrument plays the same Chocolate Rain sample at the end of each scratching phrase; either “chocolate rain” or just “chocolate”. An <envelope-blam> ramps the sample up to speed. Turntables do not go from 0 to the correct speed in an instant—even when guided by hand.
<envelope-blam prop="detune" curve="-700 0, 0 0.25" beats></envelope-blam>
<blam-blam prop="length" value="4|0.75"></blam-blam>
The bass part also has so variety. There's just three samples but played (using <notes-blam>) over four arpeggiated chords. A happy accident: samples repitched to higher notes end up shorter, varying the release time. Some notes are jabbed very briefly.
The final two bars are in fill mode, meaning notes and note placement are randomized like an improvisation.
<bar-blam s="D2 D3 A2 F3" fill chance="0.75"></bar-blam>
<bar-blam s="D3 F4 A3 F3" fill chance="0.5"></bar-blam>