# Tone without envelope

**URL:** <https://in-thread.sonic-pi.net/t/tone-without-envelope/595>\
**Category:** \[P\] Patreon Support\
**Created:** [January 6, 2018, 9:44am UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595 "2018-01-06T09:44:07Z")\
**Posts on this page:** 9\
**Page:** 1

<div class="post-metadata">

**Author:** ![Paum](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@Paum](https://in-thread.sonic-pi.net/u/Paum)\
**Post date:** [January 6, 2018, 9:44am UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/1 "2018-01-06T09:44:07Z")

</div>

Hi all,

It is possible to make long sine( or whatever shape) tone until it is not stopped?

In supercollider for ex. {[SinOsc.ar](http://SinOsc.ar)}.play

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [January 6, 2018, 11:04am UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/2 "2018-01-06T11:04:46Z")

</div>

Just out of interest: Are you planning something like [Organ²/ASLSP](https://en.wikipedia.org/wiki/As_Slow_as_Possible) (as currently being performed in Halberstadt/Germany until the year 2640)?

---

<div class="post-metadata">

**Author:** ![Paum](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@Paum](https://in-thread.sonic-pi.net/u/Paum)\
**Post date:** [January 6, 2018, 10:00pm UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/3 "2018-01-06T22:00:36Z")

</div>

Hi, actually I am pretty impressed by this project. I would love to join them …  
Why are you asking ?

---

<div class="post-metadata">

**Author:** ![Paum](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@Paum](https://in-thread.sonic-pi.net/u/Paum)\
**Post date:** [January 6, 2018, 10:02pm UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/4 "2018-01-06T22:02:35Z")

</div>

I am just curious if it is possible to make gated sound in sPi.

---

<div class="post-metadata">

**Author:** ![Martin](https://dub1.discourse-cdn.com/flex017/user_avatar/in-thread.sonic-pi.net/martin/32/157_2.png) [@Martin](https://in-thread.sonic-pi.net/u/Martin)\
**Post date:** [January 6, 2018, 11:18pm UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/5 "2018-01-06T23:18:01Z")

</div>

Well, as I said, I am just curious about what you would want to achieve.

Have you tried

```ruby
play :c, sustain: 31536000

```

This should sound for one year if I calculated correctly.

---

<div class="post-metadata">

**Author:** ![hitsware](https://avatars.discourse-cdn.com/v4/letter/h/a9adbd/32.png) [@hitsware](https://in-thread.sonic-pi.net/u/hitsware)\
**Post date:** [January 7, 2018, 2:52pm UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/6 "2018-01-07T14:52:29Z")

</div>

Or

use bpm 0.01  
play :c

---

<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:** [January 7, 2018, 8:35pm UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/7 "2018-01-07T20:35:24Z")

</div>

For the record, all Sonic Pi’s synths (triggered via `synth` and `play`) are finite in duration.

This was a specific design decision taken to make the use of the synths simple and not require any knowledge of gates, triggers and variables.

This may change in the future, but for now, the best way to achieve the kind of thing you’re talking about is to use a long sustain as @Martin has suggested along with the `control` fn which can allow you to modify a running synth:

```ruby
s = play 70, sustain: 1000, amp_slide: 1
sleep 1
control s, amp: 0

```

For more information about `control` and the `*_slide:` opts please see section 7 of the built-in tutorial 🙂

---

<div class="post-metadata">

**Author:** ![Paum](https://avatars.discourse-cdn.com/v4/letter/p/dc4da7/32.png) [@Paum](https://in-thread.sonic-pi.net/u/Paum)\
**Post date:** [January 7, 2018, 11:10pm UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/8 "2018-01-07T23:10:06Z")

</div>

Thank you all for responses, especially Sam - thanks for great software.

To the point - yes, I have thought so.

---

<div class="post-metadata">

**Author:** ![robin.newman](https://avatars.discourse-cdn.com/v4/letter/r/76d3ee/32.png) [@robin.newman](https://in-thread.sonic-pi.net/u/robin.newman)\
**Post date:** [January 8, 2018, 4:04pm UTC](https://in-thread.sonic-pi.net/t/tone-without-envelope/595/9 "2018-01-08T16:04:03Z")

</div>

I have developed a polyphonic gated synth for Sonic Pi which I wrote up here

> **[revised simpler polyphonic gated synth using Sonic Pi 3](https://rbnrpi.wordpress.com/2017/11/23/revised-simpler-polyphonic-gated-synth-using-sonic-pi-3/)**
>
> further simplepolysynth2.rb version added to the code link for this article for use with keyboards with separate note\_on note\_off midi commands, rather than those using note\_on with velocity 0 for …

There is a video showing it in action here

[![](https://img.youtube.com/vi/XYciYPLfgXI/hqdefault.jpg "Sonic Pi Pi3 Midi Polysynth") ](https://www.youtube.com/watch?v=XYciYPLfgXI)

It uses the technique that Sam described of generating a long note and the controlling its amplitude.  
Works nicely for keyboard input.
