New music doon of rupali

in_thread do
  use_synth :fm
  sleep 2
  loop do
    28.times do
       sample :drum_bass_hard, amp: 0.8
       sleep 0.25
       play :e2, release: 0.2
       sample :elec_cymbal, rate: 12, amp: 0.6
       sleep 0.25
     end
     sleep 4
   end
 end


 use_synth :tb303
 with_fx :reverb do |rev|
   loop do
     control rev, mix: rrand(0, 0.3)
     with_fx :slicer, phase: 0.125 do
       sample :ambi_lunar_land, sustain: 0, release: 8, amp: 2
     end

     control rev, mix: rrand(0, 0.6)
     r = rrand(0.05, 0.3)
     64.times do
       play chord(:e3, :minor).choose, release: r, cutoff: rrand(50, 90), amp: 0.5
       sleep 0.125
     end

     control rev, mix: rrand(0, 0.6)
     r = rrand(0.1, 0.2)
     with_synth :prophet do
       32.times do
         sleep 0.125
         play chord(:a3, :m7).choose, release: r, cutoff: rrand(40, 130), amp: 0.7
       end
     end

     control rev, mix: rrand(0, 0.6)
     r = rrand(0.05, 0.3)
     32.times do
       play chord(:e3, :minor).choose, release: r, cutoff: rrand(110, 130), amp: 0.4
       sleep 0.125
     end

     control rev, mix: rrand(0, 0.6)
     with_fx :echo, phase: 0.25, decay: 8 do
       16.times do
         play chord([:e2, :e3, :e4].choose, :m7).choose, release: 0.05, cutoff: rrand(50, 129), amp: 0.5
         sleep 0.125
       end
     end
   end
 end
use_synth :fm
  sleep 2
  loop do
    28.times do
       sample :drum_bass_hard, amp: 0.8
       sleep 0.25
       play :e2, release: 0.2
       sample :elec_cymbal, rate: 12, amp: 0.6
       sleep 0.25
     end
     sleep 4
   end
 end

 use_synth :tb303
 with_fx :reverb do |rev|
   loop do
     control rev, mix: rrand(0, 0.3)
     with_fx :slicer, phase: 0.125 do
       sample :ambi_lunar_land, sustain: 0, release: 8, amp: 2
     end

     control rev, mix: rrand(0, 0.6)
     r = rrand(0.05, 0.3)
     64.times do
       play chord(:e3, :minor).choose, release: r, cutoff: rrand(50, 90), amp: 0.5
       sleep 0.125
     end

     control rev, mix: rrand(0, 0.6)
     r = rrand(0.1, 0.2)
     with_synth :prophet do
       32.times do
         sleep 0.125
         play chord(:a3, :m7).choose, release: r, cutoff: rrand(40, 130), amp: 0.7
       end
     end

     control rev, mix: rrand(0, 0.6)
     r = rrand(0.05, 0.3)
     32.times do
       play chord(:e3, :minor).choose, release: r, cutoff: rrand(110, 130), amp: 0.4
       sleep 0.125
     end

     control rev, mix: rrand(0, 0.6)
     with_fx :echo, phase: 0.25, decay: 8 do
       16.times do
         play chord([:e2, :e3, :e4].choose, :m7).choose, release: 0.05, cutoff: rrand(50, 129), amp: 0.5
         sleep 0.125
       end
     end
   end
 end

Hmm Interesting. As listed above there appears to be a superfluous end. Also I think some of the code doesn’t execute because of your use of loop do…end which is blocking code. Once started it doesn’t exit and allow subsequent code to execute. I took the liberty of converting these to live_loops and added some puts statements to show that all of the four major loops do execute. Not sure if its what you were aiming at but the result sounds quite cool. I added use_debug false at the start so you can see the loops progressing.
You have some nice ideas here.

#revised version with live_loops
use_debug false
in_thread do
  use_synth :fm
  sleep 2
  live_loop :l1 do
    puts"l1"
    28.times do
      sample :drum_bass_hard, amp: 0.8
      sleep 0.25
      play :e2, release: 0.2
      sample :elec_cymbal, rate: 12, amp: 0.6
      sleep 0.25
    end
    sleep 4
  end
end


use_synth :tb303
with_fx :reverb do |rev|
  live_loop :l2 do
    puts "l2"
    control rev, mix: rrand(0, 0.3)
    with_fx :slicer, phase: 0.125 do
      sample :ambi_lunar_land, sustain: 0, release: 8, amp: 2
    end
    
    control rev, mix: rrand(0, 0.6)
    r = rrand(0.05, 0.3)
    64.times do
      play chord(:e3, :minor).choose, release: r, cutoff: rrand(50, 90), amp: 0.5
      sleep 0.125
    end
    
    control rev, mix: rrand(0, 0.6)
    r = rrand(0.1, 0.2)
    with_synth :prophet do
      32.times do
        sleep 0.125
        play chord(:a3, :m7).choose, release: r, cutoff: rrand(40, 130), amp: 0.7
      end
    end
    
    control rev, mix: rrand(0, 0.6)
    r = rrand(0.05, 0.3)
    32.times do
      play chord(:e3, :minor).choose, release: r, cutoff: rrand(110, 130), amp: 0.4
      sleep 0.125
    end
    
    control rev, mix: rrand(0, 0.6)
    with_fx :echo, phase: 0.25, decay: 8 do
      16.times do
        play chord([:e2, :e3, :e4].choose, :m7).choose, release: 0.05, cutoff: rrand(50, 129), amp: 0.5
        sleep 0.125
      end
    end
  end
end
use_synth :fm
sleep 2
live_loop :l3 do
  puts "l3"
  28.times do
    sample :drum_bass_hard, amp: 0.8
    sleep 0.25
    play :e2, release: 0.2
    sample :elec_cymbal, rate: 12, amp: 0.6
    sleep 0.25
  end
  sleep 4
end
#end #remove superfluous end

use_synth :tb303
with_fx :reverb do |rev|
  live_loop :l4 do
    puts "l4"
    control rev, mix: rrand(0, 0.3)
    with_fx :slicer, phase: 0.125 do
      sample :ambi_lunar_land, sustain: 0, release: 8, amp: 2
    end
    
    control rev, mix: rrand(0, 0.6)
    r = rrand(0.05, 0.3)
    64.times do
      play chord(:e3, :minor).choose, release: r, cutoff: rrand(50, 90), amp: 0.5
      sleep 0.125
    end
    
    control rev, mix: rrand(0, 0.6)
    r = rrand(0.1, 0.2)
    with_synth :prophet do
      32.times do
        sleep 0.125
        play chord(:a3, :m7).choose, release: r, cutoff: rrand(40, 130), amp: 0.7
      end
    end
    
    control rev, mix: rrand(0, 0.6)
    r = rrand(0.05, 0.3)
    32.times do
      play chord(:e3, :minor).choose, release: r, cutoff: rrand(110, 130), amp: 0.4
      sleep 0.125
    end
    
    control rev, mix: rrand(0, 0.6)
    with_fx :echo, phase: 0.25, decay: 8 do
      16.times do
        play chord([:e2, :e3, :e4].choose, :m7).choose, release: 0.05, cutoff: rrand(50, 129), amp: 0.5
        sleep 0.125
      end
    end
  end
end
1 Like