bank() repoints a pattern's drum abbreviations at a named drum-machine sample set
Strudel ships samples from classic drum machines (Roland TR-808, TR-909, …) whose sounds are named with a machine prefix, e.g. RolandTR808_bd. The .bank(name) method automatically prepends name_ to each sound in the pattern, so sound(“bd hh sd hh”).bank(“RolandTR808”) is equivalent to writing every sound with its full prefix — but with none of the repetitive typing. Because bank() only changes which sample set the standard abbreviations (bd, sd, hh, oh, cp, …) point at, the pattern string itself is unchanged: only the timbre of each named drum swaps. This decouples rhythmic writing from sound selection — you audition one pattern across machines by editing a single string. Combined with n() for choosing among per-drum sample variants, bank() is the standard way to work with drum-machine kits.
Examples
sound(“bd hh sd hh”).bank(“RolandTR808”) // 808 kit sound(“bd hh sd hh”).bank(“RolandTR909”) // same pattern, 909 kit n(“<1 2> 1 <2 3> 1”).sound(“bd hh sd hh”).bank(“RolandTR808”) // pick sample variants per hit
Assessment
Write a two-line comparison that plays the same kick/snare/hat pattern first on a TR-909 and then on a TR-808 using .bank(). Then use n() to pick alternate sample variants for each drum hit.