Mangling Images With Audio Effects

Ever wonder what those snapshots you took of your trip to Paris would look like if you ran them through a Proco RAT or a Boss Overdrive? How about a BF-3 flanger? [Robert Foss] wrote in with this nifty little script (GitHub) that processes images as if they were audio files so that you can try it out without investing in a rack of analog pedals. Test your audio/visual DSP intuition and see if you can name the images without looking at the effects.

If you know your Linux command-line utilities, there’s really not much to it — scroll down to the very bottom of the script to see how it’s done. ffmpeg converts the images to YUV format, which works much better than RGB for audio processing, and then sox adds the audio effects. Another trip through ffmpeg gets you back to an image or video.

OK, it’s cheating because it’s applying the audio effects inside the computer, but nothing’s stopping you from actually taking the audio out and running it through that dusty Small Stone. Of course, once you’ve got audio outside of the computer, the world is your oyster. Relive the glorious 70’s when video artists made works using souped-up audio synthesizers. If you haven’t seen the Sandin Image Processor or the Scanimate in action, you’ve got some YouTubing to do.

Gain Access To Science Two Ways

Not a hack, but something we’ve been wanting to see forever is open access to all scientific publications. If we can soapbox for a few seconds, it’s a crying shame that most academic science research is funded by public money, and then we’re required to pay for it again in the form of journal subscriptions or online payments if we want to read it. We don’t like science being hidden behind a paywall, and neither do the scientists whose work is hidden from wider view.

Here are two heartening developments: Unpaywall is a browser extension that automates the search for pre-press versions of a journal article, and the Bill and Melinda Gates Foundation are denying rights to research that it has funded if the resulting publications aren’t free and open.

The concept of “publishing” pre-print versions of academic papers before publication is actually older than the World Wide Web — the first versions of what would become arXiv.org shared LaTeX version of physics papers and ran on FTP and Gohper. The idea is that by pushing out a first version of the work, a scientist can get early feedback and lay claim to interesting discoveries prior to going through the long publication process. Pre-prints are available in many other fields now, and all that’s left for you to do is search for them. Unpaywall searches for you.

Needless to say, this stands to take a chunk out of the pocketbooks of scientific publishers. (Whether this matters in comparison to the large fees that they charge libraries, universities, and other institutional subscribers is open to speculation.) The top-tier journals — Nature, Science, the New England Journal of Medicine, and others — have been reluctant to offer open access, so brilliant scientists are faced with the choice of making their work openly available or publishing in a prestigious journal, which is good for their career.

In a step to change the status quo, the Bill and Melinda Gates Foundation took their ball and went home; research funded with their money has to be open-access, period. We think that’s a laudable development, and assuming that the foundation funds quality research, the top-tier journals will be losing out unless they cooperate.

To be fair to the journal publishers, many journals are open-access or have open-access options available. The situation today is a lot better than it was even five years ago. But if we had a dime for every time we try to research some scientific paper and ran into a paywall, we wouldn’t be reduced to hawking snazzy t-shirts.

Thanks [acs] for the tip!

High Vacuum With Mercury And Glassware

If you want to build your own vacuum tubes, whether amplifying, Nixie or cathode-ray, you’re going to need a vacuum. It’s in the name, after all. For a few thousand bucks, you can probably pick up a used turbo-molecular pump. But how did they make high vacuums back in the day? How did Edison evacuate his light bulbs?

Strangely enough, you could do worse than turn to YouTube for the answer: [Cody] demonstrates building a Sprengel vacuum pump (video embedded below). As tipster [BrightBlueJim] wrote us, this project has everything: high vacuum, home-made torch glassware, and large quantities of toxic heavy metals. (Somehow [Jim] missed out on the high-voltage from the static electricity generated by sliding mercury down glass tubes for days on end.)

Continue reading “High Vacuum With Mercury And Glassware”

Say It With Me: Root-Mean-Square

