On 11/14/05, Jay R. Ashworth <[EMAIL PROTECTED]> wrote:
On Mon, Nov 14, 2005 at 12:16:47PM -0700, William Ferrell wrote:
>    I've  given  it some thought; once we get pykaraoke switched over to a
>    different  playback engine (so we can play with the audio stream as it
>    heads  to  the  sound card), it'd be a matter of getting synced frames
>    (audio  and video) to an encoder. That might be a tad on the difficult
>    side :) I've never written an encoder before :)

And, come to think of it, the pitch and tempo shifting stuff is
probably made *harder* by that...

Actually not; pitch/tempo shifting is currently impossible in pycdg because of its use of pygame; we hand pygame's mixer module an MP3, Ogg, or WAV file to play, and it goes and does it. We get *no* chance to muck with the audio it produces at all.

Wanting to shorten or lengthen an song *does* make CDG rendering more "interesting" (you're no longer executing 75 packets of instructions per second) but once that wrinkle is ironed out, producing an encoded video of the result remains at the same difficulty level as just doing it without pitch/tempo shifting.

>      (Obviously, my preferred target would be Vorbis/Theora...)
>
>    Yeah, that'd rock.
>    I've got a few modifications to make to cdgrip.py, actually. I already
>    modified  it weeks ago to compress ripped audio to Ogg instead of MP3,
>    but  never  made  it  "clean,"  so I intend to fix that, and I figured
>    since  people  like  distributing  CDG+Audio  pairs in archives (.zip,
>    etc.)  and  cdg2bin  supports extracting them already, the rest of the
>    toolchain  might  as  well  support  it  too  (creating  .zip/.tar.bz2
>    archives during rip, extracting during playback, etc.).

Probably couldn't hurt.

Sounds like we're building a library. 

Switching from MP3 to OGG and from .zip to .tar.bz2 saved me 24.736% on a 19.7GB collection of karaoke pairs. The new collection after recompression is 14.8GB in size (savings of 4.9GB). That currently comprises 4,849 songs. Yay :)

Incidentally: Kelvin; I've been through much of your python code the
last 24 hours; please let me compliment you on your *insanely* good
coding and commenting style.

Seconded; that's what made it so easy to quickly learn how the player worked and figure out how to patch it (mostly properly :) to add features I wanted.

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

Reply via email to