On 4/7/06, Jay R. Ashworth <[EMAIL PROTECTED]> wrote:
> On Fri, Apr 07, 2006 at 12:29:58PM -0600, William Ferrell wrote:
> > 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.
> This is really spiffy.  I'm not sure how easily I'm going to be able to
> integrate it with the control-top I want to construct (which I've
> finally, at least, sketched out, and am trying to learn Glade to mock
> up), but...

Yeah, I'm still trying to get some of the interface elements down
better. It's usable right now thanks to Enlightenment but it could
definitely be better.

> > The JACK Audio Connection Kit is a real-time virtual mixing board for
> > Linux (and possibly other platforms; I haven't yet investigated this)
> I understand JACK has been ported successfully to OS/X now, which
> probably isn't too surprising.

Yeah, that's spiffy. I haven't got a Mac to test it with though :(

> > that uses a low-latency server and protocol to connect sound
> > applications and devices to each other. It can control all sorts of
> > real hardware (sound cards, MIDI controllers, etc.) and can accept
> > inputs from just about anything (media players, MIDI controllers,
> > etc.) for both audio and control.
> Specifically, it can talk to my Phase 26 USB box, with 3 stereo outputs
> (I'm very much a "real mixing board" kind of guy).

Ooooh, spiffy :) I likey :)

> > JACK includes a useful tool, qjackctl, that will be used in this HOWTO
> > to configure JACK and to automate patching our different tools
> > together.
> You do *not* want to try to play with JACK without qj; take my word on
> this.

Oh I learned that the hard way :)

> > This HOWTO uses JACK Rack for two things: first, it is used to perform
> > the actual pitch-shifting work when needed (audio from PyKaraoke is
> > passed to JACK Rack instead of straight ot the sound card). Second, it
> > performs crossfading work; I use different audio sources
> > (specifically, XMMS and MPlayer) during my shows, and smoothly
> > transitioning from them to CD+G music and back is important. JACK Rack
> > is, in this configuration, the only piece of software on the chain
> > that is connected to the sound card. All audio playback runs through
> > JACK Rack whether it is doing anything to the sound or not.
> Can JR, or the modules it encases, be controlled by DBus (or any other
> message passing facility)?

I don't know yet; I need to test some more things. I sure hope it can
-- I'd love to be able to control the crossfader with a real slider,
for example.

The site claims it can be controlled via the ALSA sequencer, though,
so it looks like it's possible.

> > It supports MP3, Ogg Vorbis, WAV, FLAC, and all sorts of other audio
> > formats. It can play video (via MPlayer, actually), but we want manual
> > control over that kind of thing so we'll only be using XMMS for audio.
> Mplayer is sort of ungainly for playing audio directly, isn't it?

Absolutely; I only play videos with it. It overlays the normal display
while it plays.

> > MPlayer is a multimedia player for Linux. It supports audio and video
> > playback, tons of media formats, lots of output devices and types, and
> > has more features than I can adequately count here.
> Here's a curious idea: I wonder how hard it would be to recast Kelvin's
> rendering code as an Mplayer codec?  Did we already talk about this?

Hmmm... that'd be interesting; Mplayer is good at dealing with
scaling. We could just feed it the unscaled bitmap and let it handle

> > For our purposes, we'll simply be chaining it to JACK as an audio
> > source (letting it do its own thing for video, if needed) so we can
> > crossfade between it and the filler music XMMS provides.
> How *are* you deconflicting video output sources, anyway?

Mplayer uses SDL for video *and* audio on this machine since OpenGL
and XV support broke a few months ago (the bastards :).

I don't run Mplayer and PyKaraoke simultaneously, though they can do
so without breaking. The Patchbay thing figures it out properly.

> Note: SuSE, in particular, tends to have an out of date JACK; I
> wouldn't be surprised to find that other distros do as well -- Will?
> Could you document the version numbers of all your components?

Absolutely, I'll update the writeup tonight or tomorrow with numbers.

> This is *nice* detail, Will.

Thanks :)

> > 2.2. Setting Up the Sound Processor (JACK Rack)
> >
> > Start up JACK Rack (the command is "jack-rack"). It will start with an
> > empty effects stack, which is what we want.
> Do you mention where is the best place to start all this stuff?
> .profile for the login account?  /etc/rc.*?

Heh. Crap. I totally forgot to include my script that initializes
everything for me. I'll include that with the version number update.

> > PyKaraoke needs no modifications because it uses SDL, which honors
> > .asoundrc. MPlayer needs to be told either to use JACK or SDL as its
> > audio output method:
> >
> > # mplayer -ao sdl ...
> >  -or-
> > # mplayer -ao jack ...
> You can configure that in mplayer.conf, right?

Yes, you can. I'll add this in my next revision.

> > Fire off an MPlayer instance with a song to make sure it appears as a
> > client in the qjackctl Connections window.
> >
> > If you're using MPlayer with SDL, you'll notice that PyKaraoke and
> > MPlayer appear pretty much the same within the Connections window.
> > That's an important detail later.
> Because you're cheating?  :-)

Exactly :)

If you're using JACK output directly, you just need to add another
Output Socket to catch Mplayer. Tie it to the sound processor. Another
point for me to add in the next update :)

> > I've posted this HOWTO at
> > http://willfe.com/index.php/Pitch-shifting_With_PyKaraoke_and_JACK_HOWTO
> > as well. I'll get it formatted properly here in a few minutes.
> And, BTW; kudos on the site; blogging with MW isn't easy.

Thanks, and you're right, it's a pain in the ass. I had to modify code
to make that work. I'm tempted to switch it to Plone instead.

Looking for something to read? Visit http://willfe.com/ ... it's easy,
safe, and fun for the whole family!

This SF.Net email is sponsored by xPML, a groundbreaking scripting language
that extends applications into web and mobile media. Attend the live webcast
and join the prime developer group breaking into this new coding territory!
Pykaraoke-discuss mailing list

Reply via email to