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: How do I use tags from audio types that do not store them in the file? (Read 1044 times) previous topic - next topic
0 Members and 1 Guest are viewing this topic.

How do I use tags from audio types that do not store them in the file?

Probably a newbie question but here goes:

The MIDI Player components adds several tags to a MIDI file that show up in the Other category of the Properties dialog e.g. <MIDI_FORMAT> and <MIDI_TRACKS>.

How do I use them in title formatting as column headers etc...?

I'm experimenting with having the component add a LYRICS tag for OpenLyrics to display but the tag also appears in the Other category.

Re: How do I use tags from audio types that do not store them in the file?

Reply #1
Presumably they have been set with info_set from your component so you need to use $info(MIDI_FORMAT) or %__MIDI_FORMAT%. It's documented for tech info fields here...

https://wiki.hydrogenaud.io/index.php?title=Foobar2000:Title_Formatting_Reference#Technical_information_functions

If you wanted to make LYRICS available as standard title formatting, you'd use meta_set and friends.

https://github.com/jscript-panel/foobar2000-sdk/blob/6a37425fd39df2a93f4defc8ebc2ab7617fef2a1/foobar2000/SDK/file_info.h#L85


Re: How do I use tags from audio types that do not store them in the file?

Reply #2
Thanks marc2k3. That did the trick.

Do you happen to know the reason why there is a difference? When should I use info_set() and when meta_set()?

Re: How do I use tags from audio types that do not store them in the file?

Reply #3
Metadata is what users can edit. Info is read-only properties of your file. Just look at the different tabs in the properties dialog.

I forgot to mention above but if you're presenting LYRICS with meta_set, users will expect changes to be saved to file. You'll have to handle that yourself. I've not gone that deep with input components.  If this is not possible, perhaps you should go back to using info_set and providing it as a read-only MIDI_LYRICS or something???

Re: How do I use tags from audio types that do not store them in the file?

Reply #4
Maybe not what you want, although the topic title suggests that this is precisely what you want:
https://www.foobar2000.org/components/view/foo_external_tags can offer tagging for file formats that don't support it: the tags are then written either to a "sidecar" file or to a database.

 

Re: How do I use tags from audio types that do not store them in the file?

Reply #5
If this is not possible, perhaps you should go back to using info_set and providing it as a read-only MIDI_LYRICS or something???

It is possible but maybe not worth the hassle. The idea is to be able to present embedded karaoke lyrics to panels that support it. I'll go with the MIDI_LYRICS option.