Skip to main content

Notice

Please note that most of the software linked on this forum is likely to be safe to use. If you are unsure, feel free to ask in the relevant topics, or send a private message to an administrator or moderator. To help curb the problems of false positives, or in the event that you do find actual malware, you can contribute through the article linked here.
Topic: Foobar has a big problem playing asian titled songs in order (Read 894 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

Foobar has a big problem playing asian titled songs in order

Hello everyone, I don't know if the developers of this app read this forum, but I'd like to report a problem. There's a lot of asian music on my hard drive, and foobar can't play it in order.
It plays them out of order because the kanji confuses it. The problem is fixed if I choose "track info", but that is annoying to have to do this every time.

Re: Foobar has a big problem playing asian titled songs in order

Reply #1
The developer does read this forum and important issues will be highlighted for him by others using other means.

With that said I for one don't understand what it is you are reporting. What exactly it is you are doing that causes playback order to be incorrect? And what does choosing "track info" mean?

Re: Foobar has a big problem playing asian titled songs in order

Reply #2
Doesn't foobar2000 leave to Windows to collate?

Microsoft sometimes makes strange decisions, and they might depend on the locale you have chosen on your computer.

Re: Foobar has a big problem playing asian titled songs in order

Reply #3

Here you see my files.


Here is what I see when I press play. As you can see, they are out of order, even if they have been meticulously labeled and have ''track name info'' properly in their properties.

Re: Foobar has a big problem playing asian titled songs in order

Reply #4
It looks like the problem is with how they are sorted when they are brought into a playlist, right? I've had a similar issue before, but a bit different. Still, I think my solution might fix it for you too.

File > Preferences > Shell Integration > Sort incoming files by:
Replace whatever script is there with
Code: [Select]
$replace($directory_path($substr(%path%,4,999)),\, | ) | %filename_ext%

I've found this script to always sort things as they would be sorted in Windows, even with edge cases.
As for why your files are out of order, I have no idea. I hope this helps.
Think millionaire, but with cannons.

Re: Foobar has a big problem playing asian titled songs in order

Reply #5
This is good progress. All the filenames seem sane and even start with a track number making the default sort string able to sort them correctly.

How did you add the files to the playlist? Note that playlist can have any order, if you manually put the files in such order they will remain that way unless you use a sort action or manually drag the files around.
What do you have configured in the 'Sort incoming files by' string that Cannonaire mentioned? That defines the default sort order when bringing multiple files to playlist. By default the sort string is simply: %path_sort%

If you drag all the tracks in one go from Explorer to foobar2000 playlist they should have correct order.

Or if you drag the folder/directory where the files are, they should be in the correct order.

Re: Foobar has a big problem playing asian titled songs in order

Reply #6
Replace whatever script is there with
Code: [Select]
$replace($directory_path($substr(%path%,4,999)),\, | ) | %filename_ext%
I'm curious what problem you have had that this simple replacement supposedly fixed. Your change to the default string breaks sub song ordering causing them to be in random order. And in case path is long it will get clipped, causing all the rest of the tracks to be mixed up since their paths are no longer respected.

Re: Foobar has a big problem playing asian titled songs in order

Reply #7
I selected all songs, right clicked the first and pressed play with foobar. Then it played them in the wrong order.
I can play them properly if I open foobar first and THEN add them, or if I press the "track no". But I wanted a better solution.

Re: Foobar has a big problem playing asian titled songs in order

Reply #8
I'm curious what problem you have had that this simple replacement supposedly fixed. Your change to the default string breaks sub song ordering causing them to be in random order. And in case path is long it will get clipped, causing all the rest of the tracks to be mixed up since their paths are no longer respected.
I'll try to be brief because I don't want to derail this thread. The sort script fixed the issues I had here: https://hydrogenaud.io/index.php/topic,124247
I hadn't noticed, but you're right - subsongs do load out of order now.
Think millionaire, but with cannons.

Re: Foobar has a big problem playing asian titled songs in order

Reply #9
The sort script fixed the issues I had here: https://hydrogenaud.io/index.php/topic,124247
Ah, not expected from user's perspective but expected as the sorting algorithm doesn't sort tracks directory at a time but everything at once based on the path string. Space is the first visible character and path separators come later. Unfortunately there is not a proper fix available. Replacing path separator with a character code before space would be a nice clean fix, but foobar seems to filter all non-visible control characters away.
But if you are otherwise happy with your workaround, perhaps replace it with just
Code: [Select]
$replace(%path_sort%,\, /)
I don't see any reason for all the complexities in your string, this retains subsong order and "Pure Moods" directory gets sorted before "Pure Moods II".

I selected all songs, right clicked the first and pressed play with foobar. Then it played them in the wrong order.
I can play them properly if I open foobar first and THEN add them, or if I press the "track no". But I wanted a better solution.
You didn't tell me what your 'Sort incoming files by' string is.
Also where do you select all these songs? In Windows Explorer? At least if you have foobar2000 installed correctly and the shell extension is used, I am 100% unable to pass files to the player without them getting sorted by the the order specified in 'Sort incoming files by'.
You should know that if there is a bug in the player, I absolutely want it to get fixed. That's why I'm asking all these questions so I can tell Peter what needs fixing. And of course if the problem is caused by something else, I want to figure out what it is and either get foobar2000 to work around the problem or help you solve it on your end.

Re: Foobar has a big problem playing asian titled songs in order

Reply #10
Thanks for the replacement script, Case. I had already fixed the subsong and length problems since your previous message, but your code is much simpler so I'll switch to that instead. In truth, I had adapted the code from another use and didn't understand it completely at the time—I just knew enough to change it to fix my issue. I understand it now, just in time to deprecate it.

Since you are able to help better than I, I'll just watch the thread from here on.
Think millionaire, but with cannons.