alehouse / cantata

Automatically exported from code.google.com/p/cantata
GNU General Public License v3.0
1 stars 0 forks source link

Does Cantata enable playing of hi-rez DSD audio (.dsf & .dff files) or not? #655

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Which version of Cantata?
1.5.2

Which build? KDE, Qt4, Qt5, Windows, Ubuntu, Mac?
Ubuntu-MATE 14.04 LTS

What steps will reproduce the problem?
1. Play any .dsf or .dff (DSD audio) file;
2. You'll notice that the bit-rate is a low 44100 or 48000;
3. instead of the higher bit-rates.

What is the expected output? What do you see instead?
A bit-rate of either 192000, 352800, or 384000 is expected.

Please provide any additional information below.

High-resolution DSD (Direct Stream Digital) audio works fine with all the other 
MPD clients I've used: GMPC, Glurp, mpc, ncmpc, and ncmpcpp.  

But not with Cantata, as far as I've been able to determine.

The .dsf file extension I'm referring to is this: (DSD) Storage Facility files 
(DSF), a digital audio file format and file extension (.dsf).

The .dff extension is the DSD Interchange File Format (DSDIFF) (.dff).

These are the two DSD audio-file extensions.

I don't know what the mime-types for .dsf and .dff are, and they may not even 
be defined.  Or they may be any of:

audio/dsd
audio/x-dsf
audio/x-dff

Searching on what the mime-types are has yielded very little.

From DSD-Guide.com:

DSD or Direct Stream Digital is a one bit recording format.  DSF and DFF are 
'kinds' of audio files that are delivered as downloads or read by software for 
playback. 

DSF has the ability to hold metadata and DFF doesn't, however, some players 
only read DFF files.

In PCM recording, DSF and DFF would be similar to having .wav and .aiff files 
which are both PCM.

More complex answers to the above question exists, but for those new to DSD, 
this is a simple explanation.

SACD (Super audio CD) is a container by which to put DSD audio onto a physical 
medium like a CD or a DVD.

Many DACs play .dsf and .dff files via something known as DoP (DSD over PCM). 
http://dsd-guide.com/dop-open-standard

https://en.wikipedia.org/wiki/Direct_Stream_Digital

Original issue reported on code.google.com by watchpac...@gmail.com on 28 Mar 2015 at 6:02

GoogleCodeExporter commented 9 years ago
Where I wrote "A bit-rate of either 192000, 352800, or 384000 is expected"  
above, (and my other references to "bit-rates") I meant SAMPLING rates, not bit 
rates.  DSD, as mentioned above, is actually a one-bit format, generally using 
a sampling rate of 28 million samples per second (60 times the 44100 sampling 
rate of an ordinary CD), or higher.

Original comment by watchpac...@gmail.com on 28 Mar 2015 at 6:18

GoogleCodeExporter commented 9 years ago
My reply is the same as that on kde-look:

Cantata itself does not play any files - files are played by MPD. Any playback 
issues are issues with MPD, not Cantata.

MPD supplies Cantata with a list of files, and Cantata asks MPD to play certain 
files - that's basically it. It's MPD that is playing the files.

I've never used DSF, etc. - but do these have 1 file per track? How does one 
song have multiple sample rates?

I guess, if there is more than 1 file per track (e.g. two files, with different 
samples rates in each) then Cantata could be adding the wrong file to the 
playqueue.

----------------

I have none of these to test with - so have no idea if there is an issue or 
not.  Questions:

1. Is a DSF/DFF file of a whole CD, or a single track?
2. Are there multiple files per track (or CD, if the answer to 1 is that it is 
per CD)
3. Please provide a directory listing of a DSF/DFF album

If there is only *one* file per track (or CD), then how is Cantata supposed to 
tell MPD with rate to use? To add a song to MPD's queue (so that it gets 
played) all Cantata does is say "add <filename>"

Original comment by craig.p....@gmail.com on 28 Mar 2015 at 10:51

GoogleCodeExporter commented 9 years ago
Also, what makes you think MPD via Cantata is using a different sample rate to 
other clients?

Original comment by craig.p....@gmail.com on 28 Mar 2015 at 1:07

GoogleCodeExporter commented 9 years ago
If the issues are with MPD and not Cantata, why is it that every other MPD 
client plays these files correctly? 

(Or let me say it this way: facilitates or enables the playing, since you 
insist that it is MPD that does the playing, though of course it's really the 
combination of server and client program, obviously, that makes the playing, or 
reproduction, happen.) 

Yes, one file per track. One song does not have multiple sampling rates. Some 
files are created at what's known as DSD-128 or DSD-256fs, but most of them are 
DSD-64fs. 

See:

( 
http://www.audiostream.com/content/dsd-v-pcm-file-comparison-16441-2496-24192-64
x-dsd-128x-dsd )

