Showing posts with label music. Show all posts
Showing posts with label music. Show all posts
Sunday, May 29, 2011
Saturday, January 22, 2011
... and now something completely different
I think it is about time I posted something which dose at least some justice to the name I gave this blog. Here is a short list of Indie artists who you'll see climbing up my charts on Last.fm and Libre.fm. I got to know them via the recommendations made to me by Libre.fm community radio and have downloaded their music either through their websites, or via Jamendo.
As I have been listening to plenty of main stream music, I'll try to put their characteristics in perspective by pointing to the mainstream artists who are like and not-so-like them. Unfortunately, as I have not been listening to the latest music a lot (I am out of touch with 80% top-10 artists on Last.fm for 2010), pardon me for slightly arcane comparisons.
As I have been listening to plenty of main stream music, I'll try to put their characteristics in perspective by pointing to the mainstream artists who are like and not-so-like them. Unfortunately, as I have not been listening to the latest music a lot (I am out of touch with 80% top-10 artists on Last.fm for 2010), pardon me for slightly arcane comparisons.
Saturday, November 13, 2010
Getting Rhythmbox to play desired songs in awesome
Awesome is a pretty good tiling window manager I have recently taken some liking to. I initially started with it for the simple reason that I was working with a Matlab script which spawned tens of figures and I wanted to view them simultaneously. I am sure there are easier ways of viewing those graphs than switching window managers from Gnome (which I still think is pretty good) to Awesome, but it was a valid reason to procrastinate in my own way. :-)
Anyhow, some of the things I really missed from Gnome were:
- sticky notes
- Gnome-Do and Pidgin integration (opening IM windows by just Super + Space + Buddy name )
- Gnome-Do and Rhythmbox integration (playing songs by just Super + Space + Song name )
It is the last thing which I got tired of today and looked at how I can fix it. The configuration turned out to be fairly easy to, thanks to the general awesomeness of Awesome and handy Lua documentation. It happened in the following steps:
- Getting to know rhythmbox-client can play songs using their URI, which is just the path of the file in case of local files.
- Understanding how to configure awesome using /.config/awesome/rc.lua
- Figuring out how to get a prompt to type in a song name, which turned out fairly simple thanks to awful.prompt
- Understanding functions in Lua and writing functions for Notification and running the rhythmbox client:
myRhythmboxFunction =
function (c)
home = os.getenv("HOME")
file = io.open(home .. "/.song_list")
if not file then
myNotifyFunction("~/.song_list does not exist")
else
found = false
myNotifyFunction("Searching for " .. c)
c = string.lower(c)
for song in file:lines() do
songLower = string.lower(song)
if string.find(songLower, c) then found = true awful.util.spawn ("rhythmbox-client --play-uri=\"" .. song .. "\"") myNotifyFunction("Found, playing") break end end file:close() if not found then myNotifyFunction("Not found") end end end
It is not difficult to guess what this function does:
- Open the file /.song_list
- Read one line at a time and figure out whether the parameter
occurs in the string or not (not very robust)
- If so, great! Play it!
- Otherwise, if no song is found, display a notification and let things be
- Understanding how to add global key bindings:
awful.key({ modkey, }, "p", function () awful.prompt.run({ prompt = "Play: " }, mypromptbox[mouse.screen].widget, myRhythmboxFunction, nil) end),
Here, mypromptbox is just the usual Run prompt which I have borrowed to act as the play prompt box.
After these rudimentary changes, I did:
find /my/music/folder | grep -v 'No directories' > ~/.song_list
To prepare the .song_list file needed in myRhythmboxFunction , and voila!
My songs are now Super + P + Song name away!
The next additions on my dashboard are the Pidgin integration and some sort of periodic mail notification without needing either evolution or thunderbird running in the background.
Some other holiday ...
Automatic playlists in Rhythmbox
This is a neat trick that I didn't know Rhythmbox had up its sleeve. I have made a few automatic playlists which keep me a little closer to my songs:
- Play count > 5 and last play time is at least a week before.
- Play count = 4
- Rating 4 stars and play count > 4
- ...
If you haven't already, you must give it a try!
Subscribe to:
Posts (Atom)