I'm working on a project for university and part of my project at the minute is adding noise to a .wav file. Originally my supervisor wanted me to generate noise by "specifying a given variance and adding it to the data of the .wav file". I took this to mean that the user would specify a variance of n and I would use Python's Random library in the stdlib to add variance in the range of -n..n. I've implemented this successfully and can load a file, add white noise and save it as a new file.
My supervisor has then decided we could expand on this by using signal to noise ratio. I'm just at the point where I can implement this so previously I haven't given it much thought. I've been doing some reading on it today and I don't really know how he would want it implemented.
My guess would be that I would be able to specify the power of the signal and the power of the noise. When I calculate the SNR from these values I would then use the result to generate noise and add it do the data of the wave file. Does this sound right? If it does, does anyone know how I might implement this?