1export const bumpStreet = `// froos - "22 bump street", licensed with CC BY-NC-SA 4.0 2samples('github:felixroos/samples') 3samples('https://strudel.cc/tidal-drum-machines.json', 'github:ritchse/tidal-drum-machines/main/machines/') 4 5"<[0,<6 7 9>,13,<17 20 22 26>]!2>/2" 6 // make it 22 edo 7 .fmap(v => Math.pow(2,v/22)) 8 // mess with the base frequency 9 .mul("<300 [300@3 200]>/8").freq() 10 .layer( 11 // chords 12 x=>x.div(freq(2)).s("flute").euclidLegato("<3 2>",8) 13 .shape(.4).lpf(sine.range(800,4000).slow(8)), 14 // adlibs 15 x=>x.arp("{0 3 2 [1 3]}%1.5") 16 .s('xylo').mul(freq(2)) 17 .delay(.5).delayfeedback(.4).juxBy(.5, rev) 18 .hpf(sine.range(200,3000).slow(8)), 19 // bass 20 x=>x.arp("[0 [2 1?]](5,8)").s('sawtooth').div(freq(4)) 21 .lpf(sine.range(400,2000).slow(8)).lpq(8).shape(.4) 22 .off(1/8, x=>x.mul(freq(2)).degradeBy(.5)).gain(.3) 23 ).clip(1).release(.2) 24.stack( 25 // drums 26 s("bd sd:<2 1>, [~ hh]*2, [~ rim]").bank('RolandTR909') 27 .off(1/8, x=>x.speed(2).gain(.4)).sometimes(ply(2)).gain(.8) 28 .mask("<0@4 1@12>/4") 29 .reset("<x@15 [x(3,8) x*[4 8]]>") 30 // wait for it... 31).fast(2/3) 32 //.crush(6) // remove "//" if you dare`; 33 34export const trafficFlam = `// froos - "traffic flam", licensed with CC BY-NC-SA 4.0 35 36samples('github:felixroos/samples') 37samples('https://strudel.cc/tidal-drum-machines.json', 'github:ritchse/tidal-drum-machines/main/machines/') 38 39addVoicings('hip', { 40 m11: ['2M 3m 4P 7m'], 41 '^7#11': ['3M 4A 5P 7M'], 42}, ['C4', 'C6']) 43 44stack( 45 stack( 46 "<Bbm11 A^7#11>/2".voicings('hip').note() 47 .s("gm_epiano1:2") 48 .arp("[<[0 1 2 3] [3 2 1 0]> ~@5]/2") 49 .release(2).late(.25).lpf(2000), 50 "<Bb1 A1>/2".note().s('gm_acoustic_bass'), 51 n("<0 2 3>(3,8)".off(1/8, add(4))) 52 .scale("<Bb4:minor A4:lydian>/2") 53 .s('gm_electric_guitar_jazz') 54 .decay(sine.range(.05, .2).slow(32)).sustain(0) 55 .delay(.5).lpf(sine.range(100,5000).slow(64)) 56 .gain(.7).room(.5).pan(sine.range(0,1).slow(11)) 57 ).add(perlin.range(0,.25).note()), 58 stack( 59 s("bd:1(3,8) rim").bank('RolandTR707').slow(2).room("<0 <.1 .6>>") 60 .when("<0@7 1>",x=>x.echoWith(3, .0625, (x,i) => x.speed(1+i*.24))), 61 s("rim*4").end(.05).bank('RolandTR808').speed(.8).room(.2) 62 ) 63) 64 .late("[0 .05]*2").late(12) 65 66`; 67 68export const funk42 = `// froos - how to funk in 42 lines of code 69// adapted from "how to funk in two minutes" by marc rebillet https://www.youtube.com/watch?v=3vBwRfQbXkg 70// thanks to peach for the transcription: https://www.youtube.com/watch?v=8eiPXvIgda4 71 72samples('github:felixroos/samples') 73samples('https://strudel.cc/tidal-drum-machines.json', 'github:ritchse/tidal-drum-machines/main/machines/') 74 75setcps(.5) 76 77let drums = stack( 78 s("bd*2, ~ sd").bank('RolandTR707').room("0 .1"), 79 s("hh*4").begin(.2).release(.02).end(.25).release(.02) 80 .gain(.3).bank('RolandTR707').late(.02).room(.5), 81 //s("shaker_small").struct("[x x*2]*2").speed(".8,.9").release(.02) 82).fast(2) 83 84let wurli = note(\`< 85[[a2,g3,[b3 c4],e4] ~ [g3,c4,e4](3,8)@4 ~@2]!3 86[[e2,e3,a3,b3,e4]@3 [e2,e3,ab3,b3,e4]@5]>\`) 87 .s("gm_epiano1:5").decay(.2).sustain("<[1 0@7]!3 1>") 88 .gain("<[.8@2 .4@14]!3 .7>").room(.3) 89 90let organ = note("<[~@3 [a3,d4,f#4]@2 [[a3,c4,e4]@2 ~] ~@2]!3 ~>".add(12)) 91 .s("gm_percussive_organ:2").gain(.6).lpf(1800).pan(.2).room(.3); 92 93let clav = note(\`< 94[~@3 a2 [g3,[b3 c4],e4]@2 ~ a2 [g3,b3,e4] ~@2 [g3,c4,e4] ~@4]!3 95[~@3 e3 [[a3 b3],c3,e3]@2 ~ e2 [e3,a3]@3 [b3,e3] ~@2 [b3,e3]@2]>\`) 96 .s("gm_clavinet:1").decay("<.25!3 [.25 .4]>").sustain(0) 97 .gain(.7).pan(.8).room(.2); 98 99let bass = note(\`< 100[a1 [~ [g2 a2]] [g1 g#1] [a1 [g2 a2]]] 101[a1 [~ [g2 a2]] [e3 d3] [c3 [g3 a3]]] 102[a1 [~ [g2 a2]] [g1 g#1] [a1 [g2 a2]]] 103[e2@6 e1@5 e1 [[d2 e3] g1]@4] 104>\`).s("gm_electric_bass_pick:1").release(.1) 105 106stack( 107 drums 108 ,wurli 109 ,organ 110 ,clav 111 ,bass 112)`;