Gapless looping of files on VS1000

Designing hardware that use VLSI Solution's devices as the system controller for the entire design.
User avatar
pasi
VLSI Staff
Posts: 1479
Joined: Thu 2010-07-15 16:04

Re: Gapless looping of files on VS1000

Post by pasi » Tue 2016-06-14 14:23

Ah, encoding noise suggests a high bitrate, which would certainly have an effect on the read time of the Vorbis audio frames and also the decoding time of a frame.

If you need to output uncorrelated noise, have you considered generating it instead of playing it?

The random() function that we have in the developer library is very good. You can't say the same about rand() though (the cycle is too short due to only having a 16-bit seed).
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

bLG
User
Posts: 11
Joined: Tue 2016-06-07 23:02

Re: Gapless looping of files on VS1000

Post by bLG » Tue 2016-06-14 15:30

Hi Pasi,

My bitrate is actually low. Here are the specs: .ogg file encoded @44.1kHz, 16 bit with bitrate=65kbps.

I will look at the random function, but I need a shaped noise file, so I don't think this would work?
Can you please advise that with best practices and proper encoding, when you say gapless play, what delay should I expect?
Psychoacoustically, 30ms is too much.

Regards,
David

bLG
User
Posts: 11
Joined: Tue 2016-06-07 23:02

Re: Gapless looping of files on VS1000

Post by bLG » Tue 2016-06-14 15:53

Hi Pasi,

I just checked http://www.vlsi.fi/fileadmin/software/V ... refman.pdf and didn't see any references to random, rand or noise generation.
Can you provide a link on these topics?
Thanks in advance,
David

User avatar
pasi
VLSI Staff
Posts: 1479
Joined: Thu 2010-07-15 16:04

Re: Gapless looping of files on VS1000

Post by pasi » Tue 2016-06-14 16:41

srandom()/random() prototypes can be found from stdlib.h .

What kind of filtering would you need for the noise?

(The last time I worked with the vs1000 gapless for a customer, there was no gap in the audio output at all when run at 3.5x clock and with just one byte output as the play start indicator.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

bLG
User
Posts: 11
Joined: Tue 2016-06-07 23:02

Re: Gapless looping of files on VS1000

Post by bLG » Tue 2016-06-14 21:16

I would need pink noise with a high pass, low pass filter and a handful of biquads to equalize for shaped noise spectrum.
Lastly, I add a small amount of delay (100+ms) between L/R to make this non-correlated.

I think this is out of scope for VS1000? If so, are there other chips I should consider for future applications?
We are already committed to vs1000 design though.
Best regards,
David

p.s. I will let you know what I find for gapless player with 3.5x clock 1 byte start indicator.

bLG
User
Posts: 11
Joined: Tue 2016-06-07 23:02

Re: Gapless looping of files on VS1000

Post by bLG » Tue 2016-06-14 22:36

Hi Pasi,
Sorry for the silly question, but how do I confirm that I have successfully loaded new code onto the VS1000 dev board?
I want to check the gapless with 3.5x clock.
Regards,
David

User avatar
pasi
VLSI Staff
Posts: 1479
Joined: Thu 2010-07-15 16:04

Re: Gapless looping of files on VS1000

Post by pasi » Wed 2016-06-15 11:37

bLG wrote:I would need pink noise with a high pass, low pass filter and a handful of biquads to equalize for shaped noise spectrum.
Lastly, I add a small amount of delay (100+ms) between L/R to make this non-correlated.

I think this is out of scope for VS1000? If so, are there other chips I should consider for future applications?
VS1000 is a DSP like any other, so filtering is very doable with it.

You would create left and right output from random(), then filter each channel independently using FIR or IIR as appropriate.

Are the filter specs very detailed?
bLG wrote:Sorry for the silly question, but how do I confirm that I have successfully loaded new code onto the VS1000 dev board?
I think the easiest is to make a debug printout at the start of the code.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

bLG
User
Posts: 11
Joined: Tue 2016-06-07 23:02

Re: Gapless looping of files on VS1000

Post by bLG » Wed 2016-06-15 15:31

Dear Pasi,

Thank you for the advice on printout. My filtering is not that complex. Can you send link that will highlight MIPS and max# of biquads?
Regards,
David

User avatar
pasi
VLSI Staff
Posts: 1479
Joined: Thu 2010-07-15 16:04

Re: Gapless looping of files on VS1000

Post by pasi » Wed 2016-06-15 15:58

See dsplib.h for DspIir2nLq() . At 32 stereo samples per block, at 44.1kHz you would be at 1MHz per IIR2.

Depending on the requirement for the highpass part, you may be able to use FIR, with 1 cycle per tap (so 2 per tap for stereo).

Henrik has also made a full generic filter package with a lot of different filter implementations. (hides here: viewtopic.php?f=13&t=680&p=7061#p7061 )
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

bLG
User
Posts: 11
Joined: Tue 2016-06-07 23:02

Re: Gapless looping of files on VS1000

Post by bLG » Wed 2016-06-15 22:43

Hello Pasi,
Thank you for this information on filtering, I have some reading to do now...
In the meantime, I would like to report that using my VS1000 developer board with VS1000 (Gapless) Nand player code (clock =3.5x) we have no perceptual gap now when we loop our noise files.

This is very good news. Interestingly, there is no gap if we jumper the developer board for Nand. If we set jumper to SPI, then there is a very long gap (maybe 380 to 500ms- this is estimate but it is very long).

I am happy that we are making some progress in playing our .ogg files for non-correlated noise. I will study the filtering and generating noise for future projects using VS1000.

Best regards,
David

Post Reply