INTERACT FORUM

Please login or register.

Login with username, password and session length
Advanced search  
Pages: [1]   Go Down

Author Topic: How to Replace Track Number with a Letter?  (Read 1558 times)

grossmsj

  • Recent member
  • *
  • Posts: 11
How to Replace Track Number with a Letter?
« on: May 19, 2018, 08:14:18 am »

I'm doing battle with Mercedes-Benz COMAND music interface. It does not respect track numbers when it plays an album. For example, if I don't have [Track] - [Title] it just plays songs in the alphabetical order of the titles in the filenames. With [Track] - [Title], the order of play is 01 - First Song, 10 - Tenth Song, 11 - Eleventh Song, 2 - Second Song, etc.
Since the track number is ignored, I though I could rename my song filenames by replacing the Track Number with a letter. For example 01 - First Song would be a - First Song, and 10 - Tenth Song would be j - Tenth Song.
As you can see, I'm desperate here. Also clueless to how I could manipulate a number value in [Track] to a letter. Any solutions?
Logged

MusicBringer

  • Galactic Citizen
  • ****
  • Posts: 438
  • MC33.0.30 x64bit
Re: How to Replace Track Number with a Letter?
« Reply #1 on: May 19, 2018, 12:12:57 pm »

@ grossmsj, good question.
I too wish to use Letters on occasions. For example with a 3 LP vinyl set the sides are A, B, C and so on.
Logged
Caesar adsum jam forte. Brutus aderat. Caesar sic in omnibus. Brutus sic inat.

swiv3d

  • Guest
Re: How to Replace Track Number with a Letter?
« Reply #2 on: May 19, 2018, 02:45:48 pm »

Track number is integer only. If the tracks are labelled 01-blahblah, 02-blahblah. they should be played correctly. Files must also be in a folder with the artist name and a subfolder with album name as its title. That's what I read somewhere. you can also force the Comand to import the metadata for each file which it doesn't do as a matter of course.
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: How to Replace Track Number with a Letter?
« Reply #3 on: May 19, 2018, 03:06:19 pm »

You used "01 - First Song" and then "2 - Second Song".
Do your track # tags have zero or not? Sometimes that can make all the difference to sorting.
Logged

grossmsj

  • Recent member
  • *
  • Posts: 11
Re: How to Replace Track Number with a Letter?
« Reply #4 on: May 19, 2018, 04:25:56 pm »

