Temporal Position in Metadata to control LEDs

Hello, is it possible to encode a sequence of time positions in mp3 header that can then trigger LED lights in real time? So for example tag 1 would store 4.85 seconds and when the song hits that point in real time an event signal is sent to a hardware device to trigger an LED. Is this possible?

Many thanks

The id3 standard does not know anything about triggering LEDs.

MP3tag supports user-defined fields.
So if you have an application that can read user-defined fields (or standard fields that contain the corresponding data), you are done.
But it depnds primarily on the player application.

One idea could be to use a SYLT frame.
The id3 standards define a frame called SYLT for (time) synchronized lyrics.
Mp3tag does not support this frame type.

There are 3rd party tools to manage such synchronized lyrics.

BUT as @ohrenkino already wrote:
To control your LED lights, you need some kind of software able to read this time information and send the needed signal to your LED controller.

Maybe some kind of "arduino project" or "raspberry pi project #1" or "raspberry pic project #2" can help you better?

Right! So thinking the SYLT signal can be converted to a midi output and then sent to Arduino for sequenced output to LED. Question is how does that SYLT encoding output/send information in real time?

No, that question is completely irrelevant as the SYLT frame only defines a place where data is stored that is then interpreted by a target application.
That target application then sucks in the whole frame and displays the lyrics at so-and-so many seconds runtime of a track. The field contents is pure text which is structured into a part for the runtime and a part for the corresponding text.

This would mean for you and your LED controller that you need an application that also is able to read the tags, find the field for the LED control data, read that field and interpret it.
I would assume that the control data would feature a code that says which LEDs should be lit with which intensity - and those instructions would very likely not be the original lyrics. Or do you have a dictionary that translates each word into an LED command?

And if you don't want to loose the lyrics I would strongly recommend to invent a user-defined field for this special purpose.
snychronized lyrics may look like this:

[00:02.10]I love the colorful clothes she wears
[00:06.33]And the way the sunlight plays upon her hair
[00:13.11]I hear the sound of a gentle word
[00:19.01]On the wind that lifts her perfume through the air
[00:25.57][01:17.07]I'm pickin' up good vibrations
[00:29.07][01:19.87]She's giving me excitations (Oom bop bop)
[00:32.32][00:38.67][00:45.03][01:23.03][01:29.35][01:35.71]I'm pickin' up good vibrations (Good vibrations, bop bop)
[00:35.68][00:41.92][01:26.21][01:32.59][03:01.31]She's giving me excitations (Excitations, bop bop)
1 Like

Just to get an idea, this could look like

LEDTRIGGER = LED1,4.85;LED1,10.5;LED2,10.5 ...

If you use colored RGB-LEDs you would even have to use something like
00:02.10, red 100
means 100% of RED after 2 seconds and 10 milliseconds = LED should glow in red

or

00:06.33, green 50
means 50% of GREEN after 6 seconds and 33 milliseconds = LED should glow in yellow

or

00:13.11, blue 50
means 50 % of BLUE after 13 seconds and 11 milliseconds = LED should glow in purple

There are also LED's where you can control the brightness, then you would have to add it's value too:
00:13.11, blue 50, 70
means 70% brightness for purple LED after 13 seconds and 11 milliseconds

Very interesting. So there’s a fair amount of setup involved. Will these tags be able to be incorporated to existing MP3 files or will a new file entirely need to be created? Reason I’m asking is that let’s say a DJ has 20,000 songs in their library and they don’t want to replace them with new MP3 files would simply saving the metadata into an existing file be feasible?

This is all totally theroretical, right? Because you do not have the control application nor do you have an idea what the data should look like.

The part that MP3tag can play: put data into an existing field or a user-defined, custom field.
MP3tag neither determines what format the data should have (except that it should be in text) nor what the field is called as long as it complies to the ID3 standard.
Such fields can be added to existing files, there will be no need to get new files.
Yet, if you intend to add such data to 20,000 files with all the timing and measuring that will be involved, a fair amount of data processing will be involved which will take a lot of time.
And this does not include the development of the application that reads the special field and transforms that into LED commands.

(MP3tag is a program to edit tags, among them tags for ID3s - MP3tag does not set the ID3 standard, it uses the standard)

And a huge amount of manual work to do!
In addition to @ohrenkino's explanation: Even if you have the 3rd party hardware and software to control LED's you need to find a way to "match" the music to your wanted light effects.

Just imagine:
You hear the song "In the air tonight" from Phil Collins and want to see your LEDs flashing in the exactly same rythm like Phil beat his drums. This will need a huge amount of exact timing.
Or you find some software who is able to "hear" such rythms, like the VLC visualizer "Milkdrop" for example.

But again, this is all about 3rd party, external things. Nothing that Mp3tag can do for you.
Mp3tag can help to integrate such information in your songs. But first you should search for the hard- and software to control your LED's. They will tell you what you have to provide as information to control your LEDs.

So I have a pretty tight beat detection algo that I developed. It scribes the temporal positions of the beats into an array (sample position from uncompressed wav source music i/o filestream). From here I am envisioning converting sample position to time eg 12.68 seconds and outputting those metrics to a text file or temp memory and scribing those positions into the ID3 tags. Perhaps a hundred or more depending on length of song and sequence pattern.

Appreciate the insight.