# Two wishes to Sonic Pi in Atom

**URL:** <https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791>\
**Category:** Development \[obsolete\]\
**Created:** [May 19, 2022, 10:27pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791 "2022-05-19T22:27:52Z")\
**Posts on this page:** 12\
**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:** [May 19, 2022, 10:27pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/1 "2022-05-19T22:27:52Z")

</div>

Hi all

1. I wish to be able to choose to disable the “run code” popup in Atom, so the visuals look more clean. I’m using [Sunsetting Atom | The GitHub Blog](https://atom.io/packages/sb-atom-sonic-pi)
2. I wish that the ll+TAB would work in Atom since I use it so much.
3. Are there a similar shourtcut for “with\_fx” in Sonic Pi or Atom?

Kind regards  
Relaxnow

Late night practice session with Sonic Pi and images in Hydra

[![](https://img.youtube.com/vi/KxnoLALQTy8/maxresdefault.jpg "Late night practice session with Sonic Pi and images in Hydra") ](https://www.youtube.com/watch?v=KxnoLALQTy8)

```ruby
# 220519 2330 Late night practice session with Sonic Pi and images in Hydra
# My performance https://youtu.be/KxnoLALQTy8

# --- MIXER --- 0 STOP 1 PLAY ------#
# A B C D
piano = 1 # 1 1 1 0
bass = 1 # 1 1 1 2 # bassriff 1-2 (2 needs more work)
synth_top = 1 # 0 0 1 0 _-^-_
drums = 1 # 0 1 1 1
# ----------------------------------#

live_loop :time, delay: 0.01 do
  sleep 1
end

with_fx :reverb, room: 0.8 do

  live_loop :piano1, sync: :time do
    stop if piano <1

    case piano
    when 1
      synth :piano, note: :c2, vel: rrand(0.01,0.3), release: rrand(0.2,1), pan: -0.7 if spread(1,7).tick()
      synth :piano, note: :c4, vel: rrand(0.01,0.3), release: rrand(0.1,1), pan: 0.7 if spread(2,7).tick()
      synth :piano, note: :ds4, vel: rrand(0.01,0.3), release: rrand(0.1,1), pan: 0 if spread(3,7).tick()
      synth :piano, note: :g4, vel: rrand(0.01,0.3), release: rrand(0.1,1), pan: 0 if spread(4,7).tick() and one_in(4)
      sleep 0.25

    when 2
      #break(5,7)

      #synth :piano, play_chord [:c2, :c4], vel: rrand(0.01,0.3), release: rrand(0.2,1), pan: -0.7 if spread(5,7).tick()

      #synth :piano, note: :c4, vel: rrand(0.01,0.3), release: rrand(0.1,1), pan: 0.7 if spread(5,7).tick()
      synth :piano, note: :ds4, vel: rrand(0.01,0.3), release: rrand(0.1,1), pan: 0 if spread(5,7).tick()
      synth :piano, note: :g4, vel: rrand(0.01,0.3), release: rrand(0.1,1), pan: 0 if spread(2,7).tick() #and one_in(4)
      sleep 0.25

    end

  end

  live_loop :bass1, sync: :time do
    stop if bass <1
    case bass
    when 1
      notes= (knit :g2, 12, :gs2, 12, :f2, 6, :f1, 6, :g2, 12)
      synth :saw, cutoff: range(70,120,step: 1).reflect.tick(:r), note: notes.tick, release: 0.25 if spread(3,7).tick(:b)
    when 2
      notes= (knit :ds1, 12, :g1, 6, :g1, 6, :gs1, 6) # needs more work
      notes= (knit :g1, 12, nil, 12+6) # needs more work
      synth :saw, cutoff: range(70,120,step: 1).reflect.tick(:r), note: notes.tick(), release: 0.25, amp: 2 if spread(5,7).tick(:b)
    end
    sleep 0.25
  end

  live_loop :synthmelody1, sync: :time do
    stop if synth_top <1
    a = range(0.0,0.7,step: 0.02).reflect.tick(:a1)
    notes= (knit :g5, 64, :c5, 64)
    # :dsaw :tri
    synth :dsaw, cutoff: range(70,120,step: 1).reflect.tick(:r), note: notes.tick(:n1), release: 0.1, amp: a
    sleep 0.25
  end

  live_loop :drums, sync: :time do
    stop if drums <1
    a = range(0.1,0.5,step: 0.02).reflect.tick(:a2)

    sample :bd_haus, cutoff: 80, amp: 2
    # OSC on kick
    sleep 0.5
    sample :bd_haus, cutoff: 80, amp: 2 if one_in(2)
    sleep 0.5
    synth :gnoise, note: :c3, amp: a, res: rrand(0.1,0.9), release: 0.25
    # OSC on snare
    sleep 1
  end

end # end reverb

```

[Hydra visuals - code with images](https://hydra.ojack.xyz/?code=JTJGJTJGaHR0cHMlM0ElMkYlMkZoeWRyYS5vamFjay54eXolMkZmdW5jdGlvbnMlMkYlMjNmdW5jdGlvbnMlMkZpbml0SW1hZ2UlMkYwJTBBJTBBc3BlZWQlMjAlM0QlMjAwLjQlMEElMkYlMkYlMjBkZWZhdWx0JTBBczAuaW5pdEltYWdlKCUyMmh0dHBzJTNBJTJGJTJGdXBsb2FkLndpa2ltZWRpYS5vcmclMkZ3aWtpcGVkaWElMkZjb21tb25zJTJGMiUyRjI1JTJGSHlkcmEtRm90by5qcGclMjIpJTBBczEuaW5pdEltYWdlKCUyMmh0dHBzJTNBJTJGJTJGdXBsb2FkLndpa2ltZWRpYS5vcmclMkZ3aWtpcGVkaWElMkZjb21tb25zJTJGdGh1bWIlMkY4JTJGODglMkZDdGVub2NlcGhhbGlkZXMtY2FuaXMuanBnJTJGODMycHgtQ3Rlbm9jZXBoYWxpZGVzLWNhbmlzLmpwZyUyMiklMEElMkYlMkZodHRwcyUzQSUyRiUyRmkueXRpbWcuY29tJTJGdmklMkZ3cVJuM2F0MEg2MCUyRm1heHJlc2RlZmF1bHQuanBnJTBBc2hhcGUoMSUyQzIlMkMwLjcpJTJGJTJGLnJlcGVhdCgyJTJDMiklMEEucm90YXRlKDAlMkMwLjUpJTBBJTJGJTJGLmthbGVpZCglNUI5OSUyQzQlNUQuZmFzdCgwLjIpKSUwQSUyRiUyRi5rYWxlaWQoJTVCOTklNUQuZmFzdCgwLjUpKSUwQSUyRiUyRi5rYWxlaWQoNSklMEElMkYlMkYuY29sb3JhbWEoMSUyQzElMkMxKSUwQSUyMCUyMC5jb2xvcigxJTJDMCUyQzApJTIwJTJGJTJGcmVkJTBBJTJGJTJGLmNvbG9yKDAlMkMwJTJDMSklMjAlMkYlMkZibHVlJTBBJTJGJTJGLm1vZHVsYXRlKG9zYygxMDAlMkMwJTJDMiklMkMwLjUpJTBBJTJGJTJGLmJsZW5kKG5vaXNlKDIwKSUyQzAuMDUpJTBBLm11bHQodm9yb25vaSgyMCUyQzAuNSUyQzIwKSUyQzAuNCklMEElMkYlMkYubW9kdWxhdGUobm9pc2UoMSUyQzAuOCUyQzIwKSUyQzIpJTBBJTJGJTJGLmx1bWEoMC4zJTJDMC45KSUwQS5zY2FsZSgwLjIlMkM5JTJGMTYpJTBBJTJGJTJGLnJvdGF0ZSgwJTJDMC4xKSUwQSUyMCUyMC5ibGVuZChzcmMoczApLnNjYWxlKDEuMikucm90YXRlKDAlMkMwLjEpJTJDMC4zKS5sdW1hKDAuMDcpJTBBJTIwJTIwLmJsZW5kKHNyYyhzMSkuc2NhbGUoMS41KS5yb3RhdGUoMSUyQy0wLjAzKSUyQzAuMSkubHVtYSgwLjAyKSUwQSUyMCUyMC5tYXNrKHNyYyhzMSkuc2NhbGUoMS41KS5yb3RhdGUoMSUyQy0wLjAzKSUyQzAuMykubHVtYSgwLjA1KSUwQSUyRiUyRi5ibGVuZCh2b3Jvbm9pKDIwMCUyQzAuOCUyQzIwKSUyQzAuMTIpJTBBJTIwJTIwLm91dCgpJTBB)

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [May 20, 2022, 8:00am UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/2 "2022-05-20T08:00:58Z")

</div>

Hey there @Relaxnow,

thanks for sharing your session - hopefully it inspires and empowers others to follow your footsteps 🙂

With respect to Atom, this isn’t something we officially support, so for Atom-specific features, I can only recommend you bring those up with the maintainer of `sb-atom-sonic-pi`.

With respect to `with_fx`, with the official GUI, you can type `with_fx` and hit space and it will give you an autocomplete list of FX to use that you can work with. Again, if you’re focussing on using an exeternal editor such as Atom, then you need to ask the respective maintainer for features.

Have fun and please do keep on sharing your work with us here!

---

<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:** [May 20, 2022, 8:31am UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/3 "2022-05-20T08:31:13Z")

</div>

Ty 🙂 and ty for an inspiring live coding environment.

Add 1+2)  
I’ll try to contact the maintainer of the Atom plugin.

Add 3)  
Idea: wf+TAB to insert

“with\_fx do (with cursor placement after fx ready to press space to choose effect)  
end”

Like the ll+TAB do with  
“live\_loop do  
end”

Are there a place where I can see all the code snippets for Sonic Pi?

---

<div class="post-metadata">

**Author:** ![nlb](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/nlb/32/997_2.png) [@nlb](https://in-thread.sonic-pi.net/u/nlb)\
**Post date:** [May 20, 2022, 9:10am UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/4 "2022-05-20T09:10:57Z")

</div>

> [@Relaxnow](#):
>
> Ty

Ty = thank you

i translate for the oldest 🙂

Cheers

---

<div class="post-metadata">

**Author:** ![SunderB](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/sunderb/32/2301_2.png) [@SunderB](https://in-thread.sonic-pi.net/u/SunderB)\
**Post date:** [May 22, 2022, 9:04pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/5 "2022-05-22T21:04:52Z")

</div>

Hi @Relaxnow 🙂  
I’m the maintainer of sb-atom-sonic-pi. I’m glad that you’re finding it useful!

The list of all the snippets in the package can be found on the GitHub repo: [sb-atom-sonic-pi/sonic-pi.cson at main · SunderB/sb-atom-sonic-pi · GitHub](https://github.com/SunderB/sb-atom-sonic-pi/blob/main/snippets/sonic-pi.cson). I like the ideas for the short snippets for with\_fx and live\_loop, so I’ll look at adding those (maybe alng with some others) when I get the chance.

About the pop-ups, I could add an option to disable them. To be honest it wasn’t something I’d thought about as I actually haven’t used Sonic Pi for live coding much, but I see why this would be nice for performances. I’m currently busy with my studies so I’ll look into adding those when I have more spare time.

If you have any more suggestions, please feel free to open a discussion or issue on the [GitHub repo](https://github.com/SunderB/sb-atom-sonic-pi) 🙂

---

<div class="post-metadata">

**Author:** ![samaaron](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/samaaron/32/7_2.png) [@samaaron](https://in-thread.sonic-pi.net/u/samaaron)\
**Post date:** [May 22, 2022, 10:11pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/6 "2022-05-22T22:11:33Z")

</div>

Hey @SunderB! Apologies, I should have known you were the maintainer of `sb-atom-sonic-pi` 🙂 Hi!

---

<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:** [May 22, 2022, 11:12pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/7 "2022-05-22T23:12:40Z")

</div>

Hi @SunderB  
Thank you for sb-atom-sonic-pi.  
I find it so cool that we can use Sonic Pi in Atom and use Hydra as visuals.  
It’s a really nice setup.  
I’m super busy with exams aswell so no rush.  
Kind regards  
Relaxnow

---

<div class="post-metadata">

**Author:** ![pashultz](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/pashultz/32/1964_2.png) [@pashultz](https://in-thread.sonic-pi.net/u/pashultz)\
**Post date:** [May 26, 2022, 4:44pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/8 "2022-05-26T16:44:41Z")

</div>

Hi @SunderB and @Relaxnow! Coming in late here, sorry. Might be worth noting that Sonic Pi already has a built-in expansion for a `with_fx` block: `fx [tab]`. Unfortunately it doesn’t work when it’s typed at the beginning of a line—it autocompletes to `fx_names` instead—but if you type a space, then `fx`, then press `[tab]`, it should expand correctly.

There are also snippets for specific FX, which I always forget about. They’re defined here: [sonic-pi/etc/snippets at dev · sonic-pi-net/sonic-pi · GitHub](https://github.com/sonic-pi-net/sonic-pi/tree/dev/etc/snippets)

---

<div class="post-metadata">

**Author:** ![SunderB](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/sunderb/32/2301_2.png) [@SunderB](https://in-thread.sonic-pi.net/u/SunderB)\
**Post date:** [May 26, 2022, 10:18pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/9 "2022-05-26T22:18:44Z")

</div>

I’ve updated the package to add the snippets and notification option. 🙂 However, I can’t seem to publish it to [atom.io](http://atom.io) at the moment due to technical issues.

In the meantime, if you want you can install it via the terminal using the following command:

```bash
apm install SunderB/sb-atom-sonic-pi

```

This by-passes the package registry and installs the latest dev version from the GitHub repo.

---

<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:** [May 28, 2022, 7:20pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/10 "2022-05-28T19:20:33Z")

</div>

> [@SunderB](#):
>
> `apm install SunderB/sb-atom-sonic-pi`

Hi @SunderB

Add 1)  
I have installed the update and in settings of the package I can choose which UI notification level to use. It works great. Thanks.

Add 2)  
I’m not sure how to get ll+TAB to work in Atom. I can see the snippets in the settings of the package.

---

<div class="post-metadata">

**Author:** ![SunderB](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/sunderb/32/2301_2.png) [@SunderB](https://in-thread.sonic-pi.net/u/SunderB)\
**Post date:** [May 30, 2022, 8:53pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/11 "2022-05-30T20:53:01Z")

</div>

@Relaxnow I’m glad the notifications option is useful 🙂  
For the snippets, check that the source language is set to Sonic Pi instead of Ruby. You can change this in the bottom bar:  
 ![image](https://europe1.discourse-cdn.com/flex017/uploads/sonic_pi/original/2X/e/ebeac350ab6eed00e34005a4b4a70c670751098c.png)

---

<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:** [May 30, 2022, 9:48pm UTC](https://in-thread.sonic-pi.net/t/two-wishes-to-sonic-pi-in-atom/6791/12 "2022-05-30T21:48:47Z")

</div>

Thank you.  
Just what I needed to learn.  
I looking forward to playing with this.  
😃
