Using mp3 tag to built a snippet

I would like to know if it’s possible to use the incorporated tags in a mp3 audio file in order to extract various information, such as name of the music, artist, cover.
After having been extracted, the information could be used in code such as for example :

        <audio controls>
              <source src="<?php echo $audio->url() ?>" type="<?php echo $audio->mime() ?>">
              <span class="">
                  <?php echo html($audio->title()) ?>
                  <?php echo html($audio->artist()) ?>
                  <?php echo html($audio->cover()) ?>

I saw in the docs that meta data of a file could be used by adding a {filename}.txt but I didn’t succeed to manage it properly.
Sorry for the stupid question, but I am neither a web developer nor a php skilled guy.

thank you in advance

Yes, meta data files are the way to go here.
Your code looks good, so this should work. What have you tried so far which didn’t work?

Did you add the files fields to the blueprint?

No I didn’t use the blueprint and the associated files fields.
As I am a very poor php developer (and a little bit lazy), I thought that a kind a “php script” already exists and it can extract automatically the appropriate data from the mp3 file.
I already tried with meta data files but without success. I have also to admit that I have difficulties with the basics of blueprint.
I probably have to dig a little more in the docs and revert if not successful.

These are two different kinds of things:

To extract the data directly from the mp3 files, you need to use a php script, there are a few options, I think, you just need to google a bit.

The Kirby way of using meta data files, requires that you add the information manually, either by entering the information directly into a text file or by using the panel. If you use the panel, you have to add the file field option to the corresponding blueprint, as @flokosiol mentioned.