everything related to duct tape audio suite (dtas)
 help / color / mirror / code / Atom feed
* Output the filename of the current playing song
@ 2015-11-27 10:33 Rene Maurer
  2015-11-27 11:34 ` Eric Wong
  0 siblings, 1 reply; 2+ messages in thread
From: Rene Maurer @ 2015-11-27 10:33 UTC (permalink / raw)
  To: dtas-all

Hello

I am really very happy using dtas. There are some minor things I miss.
One thing is a shortcut to get the filename of the current playing song.
For example something like this: 

# COMMANDS

* current song [FILENAME] - output the filename of the current playing
  song or the song at the top if the queue in case the player is
  paused. If FILENAME is specified, the output is written to that file.

Best
René


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Output the filename of the current playing song
  2015-11-27 10:33 Output the filename of the current playing song Rene Maurer
@ 2015-11-27 11:34 ` Eric Wong
  0 siblings, 0 replies; 2+ messages in thread
From: Eric Wong @ 2015-11-27 11:34 UTC (permalink / raw)
  To: Rene Maurer; +Cc: dtas-all

Rene Maurer <rmnet@mailc.net> wrote:
> Hello
> 
> I am really very happy using dtas. There are some minor things I miss.
> One thing is a shortcut to get the filename of the current playing song.
> For example something like this: 
> 
> # COMMANDS
> 
> * current song [FILENAME] - output the filename of the current playing
>   song or the song at the top if the queue in case the player is
>   paused. If FILENAME is specified, the output is written to that file.

Great to know you're still using it!

You can use "dtas-ctl current" and parse the YAML output.
Perhaps something along the lines of:

	#!/usr/bin/env ruby
	require 'yaml'
	x = YAML.load `dtas-ctl current`
	if cur = x['current']
	  puts cur['infile']
	elsif x['paused']
	  x = YAML.load `dtas-ctl queue cat`
	  puts Array(x[0])[0]
	end

Fwiw, I never intended the current player protocol to be used
much; but was planning on writing an MPRIS proxy to talk to
dtas-player and encourage users to use existing MPRIS clients
instead...

However, MPRIS seems to be a dead-end for text-only clients;
while mpd has a strong following.   So I'll probably start work
on an mpd protocol proxy over holidays, so we'll have a lot more
clients able to use the playback features dtas-player.

Of course, the editing/effects features of dtas will only be
available via the dtas-player protocol, but the MPD-compatible
library will be able to play YAML files intended for
dtas-splitfx (or anything dtas-player understands).


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-11-27 11:34 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-27 10:33 Output the filename of the current playing song Rene Maurer
2015-11-27 11:34 ` Eric Wong

Code repositories for project(s) associated with this public inbox

	https://80x24.org/dtas.git/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).