# Adding FX to Synths

**URL:** <https://in-thread.sonic-pi.net/t/adding-fx-to-synths/1961>\
**Category:** Support, Help & Resources\
**Created:** [January 28, 2019, 2:25am UTC](https://in-thread.sonic-pi.net/t/adding-fx-to-synths/1961 "2019-01-28T02:25:42Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![notinflight](https://avatars.discourse-cdn.com/v4/letter/n/9de0a6/32.png) [@notinflight](https://in-thread.sonic-pi.net/u/notinflight)\
**Post date:** [January 28, 2019, 2:25am UTC](https://in-thread.sonic-pi.net/t/adding-fx-to-synths/1961/1 "2019-01-28T02:25:42Z")

</div>

Hi,  
newbie here. How do I add an FX chain to a synth in a loop? I’ve got the following, and I keep getting errors on line 3 or 4 as I keep trying to figure out why it won’t run. Is this a syntax error on my part or is it not possible to run a synth and add fx to it?

```ruby
loop do
  use_synth :growl
  with_fx: Wobble do
    with_fx: Compressor do
      play :Gs3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.25
      play :Fs3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.25
      play :A3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.25
      play :B3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.5
      
    end
  end
end

```

---

<div class="post-metadata">

**Author:** ![Eli](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/eli/32/116_2.png) [@Eli](https://in-thread.sonic-pi.net/u/Eli)\
**Post date:** [January 28, 2019, 2:35am UTC](https://in-thread.sonic-pi.net/t/adding-fx-to-synths/1961/2 "2019-01-28T02:35:06Z")

</div>

Hi mate,

When you type ‘with\_fx’, make the next character a space,  
and it should bring up a list of the FX’s… then choose the  
one you want. So your code should look like this, and it’s  
quite an interesting sound too.

Eli…

```ruby
loop do
  use_synth :growl
  with_fx :wobble do
    with_fx :compressor do
      play :Gs3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.25
      play :Fs3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.25
      play :A3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.25
      play :B3, attack: 0.25, sustain: 0.1, decay: 0.1, release: 0.1
      sleep 0.5
    end
  end
end

```

---

<div class="post-metadata">

**Author:** ![notinflight](https://avatars.discourse-cdn.com/v4/letter/n/9de0a6/32.png) [@notinflight](https://in-thread.sonic-pi.net/u/notinflight)\
**Post date:** [January 28, 2019, 9:41pm UTC](https://in-thread.sonic-pi.net/t/adding-fx-to-synths/1961/3 "2019-01-28T21:41:49Z")

</div>

Hey thanks!  
That’s such a silly mistake on my part. 🤦‍♂️  
Thanks so much!

---

<div class="post-metadata">

**Author:** ![Eli](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/eli/32/116_2.png) [@Eli](https://in-thread.sonic-pi.net/u/Eli)\
**Post date:** [January 28, 2019, 9:44pm UTC](https://in-thread.sonic-pi.net/t/adding-fx-to-synths/1961/4 "2019-01-28T21:44:23Z")

</div>

Its easily done… I’ve sat there for hours some nights, because of a  
forgotten , or other simple thing. Damned if I could see it even though  
SP was giving me the line number 🙂

Eli…
