Topics
All
MacOS
(Only)
Windows
(Only)
Linux
(Only, Not)
iOS
(Only, Not)
Components
Crossplatform Mac & Win
Server
Client
Old
Deprecated
Guides
Examples
Videos
New in version:
12.2
12.3
12.4
12.5
13.0
13.1
13.2
13.3
13.4
13.5
Statistic
FMM
Blog
Files.AudioTags
Queries audio tags for audio file.
Component | Version | macOS | Windows | Linux | Server | iOS SDK |
Files | 9.4 | ✅ Yes | ✅ Yes | ❌ No | ✅ Yes, on macOS and Windows | ❌ No |
Parameters
Parameter | Description | Example |
---|---|---|
FilePath | The native file path to the audio file. | "/Users/cs/Desktop/test.mp3" |
Result
Returns JSON or error.
Description
Queries audio tags for audio file.Returns JSON object with usual two sub objects. One is AudioProperties with length (in seconds), bitrate (in bits per second), sampleRate (in Hz) and channels as numbers.
The Properties object contains all the properties with various tags. Values are texts for the given keys.
Uses TagLib, an open source library to read metadata from audio files, e.g. ID3 tags.
Currently it supports both ID3v1 and ID3v2 for MP3 files, Ogg Vorbis comments and ID3 tags and Vorbis comments in FLAC, MPC, Speex, WavPack, TrueAudio, WAV, AIFF, MP4 and ASF files.
List of ID3v2 tag names:
ALBUM, ALBUMARTIST, ALBUMARTISTSORT, ALBUMSORT, ARTIST, ARTISTSORT, ARTISTWEBPAGE, AUDIOSOURCEWEBPAGE, BPM, COMMENT, COMPOSER, CONDUCTOR, CONTENTGROUP, COPYRIGHT, COPYRIGHTURL, DATE, DISCNUMBER, ENCODEDBY, ENCODING, ENCODINGTIME, FILETYPE, FILEWEBPAGE, GENRE, INITIALKEY, INVOLVEDPEOPLE, ISRC, LABEL, LANGUAGE, LENGTH, LYRICIST, LYRICS, MEDIA, MOOD, MUSICIANCREDITS, ORIGINALALBUM, ORIGINALARTIST, ORIGINALDATE, ORIGINALFILENAME, ORIGINALLYRICIST, OWNER, PAYMENTWEBPAGE, PLAYLISTDELAY, PODCAST, PODCASTCATEGORY, PODCASTDESC, PODCASTID, PODCASTURL, PRODUCEDNOTICE, PUBLISHERWEBPAGE, RADIOSTATION, RADIOSTATIONOWNER, RADIOSTATIONWEBPAGE, RELEASEDATE, REMIXER, SUBTITLE, TAGGINGDATE, TITLE, TITLESORT, TRACKNUMBER, URL.
See Files.AudioCoverArt to get covert art.
This function requires a native path. Use Path.FileMakerPathToNativePath to convert a FileMaker path to a native path if required. If you like to have the user choose the path, you can use FileDialog functions.
For Server be aware that server has limited permissions and may not be able to access all files on a computer.
Examples
Query MP3 tags:
MBS("Files.AudioTags"; "/Users/cs/Desktop/test.mp3")
Example result:
{
"AudioProperties": {
"length": 282,
"bitrate": 128,
"sampleRate": 44100,
"channels": 2
},
"Tags": {
"ARTIST": "John Doe",
"COMMENT": "test comment",
"TITLE": "Hello World"
}
}
Read tags and show JSON in field:
If [ Length ( AudioTags::FilePath ) > 0 ]
Set Variable [ $r ; Value: MBS("Files.AudioTags"; AudioTags::FilePath) ]
If [ MBS("IsError") = 0 ]
Set Field [ AudioTags::JSON ; MBS("JSON.Colorize"; MBS("JSON.Format"; $r)) ]
End If
End If
Colorize and format in Auto-Enter calculation:
Let ( [
jsonFormatted = MBS("JSON.Format"; Self);
jsonFormatFailed = MBS("IsError");
jsonText = If(jsonFormatFailed; Self; jsonFormatted);
result = MBS("JSON.Colorize"; jsonText)
]; result )
// put this calculation into a field, so the field gets formated and colorized whenever the field is changed and the record gets commited.
See also
- Files.AudioCoverArt
- Files.SetAudioTags
- IsError
- JSON.Colorize
- JSON.Format
- Path.FileMakerPathToNativePath
Release notes
- Version 13.3
- Fixed Files.AudioTags function for macARM target.
- Version 9.4
- Added Files.AudioTags to read ID tags from audio files.
Example Databases
Blog Entries
- MBS FileMaker Plugin, version 13.3pr7
- Neue Funktionen des MBS FileMaker Plugin 9.4
- MBS FileMaker Plugin 9.4, second release
- Neues MBS FileMaker Plugin 9.4
- MBS FileMaker Plugin 9.4 - More than 5900 Functions In One Plugin
- MBS FileMaker Plugin, version 9.4pr8
- TagLib to read and write ID3v2 Tags in FileMaker
FileMaker Magazin
This function checks for a license.
Created 12nd September 2019, last changed 16th July 2022
