deltabeard / ctrmus

3DS Music Player
GNU General Public License v3.0
94 stars 12 forks source link

[REQUEST] Show current time and total time of current playing song #56

Open StupidRepo opened 1 year ago

StupidRepo commented 1 year ago

I'd like it if on the bottom screen at the bottom, it shows the current time in the song (e.g. 05:58) on the bottom left, the title of the file (and make it scroll slowly when pressing R button if the text goes off screen/is too long) on the bottom center, and the total time of the song on the bottom right (e.g. 05:59).

Concept image below (sorry the font isn't the exact same): ooh And a concept video I just made (took me about 30 minutes):

https://github.com/deltabeard/ctrmus/assets/69256931/50b5a44e-9858-4f4e-9e9c-05b1516e9af8

deltabeard commented 1 year ago

Notes for my future self: The number of samples read is already obtained in ctrmus, so the time played can already be deduced using the sample rate. So only the total number of samples for the file needs to be added.

If the number of samples in the file isn't available, then the length of the music won't be displayed.

My 3DS has collected dust; it's been 6 years since the last release of ctrmus. I last worked on a UI for it in 2021 that used LVGL, but it was slow and clunky so I abandoned it.

StupidRepo commented 1 year ago

:eyes: Are you going to update ctrmus though to add this? If not, I can always try my best to make something but I suck at coding 3DS apps/games and I just generally suck at C/C++ a lot.

deltabeard commented 1 year ago

Added in cdf49f8dcf6ad00adaa559aabb2e0dcb1539df01. Could you please test the build attached? ctrmus.zip

StupidRepo commented 1 year ago

:eyes: Of course I will test it! :grin: Thank you for updating it! (and sorry for the late reply!)

tntgamer3690 commented 9 months ago

did it work?