Project

General

Profile

$sound » History » Version 5

Per Amundsen, 12/19/2018 03:55 AM

1 1 Per Amundsen
_Added in 3.3_
2
3
*$sound(filename)*
4
5
Returns "ID3 tag":https://en.wikipedia.org/wiki/ID3 information about a file/song.
6
7 5 Per Amundsen
_If file is not found, the default sound folder associated with the file extension is returned._
8 1 Per Amundsen
9
_Same as [[$mp3]]._
10
11
*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
.copyright - [[$true]] if copyright field is enabled, otherwise [[$false]].
32
.private -  [[$true]] if private field is enabled, otherwise [[$false]].
33 3 Per Amundsen
.vbr - [[$true]] if the song bitrate is variable, otherwise [[$false]].
34
.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 4 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 2 Per Amundsen
//echo -ag $sound(song.mp3).artist- $sound(song.mp3).title - $sound(song.mp3).album
44 1 Per Amundsen
</pre>