[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fade out current playing song

From: Eric Wong
Subject: Re: fade out current playing song
Date: Wed, 16 Oct 2013 23:39:56 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Rene Maurer <address@hidden> wrote:
> Is it possible to send a command to the dtas-player in the way that
> the current song is faded out and the next song in the queue (if any)
> is played ("fade-out-now-and-skip")?

Not yet (or easily).  I haven't thought about it, I understand it's a
somewhat popular feature in other players?

> And if yes how should this be done.

I think it's easiest to use the queue internally with trim commands.
Internally, it could do something like the following (totally untested):

  # assuming a 55s file, play the first 50s normally
  dtas-ctl enq-cmd 'sox FILE1 $SOXFMT - trim 0 50

  # I'm not sure if the syntax/commands off the top of my head,
  # but we enqueue a mix command which combines the end of the
  # first track and beginning of the next track:
  a='|sox FILE1 -p trim 50 5 fade ...' # fade out
  b='|sox FILE2 -p trim 0 5  fade ...' # fade in
  dtas-ctl enq-cmd "sox --combine=... '$a' '$b' $SOXFMT -"

  # play the rest of FILE2 normally
  dtas-ctl enq-cmd 'sox FILE2 $SOXFMT - trim 5'

  # If there's a FILE3, we end up having to play all but the last
  # X seconds of FILE2 and repeat the fade using --combine.

I'm not sure if I have time to automate this right now[1].  I think it
should only affect normal tracklist users ("dtas-tl"), since it would
be using queue internally.

I envision the internal queue of dtas-player as something suitable for
production/testing/internals and the tracklist functionality being more
suitable for traditional music player duties.

[1] - My short term goal for dtas is focused audio editing/production,
      as evidenced by the introduction of the trimfx/partstats code in
      dtas.git.  However, I'll probably learn how to do fades properly
      and be more knowledgeable about that stuff soon

reply via email to

[Prev in Thread] Current Thread [Next in Thread]