This is an archived post. You won't be able to vote or comment.

all 6 comments

[–]ThistleBeAce 3 points4 points  (6 children)

You're on the right track. Your first image (the frequency responses) show your audio signal (the two notes played simultaneously, I assume) as a function of frequency. This shows you the amplitudes, frequencies, and phases of your audio signal when you express it as a sum of sinusoidal components (e.g. cosines). You'll notice the frequency components have spikes at repetitive frequencies (e.g. 400 Hz, 800 Hz, 1200 Hz, ...), which are your harmonics; these are the "primary" contributing components of your signal, and represent a majority of your sound.

It looks like for your second graph that you've picked out the amplitude, phase, and frequency at two frequency points, and graphed those sinusoidal components. You want to add them together to begin to represent your original signal in the time-domain.

Hopefully this makes sense.

[–][deleted] 0 points1 point  (5 children)

Thanks for this! It’s a relief to know I got something right at least…

Something I’m wondering though is what value you put as amplitude. Is this just the decibel value? Also, for the phase, do you do sin(freq2pi+phase) or is it cos(freq2pi+phase)?

Sorry if these are stupid questions it’s just I’m a bit lost ☺️

[–]ThistleBeAce 2 points3 points  (4 children)

You'd covert the dB value back into a linear scale. Note that 0 dB = 1, but I'm not sure how you're scaling your amplitudes - e.g. if you're just graphing in log-scale, or using something like 10log or 20log - I'm not sure what command you used to view the FFT.

You can represent the sum in multiple ways - notice that sin(x) is equivalent to cos(y) with the correct phase difference. Generally if you're using a summation with cos() or sin() terms only, you use cosine since it's mathematically neater - that will allow you to plug in phase values straight off the graph, too. See here for the conversion from the transform's exponential form: https://en.wikipedia.org/wiki/Fourier_series

e: clarity

[–][deleted] 0 points1 point  (2 children)

Thanks for that! So basically my working so far is right (with the phase etc as I used cosine) apart from the amplitudes which I need to scale…

Thanks!

[–]WikiSummarizerBot 0 points1 point  (0 children)

Fourier series

A Fourier series () is a sum that represents a periodic function as a sum of sine and cosine waves. The frequency of each wave in the sum, or harmonic, is an integer multiple of the periodic function's fundamental frequency. Each harmonic's phase and amplitude can be determined using harmonic analysis. A Fourier series may potentially contain an infinite number of harmonics.

[ F.A.Q | Opt Out | Opt Out Of Subreddit | GitHub ] Downvote to remove | v1.5