1. Download and install Total Recorder. You will then need to configure it as follows. Firstly, we need to add a few lines to its players.txt configuration file. It goes in the Program Files directory - in my example under XP it's in "C:\Program Files\HighCriteria\TotalRecorder\players.txt"; it's something similar on newer OSes. Add the following lines to the bottom of the file:
; XM in Google Chrome
;
[XM in Google Chrome]
CLASSNAME="Chrome_WindowImpl_0"
FORMAT="about:blank - <artist> - <title>"
This will tell Total Recorder to look for the Google Chrome application, find what's written in its title bar, and extract the Artist and Title information out of it.
You will probably need to reboot after installing Total Recorder.
Further configuration:
Select Options -> Settings and click on "Split" on the left side of the window.
Make sure the first checkbox is checked and the dropdown reads 'Rules using file tag'.
Also check the second checkbox 'Split mode...'.
Click on the 'Conditions' button. Here is where the magic happens. This is how the program knows when to cut your audio stream, write out the audio file, name it and tag it.
Check the 'when the clip info in external player is changed', but uncheck 'Split at the point with the lowest level' check box.
Also check 'use info from external player...' check box, and in the dropdown select the bottom-most setting - 'XM in Google Chrome'. This is why we added the configuration above to the players.txt file.
You will also need to check 'duplicate last X seconds of previous file and next file'. Set it to 30 seconds each. I know, it's not ideal, but this has to be done this way, because the song information does not change at the exact same time the next song starts. We will address what to do with this later.
Optionally save this configuration using 'Save as...' button, give it some meaningful name like XM Chrome Split.
Now we'll go through and tell Total Recorder what to record, what format to use, where to save it, etc.
Slect Tools-> Recording Wizard.
1. Accept default first checkbox (sound produced by sound player), click Next
Feel free to perform a test recording at this point. Start the browser-based player. If you see green bar in the Total Recorder window, showing recording level, you are probably okay.
2. Select MP3 format. Do not use Ogg Vorbis. This is because tools are readily available for trimming MP3s, not so for Ogg. Also, MP3s can be trimmed to the milliseconds instead of blocks the way Ogg is. More on that later. Next.
3. I suggest Near High Quality. It's music afterall, not talk radio. Next.
4. Accept default. Next.
5. No to 'Pause reduction feature'. Again, not talk radio. Next.
6. Leave 'Yes' to automatic file creatin. Next.
7. Leave next setting in place (we set it earlier). Next.
8. Leave this in place also. Next.
Wizard Finish Screen - say 'yes'
So now we have configured the software to record your audio stream, and to split it automatically based on the track information in the title bar of your Google Chrome browser. But how do you get that track information in there? That's the next step.
Open another browser. I recommend Firefox. You can't just do it using a different tab in Chrome, or a different window either. Has to be another browser. Chrome sets its title bar to be the title of whatever page it is currently displaying. We need it to be displaying the song information so we can't be using it for browsing.
So, now that you have another browser (Firefox) opened, navigate to the web page of the channel you would like to record. SXM has individual web pages for its channels. For example, channel #35 Lithium has a web page at http://www.siriusxm.com/lithium. When you load the page, it will display the song information for whatever it is currently playing. This is where we will be getting the song information.
As a sidebar, SXM really doesn't want you to be getting the information from there... Instead of embedding the information directly in the HTML of the page, they make the page load and then have Javascript send an AJAX request to the server to populate the song info... This way you can't just use a program to get the HTML from their server and then parse out the song info. But anything that can be read by a human can also be read by a program - just takes a little more doing, that's all. Even if the song info was displayed as an image, nothing prevents me from having a program do a capture of a screen area then have a Perl script feed it to an OCR library... but I digress.
Now do this: Highlight the song information in the Firefox browser window, copy it (Ctrl-C) to the clipboard, alt-tab to your Chrome window with a blank tab open, and type this in the URL bar:
about:blank <space> to paste song info>
Using the screen grab from above, I get this in the URL bar.
about:blank Beastie Boys - Intergalactic
Now position your cursor over your Start bar over the Chrome program icon. You will see a tooltip that shows something along the lines of
about:blank Beastie Boys - Intergalactic - Google Chrome
Bingo! this is the information that Total Recorder will now pick up, parse out the artist and title, and split your track.
Of course the song information changes as the music changes, and the last thing you want to do is sit in front of the computer copy-pasting all day. This is where the macro recorder /player comes in. The steps you just performed - load the SXM page in the Firefox browser, select song info, copy and paste into Chrome - you will perform again, but this time you will record it using the macro recorder, then simply tell the recorder to replay.
IMPORTANT: before you start running this macro, or any macro, know how to stop it. Otherwise you are stuck in your own private
Voodoo dick joke. In this case, Ctrl-Escape does it.
OK, so now we're ready. Here's what you do:
1. Start the browser based player and get it to play your station in tab 1 in Firefox. Do not have Firefox or Chrome maximized; this will let you switch easily between programs by clicking their title bar.
3. In a second tab in Firefox, load page for your station.
2. Start Macro Recorder.
4. Press Record on Total Recorder.
5. Press Record on Macro Recorder.
6. Switch to Firefox by clicking on its title bar. Twice with 1-2 second interval (don't want your clicks to read as a double-click, which would maximize your window - not what you want). Two clicks are necessary here - has to do with the way macros run... I'll tell you later why if you're interested.
7. Click on tab 2 to open it (even if already open). Press F5 to reload page.
Switch to Tab 1 where your player is. Select some text in the page, doesn't matter what. This is to tell the player "I'm still listening, don't time out".
Switch back to Tab 2. After artist and track info appears, wait another few seconds (they might not appear as quickly fifteen minutes from now and you don't want to trip up your macro).
7. Select artist and track info in Firefox and Ctrl-C to copy it to clipboard. While selecting, pretend the song title and artist name are really long - select a wide area of the screen. The song that's currently playing might nave a short name, but some subsequent song might have a really long name.
8. Switch to Chrome by clicking on its start bar icon
9. Type into the URL bar 'about:blank - ' (that's a space dash space in the end there) then Ctrl-V to paste artist and track info.
10. Click the Stop button on the Macro recorder to stop recording. (Do not ctrl-escape to stop recording). Right-click and select Save to save your macro, give it a filename. Exit and re-open macro recorder, then load your recorded macro.
10.5. Macro recorder was placed in the same spot on the screen where it was when you last closed it. Which means when you run your macro, it will recreate every one of your keystrokes and mouse moves - that includes the clicked you used to stop recording the macro. When you run your macro in the repeat mode, you don't want the macro itself to stop running of the macro. For that reason, you need to move your Macro recorder to a different spot on the screen. Also, when you run the macro in repeat mode and the macro executes a click in the space where the Stop button used to be, there is now only the windows desktop. The click registers as an interaction with the desktop. This is why we were clicking on the Firefox window title bar twice earlier.
11. Click on Repeat button in Macro recorder and press Play.
12. Sit back and watch as the macro recorder gets the info from the station's web page into Chrome, then Total Recorder cuts the song and creates a new file whenever song info changes.
Adjust your macro as necessary. It will probably take you a few tries.
For extra credit, interject an intermediate step in your macro which uses a simple graphics program like FastStone Image Viewer to capture a rectangular area on your player where album art is displayed, and save it as a separate JPG file named with artist and track info.
in order to sanitize file names. Don't worry about it if you don't care about having images available.