https://github.com/scottbez1/smartknob
Video demo here: https://www.youtube.com/watch?v=ip641WmY4pA&t=1s
Technically yes, but that is a serious project.
I dont have time/tools etc to do this.
I had dreamed of physical "analog" controls as a standard feature on keyboards and input devices for various applications -- would be great productivity booster for power users.
I wish this catches on and gets mass adoption.
https://universaldatasystems.org/shop/wp-content/uploads/201...
Also, online services built into these will die before the speakers do.
But speakers are something very subjective, and while I’m still delighted with the Canton I got for a discount, your ear might prefer something different. This is something where comparing in a physical store with a passionate salesperson can be worth it.
I also never had an amp fail other than by cranking it up too high with the wrong speakers.
Volume controls need to be logarithmic, not linear.
To a first degree approximation, everybody gets this wrong.
Doing this stuff well is pretty hard (e.g. designing filters that can do that kind of volume adjustment is hard because you want to be constantly adjusting them, which means you need to be super careful with your filter state) but I have heard what it sounds like, and once you hear it you get angry at all other volume controls.
The amp I'm upgrading from was interesting in this regard. In addition to the main volume knob, it had a loudness knob. The manual actually recommended keeping the volume knob fixed most of the time and using the loudness knob to set the listening level throughout the day.
From the manual:
> 1. Set the LOUDNESS control to the FLAT position.
> 2. Rotate the VOLUME control on the front panel (or press VOLUME +/– on the remote control) to set the sound output level to the loudest listening level that you would listen to.
> 3. Rotate the LOUDNESS control counterclockwise until the desired volume is obtained.
They let me set the maximum volume (about 50% of actual max). The increments in iOS then get smaller.
With that system, I could set the amplifier’s analog volume knob such that the max volume out of the streamer corresponded to my actual maximum preferred listening volume, giving me access to the full range of Spotify or AirPlay’s volume controls.
Assuming an analog input, this might result in a noticable quality reduction at low volumes.[1] that's why there were so many different "classes" of amps, they're all making different tradeoffs about how they're doing the amplification.
(Ignoring the additional quantization issue with a scaled digital input.)
Where this breaks down is if the analog signal path (after the DAC) consists of something noisy after the attenuator. Passive attenuation (like built into an amp, or the master fader of a mixer, etc.) won't add noise, but something active like an outboard EQ would. The attenuation to set desired max level must be completely last (before power amp) to avoid noise.
On the other hand, I use a Schiit Asgard at my desk, where I have it connected to my Mac via USB-C. In that setup, I have no control over the volume level going in to the Asgard. MacOS just disables the software volume control when I'm using that audio output.
When I was buying speakers for my apartment some time ago, I was similarly considering going for the all-in-one options like this, but I’m glad I didn’t. I prefer the “dumb passive speaker + networked amp”, as it allows you to pick / replace / upgrade the separate components. Went for the KEF LS50, and for the amp Lyngdorf TDAI-1120. And that’s despite KEF having the all-in-one active version of those speakers. Very happy with my choices!
The wireless model has significantly better bass response and sounds much better to my ear.
I actually had a fault with them recently and they stopped working, I’d bought the speakers used on ebay and even had I had a warranty they were past 5 years old by the point the fault developed. Regardless, kef repaired them entirely for free. 10/10 would buy again.
The other part is that they hugely overbuild the amplifier sections (at least by rating -- 280W for the mid-woofer and 100W for the tweeter.
Close! I moved from a "speakers + non-networked amp + streamer" setup.
I'm still running separate components for nearer-field listening at my desk, where I've got KEF Q150s powered by a small Schiit pre-amp and amp.
Why do they do this? The problem is so obvious that you'd reckon they're doing it to deliberately annoy users.
The problem doesn't stop there, the lack of gain with Bluetooth is notorious. Almost every Bluetooth device I own has insufficient gain, franky it's a damn nuisance. The audio in the two sound bars that I own is so low on some audio material that I'm thinking of pulling them apart to see if I can find an op amp and increase its feedback resistor to obtain more gain. I should NOT have to do this.
Let me give you an example, the audio levels on many YouTube videos can be all over the place. Often the audio can be 6 to 10 dB below what it ought to be, thus it's impossible to listen on a laptop's speakers, especially so when one is listening in a location where the background noise is high.
What's wrong with the designers who design this digital stuff, don't they ever use the equipment themselves?
Haven't they ever seen a traditional radio or HiFi where the volume potentiometer is off at the 7 o'clock position, 12 noon is the maximum volume with a nominal one volt input signal or a radio station that's using normal levels of modulation, and the reserve gain is the range from the noon position to the 5PM one?
Do I have to say it again? The reserve gain is for when the input signal is lower that it ought to be. The world is not ideal, audio signals can be far from ideal—even from high tech companies like Google.
Occasionally help comes along, VLC has settings that allow the gain to be set to over 100℅ but I've often had situations where even VLC hasn't had the necessary reserve.
I've come to the conclusion the designers and programmers of this digital equipment haven't a clue about how ordinary amplifiers work. Or they have never taken the trouble to find out. They just assume a 16-bit input has 65536 levels and that's the range. Full stop! They never give consideration to what happens when the peak audio input covers perhaps less than one third that range of bits.
To get enough volume I've even had to use the audio equalizer, that's when one has been available, and often there is not. To get the extra gain I slide all sliders to maximum. Having to do this frequently is an ergonomic nightmare.
This is what happens when the arrogant digital world is too prowd to take a leaf out of the analog world—the world that managed to get these issues right about a century or more ago.
So they don't damage users' speakers, their hearing, or generally cause annoyance.
> They just assume a 16-bit input has 65536 levels and that's the range. Full stop! They never give consideration to what happens when the peak audio input covers perhaps less than one third that range of bits.
1/3 of 65536 is still +-11,000 voltage levels, or 14.4 bits of information. That's a really good place for a signal to be! It leaves a bit (literally) of room for the peaks without clipping.
Now if you meant 1/3 of 16 bits = 5.3 bits of information, that is indeed a poorly recorded signal. +-20 voltage levels. It's going to sound terrible whether you boost it digitally or analogly. (is that a word?)
Damage speakers? Simply, not an issue unless they're one step removed from rubbish. Also, have you ever heard of output compression and clipping that would protect them? That approach is 101 electronics.
Hearing is not an issue as they're driven by flea power (they're not headphones). Even hearing these pissy little speakers when running flat out is difficult enough. And my hearing is fine.
And where are the regulations that specify a maximum sound level rating for laptops?
By comparison, my 4.5 x 2.5" palm-size Sony transistor radio type ICF-510MK2 (which I'm currently holding in my hand) not only has stacks and stacks of gain on very low level audio (I've never needed to turn the volume up past halfway), and it simply blows my expensive Lenovo laptop away when it comes to maximum output level (I've no trouble hearing it several rooms away). There are no regulations covering how loud it sounds. OK, I've now given everyone a reference device for comparison. I'd put it up against any laptop I've heard in recent times and it'd win hands down every time. BTW, I only paid $9 for it but that was a few years back.
You're right about the bits, it was a throwaway figurative comment to make a point.
I cannot understand why so many people come to the defence of poor ratshit design. My expensive Lenovo laptop, like my Dell laptop, are not fit for purpose when it comes to the audio subsystem. If I can't hear it on a nominal range of audio signals such as those mentioned from Google then, by definition, they're not fit for purpose.
The same nonsense has been wheeled out in recent days in defense of Microsoft's BSOD/crash. As I said on another post that Dark Ages Windows OS ought to be ditched or rewritten (once running, BSODs should never occur unless there's a hardware fault no matter what's loaded into the kernel). If it goes belly-up then it's bad design, QED.
Why defend the indefeasible? That people do and don't complain is why our lives are surrounded by so much shitty partially-functioning tech.
I'd add that in addition to the two Windows laptops mentioned in my reply to the above post, I've also a Toshiba laptop that's running Linux, it's audio hardware is so shitty that it can't be rectified by Linux. Not only is it's audio output low but its crummy little speakers sound terrible. Linux, which I love, sometimes is only part of the solution
In reality though, this project is more about the fun of it than about it being a really pressing need.
There's a reason why local web applications aren't a collection of HTML and JS files, and are instead full copies of the Chromium browser.
Imagine double-clicking a malicious page.html and suddenly your entire Documents folder can be fetched and manipulated by JavaScript. Yikes.
But to your latter point, yeah, there’s no reason sandboxed web apps couldn’t be given better file:// permissions.
Hope this person segmented this device away from other devices. The lack of basic security in the IoT space is astounding to me.
https://jamesbvaughan.com/volume-controller-1/basic-web-inte...
This is really concerning
Is the sound quality better when not approaching to maximum volume?
- a larger enclosed volume produces lower frequencies more efficiently
- a larger Xmax (range of motion) on a conventional driver produces louder sound
- a smaller Xmax produces less distortion
- a larger driver area produces louder sound
- a larger driver area can produce more distortion unless the engineering compensates for that, which usually involves more expense in materials and assembly
- the more efficiently coupled a driver is with the room air, the less distortion results
- there are several ways to improve the coupling of a driver to the room air, all of which increase one or more of cost or complexity or size
- larger and/or more complex cabinets cost more than smaller and simpler ones
- adding drivers to a speaker increases complexity
If we had perfect materials, we might build a single driver speaker made of infinitely stiff material of zero mass that accelerates/decelerates infinitely quickly in response to exactly enough power to overcome air pressure, and the parameters we would still have to tweak would be size (to control maximum sound pressure level) and whether we wanted to place it in front of an infinitely sound-absorbing back wall (to change it from an omnidirectional source to a cardioid source).
We don't have any of those things, so for a given budget of price, size, parts availability and complexity we need to make tradeoffs to get to our targets for loudness and quality; not all targets can be reached from a given constraint.
TL;DR: yes.
This works because function.toString() in modern runtimes gives you back fully parse-able input source.
You need to make sure you don’t reference anything outside the function, but it’s generally nicer overall than JS-in-string.
Then you treat it as an IIFE. Example:
function globalJS() { document.write('hi') }
const html = `<script>(${globalJS})()</script>`
I use this technique for calling AppleScript-flavored-JS from NodeJS too.Overall a nice technique!
TIL - that is good to know. I'll probably leave the post as-is but I will use that in the future.
Weird you can't limit digital output. I also listen mostly at low volumes and have the same issue. Part of the reason I chose Sonos is this is built in across all products, alongside an effective loudness toggle. This has been particularly helpful with some little Genelec 8010s I use as desktop speakers plugged into a Sonos Port.
The only issue I agree is truly serious is the latest release draining battery on iOS with or without background activity disabled. That’s a real bad bug to introduce and I’m surprised it hasn’t been fixed yet.
A rotary knob with an integrated esp32.
https://shop.m5stack.com/products/m5stack-dial-esp32-s3-smar...
My favorite "smart" speaker in the house is a very old (~20 years) Altec Lansing 2.1 speaker kit that has a (sadly now discontinued) Chromecast audio plugged into it's headphone in.
Edit: found this which looks to fit the bill - https://github.com/balena-io-experimental/balena-sound
The kid in me thinks there could also be a way perhaps to transmit audio through this (or another) API? (very low chance, but…)
edit: fixed
I dug into the API similarities between the speakers more and it seems like they're both using this software called StreamSDK [1]. I hadn't heard of that and it's given me more to research on these.
Your Father and Mother must be very proud of you.
I've got a very comfy and intentionally positioned chair on the other side of the room for that.
// Yes, this is JavaScript embedded in HTML embedded in TypeScript.
// I only recently learned that you can reference elements by ID this way.
// It's kind of horrible but also I love it on tiny pages like this.
You have to kind of embrace the duality of every moment. -Spencer DinwiddieAlthough I don't use USB for audio (rather buggy) the control interface works perfectly.
I duly created a websockets API that allows me to remotely control the volume over wifi via a phsyical rotary controller. Allows me to conceal all the hifi equipment in a cupboard upstairs but remotely control it from a knob downstairs in the kitchen.
Like the OP I also implemented volume limits to prevent accidental damage to the speakers (primarily from twiddles by little fingers)....works a treat!
So, instead of using the Spotify alexa skill, I have to use my phone and connect it via bluetooth, so I can turn down the volume on my phone in addition to using the quietest volume on the Echo.
Sonos volume control remains broken in their new (forced) app update, “reasonable control” on the roadmap for two months out
BOM: a halfway nice powered speaker with an integral amp and a single board computer. mount the sbc onto the speaker. then use a audio server to ship the sound around. I am a huge obsd fanboy so I would use sndiod but the linux ones(pipewire?) would probably be better for the task.
The main thing stopping me from doing it is that it turns out I dislike dumping sound into the atmosphere, nothing wrong with it, I just don't enjoy blasting music. so I just stick to my headphones, and think about it once in a while.
Marty DiBergi: Oh, I see. And most amps go up to ten?
Nigel Tufnel: Exactly.
Marty DiBergi: Does that mean it's louder? Is it any louder?
Nigel Tufnel: Well, it's one louder, isn't it? It's not ten. You see, most blokes, you know, will be playing at ten. You're on ten here, all the way up, all the way up, all the way up, you're on ten on your guitar. Where can you go from there? Where?
Marty DiBergi: I don't know.
Nigel Tufnel: Nowhere. Exactly. What we do is, if we need that extra push over the cliff, you know what we do?
Marty DiBergi: Put it up to eleven.
Nigel Tufnel: Eleven. Exactly. One louder.
Marty DiBergi: Why don't you just make ten louder and make ten be the top number and make that a little louder?
Nigel Tufnel: [pause] These go to eleven.
- This Is Spinal Tap (1984)