Learning Materials for getting into Windows 3.1 programming

As with my other recent post (Learning Materials for getting into C programming for MS-DOS/PC-DOS/DR-DOS/FreeDOS), I’m also gearing up to do the Windows 3.1 hobby programming I wanted to do as a kid but couldn’t, and that means collecting learning resources for that too.

NOTE: I haven’t managed to research the intermediate and advanced materials as thoroughly as for DOS yet, so suggestions are welcome.

C Programming itself
As with DOS programming, I don’t want to recommend the books I just happened to use. Any book should do.
Segmented memory models in C, linked lists, hash tables, and the trade-offs therein
Win16 adds more to memory management on top of what’s available in DOS, but it’s fundamentally still just real-mode C or C++ programming, so start by learning the same things.
Borrow Microsoft C: Secrets, Shortcuts, and Solutions by Kris Jamsa from the Internet Archive’s book library and read chapters 25 (Dynamic Memory Allocation) and 28 (Understanding Memory Models) and borrow Advanced Turbo C by Herbert Schildt and read Chapter 3 (Dynamic Allocation) and Appendix A (Turbo C Memory Models).  (I didn’t find either to communicate the relevant ideas ideally, but seeing the same thing explained by two different people really helps.)

Alternatively, Schildt’s Advanced C, Second Edition from the following year appears to have all the same content in the relevant sections as Advanced Turbo C does. (The first edition spends less time on those topics and I didn’t see a section on memory models in it, so I advise only consulting it if you want a dead-tree edition and can’t find any of the other suggestions from Schildt cheaply.)

See also the Special Pointer Types for Open Watcom C/16 section of the Open Watcom 2.0 C Language Reference once you’ve had things start to click.
If you want to buy just one book, buy one of the books by Schildt. Jamsa’s phrasing on memory models was a bit more illuminating for me, but Schildt’s no slouch there and he goes into much more detail on data structures, including implementing and comparing the strengths and weaknesses of three different ways to implement sparse arrays.
Windows 3.1 Application Quick Start
Read Building Win16 GUI Applications in C by Transmission Zero. It’s a quick online article/post that goes through how to produce the working skeleton of a Windows 3.1 application using a 16-bit Microsoft C Compiler but explicitly points out Open Watcom C/C++ as one of example of the any other compilers with the “necessary headers and libraries for Win16 development” that should work too.
Beginner Windows 3.1 Programming
Programming Windows 3.1 by Charles Petzold is apparently considered the gold standard for an introduction to Windows 3.1 programming. Thankfully, it’s available in the Internet Archive’s lending library and, thankfully, Mr. Petzold still offers a download of the companion floppy on the old version of his website.
In the event that you can’t use that for some reason, another one which the Watcom manuals suggest, which isn’t in the Internet Archive’s collection is Windows Programming Primer Plus by Jim Conger from Waite Group Press. It’s not in the Internet Archive’s collection as far as I can tell, so you’d have to turn to WorldCat or AbeBooks for that one.
Windows 3.1 API Reference
If you’re using Open Watcom C/C++, then you won’t have the advantage of Microsoft’s Windows API documentation.
Their manuals recommend buying the Windows API Bible (Windows 3.0 APIs) and the Windows API New Testament (Windows 3.1 API additions) by James L. Conger from Waite Group Press… both of which are also in the Internet Archive’s lending library.
Intermediate Skills
This is where things get hazy. Historically, people tended to learn about this sort of thing through journals like Dr. Dobb’s Journal, The Windows Programmer’s Journal, and so on. There are also some journal issues included on the MSDN Library Archive CD that you could get as an option from Microsoft back in the Windows 9x era and install using the CD key from the corresponding release of the regular MSDN library disc. However, those don’t turn up very often on eBay.
That said, for a less involved way to start moving beyond beginner materials, my searches turned up a book named The Windows Programming Puzzle Book by Kim Crouse… and, yes, that is another link to the Internet Archive’s lending library. To put it simply, the first third of it is a set of questions, programming challenges, and buggy programs to be fixed, and the latter two thirds are answers, including explanations for why they’re the answer.
As for DDE references, I ran across a piece of advice in Dino Esposito’s Visual C++ Windows Shell Programming which recommends the documentation included with the Microsoft Internet Client SDKs as the best place for information on DDE… which I believe are the files archived here.
Advanced Stuff
Funny enough, the advanced stuff was easier for me to find, because there are good resources in the same series as Undocumented DOS and The Undocumented PC, which I already had. Specifically, Undocumented Windows by Andrew Schulman, David Maxey, and Matt Pietrek and Windows Internals by Matt Pietrek, both available in the Internet Archive’s lending library.

