Playing Sounds

 

mIRC supports the playing of various types of sounds with the following commands and identifiers.

 

/splay -cwmpq [filename | stop | pause | resume | seek | skip] [pos]

Plays the specified sound, which can be a .wav, .mid, or .mp3 file.

 

Where switch w = wave, m = midi, p = mp3, and q = queue for playing.

 

If you do not specify a folder, the sound folders in the Sound Requests dialog are searched.

 

You can use stop to stop a currently playing sound, eg. /splay stop, or /splay -w stop, to stop just wave files.

 

You can use pause, resume, and seek with mp3s.

 

If you specify the pos value when playing an mp3, eg. /splay llama.mp3 1000, mIRC will play the mp3 starting at that position.

 

You can also seek to a position in an mp3 while it is being played with eg. /splay seek 1000

 

To skip the currently playing sound, you can use /splay -wmp skip

 

The -q switch allows you to queue sounds for playing after the current sound ends.

 

The -c switch allows you to clear the play queue except for the currently playing sound.

 

When a sound finishes playing, it triggers a sound event.

 

/vol -wmpvuN [volume]

Sets the volume on your system for waves, midis, and mp3s (same as waves)

 

If you use the -v switch, this sets the master volume on your system.

 

The volume value can range from 0 to 65535.

 

The -uN switch sets the mute setting, where N = 1 is on, N = 2 is off.

 

$vol(wave | midi | song | master)

Gets the current volume for the specified sound setting

 

Properties: mute

 

$vol(wave).mute    returns the mute setting for wave sounds

 

$inwave, $inmidi, $insong

Return $true if the specified sound type is playing, $false otherwise.

 

Properties: fname, pos, length, pause

 

$insong.fname    returns the filename of the currently playing song

 

$sound(type)

Returns the directory specified in the Sound Requests section of the Options dialog, where type can be wave, midi, mp3, wma, or ogg.

 

$sound(filename)

Returns either the directory for that file type, as above, or information about the file. The following properties will return values based on the file type.

 

Properties: album, title, artist, year, comment, genre, track, length, version, bitrate, vbr, sample, mode, copyright, private, crc, .id3, .tag, .tags.

 

If you want to retrieve the id3v2 values, you can use the .tag and .tags properties:

 

showtags {

 if ($1- == $null) { echo 2 -e * /showtags: please specify filename, eg. /showtags file.mp3 | halt }

 echo 1 id3: $sound($1-).id3

 echo 1 tags: $sound($1-).tags

 var %n = $sound($1-,0).tag

 while (%n > 0) {

   echo 1 tag: $sound($1-,%n).tag

   dec %n

 }

}