# Hypnotic slow polyrhythms

**URL:** <https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896>\
**Category:** Creations & Ideas\
**Created:** [May 27, 2024, 3:37pm UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896 "2024-05-27T15:37:20Z")\
**Posts on this page:** 13\
**Page:** 1

<div class="post-metadata">

**Author:** ![HarryLeBlanc](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/harryleblanc/32/2813_2.png) [@HarryLeBlanc](https://in-thread.sonic-pi.net/u/HarryLeBlanc)\
**Post date:** [May 27, 2024, 3:37pm UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/1 "2024-05-27T15:37:20Z")

</div>

Here’s an experiment in very slow polyrhythms. Very hypnotic. Let me know what you think!

```ruby
use_debug false

set(:notes, [:g6, :e6, :d5, :c6, :a5, :g5, :e5, :d5, :c5, :b4, :a4, :g4, :f4, :e4, :d4, :c4])
##| set(:notes, [:c6, :a5, :g5, :e5, :d5, :c5, :a4, :g4, :e4, :d4, :c4, :a3, :g3, :e3, :d3, :c3])

set(:breakout, 0)

sniddler = 0.01
breakoutloop = (1 / sniddler).to_i + 1
puts "break out after " + breakoutloop.to_s+ " loops"
loopsize = 2
mysynth = :blade
loopcount = 0

define :playnote do |depth|
  with_fx :reverb, mix: 0.7, room: 0.9 do
    use_synth mysynth
    play get(:notes)[depth]
  end
  sleep loopsize + (sniddler * depth)
end

use_synth_defaults cutoff: 50

live_loop :none do
  playnote 0
  break if get(:breakout) == 1
end

live_loop :one do
  break if get(:breakout) == 1
  playnote 1
end

live_loop :two do
  break if get(:breakout) == 1
  playnote 2
end

live_loop :three do
  break if get(:breakout) == 1
  playnote 3
end

live_loop :four do
  break if get(:breakout) == 1
  playnote 4
end

live_loop :five do
  break if get(:breakout) == 1
  playnote 5
end

live_loop :six do
  break if get(:breakout) == 1
  playnote 6
end

live_loop :seven do
  break if get(:breakout) == 1
  playnote 7
end

live_loop :eight do
  break if get(:breakout) == 1
  playnote 8
end

live_loop :nine do
  break if get(:breakout) == 1
  playnote 9
end

live_loop :ten do
  break if get(:breakout) == 1
  playnote 10
end

live_loop :eleven do
  break if get(:breakout) == 1
  playnote 11
end

live_loop :twelve do
  break if get(:breakout) == 1
  playnote 12
end

live_loop :thirteen do
  break if get(:breakout) == 1
  playnote 13
end

live_loop :fourteen do
  break if get(:breakout) == 1
  playnote 14
end

live_loop :fifteen do
  playnote 15
  loopcount += 1
  puts loopcount.to_s + " loops"
  set(:breakout, 1) if loopcount == breakoutloop
  break if get(:breakout) == 1
  
  
end

```

---

<div class="post-metadata">

**Author:** ![hitsware](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@hitsware](https://in-thread.sonic-pi.net/u/hitsware)\
**Post date:** [May 28, 2024, 9:26pm UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/2 "2024-05-28T21:26:46Z")

</div>

Here is what I hear …  
https://w.soundcloud.com/player/?visual=false&url=https%3A%2F%2Fapi.soundcloud.com%2Ftracks%2F1832430489&show_artwork=true&maxheight=166  
Is this Your intention ?

---

<div class="post-metadata">

**Author:** ![HarryLeBlanc](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/harryleblanc/32/2813_2.png) [@HarryLeBlanc](https://in-thread.sonic-pi.net/u/HarryLeBlanc)\
**Post date:** [May 29, 2024, 7:39pm UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/3 "2024-05-29T19:39:42Z")

</div>

No, sounds quite different on my system. That’s weird!  
Not sure how to troubleshoot this, as I’m a newbie, but I’m wondering if it’s a horsepower issue? My system has alot of memory and a fast processor.

---

<div class="post-metadata">

**Author:** ![hitsware](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@hitsware](https://in-thread.sonic-pi.net/u/hitsware)\
**Post date:** [May 29, 2024, 8:35pm UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/4 "2024-05-29T20:35:41Z")

</div>

Interesting . Could be horsepower … I ’ m at the low end .  
In a way no need to fix it as long as You are satisfied ???  
Would You post an audio version ?

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [May 29, 2024, 9:06pm UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/5 "2024-05-29T21:06:30Z")

</div>

I think the problem is the fx reverb which is defined inside the playnote function so you will get lots of instances. If you move it outside to include the defined live loops then it works much better: only one instance. As is, it struggles on my Pi5. Moving the reverb then no problem.

---

<div class="post-metadata">

**Author:** ![HarryLeBlanc](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/harryleblanc/32/2813_2.png) [@HarryLeBlanc](https://in-thread.sonic-pi.net/u/HarryLeBlanc)\
**Post date:** [May 30, 2024, 12:24am UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/6 "2024-05-30T00:24:54Z")

</div>

I did upload a mix to my bandcamp page:  
https://bandcamp.com/EmbeddedPlayer/v=2/track=1192335115/size=large/tracklist=false/artwork=small/

---

<div class="post-metadata">

**Author:** ![HarryLeBlanc](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/harryleblanc/32/2813_2.png) [@HarryLeBlanc](https://in-thread.sonic-pi.net/u/HarryLeBlanc)\
**Post date:** [May 30, 2024, 12:25am UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/7 "2024-05-30T00:25:32Z")

</div>

I’ll take your advice. It’s a good idea, but I thought it had to be inside the live loop for the effect to affect the sound.  
Still a noob!

---

<div class="post-metadata">

**Author:** ![robst247](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/robst247/32/2799_2.png) [@robst247](https://in-thread.sonic-pi.net/u/robst247)\
**Post date:** [June 5, 2024, 12:56am UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/8 "2024-06-05T00:56:22Z")

</div>

This is exactly what I hear on my ASUS gaming laptop, which has an AMD Ryzen 7 CPU and 16GB of RAM and can generally handle (very) intensive DSP. It reminds me of English church bell-ringers. (Anecdote: When I was 18, back in the Cretaceous Era, I fell in love with an English rose who used to go bell-ringing in the village church. I got involved in some serious bell-ringing practice, mainly because I wanted to get close to her – and I just loved the sight of her pulling on that rope and her gorgeous lithe young body rhythmically stretching. Praise the Lord! How great are Thy works! 🙏) It also reminds me of certain patterns generated by Mario Nieto’s Harmony Bloom VST sequencer: [Live Music Creation with Harmony Bloom 1.2.9 #46 (youtube.com)](https://www.youtube.com/watch?v=zp1BU9fSJQc)

---

<div class="post-metadata">

**Author:** ![HarryLeBlanc](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/harryleblanc/32/2813_2.png) [@HarryLeBlanc](https://in-thread.sonic-pi.net/u/HarryLeBlanc)\
**Post date:** [June 5, 2024, 1:32am UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/9 "2024-06-05T01:32:00Z")

</div>

Yes, I was definitely inspired by Harmony Bloom. I love that tool, it’s so much fun.  
I was also inspired by a youtuber named Lucid Rhythms, who is all about these super slow polyrhythms.

[![](https://img.youtube.com/vi/pio85Lr3pHw/maxresdefault.jpg "A New Polyrhythm Experiment Called "Rain Serenade": An Experimental Sonic Odyssey") ](https://www.youtube.com/watch?v=pio85Lr3pHw)

He’s kind of a one-trick pony, but it’s a really cool trick.

---

<div class="post-metadata">

**Author:** ![cubicinfinity](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/cubicinfinity/32/2355_2.png) [@cubicinfinity](https://in-thread.sonic-pi.net/u/cubicinfinity)\
**Post date:** [June 5, 2024, 1:52am UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/10 "2024-06-05T01:52:42Z")

</div>

This is how it sounds on my machine.

---

<div class="post-metadata">

**Author:** ![HarryLeBlanc](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/harryleblanc/32/2813_2.png) [@HarryLeBlanc](https://in-thread.sonic-pi.net/u/HarryLeBlanc)\
**Post date:** [June 12, 2024, 1:16am UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/11 "2024-06-12T01:16:36Z")

</div>

Okay, I refactored to only use one reverb instead of so many. Try this out to see if it works better.  
I also used “stop” instead of “break,” which is a bit more elegant and orderly.

```ruby
# Welcome to Sonic Pi

use_debug false

set(:notes, [:g6, :e6, :d5, :c6, :a5, :g5, :e5, :d5, :c5, :b4, :a4, :g4, :f4, :e4, :d4, :c4])
##| set(:notes, [:c6, :a5, :g5, :e5, :d5, :c5, :a4, :g4, :e4, :d4, :c4, :a3, :g3, :e3, :d3, :c3])

set(:breakout, 0)

breakoutloop = 61
sniddler = 1.0 / (breakoutloop - 1)
puts "break out after " + breakoutloop.to_s+ " loops"
loopsize = 2
mysynth = :blade
loopcount = 0

define :playnote do |depth|
  #with_fx :reverb, mix: 0.7, room: 0.9 do
    use_synth mysynth
    play get(:notes)[depth]
  #end
  sleep loopsize + (sniddler * depth)
end

use_synth_defaults cutoff: 50

with_fx :reverb, mix: 0.7, room: 0.9 do 

  live_loop :none do
    playnote 0
    stop if get(:breakout) == 1
  end

  live_loop :one do
    stop if get(:breakout) == 1
    playnote 1
  end

  live_loop :two do
    stop if get(:breakout) == 1
    playnote 2
  end

  live_loop :three do
    stop if get(:breakout) == 1
    playnote 3
  end

  live_loop :four do
    stop if get(:breakout) == 1
    playnote 4
  end

  live_loop :five do
    stop if get(:breakout) == 1
    playnote 5
  end

  live_loop :six do
    stop if get(:breakout) == 1
    playnote 6
  end

  live_loop :seven do
    stop if get(:breakout) == 1
    playnote 7
  end

  live_loop :eight do
    stop if get(:breakout) == 1
    playnote 8
  end

  live_loop :nine do
    stop if get(:breakout) == 1
    playnote 9
  end

  live_loop :ten do
    stop if get(:breakout) == 1
    playnote 10
  end

  live_loop :eleven do
    stop if get(:breakout) == 1
    playnote 11
  end

  live_loop :twelve do
    stop if get(:breakout) == 1
    playnote 12
  end

  live_loop :thirteen do
    stop if get(:breakout) == 1
    playnote 13
  end

  live_loop :fourteen do
    stop if get(:breakout) == 1
    playnote 14
  end

  live_loop :fifteen do
    playnote 15
    loopcount += 1
    puts loopcount.to_s + " loops"
    set(:breakout, 1) if loopcount == breakoutloop
    stop if get(:breakout) == 1
    
    
  end

end #with reverb

```

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [June 12, 2024, 7:47pm UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/12 "2024-06-12T19:47:00Z")

</div>

Sounds Nice. Works well on my Pi5

---

<div class="post-metadata">

**Author:** ![HarryLeBlanc](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/harryleblanc/32/2813_2.png) [@HarryLeBlanc](https://in-thread.sonic-pi.net/u/HarryLeBlanc)\
**Post date:** [June 13, 2024, 1:45am UTC](https://in-thread.sonic-pi.net/t/hypnotic-slow-polyrhythms/8896/13 "2024-06-13T01:45:54Z")

</div>

I’m glad.  
I feel like I’m starting to think in sonic pi a little more.  
This is so much fun!