See Also: Useful Info On Win16-Targeting Compilers… And a List of DOS/Win16 Resources

A Note on Convenience Over Openness

If you find writing a Windows 3.1 application in C or C++ too daunting and your primary goal is solving your own problems conveniently with no concern for making available open-source code for anyone to contribute to, there are options which are generally much easier than C or C++, but require buying proprietary software.

Suggestion 1: Borland Delphi 1.x

My first recommendation would be to search eBay for a copy of Borland Delphi 1.x on CD (either on its own or included on the CDs for Delphi 2.x through 4.x to support 16-bit development.).

It produces fast, self-contained EXEs and, for the kinds of tasks taught by Petzold in Programming Windows 3.1, it’s stupid simple.

(Having never used it before, I was able to create a “mirror a text field’s contents in a label” application in five minutes, just by dragging a couple of controls into the dialog builder that it opens into, double-clicking the text field to open up the Edit1Change handler, tentatively typing Label1.Text = Edit1.Value into it, pressing F9 (Run) to get an error message telling me my guess was wrong, and then selecting identifiers and pressing F1 or choosing “Topic Search” from the context menu to discover that it should be Label1.Caption := Edit1.Text.)

Seriously. Delphi is a ridiculously polished way to quickly whip up a GUI application, even for 2023, let alone for 1993.

Suggestion 2: Visual Basic 4 or lower

My second choice would be Microsoft Visual Basic 1, 2, 3, or 4.

It’ll be harder to find copies on eBay, they’ll probably cost more, the resulting binaries won’t run as fast, it doesn’t produce self-contained single-file executables, the IDE-Help integration can’t automatically resolve an identifier’s name to the corresponding widget’s documentation, CD-ROM versions of anything older than Visual Basic 4 are practically unobtanium, and Visual Basic 4 splits binaries across many more files than Visual Basic 3… but its ease of use is comparable to Delphi and I was still able to make the same test app in under 5 minutes when I haven’t touched BASIC of any kind in over 20 years.

Visual Basic 3 is generally agreed to be the best version for Windows 3.1 development.

Suggestion 3: WinBatch

If something more like AutoHotKey for Windows 3.1 would meet your needs, go grab a copy of the trial version of WinBatch 4.0L from the Internet Archive and see if it does what you want.

If so, go to the WinBatch website and buy a copy. They explicitly say “Support for Windows XP, Vista, 7, 8, 8.1, 10, 11, 2003, 2008, 2012, 2016, 2019, and 2022. Older versions are available for 95, 98, ME, NT, 2000, and even Windows 3.1”.

Posted in Retrocomputing | Leave a comment

Learning Materials for getting into C programming for MS-DOS/PC-DOS/DR-DOS/FreeDOS

For a while now, I’ve been wanting to get into some DOS hobby programming using Open Watcom C/C++ (or maybe gcc-ia16), but, given that DOS programming was on the wane before the Internet came around, and my childhood programming stuff is either for BASIC or a copy of Microsoft C/C++ 7.0 with reference manuals but no tutorials, that was proving kind of difficult.

However, recently, I was clued into the fact that there are actually some pretty good books I could borrow for free on the Internet Archive as a way to either determine that I wanted to buy them, or just read those crucial few pages that would make other resources make sense in the mind of a more modern programmer… so here’s what I’ve found so far:

C Programming itself
Literally any decent learning materials will do, so I don’t want to recommend the books I just happened to use.
Segmented memory models in C, linked lists, hash tables, and the trade-offs therein
Borrow Microsoft C: Secrets, Shortcuts, and Solutions by Kris Jamsa from the Internet Archive’s book library and read chapters 25 (Dynamic Memory Allocation) and 28 (Understanding Memory Models) and borrow Advanced Turbo C by Herbert Schildt and read Chapter 3 (Dynamic Allocation) and Appendix A (Turbo C Memory Models).  (I didn’t find either to communicate the relevant ideas ideally, but seeing the same thing explained by two different people really helps.)

Alternatively, Schildt’s Advanced C, Second Edition from the following year appears to have all the same content in the relevant sections as Advanced Turbo C does. (The first edition spends less time on those topics and I didn’t see a section on memory models in it, so I advise only consulting it if you want a dead-tree edition and can’t find any of the other suggestions from Schildt cheaply.)

