The Future - and Past - of Dual-Screen Laptops and Tablets

Nearly a decade ago, Microsoft cancelled the Courier tablet (see below), which would have been the first dual-screen tablet/laptop on the market, and it would have been competing head-to-head with the single-screen iPad when that tablet was first released:

Now the Courier's untimely death seems especially premature, since the big news coming from Computex 2018 is that several of the big computer manufacturers are coming out with dual-screen tablets/laptops that look all-too-familiar to anyone who saw a Microsoft Courier tablet back in the day:

It seems that - given enough time - foresight and hindsight can become blurred...

New HTML Tags for Useless Text

Just in time for April Fool's Day, here are some new HTML tags for useless text.


Defines Unnecessary Text

Extended attributes are:

Attribute Example

This could be used for: "So, my fellow Americans, I feel that this is a strong issue about which I was asked that should not go unnoticed by this administration because it impacts all of us where we live as people of this great land that....."

This could be used for: "Yawl jus' don' figur dat I be fin tuh be slaypin muh ferty wanks afore I goes huntin' latah."


Defines Disparaging Text

Extended attributes are:

Attribute Example

This could be "Gossip," "Slander," "Hearsay," "Rumor," etc.

Used for statements like: "Did you hear what Marc said to Luis? OHHH! You've gotta hear this...!"

Recovering a Mirror Set on Windows 10

I run a mirror on the C drive for one of my Windows 10 systems, and a few nights ago that system wouldn't boot; I kept getting errors like "VOLMGRX internal error" and "A recently serviced boot binary is corrupt". I tried a few of the automatic Windows 10 recovery options while my system was rebooting, but nothing seemed to work. Skipping past the steps it took to get there, I also tried using the "bootrec /fixmbr" and "bootrec /fixboot" commands, with no luck, either.

However, since I was using a mirror set for the primary drive, I was able to do the following:

When I rebooted my system, I chose Troubleshoot for my startup option.


Step 2 - On the Troubleshoot screen, I chose Advanced options.


On the Advanced options screen, I chose Command prompt.


When the Command prompt opened, I typed the following commands:

list volume

This returned a table like the following illustration, and I looked for the volume which showed status as "Failed Rd":

Volume ### Ltr Label Fs Type Size Status Info
---------- --- ----------- ----- ---------- ------- --------- --------
Volume 0 C C-DRIVE NTFS Partition 1848 GB Failed Rd Boot
Volume 1 ESP FAT32 Partition 500 MB Healthy System  
Volume 2 WINRETOOLS NTFS Partition 454 MB Healthy Hidden  
Volume 3 Image NTFS Partition 12 GB Healthy Hidden  
Volume 4 DELLSUPPORT NTFS Partition 1087 MB Healthy Hidden  

Once I knew the volume that was having the issue, I was able to run the following commands to recover the mirror set:

select volume 0

I knew that the recovery was going to take a long to complete, and I could have used "detail volume" command every few minutes to check the status, (which will show "Rebuild" in the status column). But the truth is - it was already way past midnight, so I simply went to sleep for the night. When I got up the following morning, everything was fine and I was able to reboot successfully.

FYI - The following article has all the information you need about using the Windows DiskPart command, although be forewarned - you can really screw up your system if you do something wrong.

DiskPart Command-Line Options

Adjusting Pitch for MP3 Files with FFmpeg

I recently ran into a situation where I needed to adjust the pitch of an MP3 file for a song that I needed to learn. The problem was that song was recorded in a specific key, and I needed to play the song a half-step different. Of course, rehearsing in the original key and transposing on-the-fly is pretty trivial, but sometimes I prefer to learn a song in the key which I will be playing.

In the past I have always used a tool like Cakewalk Sonar to load the MP3 file, adjust the pitch, and then save out the adjusted audio. But I thought that was far too prosaic of an approach; I wanted a way to script the pitch change. This got me thinking about one of my favorite tools: FFmpeg.

I have mentioned FFmpeg in previous blogs, and it's one of my favorite tools; I use it almost every day for one purpose or other, and I have a large collection of batch files to automate various tasks. But unfortunately, I didn't have anything for adjusting audio pitch. That being said, I have done a lot with various FFmpeg audio and video filters, and after a little while of sifting through some of the various settings I came up with a way to easily change the pitch for an MP3 file. (And if I ever need to automate a whole directory of MP3 files, it would be simple to update this script with a loop.)

Here's the secret to the way this works - there are two audio filters that I am using:

  • asetrate - this filter adjusts the sample rate; altering the sample rate will stretch or shrink the audio, thereby changing the pitch and length of the audio.
  • atempo - this filter adjusts the tempo of the audio; altering the tempo will change the length of the audio, without changing the pitch.

