1--- 2title: Build Rhythms 3layout: ../../layouts/MainLayout.astro 4--- 5 6import { MiniRepl } from '../../docs/MiniRepl'; 7 8Note: 9 10- this has been (partly) translated from https://tidalcycles.org/docs/patternlib/howtos/buildrhythms 11- this only sounds good with `samples('github:tidalcycles/dirt-samples')` in prebake 12 13# Build Rhythms 14 15This page will teach you how to get started writing rhythms using different techniques. It is a good way to learn Strudel in a more intuitive way. 16 17## From a simple to a complex rhythm 18 19Simple bass drum - snare: 20 21<MiniRepl client:idle tune={`s("bd sd").slow(2)`} /> 22 23Let's pick a different snare sample: 24 25<MiniRepl client:idle tune={`s("bd sd:3").slow(2)`} /> 26 27Now, we are going to change the rhythm: 28 29<MiniRepl client:idle tune={`s("bd*2 [~ sd:3]").slow(2)`} /> 30 31And add some toms: 32 33<MiniRepl client:idle tune={`s("bd*2 [[~ lt] sd:3] lt:1 [ht mt*2]").slow(2)`} /> 34 35Start to transform, shift a quarter cycle every other cycle: 36 37<MiniRepl 38 client:idle 39 tune={`s("bd*2 [[~ lt] sd:3] lt:1 [ht mt*2]") 40.every(2, early(.25)).slow(2)`} 41/> 42 43Pattern the shift amount: 44 45<MiniRepl 46 client:idle 47 tune={`s("bd*2 [[~ lt] sd:3] lt:1 [ht mt*2]") 48.every(2, early("<.25 .125 .5>")).slow(2)`} 49/> 50 51Add some patterned effects: 52 53<MiniRepl 54 client:idle 55 tune={`s("bd*2 [[~ lt] sd:3] lt:1 [ht mt*2]") 56.every(2, early("<.25 .125 .5>")) 57.shape("<0 .5 .3>") 58.room(saw.range(0,.2).slow(4)) 59.slow(2)`} 60/> 61 62More transformation: 63 64<MiniRepl 65 client:idle 66 tune={`s("bd*2 [[~ lt] sd:3] lt:1 [ht mt*2]") 67.every(2, early("<.25 .125 .5>")) 68.shape("<0 .5 .3>") 69.room(saw.range(0,.2).slow(4)) 70.jux(id, rev, x=>x.speed(2)) 71.slow(2)`} 72/> 73 74## Another rhythmic construction 75 76Let's start with a sequence: 77 78<MiniRepl client:idle tune={`n("0 0 [2 0] [2 3]").s("feel").speed(1.5).slow(2)`} /> 79 80We add a bit of flavour: 81 82<MiniRepl client:idle tune={`n("0 <0 4> [2 0] [2 3]").s("feel").speed(1.5).slow(2)`} /> 83 84Swap the samples round every other cycle: 85 86TODO: implement `rot`