Syndicate content

Custom Search

Howto

Implementing pitch-shifting and crossfading (for filler music/other sources) for PyKaraoke on Linux with JACK

PyKaraoke doesn’t currently support pitch-shifting natively during song playback, and this is about the only missing feature that prevents PyKaraoke from being a complete digital replacement for the traditional analog CD+G player.

This is the case because PyKaraoke relies on Pygame’s MP3/Ogg/WAV playback engine, which does not (currently) provide any means of applying effects filters to the sound before it hits the sound device. It would be possible to replace this with our own threaded MP3/Ogg/WAV player, and use libsoundtouch to perform pitch-shifting (it is a very high quality, faster-than-realtime pitch shifter and time compressor/expander), but that’s a significant undertaking. There are no Python bindings for libsoundtouch, so using it would mean mucking with SWIG, which has always given me fits.

On Linux at least, there is an alternative solution that ultimately provides more flexibility anyway in building a sound layer that permits all sorts of cool sound effect possibilities.

This HOWTO attempts to document how the whole thing fits together, how to implement it on your own system, and how to use it in production at a karaoke (or really any DJ’ed) show. Read the full story...

Technorati Tags:Technorati Tags:

Append to (Instead of Overwriting) an Audacious Playlist from Within Firefox

Maybe I’ve overlooked something stupid, but Mozilla Firefox 2.x (I haven’t tested in 3.x yet) is quite inflexible about options and command-line arguments for external (“helper”) programs. This manifests itself in a number of ways, but the one I’m dealing with today is this:

  • I’ve got Audacious (a music player for Linux) playing a playlist of decent stuff (all streamed internet radio, but that doesn’t matter).
  • I’ve got another .PLS (a “playlist” file) I’d like to add to my existing playlist (stick the new tracks contained in the new playlist at the end of the already-defined playlist in my Audacious player)
  • Audacious is smart enough to know when it’s run to check if another copy is already running; if so, it just tells that other copy to do what you’ve told the new copy to do
  • Audacious defaults to replacing the current playlist with a new file or playlist provided on the command line; to make it append instead, you have to call it with the “—enqueue” command line argument
  • Firefox won’t let me add any command line arguments to a helper program

Dammit. That sucks, except that Linux (any Unix, really) makes it quite simple to fix this kind of breakage with a specialized little script. Read the full story...

Technorati Tags:Technorati Tags: