Track numbers above 255 #104
-
|
Hi I am struggling to get track numbers above 255 to be returned by the player . I can call them and play them by explicite requesting but can’t seem to get the module to report back via the uint16_t getCurrentTrack(DfMp3_PlaySource source) command Ay ideas ? |
Beta Was this translation helpful? Give feedback.
Replies: 23 comments 14 replies
-
|
(moved to Discussions) What module do you have? Some APIs calls have limits to 255 tracks. This tends to be the "folder" APIs. Another chip states a "max of 1000 songs". |
Beta Was this translation helpful? Give feedback.
-
|
What Arduino platform are you using? (still some other questions you haven't answered). |
Beta Was this translation helpful? Give feedback.
-
|
As far as I know I have all the latest updates Sent from my iPadOn 6 Feb 2023, at 22:13, Michael Miller ***@***.***> wrote:
Yes, AVR is the general name of the platform, Mega2560 is the specific name.
You will want to grab the github master and try it. Arduino's last AVR update messed with the code generation causing some issues that don't show up on other platforms.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Please can you point me to the downloads that I should use ?Sent from my iPadOn 6 Feb 2023, at 23:20, Michael Miller ***@***.***> wrote:
You have the latest released version? The latest Master version (version number increments when it is released, so it will have the same number as the released until then) is only accessible by either using Git and clone it locally or by downloading and copying files to specific locations. It has not been released and has changes that affect AVR.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Here’s photos of the module Sent from my iPhoneOn 7 Feb 2023, at 00:54, Michael Miller ***@***.***> wrote:
https://github.com/Makuna/DFMiniMp3
You will see a CODE button, which opens a popup menu, with several options, download and then, copy contents into your arduino libraries folder (C:\Users<user name>\Documents\Arduino\libraries\DFMiniMp3), which is different for Mac, but you will find the current DFMiniMp3 folder which you can replace.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
How can I send photo ?Sent from my iPadOn 7 Feb 2023, at 17:04, Michael Miller ***@***.***> wrote:
Using Email doesn't attach the photo.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.
-
|
So, have you tried using the Mp3ChipMH2024K16SS in your declaration of your mp3 object? Notice the chip is a MH2024K. It will take me a while to try to replicate your scenario. |
Beta Was this translation helpful? Give feedback.
-
|
Want quite sure how to it …looking at your .h file the device listed is not quite the same. Please can you give me a clue on how to do this ? |
Beta Was this translation helpful? Give feedback.
-
|
Just wanted to say I really appreciate that you are trying to help with this.David Sent from my iPadOn 7 Feb 2023, at 18:51, Michael Miller ***@***.***> wrote:
So, have you tried using the Mp3ChipMH2024K16SS in your declaration of your mp3 object? Notice the chip is a MH2024K.
It will take me a while to try to replicate your scenario.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
In your sketch, you will define the mp3 object from the examples like this defalts to the original and is the same as to use the alternative, then just change that template argument to one I mentioned like I am spending more effort on this issue as I am concerned it is related to the AVR compiler issue (byte to word boundary issues). ;-) |
Beta Was this translation helpful? Give feedback.
-
|
Implemented as suggested same result reports the excess over 255/256 as beforeDavid Sent from my iPadOn 7 Feb 2023, at 20:03, Michael Miller ***@***.***> wrote:
In your sketch, you will define the mp3 object from the examples like
typedef DFMiniMp3<HardwareSerial, Mp3Notify> DfMp3;
this defalts to the original and is the same as
typedef DFMiniMp3<HardwareSerial, Mp3Notify, Mp3ChipOriginal> DfMp3;
to use the alternative, then just change that template argument to one I mentioned like
typedef DFMiniMp3<HardwareSerial, Mp3Notify, Mp3ChipMH2024K16SS> DfMp3;
I am spending more effort on this issue as I am concerned it is related to the AVR compiler issue (byte to word boundary issues). ;-)
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Finally put 1000 mp3 files into the mp3 directory on the SD card and tried to reproduce. returned 1000 correctly. The notification handler like... also returned track numbers above 255 correctly, and the call to get current track above also returned the next track that was playing correctly. These extended debug output seen above starting with IN and OUT I just added, so you will have to pick up the very latest. |
Beta Was this translation helpful? Give feedback.
-
|
BTW, my test is with only files in the MP3 folder, named 0000_anything.mp3 as required. Note starts with four digits zero padded. Having files in multiple locations is problematic as the API is not good with mixed use. Like, getCurrentTrack, is that from root, mp3, numbered folder (01,02), or advert folders? They aren't specific in the documents. |
Beta Was this translation helpful? Give feedback.
-
|
All my files are in mp3 folder and named nnnn.mp3 Sent from my iPadOn 8 Feb 2023, at 02:06, Michael Miller ***@***.***> wrote:
BTW, my test is with only files in the MP3 folder, named 0000_anything.mp3 as required. Note starts with four digits zero padded. Having files in multiple locations is problematic as the API is not good with mixed use. Like, getCurrentTrack, is that from root, mp3, numbered folder (01,02), or advert folders? They aren't specific in the documents.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
HI, Thank you for this here is my result
07:58:39.056 -> OUT 7e ff 06 48 00 00 00 fe b3 ef
07:58:39.134 -> IN 7e ff 06 48 00 00 a3 fe 10 ef
07:58:39.134 -> files 163
I actually have 3748 files as you can see high byte not populated
how can i check i have the latest avr for mega 2560 have looked on
github tried several downloads none install
david
…On Wed, 8 Feb 2023 at 01:44, Michael Miller ***@***.***> wrote:
Finally put 1000 mp3 files into the mp3 directory on the SD card and tried
to reproduce.
uint16_t count = dfmp3.getTotalTrackCount(DfMp3_PlaySource_Sd);
Serial.print("files ");
Serial.println(count);
returned 1000 correctly.
OUT 7e ff 06 48 00 00 00 fe b3 ef
IN 7e ff 06 48 00 03 e8 fd c8 ef
files 1000
The notification handler like...
static void OnPlayFinished([[maybe_unused]] DfMp3& mp3, [[maybe_unused]] DfMp3_PlaySources source, uint16_t track) {
Serial.print("Play finished for #");
Serial.println(track);
track = dfmp3.getCurrentTrack();
Serial.print("Current Track #");
Serial.println(track);
}
also returned track numbers above 255 correctly, and the call to get
current track above also returned the next track that was playing correctly.
IN 7e ff 06 3d 00 01 70 fe 4d ef
Play finished for #368
OUT 7e ff 06 4c 00 00 00 fe af ef
IN 7e ff 06 4c 00 01 71 fe 3d ef
Current Track #369
These extended debug output seen above starting with IN and OUT I just
added, so you will have to pick up the very latest.
To enable them, just add this line above the include for the library
like...
#define DfMiniMp3Debug Serial
#include <DFMiniMp3.h>
—
Reply to this email directly, view it on GitHub
<#104 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AN3ZJKCOP3ZENFINN2O6JB3WWLT7XANCNFSM6AAAAAAUS7L52M>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
The problem starts at 256 . Sent from my iPhoneOn 8 Feb 2023, at 16:20, Michael Miller ***@***.***> wrote:
Use the "board manager" in Arduino IDE, find "Arduino AVR Boards", the latest is v1.8.6
I would suggest you try just having 1000 files and see what happens. If that works like mine, then try 2000, then 3000, and narrow it down to find out the count at which the problem happens.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
It accepts them for playing but just won’t report any tracks above 255 Sent from my iPhoneOn 8 Feb 2023, at 16:20, Michael Miller ***@***.***> wrote:
Use the "board manager" in Arduino IDE, find "Arduino AVR Boards", the latest is v1.8.6
I would suggest you try just having 1000 files and see what happens. If that works like mine, then try 2000, then 3000, and narrow it down to find out the count at which the problem happens.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
With 256 it reports 0 with 257 it reports 1 at 510 or reports 255 and so on Sent from my iPhoneOn 8 Feb 2023, at 16:30, Michael Miller ***@***.***> wrote:
SO, to be clear, you placed ONLY 1000 mp3 files on the SD card and the problem persists?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
do you thtink it could be the module itself./ iave 2 and they are both the same. |
Beta Was this translation helpful? Give feedback.
-
|
I am happy to purchase a different one. It’s just finding a maker who can supply good device . Any ideas ? Sent from my iPadOn 8 Feb 2023, at 17:10, Michael Miller ***@***.***> wrote:
Yes, it's the module. The raw data returned from those extra debug statements is what the module is sending; and its wrong.
I have heard there is a way to flash the modules with updates. I have never tried it; but maybe that will correct their problem.
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you authored the thread.Message ID: ***@***.***>
|
Beta Was this translation helpful? Give feedback.
-
|
Hi Again, I took ordered new module from amazon yesterday. It has just arrvied and on conection ...... it works perfectly !!! 18:23:05.856 -> initializing... I do want you to know how much you helped. Hope you are OK with having made those changes ? David |
Beta Was this translation helpful? Give feedback.
-
Beta Was this translation helpful? Give feedback.







Finally put 1000 mp3 files into the mp3 directory on the SD card and tried to reproduce.
returned 1000 correctly.
The notification handler like...
also returned track numbers above 255 correctly, and the …