Hypnotic slow polyrhythms

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

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






1 Like

Here is what I hear …

Is this Your intention ?

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.

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 ?

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.

I did upload a mix to my bandcamp page:

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!

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! :pray:) 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)

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.

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

1 Like

This is how it sounds on my machine.

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.

# 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


Sounds Nice. Works well on my Pi5

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

1 Like