Re: Exact time based music player w/ custom fading (tricky!!)
Peter Eisenlohr <[email protected]> Wed, 18 Jan 2006 23:07:12 +0100
| Newsgroups | gmane.comp.multimedia.xmms.devel |
|---|---|
| Message-ID | <[email protected]> |
> I'm trying to find a music player that is capable of playing music at exact (read: absolute) times w/ different fade-ins and fade-outs. The playlists contain absolute time (i.e. 07:03:42) at which the then given mp3 (056-001.mp3) starts playing.
> There is extra fade-in and fade-out info in the playlist: fadein-startpoint (there is songs which do not start at 00:00:00), fadein-duration in seconds, dbA-value from which the fadein starts (it's not the usual 0-to-100 fade!), mixpoint (i.e. the time at which the following song starts to crossfade-in), fadeout-startpoint, fadeout duration, fadeout-to-dBA value.
> An A (or any other character we can chosse) tells the system that the following song must start exactly at the given time, every following track has to follow the fadein-mixpoint-fadeout schedule and not necessarily the time given.
>
> Confusing enough? ;-)
>
> Here's an example (I've made this up - dont count seconds here please):
>
> 06:55:53 5052.mp3 338.664 7.368 0.047 -48 1.825 334.986 -8 1.248
> A
> 07:00:00 17937.mp3 (...)
>
> 06:55:53 is the time at which the file should start.
> 5052.mp3 is the filename of the title (could be mp3 od mpg for layer II files).
> 338.664 is the absolute lenght of the file w/out any cuts.
> 7.368 is where the title starts playing - the stuff before is left unplayed.
> The title will fade in for 0.047 seconds from -48 dbA to 0 dBA.
> 1.825 is (in seconds from the end) where the next track starts ("Mixpoint").
> The title will stop playing at 334.986 seconds,
> it fades out 1.248 seconds from 0 to -8 dBA.
> A again means that whatever is still playing stops at about 06:59:57 (steep fadeout) and 17937.mp3 will start at exactly 0700h.
>
> Lets hear it if someone thinks something like this is possible using XMMS...
I think this is possible, although still requiring some work. Most of
this is already implemented in the XMMS-crossfade plugin
(http://www.eisenlohr.org/xmms-crossfade). The only thing is that the
settings for crossfading are currently static and not configureable on a
per-song basis.
The timing information could possibly be stored in the MP3 comment
field, or in some other sort of central data file. Back in 2001, I tried
to implement something like this (with help from Thomas van der
Stichele), but the code never made it out of its #ifdef jail :/
Also missing is an option to completely skip parts of the beginning
and/or end of a song (the 7.368 and 334.986 in your example). This
should not be too hard to implement in XMMS-crossfade. It can only be
used to cut off relatively short pieces, since the audio data needs to
be decoded even though it is never being sent to the output.
You would also need some other component that does the exact scheduling
of songs at certain times. I don't know if there is already such thing,
but it should not be to hard to implement, possibly with bash scripts
only. From the view of XMMS, this becomes a simple loading of a new
playlist at a specified time. In terms of XMMS-crossfade, this is a
manual songchange, which would be appropriately (and configureably)
crossfaded.
So, bottom line, I think this is possible with a relatively small amount
of work, considering the relatively complex feature set you are wanting.
Peter