Tenderness with a slow BPM(20)

Un peu de tendresse dans ce monde de bruts/A little tenderness in this rough world! (modifié)
All suggestions are wellcome! :hugs:

Soundcloud Tenderness Beryann Parker

use_bpm 20

with_fx :reverb, room: 0.9, mix: 0.4 do
  use_random_seed Time.now.to_i
  use_synth :beep
  
  with_fx :flanger do
    with_fx :echo, phase: 0.5 do
      live_loop :tl do
        n = scale(:e3, :major, num_octaves: 4).choose if rand < 0.5
        play n, amp: 0.08, pan: rrand(-1,1)
        sleep 0.25
        
      end
    end
    
  end
  
  use_random_seed Time.now.to_i
  use_synth :beep
  with_fx :flanger do
    
    with_fx :echo, phase: 0.5 do
      live_loop :tl2 do
        n = scale(:e1, :major, num_octaves: 3).choose if rand < 0.4
        play n, amp: 0.06
        sleep 0.5
        
      end
    end
    
  end
  
  
  
  live_loop :nappe do
    with_fx :echo do
      with_fx :flanger, depth: 0.5, mix: 0.9 do
        play chord(:e4, :M, invert: 1), amp: 0.1
        sleep 1
      end
    end
  end
  
end

Interesting piece. I liked the way you created rests using lines like:
n = scale(:e3, :major, num_octaves: 4).choose if rand < 0.5
If the rand is not < 0.5 then n is undefined and is nil.
Happily play nil is interpreted as a rest :rest by the play command and so it works.
From a programming point of view (which perhaps makes clear how rests are generated)the alternative would be:

        if rand < 0.5
          n=:rest
        else n = scale(:e3, :major, num_octaves: 4).choose
        end

which always defines n more explicitly. So your method which requires less code works because the undefined value mil is interpreted correctly as play a rest by Sonic Pi. (SP tests all note values and if the value is nil assigns it as a rest)
Your code is quite correct and efficient of space.

I liked the overall sound of your piece, which is always unique due to the setting of the random seed with a time function on every run. One suggestion is to amend this code slightly so that if you find a run that you like you can retain the seed value and use it hard coded to get the same run again.

  use_random_seed  seedVal
  puts current_random_seed #in case you want to reuse one you like
1 Like

Hi
I like the minimalist approach and, being a guitarist, E maj is also a pleasing key. I tried changing a few parameters (like attack and release times) but that didn’t improve it any, so . . .

PD-Pi

1 Like

Hello Robin! @robin.newman thanks for your appreciation, it’s cool to read that you liked it! :star_struck:
And your suggestions are very interesting and I knew that using “if rand < …” I’ll get “holes” in the melodies, rests in fact of course…But, it’s clear that I could have also done an array with notes and rests, but I think that it was the best way to code it.
As Brendan @brendanmac writes it, I wanted to create a minimalist atmosphere. A very slow one…At the beginnig , I saw a Mr Bomb’s video @mrbombmusic who insipered a small snippet and then I added a lot of blocks and stuff but finally it was really too “heavy” and I kept this simple version…
So, thanks again for your post and suggestions, I’ll use it in the future! :wink:

ps: Just one more thing about the beep synth…with a basic play function it seems not very “interesting” but when you explore it with different octaves and “with_fx” (reverb and flanger f.i, the beep sound besomes so “pure” and beautiful…in fact, I re-discoverered this beep sound lol

1 Like

Thank yoiu Brendan @brendanmac yes sure!: E maj is also a pleasant key for a pianist too :hugs:. Me too, as I was writing to @robin.newman I tried to change parameters and tried to add a lot of things but finaly it was too much and I kept this simple version.
Thanks for your post Brendan! :smiley: