Wednesday, December 11, 2013

Chromecast Stereo System

Build a stereo system using Chromecast for less than $100

I was one of the first people to buy a Chromecast. Despite having a few different devices that provide the same services (Tivo, Roku, etc), the low entry point and potential for expandability made it an interesting toy.

However, I quickly noticed we only use it to play music. I have kids running around, and if I’m playing music through the TV they just stare at the TV - which is just an artist’s album displayed using the Ken Burns effect. I decided to hook my Chromecast to my stereo, which is what this article is all about.

A quick search online revealed that a few others had thought of doing this, but the issue was with the HDMI interface. Since HDMI is audio and video combined in one physical connection, I had to buy a special device to split the audio and video.

The Setup

Stereo

I had already been looking for a new stereo receiver. The one I had worked perfectly, but was very large and very heavy. I replaced it with a Lepai mini amp, which was a huge downgrade feature-wise, but I really only need a couple of inputs these days.
Lepai LP-A68 on Amazon.com
Cost: around $25

HDMI Audio/Video Splicer

I looked over a couple on Amazon, and settled on one that got some decent reviews.
HDMI Converter: HDMI to HDMI+Audio on Amazon.com
Cost: around $40

Chromecast

The Chromecast itself.
Google Chromecast on Amazon.com
Cost: around $35


A picture of my rat's nest setup


Currently my setup is a nest of wires on a table, and I noticed my cheap stereo gets some feedback if the Chromecast gets too close (due to the wifi signal, I think). I just push them apart whenever it happens. At some point I might organize everything into a box.

Usage

The good:

  • It's easy to play some music from my phone, tablet, etc, and to be able to control what's playing remotely

The not-so-good:

  • There is no true browser support for Google Music like there is for YouTube.  Therefore, you can only stream music on your laptop if you stream the full browser tab.
  • It's not as easy to switch between devices involves taking control in this weird paradigm-shift-hiccup way that isn't as easy as you expect it to be

Both of these downsides don't quite fit with Google's advertised "it just plays everywhere" motto. They don't seem like that big of a problem, which makes it depressing that they haven't addressed these issues yet.

Summary

This seems like a good base for Google to make other cheap single-use devices that do one thing well.  If they would create a music-only Chromecast with a dedicated audio-out instead of HDMI, I would buy it.


Tuesday, December 3, 2013

Visual Studio Time-Stamp

Earlier this year I wrote a post about how to insert a time stamp in Notepad++ (link).  I thought it might be helpful to share how I did the same thing in Visual Studio using a Macro.  I recently upgraded my hard drive, and had to stumble through setting everything up again, so I figured this was as good of place as any for a reminder.

It is a fairly simple process, the most annoying part is knowing where to look.  I don't have too much interest in knowing everything there is to know about Visual Studio, so I was thankful when I found it relatively straight-forward.  You may want to use this process in your research to build other macros.

A FEW NOTES:

  • You edit a Macro in an IDE for Macros, kind of like a sub-IDE inside Visual Studio
  •  You can test Macros on a file that is open in the main Visual Studio window, so you may want to have a file open for testing
  • Visual Studio comes with a bunch of sample macros, if you have them installed you should see them in the Macro Explorer. They may help you achieve what you are trying to achieve
  • I tested this in VS 2005, but the process should be similar in newer versions
 

THE PROCESS:

  1. Open "Macro Explorer"  Menu: View > Other Windows > Macro Explorer
  2. A small window (or side-bar) opens for Macro Explorer, expand the "MyMacros" and right-click and choose Edit
  3. This opens a the Visual Studio Macros IDE
  4. The default code to get you going is already there, so you should just need to create a Subroutine, here is the code I used:
    Imports System
    Imports EnvDTE
    Imports EnvDTE80
    Imports System.Diagnostics
    
    Public Module jmjMacros
        Sub InsertMod()
            Dim textSelection As EnvDTE.TextSelection
            textSelection = CType(DTE.ActiveDocument.Selection(), EnvDTE.TextSelection)
            textSelection.Text = System.DateTime.Now.ToShortDateString() & " JMJ:"
        End Sub
    End Module
    
    (note that I have already renamed the "MyMacros" Module to "jmjMacros" in this example)

  5. Notice I used "jmjMacros" and appended a "JMJ:" at the end of the line, unless those are your initials you may want to change them
  6. You should be able to test your code. Make sure a file is open in the main Visual Studio window, and run the Macro to see if it inserts text.  If you don't have a file open, you may get an error message.  I had to switch back and forth between windows a couple times to confirm this was working
  7. That's it for the code!
The Renamed the Macro in Macro Explorer

Testing the Macro


KEYBOARD SHORTCUT:

If you want, you can map the macro to a keyboard shortcut:
  1. Under Visual Studio options (Tools > Options), choose Environment->Keyboard
  2. This just maps a keyboard shortcut to a chosen command:
    • I typed Ctrl+; into the "Press shortcut keys" field
    • Then I selected my Macro from the (ridiculously small) list of commands (see screenshot)
  3. Once I you have everything selected, click on the Assign button.  The command you set up should show under the "Shortcut currently used by" field
Setting the keyboard shortcut


If you are wondering why I use ctrl + ; (control key + semicolon key), that is the keyboard shortcut to insert the date in Google Docs.  I wanted to make sure I remembered it, so I made it the same for notepad++ and Visual Studio.