I have used the JRiver 'macro' to rename the filenames using [Track #] - [Title]. Looking at the filename created by that the filename has a leading zero for 01.
I'm beginning to suspect that COMAND is using Gracenote to override any filename changes I try to make. If I manually change a few filenames to "a - First Song" etc, they still play in the same demented order when selected by "Artist" or "Album" in their media system, but the song names don't have the leading "a". So it is finding the correct Title metadata either in the file or from Gracenote.
When I pick an album via "Folder", the tracklist is in the right order and the song names have the leading "a".
It seems I need to find a way to defeat Gracenote so the system will rely only on the metadata in the song files and not revert to what it finds in Gracenote.
It shouldn't be this hard, but how does one argue this to a German software engineer?
Logged

~OHM~

  • Citizen of the Universe
  • *****
  • Posts: 1825
  • "I Don't Play The Music The Music Plays Me"
Re: How to Replace Track Number with a Letter?
« Reply #5 on: May 19, 2018, 08:27:52 pm »

did you try turning off look up ?
Logged
“I've Reached A Turning Point In My Life. I Now Realize I Have More Yesterdays Then Tomorrows”

grossmsj

  • Recent member
  • *
  • Posts: 11
Re: How to Replace Track Number with a Letter?
« Reply #6 on: May 19, 2018, 09:23:56 pm »

I've written to MB asking how to disable Gracenote. Previous versions of COMAND described how to turn it on/off. The current version doesn't indicate how this can be done, or if it's even possible.
Logged

RD James

  • Citizen of the Universe
  • *****
  • Posts: 1871
Re: How to Replace Track Number with a Letter?
« Reply #7 on: May 19, 2018, 11:13:41 pm »

Are you sure that it's not just reading tags rather than the filename?
Check that your tags also have the leading zero, and not just the filename.
In Media Center, you can modify the tags by using "=PadNumber([Track #], 2)" in the Track # field
Logged

grossmsj

  • Recent member
  • *
  • Posts: 11
Re: How to Replace Track Number with a Letter?
« Reply #8 on: May 20, 2018, 09:32:36 am »

Yes, I am now suspecting it is reading the track number tag in the song file. Or, worse, reading the track number it finds in Gracenote and puts that in a database from which the track numbers are read.

I can see how this expression will change how the track number is presented in JRiver, but it doesn't look like this will actually change the track # tag in the file. If I use a plain old tag editor and type in "01" in the track number field, it just reverts to 1.

I'm pretty much a noob in the expression language/tag editing area, so I could be missing something important.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to Replace Track Number with a Letter?
« Reply #9 on: May 20, 2018, 10:51:42 pm »

WARNING: I am going to be preachy. Sorry about that. But I see so many people come here asking how to implement an idea they have without describing or even mentioning the problem they are trying to solve. It is very frustrating.

I'm pretty much a noob in the expression language/tag editing area, so I could be missing something important.

Well, everybody has to learn, but your first lesson is don't even consider changing the [Track #] field in MC to letters. It would break so many things (probably including the Mercedes-Benz COMAND system) and simply is not required.
The second lesson is that when you have a problem with MC, come here and ask for help with the problem. Don't ask how to implement the solution you have decided upon, because it may be a bad idea.

I don't think this issue has anything to do with Gracenote, which would just be used to look up additional metadata, maybe images if they aren't stored in the file. The play sequence is going to be based on either the file name within the Album you select, or the track number sequence within the Album, or much less likely but possible, the track name within the album. The last one is what you are trying to avoid, and would be silly for MB to do. Everyone knows that the track name isn't the correct play sequence. If you are asking MB for help, ask them how to fix your sort problem, not how to turn off Gracenote, because they will think you want to save download data, or something else.

I suspect that COMAND does expect a certain folder structure as well to read track information. Probably \[Artist]\[Album]\ then track files. That thought seems to be supported by this thread: http://www.glaowners.com/forum/electronics-audio-lighting/5282-how-use-album-art-playlists-sd-card-likely-usb-sticks-long.html Unfortunately the thread doesn't really discuss sort sequence.


So, the [Track #] field is numeric, in fact an integer as mentioned above, and it is sorted numerically. so 1, 2, 10, 11, 12, etc. If you enter "01" into the field, it will be correctly saved as "1". So this is correct;
I can see how this expression will change how the track number is presented in JRiver, but it doesn't look like this will actually change the track # tag in the file. If I use a plain old tag editor and type in "01" in the track number field, it just reverts to 1.
This won't change anything (sorry RD);
In Media Center, you can modify the tags by using "=PadNumber([Track #], 2)" in the Track # field

The [Name] field in MC should just contain the track name, and nothing else. Unless of course, MB is doing the silly thing, and sorting by track [Name]. That can be fixed, but you need to confirm that if the method below doesn't work.

Those two fields are primary fields for all sorts of stuff, like metadata lookup, and would be expected to be accurate by any player that you use to play them. So some players will read the metadata in tags, and some will just use the file name and parse out what they think the metadata should be.

You mentioned
I'm doing battle with Mercedes-Benz COMAND music interface. It does not respect track numbers when it plays an album. For example, if I don't have [Track] - [Title] it just plays songs in the alphabetical order of the titles in the filenames. With [Track] - [Title], the order of play is 01 - First Song, 10 - Tenth Song, 11 - Eleventh Song, 2 - Second Song, etc.

So this tells me that COMAND is likely to be sorting by file name. That may be a setting you can change. That is worth asking MB, but you can solve your issue all by yourself. Also, the sort/play sequence probably depends on whether you select tracks by "Current Track List", Tracks, Playlists, Artists, or Albums, all of which can be selected in COMAND.

It looks like you have renamed the files correctly already, but did you use the "Rename, Move, & Copy Files" function? I think that is what you mean by;
I have used the JRiver 'macro' to rename the filenames using [Track #] - [Title]. Looking at the filename created by that the filename has a leading zero for 01.

If you haven't, have a read the Rename, Move, & Copy Files Wiki topic, and understand what it does. It is a very powerful tool. BTW the correct naming convention for renaming the files is "[Track #] - [Name]", but I think that is what you meant.

Now when you do this;
When I pick an album via "Folder", the tracklist is in the right order and the song names have the leading "a".
I think COMAND is sorting by file name wthin the folder you selected. That makes perfect sense to me. You are selecting by the file location in folders, so COMAND sorts by folder/file name.

When you do this;
If I manually change a few filenames to "a - First Song" etc, they still play in the same demented order when selected by "Artist" or "Album" in their media system, but the song names don't have the leading "a". So it is finding the correct Title metadata either in the file or from Gracenote.
You are selecting tracks to play by their metadata, specifically [Artist] or [Album], or a combination of both. I would expect COMAND to sort by [Track #] under in this case. If it isn't, then check if Shuffle is turned on for playback, and if it isn't, are you able to check the playback sequence that tracks will be played? That may give you a hint as to how COMAND is sorting the tracks.

Ultimately though, it looks to me like COMAND uses the same convention as all other players, and expects the same folder, file naming, and metadata formats as other players. If COMAND continues to play in a demented sequence, that is definitely a question for MB... once you get your metadata, folder structure and file naming worked out in MC and on the memory card you are using.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

JimH

  • Administrator
  • Citizen of the Universe
  • *****
  • Posts: 72438
  • Where did I put my teeth?
Re: How to Replace Track Number with a Letter?
« Reply #10 on: May 21, 2018, 06:44:28 am »

WARNING: I am going to be preachy. Sorry about that. But I see so many people come here asking how to implement an idea they have without describing or even mentioning the problem they are trying to solve. It is very frustrating.
Please be preachy anytime.  I'll buy you a new soapbox.
Logged

~OHM~

  • Citizen of the Universe
  • *****
  • Posts: 1825
  • "I Don't Play The Music The Music Plays Me"
Re: How to Replace Track Number with a Letter?
« Reply #11 on: May 21, 2018, 07:07:57 am »

Quote from: RoderickGI on Yesterday at 10:51:42 pm
WARNING: I am going to be preachy. Sorry about that. But I see so many people come here asking how to implement an idea they have without describing or even mentioning the problem they are trying to solve. It is very frustrating.

Please be preachy anytime.  I'll buy you a new soapbox.
I'll chip in... ;)
Logged
“I've Reached A Turning Point In My Life. I Now Realize I Have More Yesterdays Then Tomorrows”

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: How to Replace Track Number with a Letter?
« Reply #12 on: May 21, 2018, 02:29:27 pm »

I have an idea:

Would it be feasible to include an option in Tools > Options > Media Network > Add or configure DLNA servers... that says, "Present [Field] as [Field or fields]"?

In this case, Present [Name] as [Track #] - [Name]

Where [Field] would be a drop-down with all the library fields and [Field or fields] a text box respecting MC's expression language.

I'm just throwing this out there because I, myself, have had issues with some half-baked DLNA renderers like the PlayStation 4 where [Track #] is not respected for some dumb reason. This sounds like a similar issue.

EDIT: Or rather, If Media Type is [Media Type], then present [Field] as [Field or fields]

So that you can do stuff like:

If Media Type is Audio, then present [Name] as [Track #] - [Name].
If Media Type is Video, then present [Name] as [Episode] - [Name].
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to Replace Track Number with a Letter?
« Reply #13 on: May 21, 2018, 08:08:40 pm »

Please be preachy anytime.  I'll buy you a new soapbox.

 ;D ;D Thanks Jim. My old one is getting pretty tatty.

I have an idea:

Was that sarcasm or serious? Because it sounds like asking for a solution to be implemented rather than asking for help with a problem.  ;)

I'm just throwing this out there because I, myself, have had issues with some half-baked DLNA renderers like the PlayStation 4 where [Track #] is not respected for some dumb reason.

If you were serious, have you tried turning on PlayStation 3 compatibility in your DLNA settings?
Options > Media Network > Add or configure DLNA servers... > (select your DLNA server - you can have multiple servers, one specifically for your PlayStation 4) > Advanced > PlayStation 3 compatibile

I believe that works for PlayStation 4 as well.  8)

If it doesn't, there are a bunch of other settings in the Advanced section which may solve the problem. You could also try using AndrewFG's "Digital Media Renderer Analyser" to work out the capabilities of the PlayStation 4, and perhaps how to fix the issue. There are also a HEAP of discussions on the internet about getting PlayStations to work correctly using DLNA... and a few of them actually have good information. I've looked in the past. Didn't the PlayStation 4 drop some of the DLNA functionality the PlayStation 3 had? I don't remember the details right now.

Or if nothing works, you could just select the files that you are sending to a DLNA Renderer, edit the [Name] field, and enter the expression "=[Track #] - [Name]" without quotes, and all files will now have a [Name] including the [Track #]. But that is certainly not an ideal solution. It will have to be managed carefully, as repeating the process for a file would result in a [Name] of "[Track #] - [Track #] - [Name]", for example.

But you should start a separate thread with this issue.
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: How to Replace Track Number with a Letter?
« Reply #14 on: May 21, 2018, 10:23:37 pm »

I'm not being sarcastic. :)

Also, I've run through all the troibleshooting processes you've suggested. The PS4's Media Player app is simply not equipped to properly sort media or to report itself as a zone. All it can do is pull and it doesn't support [Track #] or [Episode] so sorting is asinine. I made the suggestion knowing this.

For the record, I'm personally not all that concerned with the PS4 because I also own an Xbox One that is fully DLNA-compliant and exhibits none of the issues mentioned above. One can even push to it. I just made the suggestion because I figured it would rectify some of the PS4's problems for the benefit of others, as well as those of the OP, potentially. Unless I'm misunderstanding the issue.
Logged

RoderickGI

  • MC Beta Team
  • Citizen of the Universe
  • *****
  • Posts: 8186
Re: How to Replace Track Number with a Letter?
« Reply #15 on: May 22, 2018, 12:01:21 am »

Well, the OPs issue has nothing to do with DLNA, so it isn't really relevant in this thread, at least in my opinion. The OP is playing music from an SD memory card in a Mercedes-Benz.

I think what you have said is what I read about the PS4. They took away the ability to act as a DLNA Renderer that a DLNA Controller could push to. Really not an issue JRiver can address. Even if JRiver implemented your suggestion, which would be a fair bit of work, it would only work when the PS4 pulled media to itself, maybe, and Sony could easily break that capability on a whim. They obviously don't want people to use the PS4 as an all-around media player anymore.

Be happy you have the XBox One!
Logged
What specific version of MC you are running:MC27.0.27 @ Oct 27, 2020 and updating regularly Jim!                        MC Release Notes: https://wiki.jriver.com/index.php/Release_Notes
What OS(s) and Version you are running:     Windows 10 Pro 64bit Version 2004 (OS Build 19041.572).
The JRMark score of the PC with an issue:    JRMark (version 26.0.52 64 bit): 3419
Important relevant info about your environment:     
  Using the HTPC as a MC Server & a Workstation as a MC Client plus some DLNA clients.
  Running JRiver for Android, JRemote2, Gizmo, & MO 4Media on a Sony Xperia XZ Premium Android 9.
  Playing video out to a Sony 65" TV connected via HDMI, playing digital audio out via motherboard sound card, PCIe TV tuner

Gatherum

  • Citizen of the Universe
  • *****
  • Posts: 651
Re: How to Replace Track Number with a Letter?
« Reply #16 on: May 23, 2018, 12:47:07 am »

Ah. My mistake. I misunderstood or misread the OP's issue. Didn't mean to hijack the thread. Sorry about that!
Logged
Pages: [1]   Go Up