mIRC Home    About    Download    Register    News    Help

Print Thread
#60327 14/11/03 09:52 PM
Joined: Oct 2003
Posts: 18
I
Pikka bird
OP Offline
Pikka bird
I
Joined: Oct 2003
Posts: 18
how can i display the length of the mp3 i am playing in this format: 00:00. thanks.

#60328 14/11/03 11:13 PM
Joined: Oct 2003
Posts: 8
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Joined: Oct 2003
Posts: 8
Code:
 $replace($remove($duration($calc($sound(your_file_goes_here).length / 1000)),mins,secs),$chr(32),:) 


This should work for you. :-)


#60329 15/11/03 04:12 AM
Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
mIRC 6.1x: $duration($calc($sound(%mp3_filename).length / 1000),3)

Older version: $gmt($calc($sound(%mp3_filename).length / 1000),nn:ss)

#60330 15/11/03 06:57 AM
Joined: Oct 2003
Posts: 8
Nutrimatic drinks dispenser
Offline
Nutrimatic drinks dispenser
Joined: Oct 2003
Posts: 8
I like your code Jason, but unless you have a song that is an hour long I still like my result better.
Anyway this will give you a couple ways to get the look you want.
:-)


#60331 15/11/03 02:30 PM
Joined: Nov 2003
Posts: 228
S
Fjord artisan
Offline
Fjord artisan
S
Joined: Nov 2003
Posts: 228
The second one I posted, for the older versions of mIRC, will return it in minutes and seconds... I personally don't like the $duration() format and tend to use $gmt()

This is the alias I use...
Code:
alias -l mp3len {
  var %len = $calc($sound($1-).length / 1000)
  return $gmt(%len,$iif(%len > 3600,hh:nn:ss,nn:ss))
}


Syntax: $mp3len(path\to\filename.mp3)

#60332 16/11/03 12:55 AM
Joined: Aug 2003
Posts: 1,831
I
Hoopy frood
Offline
Hoopy frood
I
Joined: Aug 2003
Posts: 1,831
You should make that 3599, or use >=
if %len is 3600, $gmt(%len,$iif(%len > 3600,hh:nn:ss,nn:ss)) will return 00:00


Link Copied to Clipboard