See also the Special Pointer Types for Open Watcom C/16 section of the Open Watcom 2.0 C Language Reference once you’ve had things start to click.
If you want to buy just one book, buy one of the books by Schildt. Jamsa’s phrasing on memory models was a bit more illuminating for me, but Schildt’s no slouch there and he goes into much more detail on data structures, including implementing and comparing the strengths and weaknesses of three different ways to implement sparse arrays.
Using VGA’s 640x480x16color planar graphics mode
Borrow or buy Richard F. Ferraro’s Programmer’s Guide to the EGA and VGA Cards, Second Edition or Third Edition (Internet Archive links) or, if you want nicer illustrations and only need a brief introduction to EGA/VGA planar video rather than an entire book about DOS graphics, borrow The Waite Group’s Microsoft C programming For The PC, Second Edition by Robert Lafore and read chapter 11 (Direct-Access Graphics).
If you want to buy something, go for the second edition of Ferraro’s book. It’ll get you 500 pages on EGA and VGA and 500 pages on SVGA, including VESA and model-specific extensions offered by cards like the ATi VGA Wonder and the Tseng ET4000. The third edition is rarer and more expensive, has cover art that, in my opinion, has aged much more poorly, and what you’re paying for is having twice as many vendors covered in the part of the book about how to use model-specific SVGA stuff not covered by VESA… but, if you’ve got the cash and you’re going to be writing enough demoscene code for things like the XGA, the 8514/A, or S3 SVGA cards, the third edition may be worth buying.
See also chapter 2 (Icon-Based Interfaces) of The Craft of C by Herbert Schildt.
Using 256-color linear graphics modes on VGA and reading the mouse
Read David Brackeen’s 256-Color VGA Programming in C. (It’s a free series of online tutorials with source downloads for DJGPP and “Borland C, Turbo C, etc.”)
If that’s not enough, borrow Richard F. Ferraro’s Programmer’s Guide to the EGA and VGA Cards, Second Edition or Third Edition from the Internet Archive for the video and read Chapter 9, “Interfacing to the Mouse” of Herbert Schildt’s C Power User’s Guide (alt) (apparently also sold as “The Art of C: Elegant Programming Solutions”). (Schildt also covers using the PC speaker.)
Playing music on an Adlib-compatible sound card
Download Programming the AdLib/Sound Blaster v2.0 (A.K.A. adlf.zip) from the Internet Archive. (local copy)
Playing digital audio on a SoundBlaster-compatible sound card
Download SoundBlaster Programming Information v0.90 (local copy), Soundblaster programming routines (C++ src) (utility code under MIT-like license terms) (local copy), and Programming the SoundBlaster 16 DSP (local copy).
I’m not recommending a print book because, as far as I can tell, reverse-engineered free eBooks by hardware hackers are the only place to find info that doesn’t assume you bought the SDK from Creative Labs.
Reading from the PC Gameport
Read ePanorama.net – PC analogue joystick interface.
DOS/BIOS interrupt API reference
See Ralf Brown’s Interrupt List (alt, download).
Turbo Vision API documentation
When Borland released the source code for the C++ version of their Turbo Vision TUI library and the Free Pascal people ported it back to Pascal as Free Vision, neither released API documentation.
The recommended Borland Turbo Vision Version 2.0 Programming Guide from Turbo Pascal 7.0 is in the Internet Archive’s collection. However, the Turbo Vision Programming Guide from Turbo Pascal 6.0 is a decent runner-up if you can’t use it for some reason.
Assembly Language
I’m still working on this, but John Socha and Peter Noton’s Assembly Language for the PC, Third Edition looks like a good candidate.
Everything else I’ve been interested in about DOS programming so far
Start by borrowing The Craft of C by Herbert Schildt and The C Toolbox, Second Edition by William James Hunt from the Internet Archive’s library. (Among other things, the former covers TSRs in C, writing a rudimentary C interpreter, basic EGA graphics, interacting with the DOS mouse drivers, implementing a screen editor, and building an icon-based interface and icon and bitmap font editors while the latter covers other useful things like TUI popup windows and using the serial port.)
If you want another book that I found useful, Herbert Schildt’s C Power User’s Guide (alt) (apparently also sold as “The Art of C: Elegant Programming Solutions”) has a fair bit of useful non-overlap. Its chapters cover TUI pop-up and pull-down menus and pop-up windows, writing TSRs in C, Mode 4 (CGA) graphics including 2D rotation, basic DOS game development, using the serial port, writing a rudimentary BASIC interpreter, miscellaneous text-mode stuff like using color and changing the text cursor size, controlling the PC speaker, interacting with DOS mouse drivers, and drawing bar graphs.

Beyond that, you’re into more advanced stuff:

