User's banner
Avatar

PM_ME_VINTAGE_30S [he/him]

PM_ME_VINTAGE_30S@lemmy.sdf.org
Joined
12 posts • 634 comments

Anarchist, autistic, engineer, and Certified Professional Life-Regretter. I mosty comment bricks of text with footnotes, so don’t be alarmed if you get one.

You posted something really worrying, are you okay?

No, but I’m not at risk of self-harm. I’m just waiting on the good times now.

Alt account of PM_ME_VINTAGE_30S@lemmy.sdf.org. Also if you’re reading this, it means that you can totally get around the limitations for display names and bio length by editing the JSON of your exported profile directly. Lol.

Direct message

Short answer: to record a sound, take samples of the sound “really really often” and store them as a sequence of numbers. Then to play the sound, create an electrical signal by converting those digital numbers to a voltage “really really often”, then smooth it, and send it to a speaker.

Slightly longer answer: you can actually take a class on this, typically called Digital Signal Processing, so I’m skipping over a lot of details. Like a lot a lot. Like hundreds of pages of dense mathematics a lot.

First, you need something to convert the sound (pressure variation) into an electrical signal. Basically, you want the electrical signal to look like how the audio sounds, but bigger and in units of voltage. You basically need a microphone.

So as humans, the range of pitches of sounds we can hear is limited. We typically classify sounds by frequency, or how often the sound wave “goes back and forth”. We can think of only sine waves for simplicity because any wave can be broken up into sine waves of different frequencies and offsets. (This is not a trivial assertion, and there are some caveats. Honestly, this warrants its own class.)

So each sine wave has a frequency, i.e. how long many times per second the wave oscillates (“goes back and forth”).

I can guarantee that you as a human cannot hear any pitch with a frequency higher than 20000 Hz. It’s not important to memorize that number if you don’t intend to do technical audio stuff, it’s just important to know that number exists.

So if I recorded any information above that frequency, it would be a waste of storage. So let’s cap the frequency that gets recorded at something. The listener literally cannot tell the difference.

Then, since we have a maximum frequency, it turns out that, once you do the math, you only need to sample at a frequency of exactly twice the maximum you expect to find. So for an audio track, 2 times 20000 Hz = 40000 times per second that we sample the sound. It is typically a bit higher for various technical reasons, hence why 44100 Hz and 48000 Hz sample frequencies are common.

So if you want to record exactly 69 seconds of audio, you need 69 seconds × 44100 [samples / second] = 3,042,900 samples. Assuming space is not a premium and you store the file with zero compression, each sample is stored as a number in your computer’s memory. The samples need to be stored in order.

To reproduce the sound in the real world, we feed the numbers in the order at the same frequency (the sample frequency) that we recorded them at into a device that works as follows: for each number it receives, the device outputs a voltage that is proportional to the number it is fed, until the next number comes in. This is called a Digital-to-Analog Converter (DAC).

Now at this point you do have a sound, but it generally has wasteful high frequency content that can disrupt other devices. So it needs to get smoothed out with a filter. Send this voltage to your speakers (to convert it to pressure variations that vibrate your ears which converts the signal to an electrical signal that is sent to your brain) and you got sound.

Easy peazy, hundreds of pages of calculus squeezy!

could monkeys typing out code randomly exactly reproduce their exact timbre+tone+overall sound

Yes, but it is astronomically unlikely to happen before you or the monkeys die.

If you have any further questions about audio signal processing, I would be literally thrilled to answer them.

permalink
report
reply

So take my opinion with a grain of salt as I’m just a non-Blahaj user who subs to a lot of Blahaj communities, but I feel like there’s been a concerted effort to wrongly paint LinkOpensChest_wav as a transphobe all throughout Blahaj for at least a few weeks. Other than this recent set of typos, the only thing I could charitably even see as someone thinking he’s transphobic is literally that he’s not 100% stoked to vote for fucking Biden and that some shitlibs think that not voting for Biden is transphobic because everything that goes against liberalism is transphobic apparently.

Ridiculous. Hope this gets solved productively.

permalink
report
reply

I understand the last part, but I want, in my life, to at least try a career, try my hand at it. Not sure how to explain.

No I get it. I’m in the same boat, I’m still trying to get a job and I really just want to start participating in the engineering world. It’s just so hard to be allowed in.

permalink
report
parent
reply

I know it’s just a meme but I really needed this

permalink
report
reply

you might be looking up what countries you can get to with low cost of living soon.

Literally years and years ago.

permalink
report
parent
reply

I’d leave over nothing, if I could I’d get on a plane right fucking now without even saying goodbye to anyone, but I’d also be willing to flee over my $35000 and rising student loans.

permalink
report
reply