Showing posts with label Music. Show all posts
Showing posts with label Music. Show all posts

Wednesday, June 2, 2010

Gnome and Aqualung keyboard shortcuts

Aqualung doesn't integrate into Gnome directly as far as keyboard shortcuts go.  What I want is to be able to press a key sequence and toggle pause and play.  It turns out to be pretty easy:

First, start Aqualung and make sure the pause and play buttons are combined.  There is a check box under Settings/General to combine them.

Then adjust Gnome:
1. Open gconf-editor
2. Drill down to apps/metacity/keybinding_commands
3. Double click on an empty command and enter:
aqualung -N0 --play
That is a zero.
4. Remember your command number, then go to apps/metacity/global_keybindings
5. Find the run_command that has the same number as your command number, then double click on it.
6. Type in the key sequence that you want for pause/play.  I used 
<Control><Alt>p


That's it.  

Update 26 May 2011: I've switched to using KDE rather than Gnome. Here's how to set up the same keyboard shortcut in KDE:

  1. Open the System Settings. On my installation, I click the "K", then Settings, then System Settings.
  2. Choose "Shortcuts and Gestures" from the Common Appearance and Behavior section.
  3. Select Custom Shortcuts.
  4. Click the Edit button (towards the bottom), then New, Global Shortcut, Command/URL.
  5. Enter a name for the new action, I used "Aqualung Pause/Play".
  6. On the Trigger tab, enter Ctrl+Alt+P by pressing those 3 buttons.
  7. On the Action tab, enter aqualung -N0 --play for the command.
  8. Click the Apply button at the bottom.
That's it.

Update 28 June 2011: I've dumped KDE and am now using Xubuntu. Here's how to set up the same keyboard shortcut for XFCE:

  1. Open the Settings Manager. On my installation, I click the gear in the panel, then Settings, then Settings Manager.
  2. Choose "Keyboard".
  3. Select the "Applications Shortcuts" tab.
  4. Click the "Add" button.
  5. Enter aqualung -N0 --play for the command, click the "OK" button.
  6. Press Ctrl+Alt+p.
That's it. 

Update 15 Dec 2011: I'm still using Xubuntu, but somewhere along the way something changed. For step 5 above, use this for the command:

aqualung -N0 --pause
 

Saturday, February 27, 2010

Capturing audio from a flash file

Suppose you have a flash file that you want to extract the audio from. Perhaps it's an educational thing where the video really doesn't add much to the information, and you just want the audio so you can listen to it on your way to work.

You can use this script to download a flash file from YouTube:

http://www.catonmat.net/blog/revisiting-gnu-awk-youtube-video-downloader/

To run this script, just do

gawk -f path/to/get_youtube_vids.awk url/to/youtube/page

e.g.

gawk -f ./get_youtube_vids.awk http://www.youtube.com/watch?v=N_AqSbgMMS8

Copy the url out of the location bar of the browser. This created a file named N_AqSbgMMS8.flv in the current directory. This script should show progress, but that part seems to be broke. It'll claim to be at 0% for the entire download. It's better to check the file system for progress.

To dump the audio portion of the file, run ffmpeg from the command line. First do this:

ffmpeg -i N_AqSbgMMS8.flv

and see something like this:

Seems stream 0 codec frame rate differs from container frame rate: 1000.00 (1000/1) -> 25.00 (25/1)
Input #0, flv, from 'N_AqSbgMMS8.flv':
Duration: 00:08:16.36, start: 0.000000, bitrate: 103 kb/s
Stream #0.0: Video: flv, yuv420p, 320x240, 95 kb/s, 25 tbr, 1k tbn, 1k tbc
Stream #0.1: Audio: mp3, 22050 Hz, stereo, s16, 8 kb/s
At least one output file must be specified

Then run this:

ffmpeg -i N_AqSbgMMS8.flv -vn -ar 22050 -ac 2 -ab 64 -f ogg bettername.ogg

-vn means no video
-ar means audio sampling frequency, set it to the same as in the output from ffmpeg -i
-ac means the number of channels, so if ffmpeg says 'stereo', use 2, if ffmpeg says 'mono', use 1
-ab is bit rate, the default is 64k
-f is the output format. "mp3" could be used in place of "ogg", but the restricted codecs would need to be installed. You can check the supported formats by running 'ffmpeg -formats'.

The ogg output produces a file that is a little weird. mplayer plays it from the command line just fine. Exaile adds it to the playlist, but the line in the playlist is blank. Exaile does play the file, though. Aqualung doesn't even seem to be able to load the file at all. No complaints from vlc.

To install the restricted formats, google around for "ubuntu restricted codecs" to find suitable instructions. After that, use synaptic to install both libavcodec-extra-52 and libavformat-extra-52 on Ubuntu 9.10. The mp3 file that is created works on all 4 of the players I tested, although Exaile still shows a blank line in the playlist. Maybe that's just a bug in Exaile.




Saturday, December 5, 2009

Golden Robot Army


I ran across a link to this band yesterday. They have free download of all their music available on their website. This group is from Seattle, and is growing in popularity in the NW. More than anything else, I'm reminded of the Grateful Dead. Good music, and definitely worth a listen. Unless you happen to live in the Pacific Northwest and catch one of their shows, this is probably the only way to hear their music.

Sunday, October 25, 2009

Chillits


I saw a link on Boing Boing to Chillits last week. Chillits is an exclusive annual ambient music festival held every September at a private retreat center near Willits, California. I've just started working my way through it all, but so far so good. The Wikipedia page has links to the music from this year and previous years.

Saturday, September 12, 2009

Carlos Saura


I was looking around Jamendo a while back, and ran across some excellent guitar tracks by Carlos Saura. The album is titled "Un Viaje a lo Infinito (A Trip to the Infinite Thing)". It's a smallish album, only 4 tracks for about 20 minutes worth of music. All four tracks are very good guitar instrumentals, reminiscent of Joe Satriani. He has a second album, self-titled "Carlos Saura", that I haven't listened to yet, but it is rated higher than his first effort, so I'm sure I'll download it soon.

Friday, September 11, 2009

Autolux


I was looking through my music collection last night for something different to listen to and ran across 'Future Perfect' from Autolux. When I bought the CD 3 or 4 years ago, I played it almost non-stop for several months. It's not my typical code-writing music, but it sure is a sonic treat. Autolux fits in alternative rock category, with a tendency towards being a shoe-gazer band. I like the way the songs flow from one to the next with a clear break but not really. I bought the CD after hearing 'Here Comes Everybody' on one of the Directv music channels. This is a really well done album and worth a listen if you get a chance. There are a few songs available for streaming on their MySpace page. 'Future Perfect' came out in 2004, and supposedly the group is working on their second album to be release next spring.

Monday, September 7, 2009

Das Kraftfuttermischwerk


I listen to a lot of ambient/electronic music while writing code. One of my favorite sites for such music is www.kahvi.org, which has a ton of free, downloadable and streamable music.

Das Kraftfuttermischwerk has a new release on kahvi titled "Im Garten der Scheekugel", In the garden of the snowglobe, is an excellent album and worth a listen.