I hope this helps you and you may also want to check out my Useful Info On Win16-Targeting Compilers… And a List of DOS/Win16 Resources post and my similar list of learning materials for Windows 3.1.

Posted in Retrocomputing | 2 Comments

How to Hack gtk3-nocsd Into Flatpak Applications

WARNING: Use at your own risk. This is NOT a supported configuration and you’ll want to turn this off and re-test before reporting any bugs. (i.e. Report bugs gtk3-nocsd fixes, not ones it causes.)

OK, so you’ve got a desktop that’s using gtk3-nocsd and a GTK app that renders fine outside Flatpak, but does something unacceptably CSD-ish inside Flatpak. (For me, among other things, it’s non-GNOME GTK-using applications like Deluge displaying big black borders on things like context menus when KWin’s compositing is disabled.)

TIP: If it’s only the shadows on the context menus you don’t like, then it’s easier and more reliable to toss decoration, decoration:backdrop { box-shadow: none; } into your ~/.config/gtk-3.0/gtk.css.

The Flatpak developers don’t appear to see this as an issue, and not all applications have a good Qt-based counterpart, so what’s a stubborn “It’s my ****ing computer” person supposed to do?

…what about taking advantage of how Flatpak applications were already probably printing this to the terminal every time you launched them?

ERROR: ld.so: object 'libgtk3-nocsd.so.0' from LD_PRELOAD cannot be preloaded (cannot open shared object file): ignored.

Here’s how you shoe-horn your gtk3-nocsd into Flatpak without rebuilding the Flatpak Runtime or the application package:

  1. Create a folder that Flatpak isn’t going to overlay, like /gtk3-nocsd and make sure it’s got the same 0755 root:root permissions as anything else nobody but root should be able to muck in.
  2. sudo cp -p /usr/lib/x86_64-linux-gnu/libgtk3-nocsd.so.0 /gtk3-nocsd (substitute whatever path your host distro uses for the original, non-symlinked library file and note the -p to preserve the permissions and ownership. You need the sticky bit to pass certain safety checks.)
  3. Go into Flatseal or use flatpak override and grant your application filesystem access to /gtk3-nocsd:ro, then add an environment variable override to LD_PRELOAD=/gtk3-nocsd/libgtk3-nocsd.so.0

Congratulations. For better or for worse, you should now have your Flatpak’d application loading gtk3-nocsd like an un-Flatpak’d application. It seems to have solved the “big black borders on context menus with compositing disabled” issue in Deluge-GTK for me… but I make no guarantees that it’ll work for you.

You can check if it’s getting loaded by:

  1. flatpak enter <app ID> sh
  2. ps ax to get the PID of the process (probably 2 in my experience)
  3. grep nocsd /proc/<PID>/maps

In theory, you could do this in Flatseal’s “All Applications” tab, but why tempt fate. Do as I did. Apply it selectively to just the applications that exhibit problems.

I doubt the Flatpak devs will ever enable ld.so‘s secure execution mode, since it disables LD_LIBRARY_PATH, which is used in some launcher scripts to make some applications find their libraries under /app rather than /usr/lib (I had to use it to get a custom build of SDL_mixer to find libmodplug at runtime even though it found it without issue at compile time) but, if so, the next step would be to try injecting gtk3-nocsd.so.0 into /var/lib/flatpak/runtime/org.freedesktop.Platform/x86_64/<VERSION>/active/files/lib/ so it’ll show up in the list of standard paths ld.so‘s secure mode is whitelisted to.

Posted in Geek Stuff | Leave a comment

Update to Update to My Flatpak CLI Shortcut Proof of Concept

Well, it’s a bit silly, but I got nerd-sniped by how it was taking a little over six seconds to regenerate my Flatpak CLI wrappers with the shell script version I just announced yesterday, so I rewrote it in Python.

(Still the same GitHub Gist URL)

The new version completes basically instantly after the split-second pause to start the Python interpreter, thanks to using PyGObject to go straight to libflatpak so it doesn’t have to launch a whole new copy of flatpak info to query each package.

