Interesting for audio nerds: Windows actually has an audio limiter. If you playback audio via loopback shared WASAPI, DirectSound or MME it actually gets compressed very slightly as it nears the peaks. The same does not happen via WASAPI exlcusive or ASIO.
Playing loudly mastered audio out of your PC will be very slightly different from the true audio source by about -0.1dbps with the compressor affecting the peaks.
It works via audiodg.exe (CAudioLimiter in AudioEng.dlll) on the shared-mode render path after all the streams get mixed, even if there's just one playing currently. This is necessary because two loud signals being mixed together might clip your DAC and that sounds nasty, so it's understandable that it's there.
Why would you care though? I was building a audio metering system to monitor audio via loopback and the properties of the audio I played in were being modified by the limiter in these normal modes. Maybe audio purists might not enjoy it either.
> Playing loudly mastered audio out of your PC will be very slightly different from the true audio source by about -0.1dbps with the compressor affecting the peaks.
I've never had a setup where I would take my windows mixer output to 100%. I put the desired gain in the downstream amplification, not in the source. Maxing out your DSP chain because your speakers are insensitive is better addressed at the amplifier.
I always kept the software mixer at 100% (ie, unity) because when I've already paid for all 16 bits, it is my intent to keep each and every one of them available for use.
I then ran the volume up and down with a knob on the preamp.
It worked exactly the same as it would if I were playing a compact disc in a regular standalone audio CD player.
This is it. You want to keep the full levels up until the moment you don't want to use them anymore.
For those with a math background but not electronic music experience:
You're doing arithmetic with ints. Suppose you have an 8-bit volume range between 0..255. You cut the volume in half by dividing by 2, rounding down. Now your range is 0..127. Then you want to double the volume again, so you multiply everything by 2 again. But now your range is 0..254 (not 255), and you only have the even numbers. That series of samples you took like [125, 126, 127, 128, 129]? Now it's [124, 126, 126, 128, 128]. You'll never get those original values back. You can't. They're lost.
So instead, you keep that full range up until you get to the speakers, and then you cut the volume down at that point. When you turn it back up, you have the full range of values again.
It's almost exactly the same for analog gear, too. In general, you always want to run your pre-amplifier stages as close to maximum as possible without actually maxing them out. (If you do, your guitars sound great and distorted, but almost everything else just sounds bad.) If you start with a CD-quality signal at nearly full strength up until the amps, the output will sound crystal clear. But if your input signals are turned way down, and you have to crank the amps to bring everything up to the desired volume, you'll end up amplifying all the hiss and other background noise, too.
This is true for integer sample processing, but my impression was that it's much more common to do software mixing in 32-bit float across the board these days; technically you still want to avoid an unnecessary profusion of gain multiplications both because of the unnecessary CPU work and because there's still some rounding error accumulation, but you don't hard-lose relative precision in the same way, right?
We can do all the math in 32-bit floats, sure, and there's enough dynamic range therein to contain every sound that man has ever experienced -- from things that are too quiet to discern, to pressures so intense that they're incompatible with life.
But we don't usually[1] listen to 32-bit floats. We have an output stage after we're done with the math that consists of a DAC, and this DAC historically (for the past 30 years or so) has resolution of just 16 or 24 bits of linear PCM.
[1]: There are some outboard DACs and pro audio interfaces that accept 32-bit floats and convert that to analog, but...
That should be the case, but AFAIK there are still lots of integer units between here and there. That's especially likely if there are any external USB devices involved. For example, while it's been a while since I looked, last I checked a lot of outboard digital-to-audio converters (aka DACs) used 16-bit integers.
There's only one reason someone like you (or me, with a low end professional recording studio setup) would set the digital volume below 100%, and that's if the sound card is running at a higher bit depth than the audio being played back, for instance listening to CD audio when the sound card is at 24 bits, or watching a 24-bit audio dvd/blu-ray with the sound card running at 32 bits
As long as the final output's range covers at least 16 bits, it matters not in the slightest if the source was 32 bit and the chain was 24.
24 bits is enough to record a grasshopper next to a jackhammer. 32 bits is enough to record that same grasshopper next to spacex's superheavy starship booster during liftoff.
The only reason to have more than 16 bits is to permit software processing (including volume control) without quality loss.
Curiously, my Sound Blaster ZxR creates distortion when Windows master mixer volume is above 80%. It took me a while to figure out that this setting was the culprit. After installing Creative drivers, volume is automatically set to 80%, so I assumed that this is the real 0.0dB for the Sound Blaster. I didn't see it documented anywhere, though, and never dug into it deeper.
Yes, this is bullshit for people like us. When I had 4 10" KRKs for a sound system, the last thing I could have wanted is this, marketing drones having decisions on what I get to hear.
My current "sound card" accepts 24-bit PCM audio (over USB or Dante or whatever), processes it in hardware as 32-bit floats, and emits 24-bit PCM audio (which is ultimately converted to analog for driving power amplifiers directly).
The physical volume control is a single-track potentiometer connected to GPIO that digitizes its value. Gain/attenuation is thus adjusted in DSP-land.
I don't have to care as much anymore -- I get all 16 original bits worth of dynamic range through that pipeline just fine, without truncation. (But even though I don't care, the software mixer in the PC is still set to 100% and this never gets adjusted at all.)
It's kind of in the name. When an application wants to be mixed with sounds played by other applications, it opens the audio API in shared mode. When it wants exclusive access to the audio hardware (maybe some kind of professional audio scenario), it opens in exclusive mode.
As with many things in life, the absolutists always seem to get the airtime. You don’t need to 100% use AI or 100% condemn it. It’s possible to think for yourself on the fun or interesting things and also use AI for the boilerplate.
Agreed. But I also think it's possible to simultaneously hold multiple, conflicting ideas and still exist on earth. This idea of 100% this or that is extremism.
1. A memorandum is not a treaty, in international law it's equivalent to a note, it's non binding.
2. No point of the Budapest Memorandum implied that the signatories had to defend Ukraine.
Paragraph 4 essentially states that signatories have seek UN Security Council action if Ukraine became the victim of aggression or a threat of aggression involving nuclear weapons.
Ukraine isn't victim of aggression involving nuclear weapons, and even if it was, the signatories merely said they would escalate the matter to UN's security council.
Another paragraph had signatories (China, France, US, Russia, UK) to refrain from using force against Ukraine. Russia has violated this point.
And you seriously believe that if Russia had stated their intention to invade Ukraine that they would have given up their nukes under this 'note'?
All this lawyering-after-the-fact ignores that if what you say is true then Ukraine got screwed over, both by Russia and by the other signatories of that 'note'.
So, the normal response of other parties to such an agreement would be to ensure that all signatories stick to the agreement. Since the only party that conceivably could break it was Russia I'm pretty sure that that was taken into account when the agreement was signed, anything else would be stupendously naive.
The end result of this is that non-proliferation is dead, and that is a net negative for the whole world.
> Ukraine got screwed over, both by Russia and by the other signatories of that 'note'
Ukraine had no alternative.
We have various analyses in the National Security Archives, reports and memoirs from US diplomats involved in the matter: the US was the primary actor that pressured Ukraine in giving up their nuclear stock pile.
Ukraine could not operate it (everything from security, cryptography, controls, navigations, etc was in Moscow anyway), could not maintain it, and could not even guard their stock pile.
The biggest risk for the United States was that with the rampant corruption and sell off of soviet weaponry on the black market there were the wrong incentives for too many actors that could bring soviet nuclear weapons in the hands of bad actors.
And we pay them back by restricting their access to weaponry, fight with one arm tied behind their backs against a much larger invader (notably: signatory to that memorandum) and on top of that use them as scapegoat for the effects of conflicts caused by others.
This was really interesting and a lot to get done in a short internship, nevermind the public retrospective and hackernews appearance. Well done Kavish!
Woot!? The project website link in the repository leads to Blamstrain's bandcamp - that's Juho Hietala, a Finnish musician whose album "Disfold" is among top ambient / dub techno albums of all times for me, in line with Fluxion - Vibrant Forms I/II, G.R.I.T. - Expanse and Yagya - Will I Dream During The Process?
Now, he also turns out to be a programmer, which I didn't know, and that he ported a clone of my fondly beloved FT2 to a VST plugin is just such a double hit!
Juho, if you happen to read this - thank you so much, man!!
Yes, this and "belt-and-suspenders" are the ones that I notice the most. I also have non-native English speaking coworkers who have started using these terms/phrases recently, which makes me think that they're outsourcing all their writing.
It’s a common metaphor for merging a branch to the trunk. Probably because multiple in-flight development branches create a sort of air traffic control problem.
and fusion (e.g. f g h x has no intermediates e.g. mutates in place) is new
as is compute on compressed vectors (very helpful performance unlock) https://lv1.sh/blog/compute-on-compressed/
[1] seems to have the actual details on compressed vectors. looks like for each page you're storing min&max, and the values come as offsets from the min (smaller->less bits per value), did I get that right?
simple example at https://lv1.sh/blog/compute-on-compressed/
But in general compression is reducing the bit width of the input through an encoder (FOR or Frame of Reference is an old and good example). So we store the base in an offset location then the large payload is a much smaller size. E.g. i64 can goto i16. Then simd gets more #'s per cycle on the smaller, and the base is added to the scratch in stack (for sum). avg is similar (since it is just sum / count)
Playing loudly mastered audio out of your PC will be very slightly different from the true audio source by about -0.1dbps with the compressor affecting the peaks.
It works via audiodg.exe (CAudioLimiter in AudioEng.dlll) on the shared-mode render path after all the streams get mixed, even if there's just one playing currently. This is necessary because two loud signals being mixed together might clip your DAC and that sounds nasty, so it's understandable that it's there.
Why would you care though? I was building a audio metering system to monitor audio via loopback and the properties of the audio I played in were being modified by the limiter in these normal modes. Maybe audio purists might not enjoy it either.
reply