Thank you very much for the guidance here, I feel like I understand much better now. And good point about how to utilize that volume control, I was still fixated on tempo control. So looks like there's a couple ways to achieve my task. Now just ("just") to mess with the hardware and figure out how to code it.
Thanks!
Change Speed of MP3 file
-
- User
- Posts: 3
- Joined: Thu 2023-03-09 18:13
Re: Change Speed of MP3 file
Hello ,
I'm Emmanuel, an electronic from FRANCE. I want to simulate the sound of a steam locomotive which speed varies. I have a mp3 file for one speed and i need to downsample it from 44100 hz to 10000 Hz with 10 steps. I've tried to modify SCI_CLOCKF but i've difficulties with the datasheet of the VS1053B
Can you explain or give me the 10 values of the SCI_CLOCKF register that i use to put into my microcontroller?
Can i change continuosly the sample rate during the reading of the mp3 file wih SCI_CLOCKF or is there another solution with the VS1053B?
Can you be the more precise possible, and send me files example for microcontroller for similar applications
I use a mikromedia for pic 18 FJ board manufactured by Mikroelektronika
Thanks a lot,
Best regards
Emmanuel from FRANCE
I'm Emmanuel, an electronic from FRANCE. I want to simulate the sound of a steam locomotive which speed varies. I have a mp3 file for one speed and i need to downsample it from 44100 hz to 10000 Hz with 10 steps. I've tried to modify SCI_CLOCKF but i've difficulties with the datasheet of the VS1053B
Can you explain or give me the 10 values of the SCI_CLOCKF register that i use to put into my microcontroller?
Can i change continuosly the sample rate during the reading of the mp3 file wih SCI_CLOCKF or is there another solution with the VS1053B?
Can you be the more precise possible, and send me files example for microcontroller for similar applications
I use a mikromedia for pic 18 FJ board manufactured by Mikroelektronika
Thanks a lot,
Best regards
Emmanuel from FRANCE
Re: Change Speed of MP3 file
I don't think the CLOCKF adjustment method is suitable for this, it is better for very fine-tuned adjustment.manu_espagne wrote: ↑Thu 2023-03-09 18:28I have a mp3 file for one speed and i need to downsample it from 44100 hz to 10000 Hz with 10 steps. I've tried to modify SCI_CLOCKF
You can probably just write the samplerate you want to SCI_AUDATA whenever you need to. If you keep sending the same mp3 over and over in a loop without resetting the decoder in-between, the mp3 decoder never exits and also never updates the samplerate. (The mp3 decoder has its internal copy of the rate it is currently playing at, and if it doesn't see any change in the samplerate of the mp3 stream, it doesn't tell the audio output to change its rate. Thus your write to SCI_AUDATA won't get overwritten.)
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
-
- User
- Posts: 3
- Joined: Thu 2023-03-09 18:13
Re: Change Speed of MP3 file
Hello pasy,
It's Emmanuel from FRANCE again. Thanks a lot for you quickly answer.If i understand well, i need to modify the SCI_audata register, i will try that. i must send the mp3 file continuously, and send sometimes sending some octet to modify the SCI_AUDATA register, but when?
It will be good, that you send me a file in C language for Arduino or Pic that do that, because you're much much experimented than me with the VS1053B!!!
i'm waiting for your file
Thanks a lot
Have a good week,
Emmanuel
It's Emmanuel from FRANCE again. Thanks a lot for you quickly answer.If i understand well, i need to modify the SCI_audata register, i will try that. i must send the mp3 file continuously, and send sometimes sending some octet to modify the SCI_AUDATA register, but when?
It will be good, that you send me a file in C language for Arduino or Pic that do that, because you're much much experimented than me with the VS1053B!!!
i'm waiting for your file
Thanks a lot
Have a good week,
Emmanuel
Re: Change Speed of MP3 file
You write SCI_AUDATA to change the samplerate when your locomotive speed changes.
If you send the mp3 data in 32-byte blocks, you can check for this change after each block. You would then deassert xDCS and perform the SCI write operation.
There are microcontroller examples in other threads, I don't have code specifically for Pic.
If you send the mp3 data in 32-byte blocks, you can check for this change after each block. You would then deassert xDCS and perform the SCI write operation.
There are microcontroller examples in other threads, I don't have code specifically for Pic.
Visit https://www.facebook.com/VLSISolution VLSI Solution on Facebook
-
- User
- Posts: 3
- Joined: Thu 2023-03-09 18:13
Re: Change Speed of MP3 file
Hello Pasi,
It's Emmanuel from FRANCE again. I've made some trying with my mikromedia board from mikroelektronika but no results the sample frequency is always the same!!!. So i join to you my code in mikroc, and i hope you would correct it. I'm not pressed take your time!!!
Anyher question: What state or town of the USA are you from? Is there many trains, a railway station?
Thanks a lot for your corrected soft
Emmanuel, ]
It's Emmanuel from FRANCE again. I've made some trying with my mikromedia board from mikroelektronika but no results the sample frequency is always the same!!!. So i join to you my code in mikroc, and i hope you would correct it. I'm not pressed take your time!!!
Anyher question: What state or town of the USA are you from? Is there many trains, a railway station?
Thanks a lot for your corrected soft
Emmanuel, ]