How to hear the different kind of random_sources

Hello! The idea came to me when I was looking at Mr Bomb’s video @mrbombmusic about random_source. I wanted to hear really the differences between them. So I wrote this inspired by his tutorial and it works, so if you see something to improve, it will be with pleasure… :nerd_face:

use_bpm 95

use_random_source :pink 
##change with perlin, etc


a = []


with_fx :reverb, mix: 0.8 do
  200.times do
    n = rand
    a.push(n)
    play n * 150, amp: 0.5
    sleep 0.25
  end
end

puts a
3 Likes

Very interesting and useful!
Here’s a tweaked version that steps through them all:

use_bpm 95


randomsources = [:white, :pink, :perlin, :light_pink, :dark_pink]
use_random_source :pink
##change with perlin, etc


a = []

randomsources.each do |x|
  use_random_source x
  with_fx :reverb, mix: 0.8 do
    40.times do
      n = rand
      a.push(n)
      play n * 150, amp: 0.5
      sleep 0.25
    end
  end
  
  puts a
  sleep 2
end #each

I especially like perlin and dark_pink for melodies that don’t jump around too much.
Is there a clever way to constrain these random notes to a given scale?

1 Like

Good Harry @HarryLeBlanc and thanks for sharing your amelioration of my initial patch…It has a better look now! :grinning:
And it’s right, you can use one of them for a compostion but I find fascinating the idea in itself to be able to hear all these “discret” numbers, so small and inaudible at the beginning!