(http://www.theabsolutesound.com/articles/the-abcs-of-dsd-downloads/ )

Typically a .dsf or .dff file is of a single track. (I've never seen a single 
file contain more than one track.) 

A whole album would be contained within an .iso image.  Never mulitple files 
per track.  Multiple files per album, probably, yes.

> 3. Please provide a directory listing of a DSF/DFF album

See here: ( http://store.acousticsounds.com/superhirez )  

and here:
( https://en.wikipedia.org/wiki/Acoustic_Sounds%2C_Inc.)

and here:
( http://dsd-guide.com/where-can-you-find-dsd-music-downloads )

> then how is Cantata supposed to tell MPD with rate to use?

I'm sorry but I don't know the answer to that, I'm not a Cantata developer or 
code-contributor. I wish I did, and that I could help you more.  All I know so 
far from my end is that Cantata doesn't do what the other clients do.  Maybe 
the key would be to learn more about how mpd handles these files, which it does 
know how to do.

> Also, what makes you think MPD via Cantata is using a different sample rate 
to other clients?

Because my DAC shows me and because there are terminal commands in Ubuntu 

 cat /proc/asound/card1/stream0   

is one,

the output of which show me the exact rates that are produced.  

It's not so much that Cantata is using "a different sample rate to other 
clients" -- it's that Cantata seems to have no awareness of the file-type, and 
so defaults to the standard 44100 sampling rate.

In every other respect, Cantata is a superb mpd client, and if you are the 
developer my hat goes off to you.  But in this one area, it looks like Cantata 
has no awareness yet of the world of high-resolution digital audio files. 

Bit-perfect audio can be tricky for the end-user, because at least on Linux 
systems, Pulseaudio and "ReplayGain" must be disabled, and ALSA enabled and not 
hijacked by anything else that will prevent "bit-perfect" and default to 44100. 
 See thread on head-fi at:

http://www.head-fi.org/t/561961/bit-perfect-audio-from-linux

Original comment by watchpac...@gmail.com on 28 Mar 2015 at 6:33

GoogleCodeExporter commented 9 years ago
I'm sorry - but you seem confused. ALL Cantata does is ask MPD to play a file - 
the playback is done by MPD.

Now if the file only has one sample rate - how can it playback with different 
rates? All I can find on MPD and DSD is: 
http://www.musicpd.org/doc/user/dsd.html

But again, Cantata does NOT do ANY playback.

Why would Cantata need awareness of the type? It does not, and should not, care 
what the file type is - mp3, ogg, wma, flac. Its all handled by MPD. Again, to 
playback a file all Cantata does is "add <filename>" - this adds it to MPDs 
playqueue.

Without a DSD file to play with, there is not much I can even do about this. If 
you can supply me with a copyright free sample - then I can investigate. But 
unless there is some MPD command to control its config, then I can't see that 
there is much Cantata can do.

If you want this "issues" fixe - then you are going to need to be a little more 
helpful.

Original comment by craig.p....@gmail.com on 28 Mar 2015 at 7:28

GoogleCodeExporter commented 9 years ago
Sorry - I really should read more carefully! But can you please provide a 
download link to a file that you have tested that shows the issue?

Original comment by craig.p....@gmail.com on 28 Mar 2015 at 8:11

GoogleCodeExporter commented 9 years ago
> I'm sorry - but you seem confused. ALL Cantata does is ask MPD to play a file 
- the playback is done by MPD.

My apologies.  The playback is done by MPD, not Cantata. 

> Now if the file only has one sample rate - how can it playback with different 
rates?

A single individual file does not play at different rates. I apologize if 
anything I said could be interpreted to mean that. Different files are made at 
different sampling rates. One file is made at one sampling rate, another file 
is made at a different rate.

> Why would Cantata need awareness of the type?

Look, maybe it doesn't.  My only real point to you is that for whatever reason, 
I myself have not -- and I know of no one else who has -- been able to play a 
DSD file at its correct sampling rate with MPD using Cantata as the client.

I *have* been able to do so using every other mpd client I've tried.  That 
simply leads me to believe that the reason for this would have to do with 
Cantata, not with MPD.  I don't know the reason.  I thought the Cantata 
developers might.

> If you can supply me with a copyright free sample - then I can investigate.

Please see the attached .dsf file.  It's a copyright-free file. CORRECTION: I 
see there is a maximum attachment per comment of 10.0 MB.  The file I tried to 
attach is much larger than that, but you can get the file yourself at the LH 
Labs site (look on the main page at the top where it says, toward the right, 
"Free Stuff".)

( http://lhlabs.com/freestuff/hd-music.html )

> But unless there is some MPD command to control its config

Here are the configuration commands from my .mpd/mpd.conf file:
--------------------------------------
# Decoder plugins:

decoder {
    plugin              "dsf"       # Decodes DSF files containing DSDIFF data (e.g. SACD rips).
    enabled             "yes"
}

decoder {
    plugin              "dsdiff"    # Decodes DFF files containing DSDIFF data (e.g. SACD rips).
    enabled             "yes"
---------------------------------------------

and:

----------------------------------
# Audio ouput block for ALSA output:
audio_output {
        type                    "alsa"
        name                    "Geek Out HD Audio 1V5, USB Audio"
        device                  "plughw:G1V5,0"
        format                  "*:*:*"
        dsd_usb                 "yes"     #   ESSENTIAL.  Without this setting, I get -NO- DSD playback on the Geek Out.
                                          #   <http://comments.gmane.org/gmane.comp.audio.musicpd.devel/2248>
        mixer_type              "none"
        auto_resample           "no"
        auto_channels           "no"
        auto_format             "no"
        replay_gain_handler     "none"
}
------------------------------------------

These are the MPD config commands.  (The Geek Out is the name of my DAC.  
( 
http://marketplace.lhlabs.com/products/geek-out-1000-usb-dac-and-headphone-ampli
fier )

I hope the above is helpful or useful to you. The links I provided in my 
previous post should also be helpful. If you need more info, plesae ask, I'll 
try to provide what I can. Thanks again for creating Cantata, it's a very nice 
program.

Original comment by watchpac...@gmail.com on 28 Mar 2015 at 8:25

GoogleCodeExporter commented 9 years ago
I'll work some more with trying to play DSD files with Cantata.  It may be 
possible that they DO play while using Cantata as the client, and that the 
problem may be something on my end, but I spent quite awhile trying to play 
them several times under several circumstances and the conclusion was the same 
each time: that they play using the other clients but not Cantata.  Thanks for 
discussing & I'll report any discoveries.

Original comment by watchpac...@gmail.com on 28 Mar 2015 at 8:29

GoogleCodeExporter commented 9 years ago
Also just having the .dsf file may not be enough for a real investigation. As 
stated on the MPD page about DSD you posted above, you do need a DAC that 
supports DSD.

Original comment by watchpac...@gmail.com on 28 Mar 2015 at 8:41

GoogleCodeExporter commented 9 years ago
re #8 - are you saying that the file is not played? I thought it was played, 
just with the wrong sample rate?

Is replaygain enabled? AFIAK, this will affect DSD playback as you are seeing - 
MPD decodes the audio, and then resamples. Can you try with replaygain set to 
None (Settings -> Playback -> Output -> Replay gain)

I've looked at the mpc source code (and libmpdlcient, which it uses) and I 
can't find any specific DSD/DSF/DFF handling. So, not sure what difference you 
are seeing from them.

Can you please try:

1. Clear MPD's current playlist (or playqueue as Cantata calls it)
2. Stop MPD (/etc/init.d/mpd stop - or your system equivalent)
3. Start MPD from the commandline as follows:

    /usr/bin/mpd --stdout --no-daemon --verbose > /tmp/mpc-run.log 2>&1

4. Use mpc (in another terminal) to add, and play a dsd file
5. Confirm it is playing back at the correct sample rate
6. Clear MPD's playlist, and Ctrl-C MPD to stop it
7. Attach /tmp/mpc-run.log here
8. Restart MPD:

    /usr/bin/mpd --stdout --no-daemon --verbose > /tmp/cantata-run.log 2>&1

9. Add the SAME dsd file with Cantata, and play
10. Confirm the bitrate is different
11. Clear MPD's playlist, and Ctrl-C MPD to stop it
12. Attach /tmp/cantata-run.log here

This should let me see what commands mpc is sending to MPD, and what Cantata is 
sending. Then I can see if there is any difference. (I chose mpc, as it is the 
simplest of the clients that you claim is working as expected) 

p.s. Yes, you are being very helpful - and sorry if I come across as a bit 
'off', bit tired at the moment :-( There is only one Cantata developer which is 
me :-)

Original comment by craig.p....@gmail.com on 29 Mar 2015 at 11:53

GoogleCodeExporter commented 9 years ago
> are you saying that the file is not played?

Sorry, no.  The .dsf files play. I meant that they weren't playing correctly 
insofar as they always defaulted to the 48000 sampling rate (Or, as I recall, 
sometimes they defaulted to 44100).  Again, this was only when I was playing 
them from within Cantata, or when using Cantata as the client.  In mpc I was 
getting the correct rate (which is the "Momentary freq" line from the command 
output below (the list of rates just below the "Endpoint" line is just a 
listing of all the rates the DAC supports):

--> cat /proc/asound/card1/stream0                                              
                             pts/9  Sunday  2015-03-29  18:41:20 
LH Labs Geek Out HD Audio 1V5 at usb-0000:00:1d.7-2, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 1
    Packet Size = 392
    Momentary freq = 352790 Hz (0x2c.1948)
    Feedback Format = 16.16
  Interface 1
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
  Interface 1
    Altset 2
    Format: SPECIAL
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us

I always keep replaygain off. Yes, it'll re-sample.

First instance of the mpc-run log is attached per your step # 7 above.  Now 
I'll continue from step # 8.  

At step 9, playing in Cantata, the sample rate was indeed different (lower, at 
48000 -- again, see "Momentary Freq" line below):

--> cat /proc/asound/card /stream0                                              
                             pts/9  Sunday  2015-03-29  18:06:39 
LH Labs Geek Out HD Audio 1V5 at usb-0000:00:1d.7-2, high speed : USB Audio

Playback:
  Status: Running
    Interface = 1
    Altset = 1
    Packet Size = 67
    Momentary freq = 48000 Hz (0x6.0000)
  Interface 1
    Altset 1
    Format: S32_LE
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us
  Interface 1
    Altset 2
    Format: SPECIAL
    Channels: 2
    Endpoint: 1 OUT (ASYNC)
    Rates: 44100, 48000, 88200, 96000, 176400, 192000, 352800, 384000
    Data packet interval: 125 us

Now at step #12 I'll attach the /tmp/cantata-run.log.

I just looked at the two logs side-by-side and this is just kind of a crude 
guess, as I'm not a programmer but the only potentially key difference I see in 
the logs might lie with line number 24 of the Cantata log:

24 client: [0] opened from 127.0.0.1:43526

. . . and that there might be some significance to where Cantata opened from, 
that 43526 port or place, or whatever it is.

I actually thought just before I started Cantata that it would indicate the 
higher correct sample rate once I added the .dsf file to the queue and hit 
play, since the blue light indicating DSD (on my DAC) remained lit after I 
stopped mpc.  That was not the case, however.

Thanks again -- I really appreciate your willingness to help sort through this. 
 I just am not at all sure what's up with it. Maybe your look at the looks will 
provide some clues.

Original comment by watchpac...@gmail.com on 29 Mar 2015 at 10:47

Attachments:

GoogleCodeExporter commented 9 years ago
Strike the words "First instance of" in my previous post.  I only posted the 
mpc-run.log once.  (For a second I thought I was going to be posting a sort of 
"before-and-after" of the same log, instead of posting two different logs.)

Original comment by watchpac...@gmail.com on 29 Mar 2015 at 10:51

GoogleCodeExporter commented 9 years ago
Meant "your look at the logs . . ."

Original comment by watchpac...@gmail.com on 29 Mar 2015 at 10:54

GoogleCodeExporter commented 9 years ago
Sorry - but the Cantata steps were not as requested. You need to clear MPD's 
play queue/list before stopping MPC, and then RE-ADD the SAME song with 
Cantata. i.e. the steps need to be EXACTLY the same - then I can see what the 
command differences are. In your Cantata log, the DSF file is already on the 
playqueue - and playing. All Cantata seems to be dong is stopping the playback 
(client: [0] process command "stop")

Original comment by craig.p....@gmail.com on 30 Mar 2015 at 7:08

GoogleCodeExporter commented 9 years ago
You can control MPD via the commandline. What happens of you do the following:

1. ENSURE MPD's playqueue/lsit is empty!
2. Stop any MPD clients
3. telnet localhost 6600 (or different host/post)
4. Type the following into the telnet prompt:

    add "24-Bits-of-Christmas-2014-Various-Artists/A_Place_in_the_Choir.dsf"
    play

The song should now play - what is the sample rate?

Original comment by craig.p....@gmail.com on 30 Mar 2015 at 7:12

GoogleCodeExporter commented 9 years ago
Also:

1. Please re-run steps 6..12 of #10
2. Are you *sure* these are the SAME mpds, with the same config files??? 
Because the mpc log has:

    inotify: initializing inotify
    inotify: watching music directory

   ...and the Cantata log does not. These messages are coming from mpd itself - so I would expect both logs to contain this start-up info.

Original comment by craig.p....@gmail.com on 30 Mar 2015 at 7:14

GoogleCodeExporter commented 9 years ago
Take 2. Steps followed. See attached /tmp/mpc-run.log
Steps followed with Cantata, see attached /tmp/cantata-run.log

No change in sample rates. Hopefully these logs will reveal something useful.

I couldn't connect using telnet:

--> telnet 127.0.0.1 6600                                                       
                            pts/1  Monday  2015-03-30  14:01:58 
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused
[rj@rjbox:~]  [v5.0.7]  zsh  1034  --> telnet localhost 6600                    
                                                               pts/1  Monday  
2015-03-30  14:02:26 
Trying 127.0.0.1...
telnet: Unable to connect to remote host: Connection refused

Thanks again.  If I need to do this again, or do anything else, just let me 
know. I'm very willing to continue to track down the source of the differences 
between client behavior.

Original comment by watchpac...@gmail.com on 30 Mar 2015 at 6:11

Attachments:

GoogleCodeExporter commented 9 years ago
Ummm... same error. The Cantata log is only 525bytes, mpc 2.9K There are no 
commands from Cantata->MPD logged in this log file. If you are saying that this 
is the log file when you added a file and played the song (with Cantata) - then 
Cantata was not talking to that MPD.

Now, this is a wild guess but... I see from the MPC log they you are using a 
user MPD config (~/.mpd/mpd.conf) and I can see that MPC is loading a file and 
playing it. However, in the Cantata log there are no commands logged. Now - is 
it possible, that you have Cantata connecting to a *system* MPD - and this 
system config (/etc/mpd.conf) is *not* setup correctly?  (As I said, this is a 
wild guess - but please check the host/port settings in Cantata point to the 
correct MPD).

As for not connecting via telnet - is you MPD set to bind to a localsocket? 
i,e. is bind_to_address set to something like ~/.mpd/socket ?  For the telnet 
to work bind_to_address needs to be something like "any" or "127.0.0.1"

If you run cantata from the commandline as follows:

    CANTATA_DEBUG=-1 cantata

it will log all communication with MPD. The first few lines should be something 
like:

MPDConnection 139974369494784 setDetails "127.0.0.1" 6600 false 
MPDConnection 139974369494784 disconnectFromMPD 
MPDConnection 139974369494784 call connectToMPD 

setDetails shows the host and port connected to.

Original comment by craig.p....@gmail.com on 30 Mar 2015 at 9:34

GoogleCodeExporter commented 9 years ago
Since I'm not at home right now and can't follow up on your last message til 
later, and since I do happen to have access right now to a copy of my mpd.conf 
file and my Cantata config file, I thought I'd forward them for you to look at, 
until later tonight or tomorrow morning when I can respond from home to your 
message.  

Below (in the body of this message) are my .asoundrc, my ~/.mpd/mpd.conf file, 
and my ~/.config/cantata/cantata.conf.  I hope this isn't overkill.  

asoundrc:

pcm.!default {
        type plug
        slave.pcm "hw:1,0";
#        slave.pcm "plughw:G1V5,0;
}

.mpd/mpd.conf:

###     Config file for mpd (Music Player Daemon) v. 0.19.9
###     I'm using mpd with GMPC (Gnome Music Player Client) v. 11.8.16 on 
Ubuntu-MATE 14.04 LTS
###     Last update:    Friday  2015-03-27 10:35:53 PM  EDT
###     This is version 0.3 of this file as I have more to learn about mpd

###     This setup is for using mpd as a "user service," not as a "system 
service."
###     See  <https://help.ubuntu.com/community/MPD>

###     See  <https://bbs.archlinux.org/viewtopic.php?pid=1017873#p1017873> 
(post number 5)
###     See  <http://lacocina.nl/detect-alsa-output-capabilities>
###     See  mpd example config file:           /etc/mpd.conf

music_directory                 "/home/rj/Music"                # Don't use ~/
playlist_directory              "/home/rj/.mpd/playlists"
# db_file                               "/home/rj/.mpd/mpd.db"
database {
    plugin "simple"
    path   "/home/rj/.mpd/mpd.db"
}

log_file                "/home/rj/.mpd/mpd.log"
pid_file                "/home/rj/.mpd/mpd.pid"
state_file              "/home/rj/.mpd/mpdstate"         # Where settings are 
maintained across re-boots & crashes.
sticker_file            "/home/rj/.mpd/mpd.sticker.db"   # A database that 
manages dynamic information attached to songs.
auto_update             "yes"       # Enables automatic update of MPD's 
database when files in music_directory are changed.
zeroconf_enabled        "no"        # Don't publish 'service information.'
max_playlist_length     "90000"
max_output_buffer_size  "16384"

bind_to_address         "127.0.0.1"
# Sets the address for the daemon to listen on. Careful attention should be 
paid if this is assigned
# to anything other than the default.  This setting can deny access to control 
of the daemon.

port                    "6600"

log_level               "verbose"   # For now.
# Available settings are "default", "secure" or "verbose". The "verbose" 
setting is recommended
# for troubleshooting, though can quickly stretch available resources on 
limited hardware storage.

save_absolute_paths_in_playlists        "yes"      # Enables MPD to create 
playlists in a format usable by other music players.

metadata_to_use         
"artist,album,title,track,name,genre,date,composer,performer,disc,comment"
# Defines a list of tag types that will be extracted during the audio
# file discovery process.

# Input:
input {
        plugin "curl"
}

# Decoder plugins:

decoder {
    plugin              "dsf"       # Decodes DSF files containing DSDIFF data (e.g. SACD rips).  
    enabled             "yes"
}

decoder {
    plugin              "dsdiff"    # Decodes DFF files containing DSDIFF data (e.g. SACD rips).
    enabled             "yes"
    lsbitfirst          "no"        # Decode the least significant bit first.  Default is 'no'.
}

 decoder {
    plugin "wildmidi"
    config_file "/etc/timidity/freepats.cfg"
}

# Audio ouput block for ALSA output:
audio_output {
        type                    "alsa"
        name                    "Geek Out HD Audio 1V5, USB Audio"
        device                  "plughw:G1V5,0"
        format                  "*:*:*"
        dsd_usb                 "yes"     #   ESSENTIAL.  Without this setting, I get -NO- DSD playback on the Geek Out.
                                          #   <http://comments.gmane.org/gmane.comp.audio.musicpd.devel/2248>
        mixer_type              "none"
        auto_resample           "no"
        auto_channels           "no"
        auto_format             "no"
        replay_gain_handler     "none"
}

# Audio output block for http:
# audio_output {
#        type                   "httpd"
#    (Do this part later.)
# }

# Character Encoding:

filesystem_charset              "UTF-8"
# If file or directory names don't display correctly for your locale, you may 
need to modify this setting.

id3v1_encoding                  "UTF-8"
# This setting controls the encoding that ID3v1 tags should be converted from.

###    end of file   ###

.config/cantata/cantata.conf:

[General]
storeCoversInMpdDir=true
storeLyricsInMpdDir=true
currentConnection=-
stopOnExit=true
version=1.5.2
showMenubar=true
showFullScreen=false
mainWindowSize=@Size(1513 1001)
showPlaylist=true
playStream=false
splitterState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x2\0\0\x1|\0\0\x2:\x1\0\0\0\x1
\x1\0\0\0\x1)
page=ContextPage
contextZoom=-1
contextSplitterState=@ByteArray(\0\0\0\xff\0\0\0\0\0\0\0\x3\0\0\x2\x6\0\0\x1\xe8
\0\0\x1\xf7\x1\0\0\0\x6\x1\0\0\0\x1)
contextAutoScroll=false
contextTrackView=2
hiddenStreamCategories=@Invalid()
searchCategory=artist
showTimeRemaining=false
hiddenOnlineProviders=@Invalid()
forceSingleClick=true
startHidden=false
lyricProviders=lyrics.wikia.com, lyricstime.com, lyricsreg.com, 
lyricsmania.com, metrolyrics.com, azlyrics.com, songlyrics.com, elyrics.net, 
lyricsdownload.com, lyrics.com, lyrics$
inhibitSuspend=true
storeBackdropsInMpdDir=true
libraryArtistImage=true
libraryView=icontop
libraryYear=true
albumsView=icontop
albumSort=artist-year
folderView=detailedtree
playlistsView=detailedtree
playListsStartClosed=true
streamsView=detailedtree
onlineView=detailedtree
groupSingle=true
useComposer=false
filteredOnly=false
showDeleteAction=true
devicesView=detailedtree
searchView=table
playQueueView=grouped
playQueueAutoExpand=true
playQueueStartClosed=false
playQueueScroll=true
playQueueBackground=1
playQueueBackgroundOpacity=69
playQueueBackgroundBlur=0
playQueueBackgroundFile=
playQueueConfirmClear=true
playQueueSearch=true
infoTooltips=true
touchFriendly=true
showStopButton=true
showCoverWidget=true
showRatingWidget=true

useSystemTray=true
showPopups=true
minimiseOnClose=true
startupState=show
fetchCovers=true
lang=
hiddenPages=@Invalid()
sidebar=17
monoSidebarIcons=false
splitterAutoHide=false
httpInterface=lo
cdAuto=true
cddbHost=freedb.freedb.org
cddbPort=8880
paranoiaFull=true
paranoiaNeverSkip=true
useCddb=true
wikipediaIntroOnly=true
contextDarkBackground=true
contextAlwaysCollapsed=false
contextBackdrop=1
contextBackdropOpacity=30
contextBackdropBlur=0
contextBackdropFile=
contextSwitchTime=1000
wikipediaLangs=en:en
contextSlimPage=artist
playQueueHeaderState="@ByteArray(P,\x95\xf\x1\0\0\0\f\0\0\0N\0\0\0\0\0\0\x1\x83\
0\0\x1\xbd\0\0\x2\x42\0\0\0l\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0
\0\f\0\0\0\0\0\0\0\$
searchHeaderState="@ByteArray(P,\x95\xf\x1\0\0\0\t\0\0\0\x1d\0\0\0\x1b\0\0\0#\0\
0\0\0\0\0\0\a\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\0\t\0\0\0\0\0\0\0\x1\0\0\0\x2\
0\0\0\x3\0\0\0\x4\0$
mainWindowCollapsedSize=@Size(611 86)

[Connection--]
host=/home/rj/.local/share/cantata/mpd/socket
port=6600
dir=~/Music
passwd=
coverName=
streamUrl=

[PreferencesDialog]
size=@Size(891 1051)

[PlayQueuePage]
searchActive=true

[DevicesPage]
searchActive=false

[DynamicPage]
searchActive=false

[PlaylistsPage]
searchActive=false

[FolderPage]
searchActive=false

[AlbumsPage]
searchActive=false

[LibraryPage]
searchActive=false

[Jamendo]
format=ogg

[PodcastSettingsDialog]
size=@Size(550 160)

[StreamProviderListDialog]
size=@Size(466 876)

[Magnatune]
membership=streaming
download=mp3
username=
password=

[Scrobbling]
enabled=false
loveEnabled=true

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 2:41

GoogleCodeExporter commented 9 years ago
My /etc/mpd.conf file is in the form of the mpd example file, and is completely 
commented-out, except for these lines:

audio_output {
        type                    "alsa"
}

filesystem_charset              "UTF-8"
id3v1_encoding                  "UTF-8"

But I plan to remove the /etc/mpd.conf file altogether to avoid any confusion.

I do when I get home want to double-check this line in my Cantata config:

host=/home/rj/.local/share/cantata/mpd/socket

to make sure this line is as it should be.  At the moment, I'm not sure how to 
tell (i.e., should "socket" be something more specific, etc).

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 2:49

GoogleCodeExporter commented 9 years ago
Should the 'host' line in my Cantata config read:

host=/home/rj/.mpd/mpd.conf

???  i.e. should it point directly to my MPD config file?

Does Cantata (as MPD does) first look for .mpdconf , then .mpd/mpd.conf , then 
/etc/mpd.conf ?

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 3:04

GoogleCodeExporter commented 9 years ago
MPD can be configured to use; TCP/IP sockets (ie, ip address, 192.168.0.1, etc) 
or a local socket (i.e. a path)

Your mpd.conf above has:

    bind_to_address         "127.0.0.1"
    port                    "6600"

Which implies MPD is using a standard TCP/IP socket for connections. Therefore, 
Cantata needs to have host set to 127.0.0.1 and port set to 6600

Cantata needs to be pointed at MPD's socket - NOT its config. For instance, I 
have my MPD on a Raspberry Pi, and control (via Cantata) on another machine.

However, Cantata will *attempt* to read /etc/mpd.conf to determine the 
*default* host/ip and port - but these can be overridden. Its just read so that 
there are some initial values.

Please don't edit the config file, but use the GUI settings. Cantata can use 
multiple MPDs, so its important that the right one is set for this.

-------------------

But having written all of the above, I've just noticed your cantata.conf has:

    [Connection--]
    host=/home/rj/.local/share/cantata/mpd/socket

This implies you are using Cantata's basic mode - where Cantata itself starts 
up an instance of MPD. This is where your issue lies. The config for this MPD 
instance is *very* simple, and will not have the dsf, etc, stuff. You need to 
*remove* this setting in the config UI, and create a new (non Basic) setting 
with host set to 127.0.0.1 and port set to 6600

Either that or you need to edit ~/.config/cantata/mpd/mpd.conf to have your 
dsf, etc, settings.

This 'basic' mode was intended so that Cantata+MPD could be used liek any other 
standalone music player - without any need for special config. It's not what 
you required.

I guess what I should do is add a warning about this - ie. that the config is 
rather basic.

Although, I'm tempted to just remove it altogether....

Original comment by craig.p....@gmail.com on 31 Mar 2015 at 7:12

GoogleCodeExporter commented 9 years ago
Now we're talking.  I opened Cantata and went to Edit -> Preferences -> 
Collection, and created a new "Collection".  

Suddenly, here Cantata has fields for "Host (or local socket):" (where I 
entered "127.0.0.1" and "Port:" (where I entered "6600").

I did think it odd that these two fields were not in the default "Personal" 
Collection, but I guess that's the default 'basic' mode, which, I admit, the 
vast majority of Cantata users will be using.

Having set the Host and Port -- victory.  

I now play a .dsf file and both my DAC and the stream command shows that the 
file is playing -- via Cantata -- at the correct sample rate.

This took a little while but I learned a few things in the process, and I'd 
like to say thanks for being patient and for helping me figure out how to get 
things right.

I now will not deter you from devoting your time and attention to further 
development of a great program.

Oh, one last thing.  Let me know how I might best support Cantata with a 
donation or otherwise, and thanks again.

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 2:07

GoogleCodeExporter commented 9 years ago
Also, I notice that I can switch seamlessly and instantly from a 44100 web 
stream directly to a .dsf file, and that .dsf file will play at its higher 
sample rate, which is great.

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 2:13

GoogleCodeExporter commented 9 years ago
> However, Cantata will *attempt* to read /etc/mpd.conf to determine the 
*default* host/ip and port - but these can be overridden. Its just read so that 
there are some initial values.

Does Cantata attempt to read /etc/mpd.conf *before* it reads ~/.mpdconf or 
~/.mpd/mpd.conf ?  I now have my /etc/mpd.conf completely commented out (I only 
keep it there for reference -- it's the stock mpd config example file).  I just 
want to make sure Cantata is reading my active config before it tries to read 
the one that exists only in name.  (It probably doesn't matter much anyway 
since I've set host and port in Cantata.)

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 2:25

GoogleCodeExporter commented 9 years ago
The reason 'basic' does not have host and port is because it does not need 
this. When you are give the choice of which type to create, it does inform you 
that Cantata will configure and control it - therefore, there is nothing left 
to do.

Perhaps I should also add some text that this is only for a very basic setup 
and no advanced options. Your use case is very much an advanced setup. The 
basic setup is to give as much a plain-music-player as possible experience.

Cantata does not read ~/.mpd/mpd.onf - it ONLY reads /etc/mpd.conf to get some 
default values for the text fields. It does not actually use the values.

Cantata does not need to read your mpd config, it does not use it. This is 
because MPD might not even be on the same machine. Hence whey you need to fill 
in host, port, music dir, etc.

Anyway, this actual 'issue' is invalid - as it was indeed a setup issue on your 
side.

Original comment by craig.p....@gmail.com on 31 Mar 2015 at 4:56

GoogleCodeExporter commented 9 years ago
It was a setup issue, but one that should probably have at least some 
documentation for the unsuspecting user who does want to set up for DSD and who 
needs to know what to do, i.e., needs to know to create "Collection" settings 
that are other than the default.  Whereas other clients seem to accommodate DSD 
files "out of the box."

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 7:06

GoogleCodeExporter commented 9 years ago
No. You are SO wrong! Cantata ***DOES*** cater for DSD out of the box - in 
EXACTLY the same way as other clients!!!! Please stop this nonsense!

It simply ADDS **EXTRA** functionality to make things simpler for some. Most 
other clients DO NOT have the option to start a custom MPD instance.

You setup your own per-user MPD instance, and configured for this extra DSD 
stuff - so you should have been able to figure out that when no host/port was 
asked for that perhaps it was not going to connect to the instance that you 
started. (Again it even says that Cantata will start its OWN instance) That's 
not rocket science.

The Standard setup is what you should have chosen - and it is selected by 
DEFAULT. You chose to go down a different path. I agree that perhaps the 
wording could be clearer. BUT, it does state that Cantata will configure the 
MPD instance. In no place does it state that Basic will use ~/.mpd/mpd.conf

Original comment by craig.p....@gmail.com on 31 Mar 2015 at 10:17

GoogleCodeExporter commented 9 years ago
The standard, default setup is what I did choose, originally.  I simply noticed 
that the DSD files didn't work correctly with that setup.  That "extra 
functionality to make things simpler for some" was the default.

When no host/port was asked for I had no idea that this was the problem.  
Whatever, a few simple words of explanation or documentation about it would be 
enormously helpful to someone who's never seen Cantata *and may also just be 
getting started with trying to make DSD work*.

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 10:45

GoogleCodeExporter commented 9 years ago
Here's the thing: I'm brand new as far as how to get DSD set up on Linux.  
Someone recommended MPD, so I'm still very new to both MPD and Cantata both, 
and have been sorting my way through as I've gone along, and all of this has 
been just over the last six weeks.  I'd never heard of MPD before that.

Original comment by watchpac...@gmail.com on 31 Mar 2015 at 11:44

GoogleCodeExporter commented 9 years ago
Standard setup is the default -  I have checked. If you had used this, it would 
ask for the connection details, as per every other client. Therefore, if it did 
not play the DSD files, it was an issue with the *config* of the *instance* of 
MPD that you connected it to.

(This is my issue, your false claim that Cantata could not play files like 
other clients)

I know MPD can be confusing, and I agree the wording on the dialog could 
probably be better (I have made a slight addition)  - please feel free to 
provide an alternative. As I said, I'm the only developer of this, and it takes 
enough of my time as is.

The reason for the 'Basic' setup was to ease the use of MPD. But, this config 
(but its very nature) is *very* simple, and needs to be so that it just 'works' 
In fact, it obviously did work - it just used a different bit rate. And for 
99.9999% of users, this would have been fine. Hence, calling it 'Basic'

Original comment by craig.p....@gmail.com on 1 Apr 2015 at 7:08

GoogleCodeExporter commented 9 years ago
No problem. I probably could have been a bit more savvy about it & maybe 
figured it out after awhile if I'd poked around long enough & studied how 
Cantata works in different situations.  I can't fault the program.  You've got 
a good program.

> Therefore, if it did not play the DSD files, it was an issue with the 
*config* of the *instance* of MPD that you connected it to.

Agreed.

> I'm the only developer of this, and it takes enough of my time as is.

I hear you there.  I may have a minor suggestion or two (completely unrelated 
to the above discussion) but I want to put Cantata through its paces and get 
even more familiar with it before I do that.  Besides, I'm sure you have your 
own checklist of things to do for a next version.

Original comment by watchpac...@gmail.com on 1 Apr 2015 at 7:44

GoogleCodeExporter commented 9 years ago
Well, I've now added a note stating that 'Standard' is required for DSD. This 
is in both the initial wizard, and the create collection prompt. Should at 
least help, I hope :-)

As for ideas - feel free to create new issues for each. I don't mind reasonable 
requests. Although I really don't want to add much more features - the config 
dialog is way o busy, and could do with trimming down.

Original comment by craig.p....@gmail.com on 1 Apr 2015 at 9:57