Other enhancements the rewrite brought are:

  1. Flatpak info parsing is now done using Glib.KeyFile, which is a proper parser for the format
  2. Command lines are now extracted from the .desktop files using Gio.DesktopAppInfo, but with a forced fallback to the old flatpak run generator if the upstream devs omitted --file-forwarding to ensure that things like ScummVM don’t regress in their ability to invoke them with command-line arguments.
  3. EXTRA_CMDS now takes a list of commands, so you can expose more than one secondary command from each package.
  4. CMD_REMAPPINGS Now maps from flatpak package IDs rather than internal command names so that there’s no risk of collisions if the undesired name is undesired because it’s something generic like launcher.
  5. The template for wrapper scripts is now using a proper multi-line string for easy auditing and editing.
  6. The script checks if BIN_DIR is in your path and, if not, warns you that you’ll need to add it, which has the side benefit of telling you what BIN_DIR is set to without needing to read the source.
  7. There’s now basic collision resolution where the first Flatpak package to claim a name wins and a message is printed asking you to add an entry to CMD_REMAPPINGS to resolve the problem.
  8. There’s now collision detection where, whether or not this script is responsible for both of them, a warning will be printed indicating which command from which package is colliding and whether your PATH will favour the Flatpak version or the external version.

Yeah, aside from the lack of manpages (which I can’t solve if they’re just not in the package), the sledgehammer-y approach of just expecting that it’s allowed full freedom to blow away all files inside the BIN_DIR it creates and manages, and the fact that you have to edit constants in the source code rather than an external config file, this is now about as perfect as I can think to make it… maybe I’ll rewrite it in Rust next time the mood hits me.

UPDATE: I’ll also need to add autodetection for when a Flatpak is exporting secondary launchers so EXTRA_CMDS is only necessary for things like audtool and mednafen that are present but not exported.

Posted in Geek Stuff | Leave a comment

Update to My Flatpak CLI Shortcut Proof of Concept

This morning, I finally got around to rewriting my update_nvidia helper to unbreak the whole “defer driver updates until reboot to keep the kernel module and libGL in sync” thing I have going and, this afternoon, while working on something else, I realize that anything running in Flatpak was working all along because the Flatpak devs did too good a job of detecting and supplying matching in-runtime libraries for video drivers.

Why is this relevant? Well, because I realized it while fixing something else that had been bugging me: The papercuts in my script for generating flatpak CLI launcher wrappers.

For those who missed my initial announcement, it’s a script you run after installing something through Flatpak and it generates a wrapper so you can type mpv instead of flatpak run io.mpv.Mpv in a terminal window, and it’ll even handle --file-forwarding for you so you get an experience comparable to what the XDG File Chooser portal gives you with Open/Save dialogs.

So, what did I improve? Well, here’s the features list now:

  1. Run it with no arguments and it’ll set up or update a ~/.local/bin/flatpak you can add to your PATH. (not new)
  2. Add things to the CMD_REMAPPINGS list (which comes with entries like [scummvm_wrapper]='scummvm' and ["com.github.tchx84.Flatseal"]='flatseal' pre-populated) to fix stuff it couldn’t quite get right. (NEW)
  3. Add things to the EXTRA_CMDS list (which comes with ["com.github.AmatCoder.mednaffe"]='mednafen' and ["org.atheme.audacious"]='audtool' pre-populated) and you can optionally expose a second command from inside each Flatpak. (NEW)
  4. Unsets LD_PRELOAD before launching the Flatpak application to silence spurious “Can’t find libgtk3-nocsd.so.0 in the Flatpak runtime” errors. (not new)
  5. If any arguments are valid relative paths, make them absolute to fix an annoying bug with how --file-forwarding behaves without breaking non-path arguments. (NEW)

I did have to switch from dash-compatible shell script to bash script to take advantage of proper array support, but, from what I remember, the Linux Standard Base required that /bin/bash exist, so that shouldn’t be too big a hardship.

It still doesn’t solve the problem of Flatpak’s not coming with man pages, but there’s not a lot I can do when the files just aren’t included. Aside from that, I’m very impressed at how polished this feels when I’m hacking around the Flatpak developers’ putting their foot down and declaring comfortable command-line operation to be out of scope.

Enjoy. 🙂

Posted in Geek Stuff | Leave a comment

Fanfiction – Wyvern

Wyvern by ack1308

Length: 128,724 words
Status: Ongoing

…and here’s that Worm fic I mentioned I’d be reviewing soon when I did my feature for ack1308.

In it, Taylor is a Changer with a Hulk-esque trigger she needs to learn to control.

That on its own doesn’t sound particularly special, but she turns into a fire-breathing dragon, she can’t speak English in dragon form, and she gets “I talked her into following me home. Can we keep her?”‘d by Glory Girl. (There’s also a twist I don’t want to spoil that becomes very significant later on.)

This is a heavily New Wave focused fic, both because Taylor decides to join New Wave and because it’s a story where the author recognizes that there’s a lot of wiggle room in a setting to pace and focus things the way you want.

