Page 1 of 1

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

Posted: Sat Jul 14, 2018 5:52 am
by юра00
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!

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

Posted: Sat Jul 14, 2018 5:56 am
by юра00
Certainly, duration of white noise (not necessary) must be better equal to duration of the track.

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

Posted: Sat Jul 14, 2018 9:19 am
by юра00
Mr. Trebor, I don't see your reply. You've deleted it?

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

Posted: Sat Jul 14, 2018 10:07 am
by waxcylinder
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

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

Posted: Sat Jul 14, 2018 11:23 am
by юра00
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!

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

Posted: Sat Jul 14, 2018 9:37 pm
by Trebor
юра00 wrote:
Sat Jul 14, 2018 9:19 am
Mr. Trebor, I don't see your reply. You've deleted it?
This code works on mono* tracks if you paste it into nyquist prompt

Code: Select all

(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)

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

Posted: Sun Jul 15, 2018 12:15 am
by steve
Trebor wrote:
Sat Jul 14, 2018 9:37 pm
( * I don't know the code to make it work on stereo tracks)
You need to create 2 channel noise. For example:

Code: Select all

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

Code: Select all

(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,

Code: Select all

(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):

Code: Select all

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

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

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

Posted: Fri Aug 17, 2018 6:53 am
by юра00
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.

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

Posted: Fri Aug 17, 2018 2:43 pm
by waxcylinder
Oops yes, sorry that was sloppy of me :oops:

WC