How to convolve two sounds?

Hi! I would like to create one experience.
But, in newest audacity version works only variable s, not s1 and s2.
So, better to explanation.
I recorded one sound. I would like to get this sound to be inpulse. And secound, I recorded another sound, I would like to be a response. How to solve this problem?

Audacity passes sound from the selected audio track as the global variable “S” (may be “s” or “S”, Nyquist is not case-sensitive).
If there is more than one track selected, Audacity passes the first selected track to Nyquist, then the next track, then the next… So Nyquist only has access to the audio of one track at a time.

“sound” is handled by Nyquist as a “data type”.

Stereo tracks have two “sounds” - a left channel and a right channel. If a mono track is selected, then “S” is a “sound”, but if a stereo track is selected then “S” is an array of two sounds, where the first element is a “sound” from the left channel and the second element is a sound from the right channel.

Because we can’t directly access more than one track at a time in Nyquist, one trick that can be used to get two sounds into Nyquist at the same time is to prepare a stereo track that has one sound in the left channel and one sound in the right. See:
An example of this “trick” can be seen in the Vocoder plug-in that is included in Audacity.

Note also that Nyquist sees empty track space as “silence” (samples with a value of 0).

So, if we make a stereo track in Audacity with our “sound” in the left channel and our “response” in the right channel, we can access them separately with
(aref s 0) and (aref s 1) respectively.
However, we probably want “response” to be a short sound, (probably much shorter than the other), so we will need to trim it down so as to avoid lots of trailing zeros.

To get the first 0.1 seconds of the right channel we can use the EXTRACT function, perhaps something like:

(setf response (extract-abs 0 0.1 (aref s 1)))

OK, thanks. I asked It also due to this, that I can’t use the convolution response. I don’t know, how to write that, or how it works.
I think to that:
(convolve s response)
Ofcourse, I don’t know, what I must type for this response.

I’m not sure what you are asking.
Do you know what “convolution” is? What exactly are you wanting to do?

OK, I know, what is convolution.
So, I would like to create an impulse from one little sample of sound. Now, I would like too use this effect to another sound.
So, I think, that I can do that by selecting sound, but I can use only to this sound, not to another, I think to convolution.

Try something like:

(let ((signal (aref s 0))
      (impulse (extract-abs 0 0.1 (aref s 1))))
    (convolve signal impulse)
    (aref s 1)))

where the sound that you wish to process is the left (upper) channel of a stereo track, and the impulse is the first 0.1 seconds of the right (lower) channel.

It only works to the little channel, as previous. Maybe I have one idea, how to do that.
If You try develope the convolution, It must have the buttom to get this selected noise, as impulse. After that, You can record another sound and use this effect of this impulse.