-- /home/pln/Downloads/PerfectSunriseLoop.gif

do
-- resetCycles
setcps (104/60/4)
let modIndex = pF "modIndex"
d1 $ gF1 $ gM1
  $ midiOn "^41"  (struct "t t t*<1!6 2 1> t*<1!7 2>")
  $ midiOff "^41" (struct "t . ~ t ~ <~!3 t*<2 [2 1] [4 2] [2 4]>>")
  $ stack [
  "kick" # lpf 10000 # cut 1,
  "rumble" |* gain 1.3
  # lpf 200
  # cut 11,
  ""
  ]
  # "[techno:1,jazz]"
  # gain 2
  # room 0.4 # size 0.4 # dry 0.95
d2 $ gF1 $ gM2
  $ midiOn "^42" (<|"~ s ~ s*<1 2>")
  $ midiOff "^42" (<| "~ ~ s ~")
  -- $ "[vec1_snare:3]"
  $ "[snare:33]" 
  -- # note "<-0!12 -2 -2 -3 0>"
  # gain 1.3
d6 $ gF1 $ gM3
   $ midiOn "^43" (<|"~ s ~ s*<1 2>")
   $ midiOff "^43" (<| "~ s")
   $ "clap:2"
  -- # note "<-0!12 -2 -2 -3 0>"
    -- # gain 1.3
