220828 2349 late night sketch

220828 2349 late night sketch

# 220828 2349 late night sketch
# Saved 220828 2349
# Txt backup (not yet)


use_bpm 88

live_loop :time, delay: 0.01 do
  sleep 1
end

define :pattern do |pattern|
  return pattern.ring.tick =="x"
end

with_fx :level, amp: 4 do
  
  with_fx :octaver do
    
    live_loop :saw1, sync: :time do
      #stop
      use_synth :saw
      notes = [knit(:f3,64, :ds3,64).tick(:k)]
      c = rrand(70,110)
      r = rrand(0.15,0.4)
      play notes.tick, release: r, cutoff: c if pattern "x-x--x--x-x-x-x-x"
      sleep 0.25
    end
  end # end with_fx :octaver
  
  live_loop :saw2, sync: :time do
    #stop
    use_synth :saw
    notes = [:gs4, :c5, knit(:f5,8, :g5,8, :gs5,16).tick(:k)]
    c = rrand(70,110)
    r = rrand(0.15,0.4)
    a = ring(0.5,0.5,2).tick
    a = 2
    #play notes.tick, release: r, cutoff: c, amp: a  if pattern "x-x--x--x-x-x-x-x"
    #play notes, release: r, cutoff: c, amp: a  if pattern "x-x--x--x-x-x-x-x"
    play notes, release: r, cutoff: c, amp: a  if pattern "-x----x---x---xx"
    sleep 0.25
  end
  
  with_fx :reverb, room: 0.8 do
    
    live_loop :mel1, sync: :time do
      #  stop
      use_synth :tri
      
      # 1 riff chords
      notes = [:gs4, :c5, knit(:f5,8, :g5,8, :gs5,16).tick(:k)]
      play notes, release: 0.2, pitch: 12 if pattern "x----"
      
      # 2 riff random notes (not quite there yet)
      #notes = scale(:f3, :minor_pentatonic, num_octaves: 3).mirror.tick(:s)
      #play notes, release: 0.2, pitch: 12 if pattern "x-x-xx-"
      
      sleep 0.25
    end
    
    live_loop :beep1 do
      #stop
      use_synth :beep
      play knit(:f5,3, nil, 2, :gs5,1, :g5,1, nil, 1).tick(:k)   # :f5, :gs5, :g5
      sleep 4
    end
    
  end # end :reverb
  
  
  
  
  live_loop :kick1, sync: :time do
    c = range(75,130, steps: 5).mirror.tick(:k1)
    sample :bd_haus, cutoff: c, amp: 4 #if pattern "x-x--x--x-x-x-x-x" and one_in(2)
    sleep 1 # 0.25
  end
  
  with_fx :slicer do
    live_loop :noise1 do  # snarelike
      #stop
      sleep 7
      use_synth ring(:gnoise, :bnoise, :noise).choose
      play :f5, rate: 8, release: rrand(0.4,0.8)
      sleep 1
    end
  end
  
end #end :level

Beautifull! Many Thanks! I love it.

1 Like

I have to learn a bit coding style …
Would you mind to talk a bit about your code?

Why is the above notes-pattern so long(128 notes)?
Why are there so many ticks?
The pattern is in every loop the same, would it make
sense to create it outside of the loop?

Thanks

I see what you mean with the many ticks.
I didnt think about it when I wrote the code.

The code began with “notes = [:f3,:as3]” + “notes.tick”
The “[ ]” to play notes at the same time as a chord.
and grew to bass “notes = [knit(:f3,64, :ds3,64).tick(:k)]”.
I guess I forgot the “notes.tick” below.

I’m used to creating individual tick’s like “.tick(:k)”
instead of using one “tick” and then “look” multiple times.
I tried to recreate the rythm without the double tick structur, but without luck.
I guess I was lucky to find a bass rythm that I liked and kept it.
I cant explain how it works :slight_smile:

The pattern of 17 steps “x-x–x–x-x-x-x-x” was also kind of a random pick.

The 64+64=128 pattern.
I think of it as 8 bars of :f3 and 8 bars of :ds3

I tend to use knit() to create small structures.
I would love to learn other ways to do this.

What a lovely little piece of code… .great for ‘twiddling’ with !!

I spent a nice couple of hours and ended up with this, which
I hope you dont mind me expanding further on. :slight_smile:

Many thanks,.

Eli…

use_bpm 120

define :pattern do |pattern|
  return pattern.ring.tick =="x"
end

live_loop :time, delay: 0.01 do
  sleep 1
end

with_fx :level, amp: 4 do
  
  with_fx :octaver do
    
    live_loop :saw1, sync: :time do
      #stop
      use_synth :blade
      notes = [knit(:f3,64, :ds3,64).tick(:k)]
      c = rrand(70,110)
      r = rrand(0.15,0.4)
      play notes.tick, release: r, cutoff: c if pattern "x-x--x--x-x-x-x-x"
      sleep 0.25
    end
  end # end with_fx :octaver
  
  live_loop :saw2, sync: :time do
    #stop
    use_synth :blade
    notes = [:gs4, :c5, knit(:f5,8, :g5,8, :gs5,16).tick(:k)]
    c = rrand(70,110)
    r = rrand(0.15,0.4)
    a = ring(0.5,0.5,2).tick
    a = 2
    play notes, release: r, cutoff: c, amp: a  if pattern "-x----x---x---xx"
    sleep 0.25
  end
  
  with_fx :reverb, room: 0.8 do
    
    live_loop :mel1, sync: :time do
      #stop
      use_synth :fm
      
      with_fx :ixi_techno, phase: 2 do
        
        # 1 riff chords
        notes = [:gs4, :c5, knit(:f5,8, :g5,8, :gs5,16).tick(:k)]
        play notes, release: 0.2, pitch: 12 if pattern "x----"
        sleep [0,0.25,0.5,1].choose
        
        
        #2 riff random notes (not quite there yet)
        notes = scale(:f3, :minor_pentatonic, num_octaves: 3).mirror.tick(:s)
        play notes, release: 0.2, pitch: 12, amp: 0.125 if pattern "x-x-xx-"
        
        sleep 0.25
      end
    end
    
    live_loop :beep1 do
      #stop
      use_synth :pluck
      play knit(:f5,3, nil, 2, :gs5,1, :g5,1, nil, 1).tick(:k)   # :f5, :gs5, :g5
      sleep 4
    end
    
  end # end :reverb
  
  
  with_fx :ixi_techno, phase: 16 do
    
    live_loop :kick1, sync: :time do
      c = range(75,130, steps: 5).mirror.tick(:k1)
      sample :bd_haus, cutoff: c, amp: 4
      sleep 1 # 0.25
    end
  end
  
  with_fx :slicer do
    live_loop :noise1 do  # snarelike
      #stop
      sleep 7
      use_synth ring(:piano).choose
      play :f5, rate: 8, release: rrand(0.4,0.8)
      sleep 1
    end
  end
  
end #end :level

1 Like

… personally i did not like this many bd_haus hits.
I reduced and ‘naturalized’ them a little bit with

    live_loop :kick1, sync: :time do
      #stop
      c = range(75,130, steps: 5).mirror.tick(:k1)
      sample :bd_haus, cutoff: c, amp: 4 if pattern "x-----xx---x-x---x---xxx--x-----"
      sample :bd_haus if one_in 7
      sleep  0.5
    end

cheers …

1 Like

So cool to hear another version.
We share to grow and learn from each others ideas :smiley:

1 Like

Did a lot more messin around, final results here.

Eli…

1 Like