Add noise to one channel in an stereo file

GoldWave general discussions and community help
Post Reply
didudash
Posts: 6
Joined: Sun May 02, 2010 2:42 pm
Location: Colombia

Add noise to one channel in an stereo file

Post by didudash »

hi, I'm very new to the goldwave software and to Digital Audio in general. I need to generate an analog stereo signal (for testing) that in one channel has a sine signal and in the other channel has a sine signal also but with noise and/or distortion added. I managed to have a sine signal of f=2kHz in both channels but I don't know how to modify only one channel, and I also dont know how to add noise or distort this signal. Is there a way to saturate the signal in one channel?
I appreciate all the help you can give me,
diana
DewDude420
Posts: 1171
Joined: Fri Mar 11, 2005 11:15 pm
Location: Washington DC Metro Area
Contact:

Re: Add noise to one channel in an stereo file

Post by DewDude420 »

On the tool bar, edit | channel will let you select one channel or the other.

If you want to mix the noise with what's in the channel, you can copy the noise to clipboard and use the mix function. If you want to replace the audio yyou need to select one channel, hit delete, then paste the noise in.
Gord
Posts: 391
Joined: Thu May 21, 2009 4:26 pm
Location: Canada

Re: Add noise to one channel in an stereo file

Post by Gord »

If you want to force the signal to clip on one channel then you can

- select the whole file with [Ctrl-A]

- restrict editing to one channel, left = [Ctrl-Shift-L], or right = [Ctrl-Shift-R], or via the menu with

Edit > Channel > [Left | Right]

- use the Change Volume effect

Effect > Volume > Change Volume...

to increase the volume until the top of the sine wave flattens out.
didudash
Posts: 6
Joined: Sun May 02, 2010 2:42 pm
Location: Colombia

Re: Add noise to one channel in an stereo file

Post by didudash »

Thank you so much for the prompt replies. I apologize for not answering before. All you said was very helpful, yet I still have some questions.
I need to create two test signals for a design that I’m programming in a DSP development board.
My design has two entries illustrated in the following picture:
Image
Please ignore the characters in Spanish… :P I need a pure sine wave, let’s say of 1000Hz of frequency, and a distorted version of this signal. This signal is distorted in the simulation by means of saturation like this:
Image
So, what I would like to do with the goldwave software is generate a stereo signal that in the left channel has the distorted version of the sine wave, and in the right channel has the sine wave unperturbed like this:
Image
I apologize for my monologue…I hope any of you can help me.
Diana.
Moonmist
Posts: 30
Joined: Sat May 16, 2009 3:24 pm
Location: The Milky Way Galaxy

Re: Add noise to one channel in an stereo file

Post by Moonmist »

Step 1: Open GoldWave
Step 2: Click on "File" on the menu at the top of the GoldWave window
Step 3: Click on "New"
Step 4: Click on the box to the right of where it says "Number of channels"
Step 5: On the list that comes up click on "2 (stereo)"
Step 6: Choose a sampling rate and duration in the other two boxes
Step 7: Click the "OK" button
Step 8: Click on "Tool" on the menu at the top of the GoldWave window
Step 9: Click "Expression Evaluator"
Step 10: Under Presets, click the plus by where it says "Waves"
Step 11: Scroll down until you see "Sine, f = Hz", and click on that
Step 12: Under the section that says "User constants" enter "1000" in the "f =" field
Step 13: Click the "OK" button
Step 14: Right click on the bottom left corner of the GoldWave window where it says "Stereo"
Step 15: Click "Left"
Step 16: Repeat steps 8 and 9
Step 17: Under the section that says "Expression" enter "wave(n)/0.9"
Step 18: Click the "OK" button
Step 19: Click on "Effect" on the menu at the top of the GoldWave window
Step 20: Click "Dynamics"
Step 21: In the graph make sure there are no points between the far left and far right ones
Step 22: If there is then right click on all of them until there is none
Step 23: In the box to the right of "Point:" enter "1"
Step 24: In the box to the right of "Y:" enter "-1"
Step 25: In the box to the right of "Point:" enter "2"
Step 26: In the box to the right of "Y:" enter "1"
Step 27: Click the "OK" button
Step 28: Repeat steps 8 and 9
Step 29: Under the section that says "Expression" enter "wave(n)*0.9"
Step 30: Click the "OK" button
Step 31: Right click on the bottom left corner of the GoldWave window where it says "Left"
Step 32: Click "Both"

You now have your desired sound file! :)

NOTE: everywhere I say to enter something, do it without the quotes

There is alternate ways to do this, but this is the easiest way I know of (only I also have a preset saved for the dynamics effect though, so I just right click on the dynamics toolbar and choose my preset, but that would've taken more steps to explain how to get it set up that way)

Hope this helps you :)
didudash
Posts: 6
Joined: Sun May 02, 2010 2:42 pm
Location: Colombia

Re: Add noise to one channel in an stereo file

Post by didudash »

