Project

General

Profile

$sound » History » Revision 4

Revision 3 (Per Amundsen, 12/17/2018 07:56 PM) → Revision 4/6 (Per Amundsen, 12/19/2018 02:29 AM)

_Added in 3.3_ 

 *$sound(filename)* 

 Returns "ID3 tag":https://en.wikipedia.org/wiki/ID3 information about a file/song. 

 _If file is not found, the default sound folder path is returned._ 

 _Same as [[$mp3]]._ 

 *Parameters* 

 filename - Filename to check. 

 *Properties* 

 .album - Album name. 
 .title - Song title. 
 .artist - Song artist. 
 .year - Album/song year. 
 .comment - Comments field. 
 .genre - Song genre. 
 .track - Album track, 
 .length - Song length. 
 .bitrate - Song bitrate. 
 .version - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group version. 
 .variable - [[$true]] if the song is "variable bitrate":https://en.wikipedia.org/wiki/Variable_bitrate, otherwise [[$false]]. 
 .sample - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group frequency rate. 
 .mode - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group mode. 
 .layer - "MPEG":https://en.wikipedia.org/wiki/Moving_Picture_Experts_Group layer. 
 .copyright - [[$true]] if copyright field is enabled, otherwise [[$false]]. 
 .private -    [[$true]] if private field is enabled, otherwise [[$false]]. 
 .vbr - [[$true]] if the song bitrate is variable, otherwise [[$false]]. 
 .id3 - Returns the "id3":https://en.wikipedia.org/wiki/ID3 tag version. 
 .tag - Returns the number of "id3v2":https://en.wikipedia.org/wiki/ID3 tags found. 
 .tags - Returns the "id3v3":https://en.wikipedia.org/wiki/ID3 tags found. 
 .crc - Returns [[$true]] if the file is "CRC protected":https://en.wikipedia.org/wiki/Cyclic_redundancy_check, otherwise [[$false]]. TODO 

 *Example* 

 <pre> 
 ; Print artist - title - album for 'song.mp3' 
 //echo -ag $sound(song.mp3).artist- $sound(song.mp3).title - $sound(song.mp3).album 
 </pre>