(Created page with "{{mirc title|$mp3 Identifier}}{{Deprecated feature|new={{mIRC|$sound}}}}'''$mp3''' returns various information about sound files == Synopsis == <pre>$mp3(<type>)</pre> Possi...") |
m (→See also: Correct typo) |
||
Line 72: | Line 72: | ||
* {{mIRC|on mp3end}} | * {{mIRC|on mp3end}} | ||
* {{mIRC|on nosound}} | * {{mIRC|on nosound}} | ||
− | * {{mIRC|on | + | * {{mIRC|on waveend}} |
* {{mIRC|$inmidi}} | * {{mIRC|$inmidi}} | ||
* {{mIRC|$insong}} | * {{mIRC|$insong}} |
Latest revision as of 07:15, 30 January 2024
Note: This feature has essentially been replaced by $sound.$mp3 returns various information about sound files
Synopsis[edit]
$mp3(<type>)
Possible value for <type>:
- mp3 - Return the mp3 folder
- midi - Return the midi folder
- wave - Return the wave folder
$mp3(filename>)[.property]
Properties[edit]
If used with a music filename, the following properties are available:
Note: Only mp3, ogg, and wma files currently support the following properties. Keep in mind that not all properties may have been set. Each property returns the id3v1 values. For id3v2, use the .tag, and .tags properties.
- albumRetrieves the specified album name sound file.
- titleReturns the song title for the file.
- artistReturns the artist name for the file.
- yearReturns the year associated with the song release.
- commentReturns any comments made by the file creator.
- genreGrabs the genre for the file, if set.
- trackRetrieves the track number associated with the song.
- lengthReturns the full length of the song in milliseconds.
- versionGets the version number of the song, or track.
- bitrateReturns the bitrate for the file.
- vbrGets the variable bit rate for the file.
- sampleReturns the sampling frequency.
- modeReturns the mode: mono, stereo, etc.
- copyrightReturns any copyright information.
- privateReturns $true or $false for the private tag.
- crcReturns $true or $false if crc is found.
- .id3Returns the id3 tag information.
- .tagUsed to retrieve id3v2 information.
- .tagsUsed to retrieve id3v2 information.
Examples[edit]
Echo the artist name of the currently playing mp3 file to the active window:
//echo -a $mp3($insong.fname).artist
Create a small alias that will open a window, @id3info, and echo some basic info about the currently playing song to it:
alias id3info { ; First, we check to make sure we currently have an mp3, ogg, or wma file playing if ($insong) { ; If the @id3info window is open, clear it, otherwise create it. $iif($window(@id3info),clear @id3info,window @id3info) echo @id3info Artist: $mp3($insong.fname).artist echo @id3info Track: $mp3($insong.fname).track echo @id3info Title: $mp3($insong.fname).title echo @id3info Album: $mp3($insong.fname).album ; The below calculation converts the milliseconds for the sound ; file length into the format mm:ss, or minutes:seconds. Note that ; this does not properly support lengths over 59 minutes and 59 ; seconds long. echo @id3info Length: $replace($round($calc($mp3($insong.fname).length / 1000 / 60),2),.,:) echo @id3info Year: $mp3($insong.fname).year } }
Compatibility[edit]
Added: mIRC v5.8
Added on: 05 Sep 2000
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.