Thank you sooo much!
You saved me a lot of time :D


Diana.
didudash
Posts: 6
Joined: Sun May 02, 2010 2:42 pm
Location: Colombia

Re: Add noise to one channel in an stereo file

Post by didudash »

Hey Moonmist,
Although your method seems very accurate to me, I have been getting a signal that seems more saturated. I don’t know if it’s due to the sound card of the computer in my university or the method itself. To illustrate my point better I have a couple of images from my oscilloscope.
The first one is the signal that I get from goldwave using your method:
Image
And the second one illustrates the ideal signals that I generated my DSP development board.
Image
The signal generated in the DSP has bigger amplitude (because I haven’t set it to 1Vp yet) but the proportions are the same (the signal is cut or saturated at the 90% of the level of the original signal).
I attach a print screen of the program goldwave so you can see that indeed the signal is cut in 0.9.
Image
Is the scale of goldwave linear?
Again, I appreciate your help


Diana
Moonmist
Posts: 30
Joined: Sat May 16, 2009 3:24 pm
Location: The Milky Way Galaxy

Re: Add noise to one channel in an stereo file

Post by Moonmist »

didudash wrote:Hey Moonmist,
Although your method seems very accurate to me, I have been getting a signal that seems more saturated. I don’t know if it’s due to the sound card of the computer in my university or the method itself. To illustrate my point better I have a couple of images from my oscilloscope.
The first one is the signal that I get from goldwave using your method:
Image
It looks to me like your dsp board might be changing the amplitude to 90%, it's still clipped at 90% of the wave but it looks like your dsp board is also applying a 90% gain to the whole wave in addition. So that would make the new peak level 81% (or 0.81 linear scale). So instead of being 100% wave clipped at 90% it's a 90% wave clipped at 81%.
didudash wrote:And the second one illustrates the ideal signals that I generated my DSP development board.
Image
The signal generated in the DSP has bigger amplitude (because I haven’t set it to 1Vp yet) but the proportions are the same (the signal is cut or saturated at the 90% of the level of the original signal).
I attach a print screen of the program goldwave so you can see that indeed the signal is cut in 0.9.
Image
Is the scale of goldwave linear?
Again, I appreciate your help


Diana
GoldWave does the internal math using the linear scale (using 32-bit floating point arithmetic). The Expression Evaluator and the Dynamics Effect both use linear scale also. Other effects use logarithmic (dB) scale. 90% comes to about -0.9151498 dB so that's what your peak level should be of the saturated channel. If I was right about your dsp possibly also reducing the waveform 90% that would make the new peak level 81% which would be about -1.8302996 dB, so if that's what your peak level is on that channel on your dsp board, then you should use my method but skip steps 28,29, and 30. So try that and see if it looks right afterward. If that doesn't help then I have no clue what your dsp is doing to alter it, so hopefully this solves it! Wish you the best :)
didudash
Posts: 6
Joined: Sun May 02, 2010 2:42 pm
Location: Colombia

Re: Add noise to one channel in an stereo file

Post by didudash »

Thanks for your reply.
I found what was my problem with goldwave but I don't know how to fix it.
It really has nothing to do with your method, but It may have to do with the settings I have. When I put sine waves in both channels (steps 1 through 13) and I look at them in the oscilloscope, the signal in the left channel (the signal in yellow) is attenuated (I guess by default).
Image
So, I think that's the real problem, I just don't know how I didn't notice it before.
I already checked the volume settings in my computer, the cables, the probes of the oscilloscope, etc..
And also I think the signal in the right channel (the signal in blue) seems attenuated at the bottom of the signal, and when I look at the file in goldwave, the bottom part of the right channel looks like its cut also.
I don't know why my settings are such a mess.
I should clarify that the signal that I'm looking in the oscilloscope comes straight from my computer and It isn't processed by the DSP.
Again, I appreciate your help



Diana
cdeamaze
Posts: 87
Joined: Thu Oct 05, 2006 3:19 pm

Re: left channel saturated stereo sine signal

Post by cdeamaze »

If you do it correctly, here is what you should get:
Waveform of saturated (left channel, in green:saturated @.9) and unsaturated (right channel, in red)sine waves

http://cdeamaze.tripod.com/sat.jpg
Last edited by cdeamaze on Mon May 31, 2010 6:33 pm, edited 5 times in total.
didudash
Posts: 6
Joined: Sun May 02, 2010 2:42 pm
Location: Colombia

Re: Add noise to one channel in an stereo file

Post by didudash »

Ok I found what the problem was. It has nothing to do with goldwave. I started playing with the volume controls, that in the past I assumed were set correctly, and I got the two sine signals at the beginning with the same amplitude.

Image

Now, the balance it’s not symmetrical (which doesn’t make sense) but my signals are what I want them to be.

Image

Thank you so much for your help and remarks. I’m glad everything is working correctly, I just wasn’t ready to give up on goldwave :D

Diana
Post Reply