If you measure a DC voltage, and want to get some idea of how “big” it is over time, it’s pretty easy: just take a number of measurements and take the average. If you’re interested in the average power over the same timeframe, it’s likely to be pretty close (though not identical) to the same answer you’d get if you calculated the power using the average voltage instead of calculating instantaneous power and averaging. DC voltages don’t move around that much.

Try the same trick with an AC voltage, and you get zero, or something nearby. Why? With an AC waveform, the positive voltage excursions cancel out the negative ones. You’d get the same result if the flip were switched off. Clearly, a simple average isn’t capturing what we think of as “size” in an AC waveform; we need a new concept of “size”. Enter root-mean-square (RMS) voltage.

To calculate the RMS voltage, you take a number of voltage readings, square them, add them all together, and then divide by the number of entries in the average before taking the square root: \sqrt{\frac{1}{n} \left(v_1^2 + v_2^2 +...+ v_n^2\right)} . The rationale behind this strange averaging procedure is that the resulting number can be used in calculating average power for AC waveforms through simple multiplication as you would for DC voltages. If that answer isn’t entirely satisfying to you, read on. Hopefully we’ll help it make a little more sense.

Continue reading “Say It With Me: Root-Mean-Square”

DIY DynDNS With ESP8266 And Dweets

You’re on a home router, and your IP address keeps changing. Instead of paying a little bit extra for a static IP address (and becoming a grownup member of the Internet) there are many services that let you push your current IP out to the rest of the world dynamically. But most of them involve paying money or spending time reading advertisements. Who has either money or time?!

[Alberto Ricci Bitti] cobbled together a few free services and an ESP8266 module to make a device that occasionally pushes its external IP address out to a web-based “dweet” service. The skinny: an ESP8266 gets its external IP address from ipify.org and pushes it by “dweet” to a web-based data store. Freeboard reads the “dweet” and posts the resulting link in a nice format.

Every part of this short chain of software services could be replaced easily enough with anything else. We cobbled together our own similar solution, literally in the previous century, back when we were on dialup. But [Alberto R B]’s solution is quick and easy, and uses no fewer than three (3!) cloud services ending in .io. Add an ESP8266 to the WiFi network that you’d like to expose, and you’re done.

Hackaday Trims Its Own Resistors

There are times when you might want an odd-value resistor. Rather than run out to the store to buy a 3,140 Ω resistor, you can get there with a good ohmmeter and a willingness to solder things in series and parallel. But when you want a precise resistor value, and you want many of them, Frankensteining many resistors together over and over is a poor solution.

Something like an 8-bit R-2R resistor-ladder DAC, for instance, requires seventeen resistors of two values in better than 0.4% precision. That’s just not something I have on hand, and the series/parallel approach will get tiresome fast.

Ages ago, I had read about trimming resistors by hand, but had assumed that it was the domain of the madman. On the other hand, this is Hackaday; I had some time and a file. Could I trim and match resistors to within half a percent? Read on to find out.

Continue reading “Hackaday Trims Its Own Resistors”

Everyone Loves Faster ESP8266 TFT Libs

Reader [Jasper] writes in with glowing praise for the TFT_eSPI library for the ESP8266 and the various cheap 480×320 TFT displays (ILI9341, ILI9163, ST7735, S6D02A1, etc.) that support SPI mode. It’s a drop-in replacement for the Adafruit GFX and driver libraries, so you don’t need to rework your code to take advantage of it. If you’re looking to drive an LCD screen with an ESP8266 and Arduino, check this out for sure.

As a testbed, [Jasper] ported his Tick Tock Timer project over to the new library. He got a sevenfold increase in draw speed, going from 500 ms to 76 ms. That’s the difference between a refresh that’s visibly slow, and one that looks like it happens instantly. Sweet.

Improving software infrastructure isn’t one of the sexiest or most visible hacks, but it can touch the lives of many hackers. How many projects have we featured with an ESP8266 and a screen? Thanks, [Bodmer] for the good work, and [Jasper] for bringing it to our attention.