Match an Equalizer Curve
The OP is trying to do what we would refer to as channel estimation. I am linking two posts below where this is all worked out in greater detail but do want to make the point first that the choice of &quot;sounding pattern&quot; is important. The channel can only be estimated where there is signal energy in the frequency domain, so the sine sweep is an excellent choice as long as the sweep is over all the frequencies of interest. Other sounding patterns commonly used are pseudo-random noise generated with PN sequences (from linear feedback shift registers: LFSR).
An optimized FFT chirp for channel estimation:
How can I plot the frequency response on a bode diagram with Fast Fourier Transform?
Using Wiener-Hopf equations for least-squares channel estimation:
Compensating Loudspeaker frequency response in an audio signal
Related posts on PN sequences as an alternate sounding pattern:
What are the advantages and disadvantages of PN sequence over Walsh code
Sequence Length for a Linear Feedback Shift Register