Daqarta
Data AcQuisition And Real-Time Analysis
Scope - Spectrum - Spectrogram - Signal Generator
Software for Windows
Science with your Sound Card!
The following is from the Daqarta Help system:

# Sound Card Arbitrary Spectrum Response

It is not strictly necessary to use a typical stimulus like Swept Sine, Stepped Sweep, Impulse, Step, White Noise, or Pink Noise to obtain a frequency response. All you really need is a stimulus that excites the system under test at all the frequencies you are interested in. The spectrum of that stimulus can be tailored to any specific requirements.

For example, consider the Pink spectrum that falls off at higher frequencies. This is useful to allow the measurement process to deliver high power at low frequencies while limiting power at high frequencies. But suppose you have some special case, where you want to do the reverse and limit power at low frequencies. Or maybe you want to limit mid frequencies, or even most frequencies except for a certain band.

You can do this, and still measure the true frequency response of the system as though it was driven by a flat spectrum. The trick is to first measure the spectrum of the test signal, and create a Mirror Curve file which will exactly compensate for it.

The main thing to watch out for with this approach is that it can't work miracles; if the stimulus spectrum has very little energy at some frequency, the compensating Curve file will need to apply a lot of boost at that spot. In that case, whatever noise is present at that frequency will be boosted by exactly the same amount as the response. So, it's best to avoid stimulus spectra with deep dips.

The reverse is also true, since if the stimulus spectrum has a tall peak, you will have to reduce the overall drive signal to the system under test to avoid distortion at that frequency. That will mean all the other frequencies get that much less drive energy and hence the response will have a greater proportion of noise there.

Note that you should never use a Window function to view a noise response; use them only for continuous waveforms.