d3 $ gF1 $ gM2
  $ midiOn "^75" (ply "1 <2!3 4>")
  $ midiOn "^43" (
    (# delay "<0 0.2 0.3 0.5 0.6 0.7 0.8 0.9>") .
    (# delayt "s") .
    (# delayfb 0.5)
    )
  $ chop 8
  $ n (slow 4 $ ply 4 $ "<1 2 3>") 
  # "orage" 
  # cut 3 
  # gain 1.4
d4 $ gF2 $ gM3 -- BASS <3
  -- $ midiOff "^57" (struct "t f")
  $ loopAt 2
  $ "orage"
  # cut 4
  -- # bandf 100
  # gain 1.8
  -- # room 0.4 # sz 0.3 # dry 1.3
  # crushbus 41 (range 16 4 "^52")
  # octerbus 42 (range 0 0.93 "^32")
d5 $ gF3 $ gM3 -- Rain piano <3
  $ (0.05 ~>)
  $ midiOn "^41" (mask "<t f>")-- Mask norepeat
  $ midiOn "^90" (slice 2 "<0 0 1 1>")
  $ midiOn "^34" ((>| n "<<4!4 34 4!3> 4 33 <34 4>>")) -- ORAGE INFINI
  $ midiOn "^58" ((>| n "5/2")) -- Pluie infinie!
  $ slow 4 $ ply "4 . 2 0" -- Slowly, loop 4 times each 
  $ n "<~  6  7  8  8  8  7  8    9 10 11 12 13 14 13 12   17 18 19 20 17 18 20 20   17 18 19 20 21 23 22 20 21 22 23 24 25 26 27 28 29 30 31 32 33   34 35 36 37 37 37 38 37 38 39 ~ 37 ~ ~ 38 38 38 39 ~>" # "orage"
  -- $ n "<6>" 
  -- 4 == Loop intro
  -- 6 == Loop Orage
  # "orage"
  # cut 5
  # octersubbus 51 (range 0 2 "^18")
  # octerbus    52 "^34"
  # crushbus    53 (range 16 5 "^54")
  # room 0.3 # sz 0.4
  # gain 1.6
  # lpf 4500
  # hpf 300 -- Coupe la basse
d9 $ gF2 $ gM3 -- ACID Doutes TODO Moins criard
  $ sometimesBy "^18" (superimpose (off "s" (|+| note "0 12 0 <0 12>")))
  $ midiOn "^19" (struct "<~!4 t!4> t ~ t ~ t <~ t t ~> t*<1!3 2>")
  $ fix ((|+ note 12) . ((|* gain "^35"))) "vec1_acid:30"
  $ fix ((|+ note 24) . (# "vec1_acid:36") . (# delay 0.5) . (# delayt "q")) "acid2"
  $ fix ((|+ note 12) . (# "vec1_acid:30")) "acid1"
  $ fix ((|+ note 12)) "vec1_acid:27"
  $ note ("<[<c3 af2 af2>@3 d3]!3 [d3!3 [ds3 d3 ds3]]>" + 12)
  # "[acid1,acid2]"
  # room 0.4
  # sz 0.4
  # gain 1.5
d8 $ gF1 $ gM2 -- Break discret face à une telle idole
  $ midiOn "^60" (mask "t(4,8,<1!3 0>)" . chop 8)
  -- $ midiOn "^36" (id . (loopAt 0.5 . (# "jungle_breaks:130")))
  $ whenmod 64 8 (midiOff ("^56" +"^36") (
    slice 4 "0 1 2(<2!8 3!8>,8) 3*<1 1 4 [2 8]>")
    )
  $ midiOn "^92" (mask "t(16,32)" . ply "2 2 <4 8 16 16> 2")
  $ midiOn "^36" (loopAt 0.5 . (# n 45)) -- Orleanaise
  $ midiOn "^56" (loopAt "0.5 <0.5!3 <0.25 [1]>>" . (# n 14))
  $ chop 16
  $ loopAt 4
  $ "jungle_breaks:12" # cut 8
  # gain 1.3
d7 $ gF3 $ gM3 -- Voices
  $ (0.75 ~>)
  $ fix (0.25 <~) (n 7)
  $ midiOn "^91" (ply "4 [8 1]")
  -- $ fix (0.5 <~) (n 6) 
  -- $ fix (0.5 <~) (n "[4,6]") 
  -- $ fix (0.25 <~) (n "[2,3]") 
  -- $ fix (# start 0.1) (n 5) 
  -- $ n ("<~!0 0 ~ 1 ~ 2 ~ 3 ~ 0 6 ~ ~ 0 6 0 6>"
  -- TODO MAKE THE TOP N EXPRESSION FROM BOTTOM ONES
  -- $ slow 4 -- TODO on/off
  -- $ (# end "<0.5 0.13 0.5 1>") -- TODO FOR n 11 LOVE IS SOFT
  $ n (cat [
    -- "<0 ~ 1 ~ 2 ~ 3 ~>" -- Riders 1 
    -- "<0 ~ ~ ~ 1 ~ ~ ~ 4 ~ ~ 4 5 ~ ~ ~>"  -- Riders 2
    -- "<<0 6> ~ ~ ~>"  -- Road Killer
    -- "<~ ~ <0 1 7 ~> ~>" -- Squirming Brain
    -- "<8 8 9 8>" -- Children Holiday
    "<11!6 12 <~ 13>>" -- Love 
    -- "11" -- Love 
    ]
  + 45) 
  # "orage" 
  # cut 9
  # room 0.4
  # sz 0.2
  # gain 1.5
d10  
  $ loopAt 8 
  $ "risers" 
  # room 0.4
d11 $ gF3 $ gM3
  $ note ("[f4 c5 gs4 c5 f4 <bf4!3 f5 bf4 f5 bf4 f5> d5*<1 2 1 4> bf4]") 
  # "FMRhodes2" |+ note "0" -- #"FMRhodes1"
  # modIndex (range 0 8 "^30")
  # room 0.4
  # att 0.04 # rel 2
  # gain 1.3
  # lpf 2000
d12 $ gF2 $ gM3 
  $ superimpose (ply 2 . (|+ note 12) 
    . (# cut 121)
    . (# rel 0.5)
    )
  $ slow 4 
  $ note ("<f [f@15 ef]>" - 36 + "[0,12]")
  # "FMRhodes1" 
  -- # cut 12

once $ "orage:45" # cut 13

-- Absolutely! Here’s how you can express the core "Riders on the Storm" elements in TidalCycles using named notes instead of MIDI numbers.
-- ## **Bass Line (E Dorian)**
-- A classic modal bass pattern, alternating E and A, with passing notes for groove:
d1 $ n "e e a e g e b e" # s "bass"
-- Or a more walking/modal version:
d1 $ note "e fs g a b g a e" # s "bassWarsaw" |- note 24
-- ## **Piano/Keys (Comping & Descending Line)**
-- **Comping between E minor and A major:**
d2 $ n "" # s "superpiano"
-- **Iconic descending Dorian line (as in the intro):**
d3 $ n "d cs c b a g fs e" # s "superpiano"
-- ## **Melodic/Lead Lines**
-- **Dorian/pentatonic flavor for solos or riffs:**
d4 $ n "e g a b d b a g" # s "lead"
d4 $ n "e fs g a b d" # s "lead"
-- ## **Tips**
-- - Use `# gain` or `# cutoff` for filter modulation.
-- - Layer rain or vocal samples for atmosphere.
-- - Try syncopating the bass or keys for a more techno feel.
-- **Summary:**  
-- - **Bass:** `d1 $ n "e e a e g e b e"`
-- - **Piano:** `d2 $ n ""`
-- - **Descending line:** `d3 $ n "d cs c b a g fs e"`
-- - **Lead:** `d4 $ n "e g a b d b a g"`
