this post was submitted on 11 Feb 2024
158 points (97.0% liked)

196

16224 readers
3334 users here now

Be sure to follow the rule before you head out.

Rule: You must post before you leave.

^other^ ^rules^

founded 1 year ago
MODERATORS
158
sin/virtule (lemmy.blahaj.zone)
submitted 7 months ago* (last edited 7 months ago) by [email protected] to c/[email protected]
 

FUCK ZODIAC SIGNS, WHAT'S YOUR FAVORITE SIN; Lust, Gluttony, Wrath, Pride, Envy, Greed, Sloth. ok fine I'll let you choose heavenly sins too: Patience, Temperance, Charity, Kindness, Chastity, Humility.

(u can choose multiple or just a sin or a virtue and it doesnt matter if they're opposites or whatevs)

you are viewing a single comment's thread
view the rest of the comments
[–] [email protected] 21 points 7 months ago (7 children)

My favorite sin is cos(2πft) = sin(2πft+π/2), because it's easy to work with (because the frequency is exactly f Hz if t is in seconds).

[–] [email protected] 5 points 7 months ago (6 children)

Incomprehensible, tell me more :3

[–] [email protected] 5 points 7 months ago* (last edited 7 months ago) (5 children)

So in electrical engineering and audio applications, we often decompose a signal into a (possibly infinite [1]) weighted sum of sines and cosines. Because each sine has a frequency [2], each weight roughly represents how much of each frequency is in the decomposed signal. Similarly, if such a decomposition is performed on certain test signals, you can characterize how a system will act on any signals.

In audio applications, this has a particularly intuitive interpretation: this characterizes how bright or dull, bassy or trebly, "sounds good" or "sounds like shit", a sound is, depending on what frequencies are present. For a system, it describes what frequencies it emphasizes and can be used as a figure of merit to decide if it is fit for purpose.

Also, because in audio applications we need to do things in nearly real-time, and because we can safely throw out all frequencies above 20kHz (we can't hear them!), all the infinities and most of the calculus drops out in favor of matrix algebra. This is why if you use an equalizer plugin (like ReaEQ or Izotope Ozone) you can see a(n approximate) chart of the frequencies that are sounding at any given time (technically in a window of time that is tiny compared to the progression of the music) and look visually for anything that shouldn't be there.

For example, even if your speakers can't reproduce 60Hz, you can check if a track has 60Hz hum from the power system by looking for a spike in the frequency response at 60Hz that stays up the whole time. To fix it, you would put in a notch filter that "throws out" 60Hz.

I prefer cos to sin because if you solve for both in terms of complex exponentials, you end up with real weights in the answer. Practically [3], cos(t) = 1/2 * ( e^jt + e^-jt ) and sin(t) = 1/(2j) * ( e^jt – e^-jt ), the latter of which is annoying. I prefer the form cos(2πft) because you can measure a real wave directly in terms of its frequency (=1/period). Since the post "asked for" a sin(e), and sin(x+π/2) = cos(x) for any x, I plugged in my "pet" argument to get sin(2πft+π/2).

Also on a more advanced note, if you derive the Fourier transform using e^j2πft as a basis, you end up with a unitary (read: mathematically convenient) transform. Unfortunately, using e^jωt where ω=2πf actually doesn't yield a unitary transform, but e^jωt still constitutes an orthogonal basis so it is still just as used in engineering applications.

I literally have dozens of books about sin(e)s and how to use them to get what I want (Fourier analysis). It's such a deep and interesting topic that I recommend everyone look into at some point.

[1] In the real world, because there is only finite computer storage, any infinities are practically truncated or otherwise approximated away. Still, the full theory is useful for understanding and possibly deriving your way out of some complex calculation.

[2] The input to the sine function sin(2πft) must not have units, i.e. it needs to just be a number. Therefore, if the independent variable t is in terms of some unit, the frequency is in terms of 1/unit. For example, if the input is in seconds, the frequency is in 1/s = Hz.

[3] j = sqrt(-1). Yes, j is for jmaginary. Electrical engineers use j instead of i for the imaginary unit. Also, all arguments to sin() and cos() are in radians, not degrees. π radians = 180°, π/2 radians = 90°, and 2π radians = 360° = 1 rotation.

[–] [email protected] 2 points 7 months ago (1 children)

Please stop! The flashbacks, oh god, the flashbacks!

[–] [email protected] 1 points 7 months ago

Sinusoids have infinite support and therefore never stop 😈.

load more comments (3 replies)
load more comments (3 replies)
load more comments (3 replies)