Newbie asking for a kickstart, please!

Using Nyquist scripts in Audacity.
Post and download new plug-ins.

If you require help using Audacity, please post on the forum board relevant to your operating system:
Windows
Mac OS X
GNU/Linux and Unix-like

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by shakeshuck » Wed Apr 19, 2017 10:06 am

That's what I meant, LOL. :roll:

With DSD128 the sample rate is 5.6 Mhz; I was curious as to what would happen if you attempted to remove all the spurious ultrasonic noise. The waveform looks a lot better (especially if you do the averaging more than once), but I can't recreate the DSF to see if there are any audio anomalies. :(

Does anyone know of any DSF decode/encode libraries other than C++?
Let's just say that's not one of my fortes. :lol:
shakeshuck
 
Posts: 15
Joined: Tue Apr 18, 2017 12:36 pm
Operating System: Windows 7

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by steve » Wed Apr 19, 2017 10:29 am

FFmpeg includes "dsfdec" which is a DSD / DSF decoder.
I think that dBpoweramp also has an optional DSD decoder

I don't know of any software DSF encoders. Conversion from analog to DSD is generally done in hardware. Software transcoding from PCM to DSD would defeat the point of DSD (which according to advocates of DSD, avoids limitations that are intrinsic to PCM).
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43942
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by shakeshuck » Wed Apr 19, 2017 11:15 am

I did play with a format converter to do DSD -> PCM -> DSD , and that process also removed some of the noise from the signal; but it also messed up the timing in the file too - waves weren't where they used to be!

That was one of the reasons I thought I'd try to remove the noise natively (relatively) and leave the stream untouched as far as timing is concerned. Of course the noise might be the reason DSD sounds different to some, and removing it might make it more PCM-like. On the other hand, it might make DSD64 sound like DSD128 and save lots of hard drive space!

Like I said, just curious.

Since posting I have found a patch for SoX that appears to add DSF encoding, but again it's C++. I'll have to dig some books out and see if I can work out what it's doing.
shakeshuck
 
Posts: 15
Joined: Tue Apr 18, 2017 12:36 pm
Operating System: Windows 7

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by steve » Wed Apr 19, 2017 11:45 am

shakeshuck wrote:Since posting I have found a patch for SoX that appears to add DSF encoding

Could you post a link to that. I'd be interested in having a look.
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43942
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by shakeshuck » Wed Apr 19, 2017 12:12 pm

The patch I initially found is here:

https://sourceforge.net/p/sox/mailman/message/34464900/

Although it looks like there's more to the thread than just that patch...

https://sourceforge.net/p/sox/mailman/s ... sg34464900

I assume the sigma-delta routine is for PCM -> DSD conversion, so I think all I need to look at in this case is the initial patch (2/6) to repackage the stream. At least I hope so!
shakeshuck
 
Posts: 15
Joined: Tue Apr 18, 2017 12:36 pm
Operating System: Windows 7

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by shakeshuck » Fri Apr 21, 2017 4:07 pm

Steve,

I know I'm drifting off topic now, but I've taken a look at the file format, and it seems relatively straightforward, but - this is the important bit - how does the data in the dsf file translate into a wave form?

Any clues appreciated, but I do understand if you don't want to wander down that route... ;)
shakeshuck
 
Posts: 15
Joined: Tue Apr 18, 2017 12:36 pm
Operating System: Windows 7

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by steve » Fri Apr 21, 2017 6:33 pm

9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43942
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by shakeshuck » Fri Apr 21, 2017 8:50 pm

That's just the file layout again.

If I assume that the binary bits are added for 1 and subtracted for 0, then it would be impossible to get the up and down spikes that we see in Audacity, unless the bits are summed every n samples. But if that's the case, it's hardly bitstream, is it?

...or is the Audacity display a summation of what's actually going on? I haven't tried counting the 5,000,000 samples per second to find out. :shock:

Edit: I just took a look and that is what it seems to be doing; One sample in Audacity appears to be something like 50-60 bits?

Further edit: That's at a sample rate of 705600, or about 1/8th of the original. Which means the samples (rightly or wrongly) appear to be measured in bytes.
shakeshuck
 
Posts: 15
Joined: Tue Apr 18, 2017 12:36 pm
Operating System: Windows 7

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by shakeshuck » Sat Apr 22, 2017 10:25 am

OK, I've finally twigged why bitstream editing is so difficult, LOL. :roll:
You don't have a simple amplitude value to adjust, you have to recalculate the whole wave... :(
shakeshuck
 
Posts: 15
Joined: Tue Apr 18, 2017 12:36 pm
Operating System: Windows 7

Re: Newbie asking for a kickstart, please!

Permanent link to this post Posted by steve » Sun Apr 23, 2017 9:14 am

There isn't a direct relationship between "bits" in DSD and "samples" in PCM. They are related only through the analog waveform that they represent.

In PCM digital audio we represent the amplitude at a given point in time with a number. The time / amplitude value pair is called a "sample". The continuous analogue waveform is thus described by interpolation between sample values that are equally spaced in time, where the frequency of samples per second is the "sample rate".

In DSD (Direct Stream Digital) audio, there are no "samples", there is just a continuous stream of "bits". A "bit" is a "binary digit", which means that it is either an "on" state or an "off" state. The continuous analogue waveform is described by the "density" of "on" states. A continuous stream of zeros (off states) thus represents low voltage output, and a continuous stream of ones (on states) thus represents high voltage output. This is called "Pulse Density Modulation":

Here's an image to illustrate the scheme. Each vertical bar represents a "bit". If the "bit" is a "one" (an "on" state) it is shown in blue, and if "zero" ("off"), it is shown white. The red line represents the analogue waveform, that is "high" when the density of "ones" is greatest, and "low" when the density of "ones" is least.

Pulse-density_modulation_2_periods.gif
Pulse-density_modulation_2_periods.gif (3.06 KiB) Viewed 384 times
9/10 questions are answered in the FREQUENTLY ASKED QUESTIONS (FAQ)
steve
Senior Forum Staff
 
Posts: 43942
Joined: Sat Dec 01, 2007 11:43 am
Operating System: Linux *buntu

PreviousNext

Return to Nyquist



Who is online

Users browsing this forum: No registered users and 1 guest