What are your favorite fx combo in Sonic Pi?

Hi all

What are your favorite fx combo in Sonic Pi?

Kind regards
Relaxnow

Hi
disto and flanger

live_loop :melo  do
  notes = (scale :gb3 ,:aeolian ,num_octaves:1 ).shuffle
  
  with_fx :distortion ,distort:0.9 ,mix:1 do
    with_fx :flanger ,feedback:0,mix:1 do
      with_fx :krush  ,cutoff:130 ,gain:rrand(1,3000),mix:1  do
        n = synth:piano,attack:2,note:notes.tick
        sleep 0.425
      end
    end
  end
end

and you?

1 Like

Hi Baya
I’m just starting to explore fx
Right now it’s something like this

chooseFxRack = 3 or 4 in the code below

I also think flanger with feedback are fun to explore

Kind regards
Relaxnow

By the way, as a newbie I’m wondering
A) Why do I need to stop/start the code to get the fx chain below to take effect? Answer: It’s a thread
B) What are a better way of doing this, so I can change the current fx in the thread? Just found " 7.2 - Controlling FX" section Sonic Pi - Tutorial I’m gonna read up on that. As I understand it now, I need to control the fx effects from inside the live_loop.

# 220902 0023 bitcrusher saw bass divide by 17 (not done)
# 220902 0023 saved


use_bpm 200

live_loop :time, delay: 0.01 do
  sleep 1
end


# --- fx mixer --- start
chooseFxRack = 1    # stop/start to take fx effect                # change here
#
#   Idea: Turn on/off fx chain - not done yet
#
#   0)
#   1) ixi_techno place 1 + flanger  heavy
#   2) + distort by moving ixi_techno to place 2
#   3) bitchrusher 0.8
#   4) bitchrusher 1.2 + ixi_techno  (a bit much ^^)

case chooseFxRack
when 0
  my_ixi_1 = 0
  my_ixi_2 = 0
  
  my_bit8 = 0
  my_bit12 = 0
  
when 1
  my_ixi_1 = 1
  my_ixi_2 = 0
  
  my_bit8 = 0
  my_bit12 = 0
  
when 2
  my_ixi_1 = 0
  my_ixi_2 = 1
  
  my_bit8 = 0
  my_bit12 = 0
  
when 3
  my_ixi_1 = 0
  my_ixi_2 = 0
  
  my_bit8 = 1
  my_bit12 = 0
  
when 4
  my_ixi_1 = 1
  my_ixi_2 = 0
  
  my_bit8 = 0
  my_bit12 = 1
end
# --- fx mixer --- end



with_fx :level, amp: 0.7 do
  
  with_fx :bitcrusher, bits: 1.2, mix: my_bit12 do
    with_fx :ixi_techno, mix: 0.8, phase_offset: 0.2, mix: my_ixi_1 do               # 1) Place 1 or 2
      with_fx :flanger, depth: 0.6, wave: 2 do
        with_fx :distortion, distort: 0.99 do
          with_fx :bitcrusher, bits: 0.8, mix: my_bit8 do
            with_fx :ixi_techno, mix: 0.8, phase_offset: 0.2, mix: my_ixi_2 do        # 2) Place 1 or 2
              
              
              notesA =:c2    # :c2    :f2    :g2   :1
              diff   = 1   # 1/-2     1/3   -2     3
              
              ### notesB =:cs2  #+5-12+4  # Not used anymore
              
              
              live_loop :bass1, sync: :time do
                #stop
                use_synth :saw
                3.times do
                  10.times do
                    play notesA, release: rrand(0.15,0.75), cutoff: rrand(70,110), pan: 0.5 if spread(3,5).tick
                    sleep 0.5
                  end
                  
                  7.times do
                    play notesA+diff, release: rrand(0.15,0.75), cutoff: rrand(70,110), pan: 0.5 if spread(5,7).tick
                    sleep 0.5
                  end
                end
                #sleep 1
              end
              
              live_loop :bass2, sync: :time do
                #stop
                use_synth :saw
                3.times do
                  10.times do
                    play notesA+12+12, release: rrand(0.15,0.75), cutoff: rrand(70,110), pan: -0.5 if spread(4,5).tick
                    sleep 0.5
                  end
                  7.times do
                    play notesA+diff+12+12, release: rrand(0.15,0.75), cutoff: rrand(70,110), pan: -0.5 if spread(4,7).tick
                    sleep 0.5
                  end
                end
                #sleep 1
              end
            end # end :bitcrusher 0.8
          end # end :bitcrusher 1.2
        end # end :flanger
      end # end :ixi1
    end # end :ixi2
  end # end :distortion
end # end :level


live_loop :kick1, sync: :time do
  #stop
  sample 25, cutoff: rrand(70,90), amp: 4
  sleep 2
  sample 25, cutoff: rrand(70,90), amp: 4
  # sample 133, cutoff: rrand(70,90), amp: 4, rate: 2
  sleep 2
end


