Jump to content
Sign in to follow this  
jackocleebrown

DSF to FLAC conversion

Recommended Posts

Hello,

 

If anyone is interested I have just uploaded some code I've been working on for dsf to flac conversion. You can get the source at https://code.google.com/p/dsf2flac/

 

Although there are other conversion tools out ther (Audiogate and Saracon for example), I wanted to have something where I could play with filters, dither etc and see exactly what is going on.

 

It is early days but it seems to work quite well, runs at around 14x on my laptop (core2duo [email protected]).

 

I've only tested on 1bit stereo DSD64 files on linux X86_64 and there are no binaries yet but thought it might be interesting for the enthusiast.

 

Cheers, Jack.

Share this post


Link to post
Share on other sites
Hello,

 

If anyone is interested I have just uploaded some code I've been working on for dsf to flac conversion. You can get the source at https://code.google.com/p/dsf2flac/

 

Although there are other conversion tools out ther (Audiogate and Saracon for example), I wanted to have something where I could play with filters, dither etc and see exactly what is going on.

 

It is early days but it seems to work quite well, runs at around 14x on my laptop (core2duo [email protected]).

 

I've only tested on 1bit stereo DSD64 files on linux X86_64 and there are no binaries yet but thought it might be interesting for the enthusiast.

 

Cheers, Jack.

 

Jack, I was working on something similar to this before all the DoP fun broke out. I have a bunch of code that I would be happy to share in case it contains useful information . There are things like DSD to DoP converters and DSD to FLAC with built in SOX filters. I think some of the code supports DSF and DIF. Let me know if you want to take a look at the code...

 

Jesus R

Share this post


Link to post
Share on other sites
Jack, I was working on something similar to this before all the DoP fun broke out. I have a bunch of code that I would be happy to share in case it contains useful information . There are things like DSD to DoP converters and DSD to FLAC with built in SOX filters. I think some of the code supports DSF and DIF. Let me know if you want to take a look at the code...

 

Jesus R

 

 

Hi Jesus, that sounds quite interesting. I must confess that until you mentioned it above I had not heard of DoP. Is there much hardware support yet? I use a squeezebox touch based streaming system, so the best option for me personally at the moment is to get the dsd into flac format. The code I wrote includes a pretty complete dsf reader, if the DoP format is not too complex it would be pretty simple to write a converter. Do you have any code for reading dsdiff files? I think that I could add support for that quite easily (depending on the complexity of the format). To be honest the reason I went for dsf was that I read that dsdiff sometimes holds the dsd samples in a compressed format, plus I can get the metadata from the dsf files.

 

Cheers, Jack.

Share this post


Link to post
Share on other sites
Hi Jesus, that sounds quite interesting. I must confess that until you mentioned it above I had not heard of DoP. Is there much hardware support yet? I use a squeezebox touch based streaming system, so the best option for me personally at the moment is to get the dsd into flac format. The code I wrote includes a pretty complete dsf reader, if the DoP format is not too complex it would be pretty simple to write a converter. Do you have any code for reading dsdiff files? I think that I could add support for that quite easily (depending on the complexity of the format). To be honest the reason I went for dsf was that I read that dsdiff sometimes holds the dsd samples in a compressed format, plus I can get the metadata from the dsf files.

 

Cheers, Jack.

 

Jack, DSF is certainly my preferred format for the reasons you state. However, there are a lot of DFF downloads available and it's best to support both formats. At the end of the day one has to edit the metadata manually to get it just right. I have several versions of the code and they all support DSDIFF. I had just started to add DSF when I stopped work on the project and as it turns out that version does not work very well with DSF:) It would be great if you could consolidate the two projects and release this code on google.

 

The DoP code I have is an early version that supports the original dCS format and it has been superseded with the DoP v1 spec. I can get you the current spec if needed. This is a database of the known DSD devices. Most of the devices support DoP via USb and some of the devices even support DoP over their digital inputs.

https://docs.google.com/spreadsheet/ccc?key=0AgVhKcl_3lHfdFVyenBBNjNpQ2lieG81WGpqQTNfVUE#gid=0

 