Tonally, this starts out reminiscent of something like many Human in Equestria stories from the My Little Pony fandom, where you have a lot of time spent just enjoying the back and forth between the characters as they get to know each other and show off their personalities… including things like an “Amy comes face-to-face with a dragon” scene after she ignores the instruction to knock before entering Vicky’s room.

Through various techniques, like playing with the pacing and focusing on the moment-to-moment humanity of the characters, the fic does a good job of keeping things fairly light and fun for quite a while still acknowledging that the setting isn’t light and fun and things will turn sooner or later. (For example, the need to go back over Taylor’s trigger event or getting to see Amy comment on how doctors get paid more to do less, only to have it go nowhere.)

It also helps that, when Armsmaster does show up to try to push Taylor into the Wards, she has support from Carol in her role as a lawyer to counter his efforts.

That said, thought it happens slowly, it does build and things do escalate. Given the pacing, as of this writing, it’s not gotten that far into its story arc, but it’s still long enough to be worthwhile.

This is one of those stories where it’s hard to say a lot, because what I enjoy about it is just the overall experience. There aren’t a lot of really punchy quotes (though there is a moment when Taylor stops a criminal from trying to shoot her, and Vicky comments that “he looked exactly like a cartoon character after a bomb’s gone off in his face.”) …just the moment-to-moment story of character who are enjoyable to read about.

There’s also a twist In her powers and the villain roster that’s kind of interesting, though I’m not sure whether I enjoy it more or less than what I imagine the story could have been without it. (For those willing to accept a spoiler, Lung doesn’t exist, the ABB has a different leader, and she’s got Lung’s “scale up to the threat given enough time” thing. It’s kind of a shame that it’s a twist, because “Lung’s powers on a protagonist” has a ton of potential for a variety of reasons, including Taylor being much more body-shy than Lung, and it meshes nicely with the character-centric, generally light style.)

Looking back, it’s actually a good plot twist in the proper sense of the word. Specifically, it changes how I see the character going forward and that’s particularly elegant because it serves to help the reader follow Taylor on her journey rather than seeing more than she does from the beginning.

Carol also sets up a very satisfying sting operation against Sophia, Emma, and Madison, where you really get to savour the experience, and it’s also the most realistic one I’ve ever run across in fanfiction.

That said, after the sting operation, there’s a time skip that I’m not so sure about, given the pacing of what follows.

I’d give this maybe a 4.7 out of 5 for the stuff before the very end of chapter 18, leading into the timeskip, and the courtroom scene following that. Maybe a 4.0 for the rest of what follows, since I’m not yet confident in the author’s ability to do what they seem to be aiming for with the arrival of the Slaughterhouse Nine, and I’m reluctant to rate it too highly when I have so little data. 4.5 overall, maybe?

Before that point, it’s novel, I really enjoy the focus and writing style, and I like how it uses world-building for twists without overdoing it.

Posted in Fanfiction | 2 Comments

Noise-Reduction Tips For People Who Have Trouble Ignoring Ambient Sounds

If you have sensory processing issues, it can be difficult to get people to understand how much ambient noise weighs on your attention and stresses you out… since I’ve put a lot of work into making my environment quieter and more pleasant to listen to, I thought I’d list some of the thing that helped… in rough order from most to least likely to be something you’ll go out and do.

Self-Adhesive Felt Furniture Feet

Buy a variety pack of these. They’re one of the things I’ve used the most for all sorts of things:

  • Silencing furnace vents on tile floors which rattle when a vacuum or broom runs over them.
  • Fixing chairs that don’t sit perfectly flat and rattle when a pet jumps onto them. (To remove the dome-shaped “large thumbtack” metal feet some furniture comes with, use something like a chisel to pry them up and then pliers to pull them out.)
  • Muffling noises from things like rocking chair springs and fan motors that transfer into the floor
  • Preventing your desk from acting like an amplifier for your external hard drive’s seeking noises. (Find a piece of wood or other thing that would look nice as a platform under your hard drive and put felt feet on the bottom of it.)
  • Preventing your floor from acting like an amplifier for your pet fountain’s cheap water pump (Again, make a platform with felt feet on the bottom)

If you need to keep one thing from transferring shock or vibration to another, felt should be the first thing you turn to.

(But temper your expectations for low-frequency noises. It’s very hard to muffle those and the usual way that’s done is by specially constructing the walls, floors, and ceilings to limit how far sound can propagate in them.)

Felt feet from the dollar store are OK, but the best value for my money so far has been a Richelieu FELTAC multipack that I found at Costco.

Self-adhesive Silicone Rubber Bumpers

