Krush and bitcrusher on saw with big reverb

# 240531 2209 krush and bitcrusher on saw with big reverb
# Saved 240531 2209

set_volume! 4
with_fx :reverb, room: 0.9 do
  c = 90
  with_fx :bitcrusher do |bitc|
    with_fx :krush do |krush|
      live_loop :a1 do
        puts c = [70,70,70,70,130].look
        control bitc, cutoff: c
        control krush, cutoff: c, mix: [0,0,0,1,0,1].look
        sample :bd_haus,cutoff: 70, pan: 0.25, amp: 3 if spread([1,1,5].choose,12).look
        sample :bd_haus,cutoff: 110,pan: -0.25 if spread([2,5].choose,7).look
        use_synth :saw
        use_synth_defaults cutoff: [70,70,70,90,110].choose, release: [0.1,0.2,0.3, 0.5].choose
        b = 16
        play :c5+knit(0,b*3,-2,b).look, cutoff: 60, amp: 0.7
        play :c2+knit(0,b*3,-2,b).look
        use_synth_defaults cutoff: [70,70,70,90,110].choose-20, release: [0.1,0.2,0.3].choose, amp: 0.8
        a = 16
        play :c4+knit(0,a,2,a,3,a,7,a+a).look
        sleep 0.25
1 Like

hello @Relaxnow excellent track! :grinning: I have a question: what does precisely 20 here: use_synth_defaults cutoff: [70,70,70,90,110].choose-20 is it 20 times in the list? :thinking:
Thanks for sharing!

1 Like

Hi @beryann
Thank you.


Is the same as


-20 is just a fast way to adjust the cutoff value.
Tryout -30, -20, -10,+0,+10,+20

1 Like

[edit: oops, there’s the answer :wink: ]

it’s a global offset for the values inside the array

8.times do
  x = [1,2,3,4,5].choose-100
  sleep 0.5
  puts x


1 Like

thanks to you two :slightly_smiling_face: @Relaxnow @brendanmac okay, understood…i see it as a good trick in a live coding situation to change the values of the array quickly, is it correct? :thinking:

Yes, correct. It’s a live coding shorthand, allowing the performer to shift a control range by only typing one number, instead of re-typing the boundaries of a range. Live coding is a such a great challenge for musicians and coders. If I find myself re-typing many numbers in a control range, I think “is there a better/quicker way to do this”. Because less code = better efficiency, and arguably better transparency.

1 Like

I’m learning so much from y’all. And enjoying the music!

1 Like

I agree totally with you Brendan @brendanmac That’s why I am also “studying” the Ziffers mini-notation which can be very useful for live coding.
Apart from this, there must still be a lot of shortcuts/shorthands to be discovered in Sonic Pi, they would almost have to be exhaustively listed to share and study them. It’s a simple project idea that I am sharing with you… :smile:

1 Like

I think we all learn and develop our own ‘style’ of coding shorthand, there’s no wrong or right way - the code either works or it doesn’t :smiley: Compare how Sam, Robin, DJDave and Relaxnow write their Sonic Pi code, quite different. I quickly learned to stop my ‘skills envy’, and focus on writing what works for me.

And by shortcuts, do you mean keystrokes :


1 Like

You are right :

the code either works or it doesn’t

And yes I mean keystrokes! excuse me! I try to integrate them little by little in my code.
And thanks to the community here! I regularly discover ideas that are used in my compositions in Sonic Pi :wink:
Best Regards