Jesus R

Share this post


Link to post
Share on other sites
Jack, DSF is certainly my preferred format for the reasons you state. However, there are a lot of DFF downloads available and it's best to support both formats. At the end of the day one has to edit the metadata manually to get it just right. I have several versions of the code and they all support DSDIFF. I had just started to add DSF when I stopped work on the project and as it turns out that version does not work very well with DSF:) It would be great if you could consolidate the two projects and release this code on google.

 

The DoP code I have is an early version that supports the original dCS format and it has been superseded with the DoP v1 spec. I can get you the current spec if needed. This is a database of the known DSD devices. Most of the devices support DoP via USb and some of the devices even support DoP over their digital inputs.

https://docs.google.com/spreadsheet/ccc?key=0AgVhKcl_3lHfdFVyenBBNjNpQ2lieG81WGpqQTNfVUE#gid=0

 

Jesus R

 

Hi Jesus, If you can send me your code for dealing with DSDIFF then I'll have a go at adding support for it over the next couple of weeks. I'm not sure how DoP fits into the current program structure as a file conversion tool. Does it make sense to pack a flac file with DoP pcm data? If so then I could look at adding support for this too.

 

For your interest, I spent a couple of hours today running some simple test data through the conversion. Results are pretty interesting: https://code.google.com/p/dsf2flac/wiki/TestingRev3

 

Incidentally I also have a dsf file reader for Matlab which I have been using to analyse DSD streams. I'll put this up on the google code site too as it might be useful for someone.

 

Cheers, Jack.

Share this post


Link to post
Share on other sites
Hi Jesus, If you can send me your code for dealing with DSDIFF then I'll have a go at adding support for it over the next couple of weeks. I'm not sure how DoP fits into the current program structure as a file conversion tool. Does it make sense to pack a flac file with DoP pcm data? If so then I could look at adding support for this too.

 

For your interest, I spent a couple of hours today running some simple test data through the conversion. Results are pretty interesting: https://code.google.com/p/dsf2flac/wiki/TestingRev3

 

Incidentally I also have a dsf file reader for Matlab which I have been using to analyse DSD streams. I'll put this up on the google code site too as it might be useful for someone.

 

Cheers, Jack.

 

Send me an email at [email protected]

Share this post


Link to post
Share on other sites
Send me an email at [email protected]

 

Hello Jesus, I've just committed a version which will read dsdff files too. Thanks for the code, it was very useful. DFF is slightly slower than DSF (roughly 12x compared to 14x on my machine). I'm pretty sure I know why: because of how the samples are interlaced in DFF I left out one layer of buffering, it reads from the file on every 8bit step through the file. I expect it is just the overhead of the read calls. I thought it would be ok because fstream is already buffered. I'll put the buffer back in at some point to see if it helps.

 

I've not yet added support for DST compressed samples. I don't have any example data at the moment. Also does not read any extras from DFF (comments, cue sheets etc). I've only tested it on DFFs I downloaded from 2L so use with caution! I'll try and do some further testing in the next week or so.

 

Oh, this version also supports DSD128 on both DFF and DSF.

 

Cheers, Jack.

Share this post


Link to post
Share on other sites
Hello Jesus, I've just committed a version which will read dsdff files too. Thanks for the code, it was very useful. DFF is slightly slower than DSF (roughly 12x compared to 14x on my machine). I'm pretty sure I know why: because of how the samples are interlaced in DFF I left out one layer of buffering, it reads from the file on every 8bit step through the file. I expect it is just the overhead of the read calls. I thought it would be ok because fstream is already buffered. I'll put the buffer back in at some point to see if it helps.

 

I've not yet added support for DST compressed samples. I don't have any example data at the moment. Also does not read any extras from DFF (comments, cue sheets etc). I've only tested it on DFFs I downloaded from 2L so use with caution! I'll try and do some further testing in the next week or so.

 

Oh, this version also supports DSD128 on both DFF and DSF.

 

Cheers, Jack.

 

Very cool! I'll send you a link with some test files you can use..

 

Jesus R

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  



×
×
  • Create New...