These little sticky rubber dots are great for areas where felt isn’t suitable, like kitchen cabinets. They’re good for:

  • Taking the sharp edge off cabinet and door closing sounds when you can’t afford those self-buffering silent-closing hinges.
  • Making your hard drive or pet fountain even quieter (Stick silicone bumpers to the underside of the device, between it and the platform you built. They may not be as effective as the felt, depending on how firm they are, but they’ll help to catch frequencies the felt isn’t as good at catching. This was inspired by how my Antec P183 computer case floats the internal hard drive mounting screws on silicone grommets.)
  • Replacing lost rubber feet on electronics

However, be aware that, even within the same “product”, they come in varying stiffnesses. (The Dollarama ones I bought were initially just right but, when I used them up and bought a new pack, I found them much stiffer.)

I advise buying several different shapes and sizes (eBay sellers are a good source), both for varying material properties and to ensure you have something that’ll fit.

If you find their adhesive to not be strong enough, pick up a roller of glue tape (not double-sided tape, the whiteout-like rollers which deposit adhesive directly on the paper without also depositing any kind of plastic or paper backing layer).

Silicone Lubricant or White Lithium Grease

I always keep a spray-can of one or both of these around. Whenever you have a squeaky hinge or a creaky spring, a little spray is all it’ll take to silence it.

(Just remember to hold some paper towel behind it to catch any overspray and be aware that rocking chair springs may still transmit a non-creaking “low-pitched ringing” sound into the floor to be heard in an otherwise silent room on the floor below. Felt feet can help with that, but only so much.)

Try a Brown Noise App

Brown noise (so named because it’s generated from the math behind Brownian motion), also known as red noise or random walk noise, sounds loosely reminiscent of ocean waves, wind, and countless other kinds of ambient noise you may think of, and it’s a good, relaxing choice for covering up sounds you can’t get rid of.

The Wikipedia Brownian noise article has a 10-second sample clip, but it comes in multiple apparent pitches and in softened and un-softened forms, as this YouTube video demonstrates. My own brown noise generator is set to produce un-softened brown noise at an apparent pitch somewhere in the middle between those two.

Whether you need to relax, focus without distraction, mask away tinnitus, or you’re trying to “meditate yourself to sleep”, brown noise is something you should try. In fact, I’ve found that my body has learned to interpret the sound of brown noise as a signal to release any tension it’s been hiding from me in anticipation of my efforts to unwind or fall asleep.

Make a Noise Baffle

One of my PCs is a hand-me-down small form factor machine with a specialized CPU cooler that I felt wouldn’t be worth the cost to replace with something quieter… but I still didn’t like the metallic whine its non-standard-sized fan made, so I took inspiration from how my main PC’s Antec P183 case quiets down hard drives and optical drives with a sound-absorbing door.

I imagine this would also work for making a laptop’s exhaust fan less noisy or any other small cooling fan, though I don’t use laptops often enough to have tried it.

There are two goals in this project:

  1. Make the sound waves slam into something that wants to absorb and not re-transmit them.
  2. Make them bounce their way around a corner or two while doing it before they can reach the outside air.

To do this, you will need:

  1. A hot glue gun (I used a high-temperature hardware store one I already had, but a low-temperature one from the craft store or dollar store’s craft aisle should work too)
  2. A small wooden box you can cut up (check your dollar store’s craft aisle or your local craft store) or, if ugly is OK and you can’t afford to do better, a corrugated cardboard box to cut up, like I did for my prototype.
  3. Sheets of soft foam or scraps of terrycloth (eg. a worn-out towel) to soak up the noise. The fluffier the towel, the better.
  4. Paint to make the result blend into its surroundings
  5. (optional) Felt or cork rubber to make a gasket out of (I used cork rubber from an automotive gasket material pack)
  6. (optional) Washers or other thin, heavy items
  7. Something to cut your materials with (eg. Utility knife for cardboard, some kind of hand saw, band saw, or rotary tool for wood, etc.)

The construction process is as follows:

  1. Cut the cardboard or wood and then glue it together to make a box that will fit over the vent, leaving a suitably large hole for the air to exit out after turning a corner. (I made mine wide and open on only one side so the air had to make a U-turn and exit around the side of the PC, but 90 degrees for something like redirecting a side vent on a laptop backwards should work too as long as the noise is exiting in a direction pointing away from you. Just be sure you glue something like a toothpick into the floating corner to support it.)
  2. If needed, glue some washers into the bottom to lower the centre of gravity and make it harder to tip over.
  3. Glue your terrycloth or foam to the inside of the box to soak up as much of the noise as possible before it exits the box.
  4. If you have it, glue the felt or cork-rubber around the outside of the side of the box that will butt up against the vent to make a good seal and silence any vibration.
  5. Paint the outside of the box to match what you’re using it with. (eg. If you have a laptop with a magnesium unibody housing, try to get spray-paint in a matching metallic silver colour. Mine is all-black, but I’m planning to use painter’s tape and silver spray-paint to extend the PC’s trim onto it)
  6. If you’re silencing something with a high flow rate through a small opening, like a laptop exhaust fan, you may need to take extra measures to keep the force of the exhaust from pushing it away from the vent, such as putting a paperweight on the other side of it, adding rubber feet, etc.