So the trick is to use these two filters inversely; in other words:

  • If you increase the sample rate by 2, then you need to decrease the tempo by 2.
  • If you decrease the sample rate by 1.5, then you need to increase the tempo by 1.5.

With that in mind, I pulled out one of my favorite math constants: 2^(1/12), which is roughly 1.0594630943592952645618252949463. You might recall from some of my other blogs that this is the value by which every pitch in Equal Temperament is derived; in other words, that value is used to create every note in the chromatic scale which is used throughout the planet.

Taking that into account, I looked at the filter settings that were possible for use with FFmpeg:

  • If I assume that MP3 files are using a sample rate of 44.1khz, then I need to use values for the asetrate filter which raise or lower the sample rate by r*2^(n/12), where:
    • r is the sample rate.
    • n is the number of half steps to raise or lower.
  • The atempo can be values between 0.5 and 2.0, where:
    • 0.5 is half-tempo
    • 1.0 is the original tempo
    • 2.0 is double-tempo
    With that in mind, I used a similar formula to increase or decrease the tempo by 2^(n/12), where n is the number of half steps to raise or lower.

The math is a little weird, I'll admit - but it's pretty straight-forward. And here's the great part for you: I've already done the math, and I've written a batch file which defines a set of constants that can be used in batch files to script the raising or lowering the pitch of an MP3 file.

Here's the code for the batch file:

@echo off

set TMPFILE1=InputFile.mp3
set TMPFILE2=OutputFile.mp3

set RAISE_PITCH_01=asetrate=r=46722.3224612449211671764955071340,atempo=0.94387431268169349664191315666753
set RAISE_PITCH_02=asetrate=r=49500.5763304433484812188074908520,atempo=0.89089871814033930474022620559051
set RAISE_PITCH_03=asetrate=r=52444.0337716199990422417487017170,atempo=0.84089641525371454303112547623321
set RAISE_PITCH_04=asetrate=r=55562.5183003639065662339877809700,atempo=0.79370052598409973737585281963615
set RAISE_PITCH_05=asetrate=r=58866.4375688985154890396859602340,atempo=0.74915353843834074939964036601490
set RAISE_PITCH_06=asetrate=r=62366.8181006534916521544727376480,atempo=0.70710678118654752440084436210485
set RAISE_PITCH_07=asetrate=r=66075.3420902616540970482802825140,atempo=0.66741992708501718241541594059223
set RAISE_PITCH_08=asetrate=r=70004.3863917975968365502186919090,atempo=0.62996052494743658238360530363911
set RAISE_PITCH_09=asetrate=r=74167.0638253776226953452670037700,atempo=0.59460355750136053335874998528024
set RAISE_PITCH_10=asetrate=r=78577.2669399779266780879513330830,atempo=0.56123102415468649071676652483959
set RAISE_PITCH_11=asetrate=r=83249.7143785253664038167404180770,atempo=0.52973154717964763228091264747317
set RAISE_PITCH_12=asetrate=r=88200.0000000000000000000000000000,atempo=0.50000000000000000000000000000000

set LOWER_PITCH_01=asetrate=r=41624.8571892626832019083702090380,atempo=1.05946309435929526456182529494630
set LOWER_PITCH_02=asetrate=r=39288.6334699889633390439756665420,atempo=1.12246204830937298143353304967920
set LOWER_PITCH_03=asetrate=r=37083.5319126888113476726335018850,atempo=1.18920711500272106671749997056050
set LOWER_PITCH_04=asetrate=r=35002.1931958987984182751093459540,atempo=1.25992104989487316476721060727820
set LOWER_PITCH_05=asetrate=r=33037.6710451308270485241401412570,atempo=1.33483985417003436483083188118450
set LOWER_PITCH_06=asetrate=r=31183.4090503267458260772363688240,atempo=1.41421356237309504880168872420970
set LOWER_PITCH_07=asetrate=r=29433.2187844492577445198429801170,atempo=1.49830707687668149879928073202980
set LOWER_PITCH_08=asetrate=r=27781.2591501819532831169938904850,atempo=1.58740105196819947475170563927230
set LOWER_PITCH_09=asetrate=r=26222.0168858099995211208743508580,atempo=1.68179283050742908606225095246640
set LOWER_PITCH_10=asetrate=r=24750.2881652216742406094037454260,atempo=1.78179743628067860948045241118100
set LOWER_PITCH_11=asetrate=r=23361.1612306224605835882477535670,atempo=1.88774862536338699328382631333510
set LOWER_PITCH_12=asetrate=r=22050.0000000000000000000000000000,atempo=2.00000000000000000000000000000000

ffmpeg -y -i "%TMPFILE1%" -af "%RAISE_PITCH_01%" "%TMPFILE2%"

