vs1003b pitch/tempo shifting

Writing software for systems that use VLSI Solution's devices as slave codecs to a host microcontroller.
Cocoa
User
Posts: 9
Joined: Wed 2020-11-11 10:09

vs1003b pitch/tempo shifting

Post by Cocoa » Wed 2020-11-11 10:38

Hello. According to plugin instructions, I've loaded the program to vs1003b, besides, I put 0xB000 to SPI_AICTRL0, and 0x30 to SPI_AIADDR. However, it doesn't work. I can't find out what is wrong with it. What reason may it be ? The sample rate is 44100Hz,and it's mp3 song. :?

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

Re: vs1003b pitch/tempo shifting

Post by pasi » Wed 2020-11-11 11:06

You say it doesn't work. How does it play? Does it play at all? Does it play with normal speed?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Cocoa
User
Posts: 9
Joined: Wed 2020-11-11 10:09

Re: vs1003b pitch/tempo shifting

Post by Cocoa » Fri 2020-11-13 3:25

Thanks. I'm sorry for this unclear expression. It just plays with normal speed. But now luckily I've found the problem. The values of SPI_AICTRL0 and SPI_AIADDR are both reset after a soft reset.
Now there is another problem, when it plays at a speed or in a pitch I set, the volume changes a lot, besides, it doesn't play fluently, accompanied with noise. I try to put different values to CLOCKF and AUDATA, but it makes no difference. What may be the reason ?

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

Re: vs1003b pitch/tempo shifting

Post by pasi » Fri 2020-11-13 11:23

You should not write to AUDATA. The samplerate is determined from the audio file you send.

Do you have issues when you speed up the tempo or when you slow down the tempo?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Cocoa
User
Posts: 9
Joined: Wed 2020-11-11 10:09

Re: vs1003b pitch/tempo shifting

Post by Cocoa » Mon 2020-11-16 2:42

The tempo can actually speed up or be slowed down, this is normal.

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

Re: vs1003b pitch/tempo shifting

Post by pasi » Mon 2020-11-16 11:01

Cocoa wrote:
Fri 2020-11-13 3:25
the volume changes a lot, besides, it doesn't play fluently, accompanied with noise.
What kind of noise? What you hear could be just due to the very simple (and old) pitch-shifting algorithm.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Cocoa
User
Posts: 9
Joined: Wed 2020-11-11 10:09

Re: vs1003b pitch/tempo shifting

Post by Cocoa » Mon 2020-11-16 11:28

The noise sounds like a tape being stuck, it just lasts for a moment, and occurs in next several seconds. So the song is not played that frequently.
The algorithm I used was downloaded from your website. If it's the result of the algorithm, what's the newest algorithm ? Could you provide me a link or enclosure ? I guess the algorithm used present is already the newest.

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

Re: vs1003b pitch/tempo shifting

Post by pasi » Mon 2020-11-16 12:47

Does it happen with all files? Can you attach or send to support the one you use?

The top two reasons for "hickups" are:
1. The clock is not high enough to decode when you speed up tempo or pitch shift higher.
2. You are not providing the audio data quickly enough to SDI.

Can you monitor DREQ?
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Cocoa
User
Posts: 9
Joined: Wed 2020-11-11 10:09

Re: vs1003b pitch/tempo shifting

Post by Cocoa » Tue 2020-11-17 8:21

Yes, it happens with all files.

The clock I provide for vs1003b is 12.288MHz, and I set 0xf800 to CLOCKF at the same time. In this case, the clock of vs1003b has reached the maximum. And actually it play normally at original speed, which means the clock is already enough for normal speed or a lower speed. However, "hickups" happen when I slow down tempo and lower pitch.

So I think these two may not be the real reason. What about your opinion ?
Then, yes, I've honored DREQ.
Attachments
pitchshifter131.zip
(121.25 KiB) Downloaded 4 times

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

Re: vs1003b pitch/tempo shifting

Post by pasi » Tue 2020-11-17 11:28

Can you record a short piece of what it sounds like? It might give us some more ideas.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook

Post Reply