Project

General

Profile

$mp3 » History » Version 7

Per Amundsen, 12/19/2018 02:29 AM

1 1 Per Amundsen
_Added in 1.9.0_
2
3
*$mp3(filename)*
4
5 2 Per Amundsen
Returns "ID3 tag":https://en.wikipedia.org/wiki/ID3 information about a file/song.
6 1 Per Amundsen
7
_If file is not found, the default sound folder path is returned._
8
9 4 Per Amundsen
_Same as [[$sound]]._
10
11 1 Per Amundsen
*Parameters*
12
13
filename - Filename to check.
14
15
*Properties*
16
17
.album - Album name.
18
.title - Song title.
19
.artist - Song artist.
20
.year - Album/song year.
21
.comment - Comments field.
22
.genre - Song genre.
23
.track - Album track,
24
.length - Song length.
25
.bitrate - Song bitrate.
26
.version - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group version.
27
.variable - [[$true]] if the song is "variable bitrate":https://en.wikipedia.org/wiki/Variable_bitrate, otherwise [[$false]].
28
.sample - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group frequency rate.
29
.mode - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group mode.
30
.layer - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group layer.
31 3 Per Amundsen
.copyright - [[$true]] if copyright field is enabled, otherwise [[$false]].
32
.private -  [[$true]] if private field is enabled, otherwise [[$false]].
33 1 Per Amundsen
.vbr - [[$true]] if the song bitrate is variable, otherwise [[$false]].
34 6 Per Amundsen
.id3 - Returns the "id3":https://en.wikipedia.org/wiki/ID3 tag version.
35
.tag - Returns the number of "id3v2":https://en.wikipedia.org/wiki/ID3 tags found.
36
.tags - Returns the "id3v3":https://en.wikipedia.org/wiki/ID3 tags found.
37 7 Per Amundsen
.crc - Returns [[$true]] if the file is "CRC protected":https://en.wikipedia.org/wiki/Cyclic_redundancy_check, otherwise [[$false]].
38 1 Per Amundsen
39
*Example*
40
41
<pre>
42
; Print artist - title - album for 'song.mp3'
43
//echo -ag $mp3(song.mp3).artist- $mp3(song.mp3).title - $mp3(song.mp3).album
44
</pre>