Archive for February, 2008
Sunday, February 24th, 2008
Fix flicker and screen offset with a DVI to HDMI cable
When I bought a new High Definition LCDTV this boxing day, I noticed that there was a VGA input. Naturally, I found an old VGA cable and hooked up my media PC. To my dismay, the picture would flicker at random times (especially noticeable when you’re playing movies) and the screen was not centered on the screen.
I was worried at first when I saw some of the prices for monster cables in future shop, best buy and the like, but a quick search over at Canada Computers brought up the perfect cable for only$18. The picture is now flicker-free, and is sharp as ever. For a US alternative, this cable is only $8 at newegg.
Note that you’ll still need to find a way to get sound to your tv/media center. I just use a stereo to RCA cable I bought for $1 at a dollar store, which I hooked up to my surround sound.
Thursday, February 21st, 2008
CD Art Display
CD Art Display is a great program. If you failed at the tutorial I posted on how to change your MSN picture to your currently playing album artwork, this program will do it all for you. It also displays the current artwork and info for the currently playing track, finds artwork, lyrics, etc. The display is skinnable, and can look amazing. Head over and download this program. I love it.
The lyric functionality doesn’t save the lyrics to iTunes directly (as far as I know). So you can still use iTunes Lyric Downloader for that. And if you want to fix your track information so it looks a bit better when you display it in CAD, try this.
(This also means I’m ending all my work on iTunes Displayer, since it’s crap compared to this program.)
Thursday, February 21st, 2008
iTunes Guitar Tab Downloader Released
Today I wrote a quick program that will automatically search for tabs of the selected tracks in iTunes. The tabs are saved as text files in a specified folder.
I’ve noticed over the years that it’s nice to have copies of guitar tabs on your computer, especially for days where the internet is broken and you have nothing to do. I also like the option of selecting all of my favourite tracks in iTunes (ie my 3-star+ smart playlist) and just browsing the text files. A lot of times it just doesn’t cross my mind to try and learn a certain song on guitar. Anyways, try it out and enjoy!
Tuesday, February 19th, 2008
How to change your MSN Display Picture to iTunes’ Current Playing Album Art
Update: If you’d rather just download a program instead of writing your own to do this for you, take a look at CD Art Display. It’s free to download, and will do even more than just show album art in your msn profile picture.
This little howto is actually quite involved. I wasn’t quite sure what was possible with the new Live Messenger Addin capability, but as it turns out, it is quite difficult to bypass some of the barriers set up by the addin technology. If you are really intent on getting this set up, or are just curious about what I did to get it going, feel free to read on.
A note to those who aren’t interested in the programming side of this post: I’ll post the files you need to download throughout the howto, but these files are not really recommended for everyday use. The actual solution I’ve come to is a pretty odd workaround, though it does work, so feel free to give it a try if you’re brave. You’ll need to go through each step, but you can just download the files for #1 and #4.
What you’ll need:
-some knowledge of VB.Net and a visual studio version with vb.net
-itunes 7.x
-a bit of free time
Step 1: Set up Live Messenger to allow Addins
The new Live Messenger does have addin capabilities built in, but they are not enabled by default (they’re in beta I guess). To enable addins, you’ll have to edit your messenger registry entries. Go to Run, type “regedit” and hit enter. then browse to “HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger” and add a “DWORD” entry called “AddInFeatureEnabled” and change it’s value to 1. Now restart your Live Messenger and go to Options. There should be a tab called “Add-ins”. You’re Messenger is all set to go.
Step 2: Write your .dll file for the Addin
Open up visual studio and start a new Class Library. You’ll want to set up the project name right away, since your Class name has to be the same as the assembly name. Make sure your root namespace is empty. Add the MessengerClient.dll reference (browse to C:\Program Files\Windows Live\Messenger). Then you’ll want to go through and look at this code (download the .dll here):
Imports Microsoft.Messenger
Public Class MessengerAddin ‘<- *Important* this is your assembly name!!
Implements IMessengerAddIn
Public theMessenger As MessengerClientPublic Sub Initialize(ByVal messenger As Microsoft.Messenger.MessengerClient)
Implements Microsoft.Messenger.IMessengerAddIn.Initialize
Me.theMessenger = messenger
Me.theMessenger.AddInProperties.Creator = “SkyCapitan”
Me.theMessenger.AddInProperties.Description = “iTunes Art plugin!”
Me.theMessenger.AddInProperties.FriendlyName = “SkyCapitan’s Addin”
Me.theMessenger.AddInProperties.PersonalStatusMessage = TimeOfDay & ” - Sky’s not listening to music….”
Me.theMessenger.AddInProperties.Url = New Uri(”http://svankruistum.com”)Dim systime As New System.Timers.Timer()
systime.Interval = 5000 ‘This will check our config file every 5 seconds to see if the track has changed
systime.Enabled = True
AddHandler systime.Elapsed, AddressOf OnTimedEventEnd Sub
Public Sub OnTimedEvent()On Error Resume Next ‘in case the config file is not “0″ or an artist_ or album combination
Dim tempin As String
Dim jpeg As String
Dim oRead As System.IO.StreamReader
Dim oWrite As System.IO.StreamWriteroRead = New System.IO.StreamReader(”C:\art\config.txt”)
tempin = oRead.ReadLineIf tempin = “0″ Then
oRead.Close() ‘Nothing new we have to do
Else
jpeg = tempin
‘Change the picture
Me.theMessenger.AddInProperties.UserTile = System.Drawing.Image.FromFile(”C:\art\” & jpeg & “.jpg”)
oRead.Close()
‘Change the config file back to “0″
oWrite = New System.IO.StreamWriter(”C:\art\config.txt”)
oWrite.Write(”0″)
oWrite.Close()End If
End Sub
End Class
A large part of this code is courtesy of a blog post at Nick’s .NET Travels, found here. His example sets up a few other Messenger Events that you might like to explore. There is a lot of opportunity for some interesting addins.
The addin should be operational at this point, but another problem lies with MSN’s strict sandbox for addins…
Step 3: Set up your MessengerAddin.dll to allow the System reference
The code above needs to access the system namespace for a few reasons: get the art file, check the config file, and use the system timer. Due to the sandbox restrictions in place by MSN Messenger, we need to register the addin on our system.
To do this, first you must sign your file. This is done under Project Properties -> signing. Sign the addin and add a password of your choice.
Next, you’ll need to save and build the class library. Then browse to the location of the built .dll file. Now you need to drag and drop the file into your C:\WINDOWS\assembly folder.
Open up MSN, and try enabling your addin. Everything should work (though you don’t have the artwork and the appropriate config file yet).
Step 4: Create a program to save your artwork and config file
After creating a few past itunes programs, I just had to edit a few lines in my itunes displayer program. If you don’t want to create your own program, here is an adjusted version of itunes_displayer for you to run. This isn’t really ideal, since a popup jumps up every track change, etc. here’s some code (it’s vb6, not vb.net) that might help you to set it up:
‘Declarations
‘Allows us to communicate with the running iTunes application
Dim WithEvents iTunes As iTunesApp
Dim Track As iTunesLib.IITTrack‘iTunes play event
Private Sub iTunes_OnPlayerPlayEvent(ByVal iTrack As Variant)‘Find the current track
Set Track = iTunes.CurrentTrackDim Art1 As iTunesLib.IITArtworkCollection
Dim Art2 As iTunesLib.IITArtwork
Set Art1 = Track.ArtworkIf Art1.Count > 0 Then
Set Art2 = Art1.Item(1)
Art2.SaveArtworkToFile (”C:\art\” & Track.Artist & ” - ” & Track.Album & “.jpg”)
Open “C:\art\config.txt” For Output As #5
Print #5, Track.Artist & ” - ” & Track.Album
Close #5End If
End Sub
Either way, you’ll need the artwork and the config file one way or another.
Now all you need to do is run the itunes_displayer program (or your own alternative), and then enable the addin! Hope it works out for you!
A few notes:
-Your messenger picture does not change in real time for everyone. When you have an active conversation open, the person might see your picture change. If not, it won’t always be apparent to others that your picture is changing.
-I had to make all the files and such because despite the signed dll and assembly folder move, the sandbox still doesnt let me open an itunes reference from within the addin. If anyone knows a more efficient way to do this, i’d love to hear it!!
Tuesday, February 19th, 2008
How to change your MSN Display Picture to iTunes’ Current Playing Album Art
Update: If you’d rather just download a program instead of writing your own to do this for you, take a look at CD Art Display. It’s free to download, and will do even more than just show album art in your msn profile picture.
This little howto is actually quite involved. I wasn’t quite sure what was possible with the new Live Messenger Addin capability, but as it turns out, it is quite difficult to bypass some of the barriers set up by the addin technology. If you are really intent on getting this set up, or are just curious about what I did to get it going, feel free to read on.
A note to those who aren’t interested in the programming side of this post: I’ll post the files you need to download throughout the howto, but these files are not really recommended for everyday use. The actual solution I’ve come to is a pretty odd workaround, though it does work, so feel free to give it a try if you’re brave. You’ll need to go through each step, but you can just download the files for #1 and #4.
What you’ll need:
-some knowledge of VB.Net and a visual studio version with vb.net
-itunes 7.x
-a bit of free time
Step 1: Set up Live Messenger to allow Addins
The new Live Messenger does have addin capabilities built in, but they are not enabled by default (they’re in beta I guess). To enable addins, you’ll have to edit your messenger registry entries. Go to Run, type “regedit” and hit enter. then browse to “HKEY_CURRENT_USER\Software\Microsoft\MSNMessenger” and add a “DWORD” entry called “AddInFeatureEnabled” and change it’s value to 1. Now restart your Live Messenger and go to Options. There should be a tab called “Add-ins”. You’re Messenger is all set to go.
Step 2: Write your .dll file for the Addin
Open up visual studio and start a new Class Library. You’ll want to set up the project name right away, since your Class name has to be the same as the assembly name. Make sure your root namespace is empty. Add the MessengerClient.dll reference (browse to C:\Program Files\Windows Live\Messenger). Then you’ll want to go through and look at this code (download the .dll here):
Imports Microsoft.Messenger
Public Class MessengerAddin ‘<- *Important* this is your assembly name!!
Implements IMessengerAddIn
Public theMessenger As MessengerClientPublic Sub Initialize(ByVal messenger As Microsoft.Messenger.MessengerClient)
Implements Microsoft.Messenger.IMessengerAddIn.Initialize
Me.theMessenger = messenger
Me.theMessenger.AddInProperties.Creator = “SkyCapitan”
Me.theMessenger.AddInProperties.Description = “iTunes Art plugin!”
Me.theMessenger.AddInProperties.FriendlyName = “SkyCapitan’s Addin”
Me.theMessenger.AddInProperties.PersonalStatusMessage = TimeOfDay & ” - Sky’s not listening to music….”
Me.theMessenger.AddInProperties.Url = New Uri(”http://svankruistum.com”)Dim systime As New System.Timers.Timer()
systime.Interval = 5000 ‘This will check our config file every 5 seconds to see if the track has changed
systime.Enabled = True
AddHandler systime.Elapsed, AddressOf OnTimedEventEnd Sub
Public Sub OnTimedEvent()On Error Resume Next ‘in case the config file is not “0″ or an artist_ or album combination
Dim tempin As String
Dim jpeg As String
Dim oRead As System.IO.StreamReader
Dim oWrite As System.IO.StreamWriteroRead = New System.IO.StreamReader(”C:\art\config.txt”)
tempin = oRead.ReadLineIf tempin = “0″ Then
oRead.Close() ‘Nothing new we have to do
Else
jpeg = tempin
‘Change the picture
Me.theMessenger.AddInProperties.UserTile = System.Drawing.Image.FromFile(”C:\art\” & jpeg & “.jpg”)
oRead.Close()
‘Change the config file back to “0″
oWrite = New System.IO.StreamWriter(”C:\art\config.txt”)
oWrite.Write(”0″)
oWrite.Close()End If
End Sub
End Class
A large part of this code is courtesy of a blog post at Nick’s .NET Travels, found here. His example sets up a few other Messenger Events that you might like to explore. There is a lot of opportunity for some interesting addins.
The addin should be operational at this point, but another problem lies with MSN’s strict sandbox for addins…
Step 3: Set up your MessengerAddin.dll to allow the System reference
The code above needs to access the system namespace for a few reasons: get the art file, check the config file, and use the system timer. Due to the sandbox restrictions in place by MSN Messenger, we need to register the addin on our system.
To do this, first you must sign your file. This is done under Project Properties -> signing. Sign the addin and add a password of your choice.
Next, you’ll need to save and build the class library. Then browse to the location of the built .dll file. Now you need to drag and drop the file into your C:\WINDOWS\assembly folder.
Open up MSN, and try enabling your addin. Everything should work (though you don’t have the artwork and the appropriate config file yet).
Step 4: Create a program to save your artwork and config file
After creating a few past itunes programs, I just had to edit a few lines in my itunes displayer program. If you don’t want to create your own program, here is an adjusted version of itunes_displayer for you to run. This isn’t really ideal, since a popup jumps up every track change, etc. here’s some code (it’s vb6, not vb.net) that might help you to set it up:
‘Declarations
‘Allows us to communicate with the running iTunes application
Dim WithEvents iTunes As iTunesApp
Dim Track As iTunesLib.IITTrack‘iTunes play event
Private Sub iTunes_OnPlayerPlayEvent(ByVal iTrack As Variant)‘Find the current track
Set Track = iTunes.CurrentTrackDim Art1 As iTunesLib.IITArtworkCollection
Dim Art2 As iTunesLib.IITArtwork
Set Art1 = Track.ArtworkIf Art1.Count > 0 Then
Set Art2 = Art1.Item(1)
Art2.SaveArtworkToFile (”C:\art\” & Track.Artist & ” - ” & Track.Album & “.jpg”)
Open “C:\art\config.txt” For Output As #5
Print #5, Track.Artist & ” - ” & Track.Album
Close #5End If
End Sub
Either way, you’ll need the artwork and the config file one way or another.
Now all you need to do is run the itunes_displayer program (or your own alternative), and then enable the addin! Hope it works out for you!
A few notes:
-Your messenger picture does not change in real time for everyone. When you have an active conversation open, the person might see your picture change. If not, it won’t always be apparent to others that your picture is changing.
-I had to make all the files and such because despite the signed dll and assembly folder move, the sandbox still doesnt let me open an itunes reference from within the addin. If anyone knows a more efficient way to do this, i’d love to hear it!!
Friday, February 8th, 2008
Top 5 Firefox Extensions
Tweaks and extensions go hand-in-hand, so here are my favourite extensions:
This extension does what it says: it blocks ads. However, instead of using a centralized list for blocked content, I choose what to block. I’d prefer not to block any ads at all (as an aspiring web developer I understand the need for ad revenue), but some ads just have to be blocked (speaking smiley’s anyone?). I use it especially to block questionable content from some of the sites I frequent (avatars, and half-naked ads).
While I’m sure it’s easy enough to find or make a search plugin for firefox, it’s a lot easier right-clicking a search box and adding it to the firefox search bar.
3. Smart Bookmarks Bar (and favicon picker)
These two go hand in hand. Smart bookmarks shows only the favicon for sites on your bookmarks toolbar. Favicon picker allows you to select icons for missing favicons. This clears up a lot of space in my firefox:
(in case you’re wondering where my menu-bar went, i use the “Hide MenuBar” Extension, which gets honourable mention.)
4. Foxmarks Bookmark Synchronizer
A great extension if you often use firefox on more than one computer. I use this so that the bookmarks on my main desktop are always the same as the bookmarks on my media pc located in the living room. Also serves as a good backup if you ever lose all your firefox data.
Just because it’s a lot more work to switch between firefox and another ftp program. This one is perfect for web developers.
If you don’t trust my selections, check out Lifehacker’s top 10 Must-have Firefox extensions.
Friday, February 8th, 2008
Top 3 firefox tweaks
So after a clean windows install having finished my new computer build, I have finally fixed up my firefox with 3 key tweaks.
Top 3 about:config tweaks:
Just type “about:config” in the address bar in firefox to see all the possible tweaks in firefox.
- browser.search.openintab: set to true if you’d like the search box to open a new tab whenever you use it. (this is probably my favourite tweak.) This lets you search stuff that’s open in your current tab without leaving the page.
- network.http.pipelining: set to true if you’d like to use firefox’s ability to send out multiple data requests (and speed up your browsing). You can go further by changing the pipelining.maxrequests to a larger number (though this might put a bit more strain on websites…)
- browser.startup.page: set to 3 and whenever firefox opens, it goes straight to whatever site was open when you closed it. This is great whenever you accidentally close firefox. It would also let you disable firefox’s warning when you try to exit with tabs open (set browser.tabs.warnOnClose to false)
Friday, February 8th, 2008
How to add bpm information to your tracks
Adding bpm (beats per minute) info can be beneficial to a variety of users. Perhaps you’re an aspiring DJ, or like to jog with your ipod, or maybe you just like dancing to all the fastest songs in your music collection. No matter what your reason is, it’s relatively easy to add bpm tags to your files. The best program I’ve found is called MixMeister BPM Analyzer. The program allows you to pick mp3 files, and will automatically determine a bpm value. The bpm value is stored in the id3 tag of the file, and will show up in your favourite media player (as long as it isn’t boring old Windows Media Player).
The Bad News: I originally had visions of amazing playlists where I’d have all my fast rock tracks, and all my slow tracks separated for various moods, but as it turns out, bpm can only take you so far. In my experience, the bpm value really only allows you to match songs up without a change in pace. The value itself does not tell you too much about the actual feel of the track. Just because the speed is 120bpm doesn’t necessarily make it a rock track. For example, over half of Jay-Z’s “Black Album” has an average bpm of around 90 (with about 2 tracks at 165 bpm) while Belle & Sebastian’s “Dear Catastrophe Waitress” has an average bpm of around 135. I wouldn’t consider Belle & Sebastian more intense than Jay-Z, even though their songs have a faster tempo.
The Good News: The bpm value can provide some good insight when comparing tracks by the same artist. Since an artist is generally consistent within it’s own genre, the tempo of a track can really help show where the “slow songs” are on an album. The only difficulty with this is that I have yet to find a valid algorithm within iTunes’ smart playlists to properly compare bpm values between songs on the same album.
It’d be interesting to explore some more applicable uses for the bpm value of a track for an everyday iTunes user.
Wednesday, February 6th, 2008
iTunes Last.FM Tagger with Automatic Mode
I just finished adding an automatic option for the itunes tagger. This means that the program will no longer overwrite any existing data unless the “Only check for missing data” option is disabled (in which case everything will be replaced). I also increased the delay between requests to last.fm. The web service provided by Last.fm will ban your IP address if more than 1 query is sent each second. This would be a very bad thing to happen, so I’ve set the program to only query every 2 seconds. As such, for each song you search in automatic mode, the program will require about 2.5 seconds (ie. 100 songs = 4.2 minutes).
Leave comments if you have anything to say about the latest release. Enjoy!
Friday, February 1st, 2008
iTunes Tagger (now with Last.FM tags!)
Turns out that the fingerprinting software from Musicip.com was a bit more restricted than I thought. So I completely redesigned my tagging program to work with a more recent player in the market, a last.fm fingerprinting client. This client was released by a guy named Norman (to whom I have no affiliation). To learn more about the last.fm fingerprinting program, visit here.
Anyways, the important part is this: The new program automatically searches the top 5 last.fm tags for each selected track, then saves the top tag as the song genre and saves all 5 tags in the comments. I actually have genres now for my top 300 tracks in itunes, from a mere 10 minutes of tagging. Give it a try and see how it works. The biggest problem? People who use ridiculous tags on Last.fm
Oh, and the program will also automatically find any missing metadata for your track using the last.fm fingerprinting stuff as well as some musicbrainz data. Pretty nifty.
