Soundpal: an MP3 player

Hello @jaymakesgames -- love the interface, in-built visual effect, and how you let the user to change font! However, as I try to install on my Playdate (OS 2.0.0) this error message appeared. It's a message typically when Playdate OS is newer than game was built. It'd be nice to have a working version. I'll be using this at bed side to let my daughter to play her favorite songs. :slight_smile:

Hey @dkwo ; thanks for the kind words!

Since it’s a C project, it needs to be rebuilt with the latest SDK. I don’t think that should be too much trouble to do. Will try to get to it soon. :slight_smile:

Sorry for the wait; a new version is up (link in initial post is also updated to point to it) that is compiled with the latest SDK.

Please give it a go and let me know if that sorts things out for you! :slight_smile:

1 Like

Thanks so much @jaymakesgames, it's working great! It loads really fast, and the sound quality is surprisingly great!

I was wondering, if you have plan to support Unicode character display? At moment with in-built fonts I'm not able to see Japanese characters, I think it'd be really helpful if your music player supports displaying non-English characters. I'll be happy to find a font that would will suit your need (if this will be helpful to you.) I can imagine a lot of work may be involved in this, so no problem if you have no plan to support it. :slight_smile:

Soundpal 2023-06-29 15.22.30
Soundpal 2023-06-29 15.22.22|400x240
Soundpal 2023-06-29 15.23.04|400x240
Soundpal 2023-06-29 15.23.10|400x240
Soundpal 2023-06-29 15.23.16|400x240

It would be nice to do this!

Yeah; all the fonts that come provided with the SDK generally don’t seem to have any glyphs filled out outside of the ASCII range — and a subset of those are all I have provided for selection in the app.

I suspect fixing this is as simple as finding some font that includes all of these, and adding that in for usage is really easy. Maybe some extra work while decoding the tags.

I am pretty sure I’ve seen a few folks offering fonts on the forums that support the full set of characters. I’ll have to go scrounging around for a good free one! :slight_smile:

1 Like

Of course; turns out it’s the “extra work” path to get this working.

I was able to get some fonts to test with from here, from the work @hunty did: :pray: Japanese pixel fonts with Kanji support - #5 by hunty (thank you for that!)

With that, I was able to get things sort of working:

KindOfWorking

A bunch of these titles are clipped because of the entire app effectively assuming ASCII everywhere, but it’s a start. There’s a bunch more to do to get all the plumbing working. :sweat_smile:

1 Like

@jaymakesgames wow, didn't expect you to have a working screen happen overnight, that IS a progress.

From the song titles... they're from Final Fantasy 7? :slight_smile:

If the text is clipping, I wonder if it's a logic in the app or choice of font. If other fonts might help, if you could let me know the type of fonts you need I can go find if there's a free one in Japanese font community sites.

Please share a beta build if it's okay!!!

