Sonic Pi - Capturando áudio ao vivo

O Sonic Pi permite a incorporação de sinais de áudio capturados ao vivo por uma interface de áudio. Podemos tocar os sons capturados, ao vivo, com ou sem efeitos.

#abre canal de som ao vivo, sem efeitos
live_loop :soundin do
  synth :sound_in      
  sleep 2
end

live_loop :soundin do
  with_fx :echo do
    with_fx :ixi_techno, mix: 0.5 do
      with_fx :flanger, phase: rrand(0.5,3) do
        with_fx :octaver do
          synth :sound_in_stereo, input: 1
        end
      end
    end
  end
  sleep [1,2].choose
end

#duplicação de canal de áudio, com múltiplos efeitos

set_volume! 0.7
set_sched_ahead_time! 0.1

live_loop :soundin do
  
  with_fx :compressor, threshold: 0.7, slope_below: 1.1,
  slope_above: 0.7, mix: 0.7 do
    
    with_fx :pitch_shift, pitch: rrand(0,4),
window_size: [0.0001,0.001,0.01,0.1,1].choose, mix: 0.333 do
      
      with_fx :echo, phase: 0.25, decay: 2, mix: 0.5 do
        with_fx :slicer, phase: [0.5,0.1].choose, mix: 0.5 do
          with_fx :echo, phase: 2, decay: 6 do
            with_fx :octaver, super_amp: 0, mix: 0.3 do
              with_fx :flanger, phase: [0.25,0.5,1].choose, phase_slide: 1 do
                with_fx :tanh, krunch: 1000, mix: 0.3 do
                  synth :sound_in
                end
              end
            end
          end
        end
      end
      
      with_fx :ring_mod, freq: rrand(0,100),
      freq_slide: [1,2].choose do
        with_fx :echo, phase: 0.5, decay: 2, mix: 0.5 do
          with_fx :slicer, phase: [0.5,0.1].choose, mix: 0.5 do
            with_fx :echo, phase: 2, decay: 6 do
              with_fx :octaver, sub_amp: 0, mix: 0.3 do
                with_fx :flanger, phase: [0.25,0.5,1].choose, phase_slide: 1 do
                  with_fx :tanh, krunch: 1000, mix: 0.3 do
                    #with_fx :distortion, distort: 0.99 do
                    synth :sound_in
                  end
                end
              end
            end
          end
        end
      end
      
    end
    
  end #compressor

  sleep 2
end