Blackout Curtains, Wall Comforters, Acoustic Panels, etc.

I hadn’t realized this until I bought a set for their light-dampening properties, but proper “total blackout” curtains are also marketed on their ability to improve the insulation value of the room (which is why they’re white on the back to reflect the sun back out) and, most importantly to this list, to muffle sounds coming in from outside and reduce echoing inside.

If the noise you need to muffle is coming from areas you don’t control or you need to damp down echoing, hanging some something on the wall or in front of the window that’s good at absorbing noise is the way to go.

If you rent and aren’t allowed to drill holes to hang things, look into removable adhesive hooks with a high rated load capacity like 3M’s Command™ brand, which are available in ratings up to 20 pounds. (You could also see if your landlord would see professionally designed acoustic tiles/panels as acceptably neutral or a beneficial to the future rental value of their units.)

Noise-Cancelling Headphones or Construction-site Hearing Protectors

I don’t use noise-cancelling headphones myself, since I prefer to not use headphones, but I’ve tried a pair. They don’t cancel all frequencies equally, but they may be just what you’re looking for, depending on which frequencies you find most grating.

As for the hearing protectors, I do use them when necessary and I’ve found that it’s much easier to “forget that you’re wearing” a good quality pair of the big, bulky over-ear hearing protectors that look like bright yellow recording studio headphones than it is with the foam in-canal earplugs.

(A family member gave me a Stanley Leightning L2F (RST-63007) and I like it aside from the vinyl on the underside of the headband having started to flake off.)

Another option to consider would be construction-site hearing protectors with integrated headphones… just make sure you get ones with an aux jack so you can feed them with more than just what you get off the built-in radio and/or MP3 player.

Roomba (or other equally good robot vacuum)

If you can afford it (I’ve heard that any robot vacuum with a regular/non-sale price of less than $500 Canadian isn’t worth it), getting a Roomba has four big advantages:

  1. Less time spent cleaning means more time for whatever de-stresses you most effectively.
  2. Some models of robot vacuum can be programmed to run on a timer and automatically do the cleaning while you’re away from home, so you just need to empty the bin.
  3. I can’t vouch for other brands or models, but the Roomba we have is significantly quieter and has a much less irritating motor sound than any of the traditional vacuum cleaners we’ve used.
  4. I don’t know about other robot vacuums, but there are Amazon Marketplace sellers offering replacement front caster wheels for the Roomba line which have a rubber tire to make them run more quietly on hard floors. (This is the listing I used but be aware that the one I got had a manufacturing defect that caused it to catch at one spot until I sanded the rubber down a bit.)

Replacement fans for your computer

If you’ve got a desktop PC and it’s noisy (eg. because you work it hard and the fans rev up) or you just don’t like the character of the fan noise, and you or someone you know are comfortable installing new parts inside it, one good option is to replace the cooling fans with quieter, more pleasant-sounding models.

For this, the the world-leading brand is Noctua. They offer both case fans and CPU coolers and, for case fans, they offer two different choices depending on how much you want to spend: Their premium NF-A line which packs in every trick in the book, and their budget “Redux” models which are slightly less optimized, available in fewer sizes, and require you to choose between versions optimized for airflow or static pressure, but are almost half the price of the premium versions.

(I have a set of four of their NF-P12 redux-1300 PWM fans in my main PC, and a single premium-series NF-A9 PWM fan in my secondary PC.)

If your case offers fan mounts of multiple different sizes, try to get the cooling you need using only the biggest size of fans available. The bigger a fan is, the slower it needs to spin to move air and the easier it is to make it sound pleasant.

You may also want to consider something to throttle back any fans which provide more cooling than necessary, like their low-noise adapters (included with the premium fan I bought but not the Redux fans) or a fan-speed controller so you can dial in whatever balance between cooling and noise that you want. (I bought a Noctua NA-FC1 to control the fans I wanted to run at a fixed speed)

They have an official Amazon store if you want to take advantage of free shipping.

Posted in Lair Improvement | Leave a comment