Ha; yeah ("Crisis Core” OST) :slight_smile:

If the text is clipping, I wonder if it's a logic in the app or choice of font.

It’s a problem in the app, the font is perfectly fine from what I can tell.

To get into the technical details: I’m copying strings using methods that assume ASCII, so if they are handling a wide character string they will get tripped up seeing a \0 partway through (which is allowed in unicode, and some of the songs I have do exactly this).

Please share a beta build if it's okay!!!

What I have in place right now is pretty hacky, and only plumbs through song titles. I’d like to fix up the truncation issue in the menus (it looks fine in the player view, actually), then get an experimental build out to see how it works for you. Target is soon(ish). :slight_smile:

If all that looks good, then the next longer term goal is to convert the hackery I did into a proper implementation (which would handle all the tags, rather than just song title). :wink:

1 Like

Soon(ish) turned out to be soon(er). :tada:

Give this build a try: soundpal_experimental.zip

This adds support for displaying song name tags in menus and the main player screen. Does not fix any other tags or display text (yet).

Note, you’ll need to choose one of these fonts first:

fonts

:slight_smile:

1 Like

Hi Jay, thanks for the experimental build!

I tried to add a few songs in a mixture of:

  1. Songs without Japanese filenames
  2. Songs with Japanese filenames
  3. Most of them has artist, title, and album in Japanese

Yes, I tried to use the last two fonts and compared difference. I can see that characters are now rendered in a way it's using a US code page for font "JF Dot Ayu", and characters are sort of showing but wrong characters seem to be mapped for font "KH Dot Ningyouchou".

And even though I have Japanese characters in artist and album they're categorized as Unknown Album / Artist -- please ignore this if this is known issue.

To make sure I have a clean start, I also tried deleting the game and data, and then install from Playdate's Setting ➔ Games .

I might be missing something, just letting you know what I saw.

Soundpal 2023-07-01 18.24.50
Soundpal 2023-07-01 18.25.07|400x240
Soundpal 2023-07-01 18.24.42|400x240
Soundpal 2023-07-01 18.24.04|400x240
Soundpal 2023-07-01 18.23.57|400x240

Thanks!

Thanks for trying!

Worth noting: when the app can’t parse out a song name, it falls back to displaying the filename, and that path isn’t aware of dealing with Unicode yet.

From the description and screenshots it looks like the app isn’t able to parse any of the tags on your mp3s.

Do you know how they are tagged? Right now I am only parsing ID3v2.2 and ID3v2.3 (and the unicode support I just added was on the v2.2 format end).

If you are able to share one of the files, that would be helpful! Feel free to DM. If you can’t share any of these for legal reasons, I could spin up a build with some debug info somewhere (either logs, or on screen) that shows what happened in the tag parser :slight_smile:

1 Like

No problem at all! :smiley:

There seems to be no DM feature on this forum and I can't post zip attachment as a new member, even got my uploaded zip file deleted by pastebin :grinning: so I'll paste info read by eyed3[1]. Some of them are in ID3v2.4 which per your reply is not supported so it's expected, but others are ID3v2.3 so it should probably be parsed.

Weird... I just renamed a few Japanese filename mp3s with ID3v2.3 to English filename, when I open it the player screen is not showing Japanese characters.

[1]

$ eyeD3 _to_jay_type*
/hogehoge/_to_jay_type1.mp3                         [ 20.62 KB ]
-------------------------------------------------------------------------------
Time: 00:01     MPEG1, Layer III        [ 160 kb/s @ 44100 Hz - Mono ]
-------------------------------------------------------------------------------
ID3 v2.4:
title:  ぐでたま行進曲(Full ver.)
artist: 原 由子
album:
album artist: None
track:
-------------------------------------------------------------------------------
eyed3.mp3.headers:WARNING: Lame tag CRC check failed
/hogehoge/_to_jay_type2-ああああ.mp3                     [ 9.26 KB ]
-------------------------------------------------------------------------------
Time: 00:01     MPEG1, Layer III        [ ~65 kb/s @ 44100 Hz - Mono ]
-------------------------------------------------------------------------------
ID3 v2.3:
title: タイトル
artist: Nintendo
album: 街へいこうよ どうぶつの森 ~森の音楽会~
album artist: Various Artists
track: 1/39             genre: Soundtrack (id 24)
disc: 1/1
-------------------------------------------------------------------------------
/hogehoge/_to_jay_type3-ああああ.mp3                    [ 20.33 KB ]
-------------------------------------------------------------------------------
Time: 00:01     MPEG1, Layer III        [ 160 kb/s @ 48000 Hz - Mono ]
-------------------------------------------------------------------------------
ID3 v2.4:
title: イケてるマスコット
artist: Netflix
album: ぐでたま 〜母をたずねてどんくらい
album artist: None
track: 6
-------------------------------------------------------------------------------

[2] Soundpal 2023-07-02 02.56.51

Hm; yeah, filename display doesn’t work correctly (and on top of that I introduced a bug where sometimes it doesn’t render at all).

Will look at that next.

Also: thanks for these tag dumps! eye3d looks pretty cool and seems like I can use it to manipulate tags as well, which will be super helpful.

Going to fiddle with this a bit more, might go about adding 2.4 support, too.

1 Like

All right! One more try; same link, new binary: soundpal_experimental.zip

This should fixup all sorts of things. It should also parse your 2.4 files (untested, but it looks like the tags I’m parsing are unchanged from 2.3 so I am hoping it will “just work").

:slight_smile:

1 Like

Some other minor updates:

  • Build with latest SDK
  • Menu titles when navigating around
  • Other fixes surrounding unicode plumbing

@dkwo would love to know how the unicode support changes work out on your end.

:slight_smile:

1 Like

Hey @jaymakesgames -- sorry for the wait!

I tried your last build.

$ md5sum soundpal_experimental.zip
5660b7f6bdcd47484c2074495e9145f8  soundpal_experimental.zip

Following are my steps.

  1. I was greeted by v0.4exp screen.
    Soundpal 2023-07-18 17.07.04|400x240
  2. If I go stright to All Songs Soundpal 2023-07-18 17.07.34|400x240, I get a e0 error Playdate Error e0 - Playdate Help saying the game crashed
  3. Reinstalled Soundpall
    3.1. I then renamed game data directory (user.xxxxx.com.jaymakesgames.soundpal)
    3.2. Removed Soundpal from Playdate OS UI
    3.3. Delete existing build from play.date sideload page
    3.4. Re-upload the soundpal_experimental.zip to sideload page
    3.5. In Playdate OS UI, refresh game list and installed Soundpal
  4. Open Soundpal, set font to KH Dot Ningyouchou, restart Soundpal
  5. Go to All Songs, from song lint Soundpal 2023-07-18 17.20.19|400x240 I see:
    5.1. First 5 lines are corrupted characters, they are songs in root of music folder, characters in the play screen is still corrupted but playback is fine Soundpal 2023-07-18 17.44.59|400x240
    5.2. And then I can see Japanese filenames with correctly decoded, they're mp3 files within to playdate 街へいこうよ どうぶつの森 ~森の音楽会~ folder, if I play them I can see the character looks like current release version (without Japanese string support), and then Album and Artist is Unknown Soundpal 2023-07-18 17.45.20|400x240
  6. If I go back up by pressing B button, I would get the e0 error again
  7. Open Soundpal, set font to JF Dot Ayu, restart Soundpal
  8. I can see font been updated Soundpal 2023-07-18 17.22.10|400x240, however, the result is the same

Hope this helps!

Thanks for trying! Sorry this build was basically a wash and actually worse than before.

Giving it a go on hardware I can crash quite easily. Looks like the simulator is much more forgiving of whatever bugs I happen to be writing. :upside_down_face:

Looking into it, stay tuned.

1 Like

Ah, quick bug to spot.

The main crasher should be resolved. I don’t think it’s going to fix up poor parsing or titles being messed up - but at least it shouldn’t (I hope) crash as frequently anymore. :slight_smile:

Build updated, same link for anyone who would like to try.


I tried some more stuff out on hardware myself and noticed that with a library of more than just a handful of songs, it can take a while to finish parsing everything. I’m not sure if this is related to having more non-ASCII tags or not. Either way; could be sped up. Something to consider for future builds!

1 Like

Hello @jaymakesgames ~~~

I tried the last build -- 406a88f70fc0a2aa535359a0d1aa5fe3 soundpal_experimental.zip right? This time the audio playback will continue even if I back off from song directory to top menu, however, songs in root music directory still showed wrong characters.

Soundpal 2023-08-01 19.26.27|400x240
Soundpal 2023-08-01 19.26.46|400x240

By the way, I wonder if it'd be hard to add version info to your builds so that version is recognized in Playdate's sideload details and on device. I ask because I was trying the build that you posted 12 days ago (timestamp of your comment) but I wasn't sure it was a new build because they all show 0.0.0 :smiley: until I knew I already tested by getting the md5sum of the zip.

capture_20230801_192324_001|690x322
Settings 2023-08-01 19.25.51|400x240

Thanks for the great work!