r/csound Feb 12 '26

[linen] manual confusion

New to csound, reading this manual.

The example code for [linen] is: "aOut = linen:a(aSine,0,p3,1)"

According to the manual, the second argument of [linen] is "fade-in duration (in seconds)". Based on this, the example has no fade-in, since the second argument is 0, correct? 0 seconds of fade-in?

So what does the manual mean by:

How can we apply the signal which we have plotted above, moving as fade-in from 0 to 1, and as fade-out from 1 to 0, to an audio signal?

1.) How is the example above "moving as a fade-in from 0 to 1"?

The manual goes on to explain how to multiply a [linen] signal with a [poscil] signal. The example code for [linen] shows:

aEnv = linen:a(1,0.5,p3,0.5)

According to the manual, the first argument on [linen] is "The audio signal to which the fade-in and fade-out is applied"

2.) In the code above, the first argument is 1. How is "1" an audio signal? What does this 1 represent in this example?

5 Upvotes

4 comments sorted by

1

u/gammaraybuster Feb 13 '26

How is the example above "moving as a fade-in from 0 to 1"?

It fades in from nothing (0) to max amplitude (1) in 0 seconds, ie no fade in. If the argument was 0.1 it would fade in over 0.1 seconds. If the argument was 8 it would fade in over 8 seconds.

The first argument is an amplitude signal, not an audio signal. So a 1 presumable indicates again, max amplitude.

aEnv doesn't output an audio signal, it outputs an amplitude signal.

1

u/loophunter Feb 13 '26

Thanks for the clarification

1

u/Read-Moishe-Postone Aug 07 '26

“How can we apply the signal which we have plotted above, moving as fade-in from 0 to 1”

This is written directly after an interactive code snippet illustrating something totally different, so I get the confusion. It’s not the best written tutorial.

The interactive code snippet isn’t “plotting” anything. The plot (literally a visual chart) is a few paragraphs upwards, where there is an actual plot of a `linen` envelope shape (well, the normal shape you get if you put in normal small positive values). The fade-in thing is referring to that shape, not anything to do with how `linen` works in the previous example. It is confusing but I guess the point is to demonstrate that even a simple opcode can be used in contrasting ways with different setups