The only parts that you need to configure are:

  • TMPFILE1 - set this variable to the name of your original input MP3 file.
  • TMPFILE2 - set this variable to the name of your adjusted pitch output MP3 file.
  • Specify whether to raise or lower the pitch in the FFmpeg command by choosing one of the constants defined in the batch file; for example:
    • RAISE_PITCH_02 would raise the pitch of the original audio file by two half-steps (or one whole step).
    • LOWER_PITCH_05 would lower the pitch of the original audio file by five half-steps (or 2½ whole steps).

There are, of course, hundreds of other parameters which you can pass to FFmpeg in order to customize how FFmpeg processes the audio, but those are way out of scope for this blog.

With that in mind, that's it for now; have fun!

Inheriting C++ Code from Other Programmers

Trying to get someone else's 20-year-old C++ code to compile is like trying to translate hieroglyphics without the use of the Rosetta Stone...


"Safe strings to prevent buffer overruns? Bah! Who needs 'em..."

Sad smile

UPDATE: True story - the original C++ code which was the impetus behind this blog post was written sometime around the release of Visual Studio 5 or 6, so the way that I eventually managed to get this code to compile on an up-to-date version of Visual Studio was to do the following: I set up a virtual machine in Hyper-V running Windows XP, installed Visual Studio 6.0, and compiled the code. Once I had it compiling with no errors, I kept updating the version of Visual Studio and recompiling; e.g. VS.NET, VS2003, VS2005, VS2008, VS2010, VS2012, VS2013, and finally VS2015, (which was good enough for what I needed to accomplish). As I upgraded each version of Visual Studio, I fixed whatever errors were introduced on a version-by-version basis. A few hours later and all the errors were gone, and the original program worked great.

Omnicharge is Your Devices' Best Friend when Travelling

When I travel, I tend to bring a lot of interesting gear along with me, and much of that gear is designed to support my other gear. I never know what I might need, so I plan for the worst and try to bring a little bit of everything. For example, I have various chargers for phones/tablets/notebooks, etc., plus a variety of USB/Network cables and adapters, and when I'm travelling overseas I bring adapters for international electrical outlets.

However, I have often found myself at a loss for power outlets in various airports, so last year I invested in an Indiegogo campaign to support a device which I thought needed to be brought to the market: Omnicharge. While it wasn't cheap, it promised 2 fast-charging USB ports and an actual AC/DC power outlet. And I must admit, the prospect of having a way to recharge my laptop and other devices was rather appealing.

During the Indiegogo campaign, I pledged the extra cash for the Omnicharge Pro (Omni 20), which boasts 20400mAh with a maximum output of 100W. The campaign was successfully funded at 4,257% of its original goal, (with a grand total of $3,185,869 pledged), so I guess that I wasn't the only traveller who thought this was an amazing device to add to their "go bag."


I received my Omnicharge a couple months ago, and I have had a chance to travel with it a few times. So far, it has exceeded my expectations. I have been stranded with a dying laptop and no AC power outlet on more than one occasion, and the Omnicharge has rescued my laptop each time. The Omnicharge's screen and menus are easy-to-navigate, and it completely charges my Microsoft Surface Book's drained batteries in an hour (while I am still using it).


Now that the Indiegogo campaign has long-since ended and backers have received their "early bird" releases, you can now purchase one of these devices through Amazon at

For more in-depth information about the Omnicharge, see the following video-based overview on YouTube:

This Scammer Picked the Wrong Geek to Mess With

What a great way to start my day. I just received a call on my work phone from an anonymous number where a guy with a thick accent on the other end of the line began his pitch by claiming, "This is Windows Technical Support. I am calling you today because we have been receiving a bunch of messages from your computer which are telling us that..."


Hehe... seriously? This clueless dude had no idea he was dealing with a Microsoft employee. But then again, I had a busy day planned, so I had no time for squabbling.

I quickly cut him off and said, "Look, I can save us both a bunch of time. Do you know who I work for?"

The would-be con man was immediately taken aback and momentarily at a loss for words, but he managed to eke out a hesitant "No" as a reply.

I continued by saying, "I work for Microsoft."

The scammer attempted to regain his composure and started to reply with, "Oh, then you must know..."

I cut him off again and I asserted, "Yes, I do know. I have worked for Microsoft for over 20 years, and I know that Microsoft does not call customers like you are doing. You are a liar. And what you're doing is illegal."

Predator had turned to prey, and the hapless dolt on the opposite end of the phone began to mumble, "Honestly, sir, I... uh..."

And then I heard nothing but dial tone.

Yup, that was a great way to start my day.

Exporting and Importing Windows Media Center Recording Schedules

