How to mix (add) "white noise" to the track.

Dear specialists! Tell me how to mix “white noise” to the track. You can, of course, create a “white noise”, export it to a file, then import 2 tracks (the music file itself and white noise) and merge the tracks. But I would like to add white noise to the track directly after importing the music file, right in the editor, without exporting anything. Thank you!
Capture.PNG

Certainly, duration of white noise (not necessary) must be better equal to duration of the track.

Mr. Trebor, I don’t see your reply. You’ve deleted it?

  1. Import your music track
  2. Tracks>Add New … (stereo or mono as appropriate)
  3. Generate Noise
  4. Mix&Render (permanent change) - or just Export (temporarily mixed for export)

After step 2 the new track should be “focused” - not the yellow border
and it step 3 the noise generated should be the length of the audio imported in step 1 (it did when I tested on 2.2.0 just now).

WC

More or less clear. In my opinion, enough steps 1-3. True, noise is only 30 seconds, but usually more is not necessary, on the contrary, it takes 10-15 seconds, thank you!
Capture.PNG

This code works on mono* tracks if you paste it into nyquist prompt

(sum (mult 0.1 (noise)) *track*)

0.1 is the volume of the noise, adjust to taste.
( * I don’t know the code to make it work on stereo tracks)

You need to create 2 channel noise. For example:

(setf noise (mult 0.1 (noise)))
(sum *track* (vector noise noise))

Note that in this example the noise is actually mono, but we have duplicated it in a vector (an array).

If we want true stereo noise (noise in left channel is different to the noise in the right channel), then we could do it as:

(setf stereo-noise
    (vector (mult 0.1 (noise))
            (mult 0.1 (noise))))

(sum *track* stereo-noise)

If we want code that can handle either mono or stereo, we could use a conditional statement and test if track is an array,

(if (arrayp *track*)
    (sum *track*
         (mult 0.1 (vector (noise)(noise))))
    (sum *track* (mult 0.1 (noise))))

or (and I prefer this method even though it looks a little cryptic):

(defun addnoise (sig amount)
  (sum sig (mult (noise) amount)))

(multichan-expand #'addnoise *track* 0.1)

Dear waxcylinder, you have said it a little bit. It turns out that we must select the whole track before adding noise (steps 2-4). Then the length of the noise will be equal to the length of the track.

Oops yes, sorry that was sloppy of me :blush:

WC