# About env\_curve

**URL:** <https://in-thread.sonic-pi.net/t/about-env-curve/9262>\
**Category:** Support, Help & Resources\
**Created:** [October 20, 2024, 9:01am UTC](https://in-thread.sonic-pi.net/t/about-env-curve/9262 "2024-10-20T09:01:19Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![beryann](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/beryann/32/3133_2.png) [@beryann](https://in-thread.sonic-pi.net/u/beryann)\
**Post date:** [October 20, 2024, 9:01am UTC](https://in-thread.sonic-pi.net/t/about-env-curve/9262/1 "2024-10-20T09:01:19Z")

</div>

Hi there,  
I need some help and explanation in the same time. In the documentation in SPi, I am searching how to use use\_curve with this line of code:

```ruby
use_synth :piano
loop do
  play choose(chord(:E3, :minor)), release: 0.3, attack: 0.1, sustain: 1, decay: 0.5, release: 0.2, env_curve: (ring, 1,2,3,4,5,6,7).tick
  sleep 1
end

```

So with the example given by Sam @samaaron, I added this env\_curve with a ring but it’s not very significative when you hear it! But, my line of code isn’ t probably right…  
Is it the synth which is not adapted ?(I tried with different one) Someone could explain and give an example (which works 😀)  
Thanks for your attention!

---

<div class="post-metadata">

**Author:** ![Davids-Music-Lab](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/davids-music-lab/32/512_2.png) [@Davids-Music-Lab](https://in-thread.sonic-pi.net/u/Davids-Music-Lab)\
**Post date:** [October 20, 2024, 9:05am UTC](https://in-thread.sonic-pi.net/t/about-env-curve/9262/2 "2024-10-20T09:05:01Z")

</div>

:piano, :pluck and some other synths can behave strange with envelopes, try :tri or :saw

---

<div class="post-metadata">

**Author:** ![beryann](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/beryann/32/3133_2.png) [@beryann](https://in-thread.sonic-pi.net/u/beryann)\
**Post date:** [October 20, 2024, 5:36pm UTC](https://in-thread.sonic-pi.net/t/about-env-curve/9262/3 "2024-10-20T17:36:03Z")

</div>

I tried different synth and it works better in certain cases like this one (I tried with a ring but it bugs…):

```ruby
a = 1 #try with 2,3,4,5,6,7 
use_synth :chipbass
live_loop :test do
  play 60, env_curve: a
  sleep 1
end

```

---

<div class="post-metadata">

**Author:** ![beryann](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/beryann/32/3133_2.png) [@beryann](https://in-thread.sonic-pi.net/u/beryann)\
**Post date:** [October 20, 2024, 7:31pm UTC](https://in-thread.sonic-pi.net/t/about-env-curve/9262/4 "2024-10-20T19:31:43Z")

</div>

About the env\_curve:  
I did these two blocks each one with a different env\_curve and with a slide option on the panoramic. And its interesting here because with these two different curves, I think that it works better with the pan\_slide…So, that curve option can be interesting depending on the effect you want to use! Not sure for the parameters for the eq 🤔  
Tell me if you see something not correct…

```ruby
set_volume! 0.7

use_synth :growl

live_loop :test do
  with_fx :eq, low_shelf: 0.8, high_shelf_note: 450 do
    with_fx :reverb, room: 0.8 do
      
      
      s = play 60, env_curve: 7, decay: 0.5, sustain: 0.5, release: 2,pan: -0.9, pan_slide: 1
      sleep 1
      control s, pan: 1
      play 60
      sleep 1
    end
    
    
    live_loop :test2 do
      s = play 72, env_curve: 1, decay: 0.5, sustain: 0.5, release: 2,pan: -0.9, pan_slide: 1
      sleep 1
      control s, pan: 1
      play 72
      sleep 1
    end
  end
end

```
