strudel-samples.txt
A presentation on loading and manipulating samples with strudel.
Table of Contents
Samples Redux
strudel has lots of awesome ways to modulate, loop, chop,
and process samples; kind of like having a Digitakt
in your browser.
Playing samples
Playing a sample is the same as playing a sound; in fact, most sounds we have already played with are samples:
$: "xylophone_hard_ff"
Speed
speed
controls the rate of playback, altering the pitch:
groove: "bd!2 [~ bd]!2"2"1 0.75"
Negative speeds reverse sample playback:
groove: "sd!2 [~ sd]!2""1 -1"2
Cut
cut
creates cut groups; only 1 sample can play at a time in any cut group.
melody: "piano*4"1
drums: "bd*4"1/16"1 0"
Sample Banks
All the percussion we have used thus far are samples.
We can choose different sample bank
s to pull samples from:
groove: "bd!2 [~ bd]!2"2, "hh*8", "~ ~ cp ~"
"RolandTR808"
Try changing the sample bank:
bank | description |
---|---|
"RolandTR808 " | Iconic drum machine of 80s hip-hop sounds |
"RolandTR909 " | Popular in techno and house |
"BossDR220 " | Simplified Roland TR707 |
"OberheimDMX " | Influential 1980s drum machine |
"LinnDrum " | 1980s drum machine targeting realistic sound |
The bank
function works by putting the name of the sample bank with an _
at the front of sample names.
bank: "bd*2""RolandTR808"
explicit: "RolandTR808_bd*2"1/4
Find sample banks in the drum machine
tab of the sounds
window.
Not all sample banks support the same percussion sounds!
Velocity
Changing the velocity of a sample changes its loudness.
d1: "bd*4""RolandTR909"
0 6, 1, sine
Begin & End
Strudel can start and end samples in different spots:
$: "0*2""numbers"1/16"0 0.2"0
$: "<bd sd>*8""0.1 0.5 0.75 1"2
Filter
Strudel also supports filters:
$: "sd*8""RolandTR909"
0, 2000, sine8
"<0 0 10>" // Resonance
"<0 0.1 1 4 -4>"2 // Envelope attack
Filter Type | Description |
---|---|
hpf | high-pass filter |
lpf | low-pass filter |
bpf | band-pass filter |
djf | dj-filter (try different values from 0 to 1.0 ) |
Loading Samples
Strudel can load samples with a custom name from a URL:
;
$: "conga*2"
Variations
Samples can have variations; 2 ways to select the variations:
- Pass a pattern of sample indices into the
n
function - Append the index to the sample name with
:
;
$: "conga:<0 1>*2", "conga*2""0 1"
Sample Packs
One can make sample packs in strudel using a special strudel.json
file.
_base
- A URL that gets added to the beginning of every other URL in the file.
Github
Strudel has a special shorthand from loading samples from github repositories.
'github:path/to/repo';
Longer samples
By default, samples play at normal speed until the end. For long samples, this
causes chaos
.
Overlap
Try playing this sample:
;
$: "tumbao"
cut
groups can mitigate the chaos. Try adding .cut(1)
.
Slow
We can give more space for the sample to play out with slow
:
;
$: "tumbao"12
Speed
We can speed up the sample to hear more of it:
;
$: "tumbao"121 25
setcps
We can even try changing strudels tempo:
;
1/2;
$: "tumbao"121 25
setcps
sets cycles
-per-second. A lower cps
results in a faster tempo.
We can use a formula to convert bpm
to cps
:
;
bpm/60/4;
LoopAt
loopAt
speeds up the sample so that it loops perfectly in n
cycles.
;
125/60/4
$: "tumbao"5
Combining knowledge of sample length and strudel's tempo is key!
fit
makes the pattern perfectly fit its event duration:
$: "<0 [0 1]>""numbers""<1!2 0.5>/2"
Chopping samples
Strudel has lots of fun and gnarly ways of chopping up samples and making them feel new again.
Breakbeats!
But first, let's get some break beats :)
'github:yaxu/clean-breaks';
120/60/4
$: "amen"4
Chop
chop
seamlessly splits the sample into multiple parts.
'github:yaxu/clean-breaks';
144/60/4
$: "amen"8"<blue red>"4
chop + more
Once the sample is chopped, we can start to transform it with patterns:
'github:yaxu/clean-breaks';
120/60/4;
$: "groove"322
0 5, 12
"0.75 1.5 0.9 1"
striate
Instead of chopping, we can striate
:
$: "numbers:0 numbers:1 numbers:2 numbers:3"1
"red white purple brown"
2, 4
Repeats the pattern n
times, but only playing the 1st nth
of the sample the
first time, the 2nd nth
the next time, and so on.
Jam time
'github:yaxu/clean-breaks';
// Downtempo
80/60/4;
$: "amen"4320 8