# Exploring tb303

**URL:** <https://in-thread.sonic-pi.net/t/exploring-tb303/9451>\
**Category:** Show your work\
**Created:** [January 17, 2025, 10:10pm UTC](https://in-thread.sonic-pi.net/t/exploring-tb303/9451 "2025-01-17T22:10:12Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Relaxnow](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/relaxnow/32/2172_2.png) [@Relaxnow](https://in-thread.sonic-pi.net/u/Relaxnow)\
**Post date:** [January 17, 2025, 10:10pm UTC](https://in-thread.sonic-pi.net/t/exploring-tb303/9451/1 "2025-01-17T22:10:12Z")

</div>

[![](https://img.youtube.com/vi/_xx6EzpYa-E/maxresdefault.jpg "Exploring tb303 with Sonic Pi #sonicpi") ](https://www.youtube.com/watch?v=_xx6EzpYa-E)

```ruby
# 250117 2309 Exploring tb303
# https://www.youtube.com/watch?v=_xx6EzpYa-E

set_volume! 2

use_bpm 77

with_fx :reverb, room: 0.75 do
  with_fx :krush do |krush|
    
    live_loop :a1 do
      tick
      
      
      #control krush, mix: [0,0.2,0.4,0.6].choose
      #control krush, mix: 0
      #control krush, mix: 0.6
      control krush, mix: line(0,0.8,steps: 64).look
      
      sample :bd_fat, amp: 4 if spread(1,9).look
      sample :bd_fat, rpitch: 24, amp: 6 if spread(1,5).look
      
      #sample :bd_fat, amp: 4 if spread(1,4).look
      sample :sn_generic, finish: 0.01, amp: 2 if spread([1,1,1, 1,1,1, 5,1,1, 1,1,1].look,9).look
      
      k = 64
      
      use_synth :tb303
      
      n = :f2+knit(0,k,-2,k).look
      #n = :f2-7
      
      use_synth_defaults release: [0.1,0.2,0.4,0.8].choose, cutoff: [70,90,110].look+knit(-20,k,-10,k).look
      play n+[0,0,0,0,12].look, pan: rdist(0.25) if spread(9,12).look
      
      use_synth_defaults release: [0.1,0.2,0.3,0.4,0.8].choose, cutoff: [70,90,110].look+knit(-20,k,-10,k).look
      play n+[0,0,0,0,12].look+24, amp: 0.5, pan: rdist(0.5) if spread(5,12).rotate(5).look
      
      
      use_synth [:noise,:gnoise].choose
      density [1,2,1,1,4,1,1,1,1,1,1,1,1,].choose do
        use_synth_defaults release: 0.001, cutoff: rrand_i(90,130)
        play :c2, pan: rdist(1) if spread(rrand_i(14,15),16).look
        sleep 0.25
      end
      
    end
  end
  
  live_loop :a2 do
    tick
    use_synth :beep
    play :a5+knit(0,32,1,32,1,32,0,32).look, amp: 0.6 if spread(1,32).rotate(5).look
    sleep 0.25
  end
  
end

```
