Hi, I wrote the Linux kernel drivers for speaker output on the new ARM64 Macs, so I can shed some light on this.
> I wonder how they model the energy output of the speakers.
Simple. The speaker codecs (special made for Apple, but e.g. compatible to https://www.ti.com/product/TAS2764) give you current/voltage measurements you can calculate the power from. It's what they call I/V sense.
> In principle you could have a function that calculates the energy of the spectrum and integrate that over time.
Right. You don't want to do the calculation in frequency domain since that would be wasteful. You can integrate the power of the samples straight away (here by multiplying the instantaneous voltage and current, if we didn't have that, we could at least estimate it by assuming a constant resistance of the speaker coils).
> If you put out too much energy, what do you do? Reduce the overall volume, apply a frequency cutoff, or a low-pass-filter?
You model the coil's temperature. If it comes near a dangerous level, you reduce the volume on the particular speaker. You don't need to worry too much about this since usually you don't hit the limits, you are merely guarding against especially nasty sound input.
> I feel there are so many variables here, and it is going to be hard to replicate what Apple does.
We don't need to replicate what Apple does. Though we are stealing the parameters for the coil temperature model Apple is using (at least for some machines).
Yes, exceptions should be written into the law in the first place. I assume the government is very comfortable with getting to draw the line themselves.
I happen to come from that part of the world where something radically different has been tried out, and will also tell you capitalism is good (considering the alternatives).
> I don't really understand the physics of why electrons don't collapse into the positive nucleus, since positives and negatives should attract
My (student of physics) answer to that would be that they are pretty much collapsed as much as they can. It’s just that under quantum mechanics that least energetic state is not the one in which the electron is perfectly co-localized with the positive charge. (As that perfect co-localization is not even physically attainable.)
It's maybe worth mentioning that, pre-quantum mechanics, this was so far from being a naïve question as to be one of the motivating concerns of early-20th-century physics. It's not the same thing as, but is closely related to, the ultraviolet catastrophe (https://en.wikipedia.org/wiki/Ultraviolet_catastrophe).
> (As that perfect co-localization is not even physically attainable.)
But then, you have (or would have.. I think it's not experimentally verified) degenerate states of matter, like in a neutron star, where pressure is so big that the electrons collapse into protons to form neutrons.
> It seems to me this is simply a statement that an electron is a fermion not a boson, right?
Not really, that's a property of any quantum particle, bosons also. They don't occupy a single point in space like you would imagine classical particles do. They also cannot occupy a single point in space relative to another particle.
> It's a fermion, but why should it be?
Well there's the spin-statistics theorem in quantum field theory which starts from some likely assumptions and then shows that particles with non-integral spin must be fermions while particles with integral spin must be bosons. Other than that I take it simply as an experimental fact. I don't think there's a nice reason for it one could give (today, that is).
Fascinating! I would love to gain more of an intuitive grasp on how subatomic particles all work and fit together, i'm not a physicist though. Could you suggest any good introductory reading?
I like to read Wikipedia and popularized stuff. The problem is I come away unsatisfied, because even the best writing directed at people who aren't good at math, is more about giving the feeling of understanding than actual understanding.
My point about bosons and fermions, is I read the summary on Wikipedia, but they are just labels to me. I don't have the intuition or math except that it says the one kind of thing can "overlap" in ways the other can't.
Richard Feynman's "QED: The Strange Theory of Light and Matter" has been much praised though. What did I get out of it? I guess that quantum mechanics has something to do with multiplying complex numbers.
I'm not sure exactly what I'm missing, but I get the impression that if I could understand Hamiltonians, Lagrangians, or variational calculus, then I would have some insight into modern physics.
Some of it sounds tantalizingly straightforward, but at the same time beyond my mental capacity - imagine a space, a field, etc. - but it's infinite-dimensional or something. Or it's a space of functions.
Still, on Wikipedia you can keep clicking on things - what's a "fiber bundle", etc.
Ah whoops! It sounds like we're in a very similar boat indeed! All good, nice to meet a like-minded soul on HN.
I completely know what you mean about the complex numbers and Hamiltonians etc. A lot of the time I think I could even have a reasonable chance of understanding the concepts given a few graphs/diagrams and some kind of translation to prose/pseudocode (or even just code) but there is so much symbolic syntax in both maths and physics (too much for me!) - I think it's probably hard to become fluent unless you use it every day I reckon.
I can also imagine something like a 'reasonably realistic' subatomic particle simulation framework in a 3D engine where one could fully control time space, energies, polarisation, quantum stuff etc and really examine the events in detail. I think one could perhaps start to get a feel for how it all fits together just by playing with the various interactions and watching/virtually-measuring carefully?
> I wonder how they model the energy output of the speakers.
Simple. The speaker codecs (special made for Apple, but e.g. compatible to https://www.ti.com/product/TAS2764) give you current/voltage measurements you can calculate the power from. It's what they call I/V sense.
> In principle you could have a function that calculates the energy of the spectrum and integrate that over time.
Right. You don't want to do the calculation in frequency domain since that would be wasteful. You can integrate the power of the samples straight away (here by multiplying the instantaneous voltage and current, if we didn't have that, we could at least estimate it by assuming a constant resistance of the speaker coils).
> If you put out too much energy, what do you do? Reduce the overall volume, apply a frequency cutoff, or a low-pass-filter?
You model the coil's temperature. If it comes near a dangerous level, you reduce the volume on the particular speaker. You don't need to worry too much about this since usually you don't hit the limits, you are merely guarding against especially nasty sound input.
> I feel there are so many variables here, and it is going to be hard to replicate what Apple does.
We don't need to replicate what Apple does. Though we are stealing the parameters for the coil temperature model Apple is using (at least for some machines).