live_loop :kick2, sync: :time do
  stop
  3.times do
    sample 25, cutoff: rrand(100,110), amp: 3
    sleep 0.5
  end
  sleep 5
  sleep 0.5*3
end

live_loop :kick2, sync: :time do
  5.times do
    sample 25, cutoff: rrand(100,110), amp: 3 if spread(3,5).tick
    sleep 0.5
  end
  sleep 0.5*10
  #sleep 0.5*3
end

How to control fx effect in Sonic Pi from inside a live_loop with “control”

# 220904 2249 Learning how to control fx effect from inside a live_loop with control
# YT https://youtu.be/iInSVo0JlTY

# https://in-thread.sonic-pi.net/t/what-are-your-favorite-fx-combo-in-sonic-pi/7043/3

# "7.2 - Controlling FX"
# https://sonic-pi.net/tutorial.html#section-7-2

use_bpm 120

live_loop :time, delay: 0.01 do
  sleep 1
end


with_fx :level, amp: 4 do
  
  with_fx :distortion do |dist|
    with_fx :flanger do |flan|
      with_fx :bitcrusher do |bitc|
        with_fx :reverb do |reve|
          
          
          live_loop :synth1, sync: :time do
            #stop
            use_synth :saw
            tick
            
            #Song structure
            PartA = 32
            PartB = 16
            
            play knit(:c2,PartA, :cs2,PartB, :c2,PartB).look,
              release: 0.25 if spread(7,16).look
            sleep 0.25
            
            
            ### fx mixer ###
            
            ## distortion
            puts d = range(0,1, step: 0.025).mirror.look
            control dist, distort: d  
            
            ## flanger feedback
            puts d = rrand(0.1,0.7)   
            control flan, feedback: d
            
            ## bitcrusher
            puts    d = knit(0.1,16, 1,2).look
            control bitc, bits: d
            
            ## controlling reverb
            puts d = knit(0,32, 0.8,4).look
            control reve, room: d
            # starting with 0 room and mixing room in later,
            # so it doesnt get to messy
            control reve, mix: knit(0,32, 0.3, 16).look
            
          end
          
        end #end :reverb
      end #end :flanger
    end #end :distotion
  end #end :bitcrusher
  
  live_loop :kick do
    9.times do
      sample :bd_haus, cutoff: 85
      sleep 1
    end
    sleep 1*7
  end
  
end #end :level




1 Like

Exploring controlling fx inside live_loop in drum seq’s

Hmm. I still need to stop/start code to get the fx to take effect?

Run code with
my_fx = 0 (no reverb since mix = 0)

change my_fx=1
Run code

Trouble: No effect on sound.

Stop/run code. Now it’s with effect. How do I get code to change effect with no stopping?

# 220906 0525 drum seq created with split on amp (nice fx)
# Jumping off point https://in-thread.sonic-pi.net/t/can-someone-build-an-efficient-drum-machine/775/15?u=relaxnow
# I have add'ed fx effects


use_bpm 120

def beats(pat)
  pat.delete(' ').split('').map(&:to_i).ring
end

patt = {
  :bd_klub         => "9--5 --5- ---- -3-- 9--- ---- 9--- ----",
  :drum_snare_soft => "---- ---3 9--- ---- ---- ---- --33 9---",
  :perc_snap2      => "9--- --11 11-- ---- 5--- 5-11 11-- 9---",
  :elec_flip       => "--5- ---- --5- --5- --5- ---- --5- --5-",
  # :bd_boom => "9-3--"
}



with_fx :level, amp: 4 do
  
  with_fx :distortion do |distortion|
    with_fx :bitcrusher do |bitcrusher|
      with_fx :reverb do |reverb|
        
        
        
        live_loop :main do
          tick#(step: [0,1,1,1,1,1,2].choose)  # change step of tick randomly for nice effect
          patt.each{ |key, val|  sample key, amp: beats(val).look / 10.0  }
          sleep 0.25
          
          
          my_fx = 0                             # Manual pick fx pattern           # change here
          #                                       # 0 = No effect since mix = 0
          #                                       # 1 = rrand()
          #                                       # 2 = range()
          
          #my_fx = rrand_i(0,2)                 # Auto pick fx pattern             # change here
          
          case my_fx
          when 0
            mix = 0   # No effect since mix = 0
            r1 = 0.5
            r2 = 0.5
            r3 = 1
          when 1
            mix = 0.5
            r1 = rrand(0.1,0.9)
            r2 = 0.9#rrand(0.1,0.9)
            r3 = 0.5
          when 2
            mix = 0.5
            puts r1 = range(0.1,0.9, step: 0.01).tick(:r1)
            puts r2 = range(0.9,0.1, step: -0.05).tick(:r1)
            r3 = 0.5
          end
          
          
          control distortion, mix: mix
          control distortion, distort: r1#, mix: mix
          
          control bitcrusher, mix: mix
          control bitcrusher, bits: r2#, mix: mix
          
          control reverb, mix: mix
          control reverb, room: r3#, mix: mix
          
          
        end
        
      end
    end
  end
  
end