Tim Phipps
2006-May-08 08:40 UTC
[Flac-dev] metaflac: New tags to replace crossfading in players.
Hi All, I'd like to improve the way MPD (and other players) switches between tracks. I'd like something like crossfade but without any fading. I'd like the player to just overlap the end of one track with the beginning of the next track to provide a nice transition. Crossfading in MPD doesn't work for me since it just ramps the volume up/down over a fixed time and some tracks just don't suit this e.g. tracks that fade in/out already and tracks that start/stop with bangs. I'd like to use the replaygain code in metaflac to also record the volume profiles at the start and end of the track and then use those profiles in the player to work out how much to overlap two tracks by. To do it in one pass will mean recording the non-replaygain volumes and the the player will have to factor in whatever replaygain it's going to use. The player can then have a crossover level set (probably a config setting) and it would calculate the times at which the start and end profiles crossed that level and schedule the crossover accordingly. I think this means storing a set of volumes and times in the tags so the player can do some interpolations and so you don't have to rerun metaflac if you change your chosen crossover level or replaygain settings. What should these tags look like? Should I have tags like: START_90dB=0.000s START_80dB=0.567s START_70dB=2.557s START_60dB=4.676s ... END_80db=200.678s END_90db=201.034s or something like: START_PROFILE="90=0.001,80=0.576,70=2.557,60=4.676" END_PROFILE="80=200.678,90=210.034" I don't know what the dB intervals should be or what the range should be. I'm guessing that anything less than 60db won't matter even though I typed in 90dB above. Any suggestions would be welcome and any help in coding and/or testing would be good. Cheers, Tim.
Josh Coalson
2006-May-09 21:10 UTC
[Flac-dev] metaflac: New tags to replace crossfading in players.
--- Tim Phipps <flac-dev@phipps-hutton.freeserve.co.uk> wrote: ...> What should these tags look like? Should I have tags like: > > START_90dB=0.000s > START_80dB=0.567s > START_70dB=2.557s > START_60dB=4.676s > ... > END_80db=200.678s > END_90db=201.034s > > or something like: > > START_PROFILE="90=0.001,80=0.576,70=2.557,60=4.676" > END_PROFILE="80=200.678,90=210.034" > > I don't know what the dB intervals should be or what the range should > be. I'm > guessing that anything less than 60db won't matter even though I > typed in > 90dB above. Any suggestions would be welcome and any help in coding > and/or > testing would be good.2 general comments: 1. since right now in the api you can only search by exact field name, the second format is probably better; it's also more flexible. 2. if you want these to be machine parseable it's better to use a more specific/unique name than START_PROFILE to avoid conflicting with someone/something else. Josh __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com