I ran into an interesting problem the other day which warranted some investigation: I was replacing the computer which my dad uses for Windows Media Center, (which he uses as his DVR and to watch movies), and he had an elaborate recording schedule set up for all of his favorite shows and wish lists. The problem for me - as his IT guy - was to figure out how to migrate his recording schedule from his old computer to his new computer, and as it turns out - there was already a command line solution from Microsoft which was pretty easy to use.

The tool in question is called loadmxf.exe, and you can find out more about that utility in the Windows Media Center Guide Listings Format article on MSDN.

That being said, here are the steps to export your recording schedules from one Windows Media Center computer and import them into a new Windows Media Center computer.

On Your Old WMC Computer:

  1. In Windows Explorer, navigate to the following folder:


  2. Find the most recent "mcepgX-X" folder
  3. Find the "backup\recordings" folder
  4. Copy the latest "yyyymmdd_hhmmss" file to a share or flash drive

Note: The "yyyymmdd_hhmmss" file is an XML file which contains your recording schedule, and you can find detailed information about the data in the file in the Windows Media Center Guide Listings Format article which I mentioned earlier.

On Your New WMC Computer:

  1. Copy "yyyymmdd_hhmmss" file from earlier to the following folder:


  2. Open a command prompt and type:

    "%windir%\ehome\loadmxf.exe" -i "%ProgramData%\Microsoft\eHome\mcepgX-X\backup\recordings\yyyymmdd_hhmmss"

  3. Once completed, the tool will display the import status
  4. Open the Windows Media Center application
  5. All of your scheduled recordings should be displayed in Windows Media Center, however - they will not work until you open each scheduled recording and resave it without making any changes

Hacking - Hollywood Style

I read an article the other day about the "tech consultants" who work for Hollywood. (Sorry, I don't remember where I read the original article... and at the moment I don't feel like looking for it, either.)

Anyway, these consultants are acutely aware of the fact that real hacking does not make for gripping Hollywood-style action, so directors and assorted other creative supervisors ask for scenes which make for better movies. These requests - of course - lead to scenes which are so far over the top ridiculous that you have to completely dismiss reality if you actually know anything about computers. That being said, the article also mentioned that since these same consultants are aware that their scenes cannot be realistic, there is something of a competition between consultants to see who can make their scenes the least-plausible. (My favorite is the guy who used Excel and a MacBook to diffuse a nuclear bomb.)

With that in mind, a subreddit has emerged as a repository of all of these utterly ludicrous technology fails, and I have to admit - I'm hooked and I cannot stop laughing...


It's a Unix System, I know This! • /r/itsaunixsystem

A subreddit for every over the top, embarrassing, and down right flat out incorrect usage of Technology found in Movies, TV Shows, and Video Games!

Fixing Underwater Videos with FFMPEG

I ran into an interesting predicament: I couldn't get the right color adjustment settings to work in my video editor to correct some underwater videos from a scuba diving trip. After much trial and error, I came up with an alternative method: I have been able to successfully edit underwater photos to restore their color, so I used FFMPEG to export all of the frames from the source video as individual images, then I used a script to automate my photo editor to batch process all of the images, then I used FFMPEG to reassemble the finished results into a new MP4 file.

The following video of a Goliath Triggerfish in Bora Bora shows a before and after of what that looks like. Overall, I think the results are promising, albeit via a weird and somewhat time-consuming hack.

Exporting Videos as Images with FFMPEG

Here is the basic syntax for automating FFMPEG to export the individual frames:

ffmpeg.exe -i "input.mp4" -r 60 -s hd1080 "C:\path\%6d.png"

Where the following items are defined:

-i "input.mp4" specifies the source MP4 file
-r 60 specifies the frame rate for the video at 60fps
-s hd1080 specifies 1920x1080 resolution (there are others)
"C:\path\%6d.png" specifies the directory for storing the images, and specifies PNG images with file names which are numerically sequenced with a width of 6 digits (e.g. 000000.png to 999999.png)

Combining Images as a Video with FFMPEG

Here is the basic syntax for automating FFMPEG to combine the individual frames back into an MP4 file:

ffmpeg.exe -framerate 60 -i "C:\path\%6d.png" -c:v libx264 -f mp4 -pix_fmt yuv420p "output.mp4"

Where the following items are defined:

-framerate 60 specifies the frame rate for the output video at 60fps (note that specifying a different framerate than you used for exporting could be used to alter the playback speed of the final video)
-i "C:\path\%6d.png" specifies the directory where the images are stored, and specifies PNG images with file names which are numerically sequenced with a width of 6 digits (e.g. 000000.png to 999999.png)
-c:v libx264 specifies the H.264 codec
-f mp4 specifies an MP4 file
-pix_fmt yuv420p specifies the pixel format, which could also specify "rgb24" instead of "yuv420p"
"output.mp4" specifies the final MP4 file