Tone without envelope

Hi all,

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

In supercollider for ex. {SinOsc.ar}.play

Just out of interest: Are you planning something like Organ²/ASLSP (as currently being performed in Halberstadt/Germany until the year 2640)?

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

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

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

Have you tried

play :c, sustain: 31536000

This should sound for one year if I calculated correctly.

Or

use bpm 0.01
play :c

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:

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 :slight_smile:

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

To the point - yes, I have thought so.

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

There is a video showing it in action here

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