mIRC Homepage
Posted By: captain_obvious mp3 - 20/07/03 12:33 AM
can anyone give me a gist of what happens with a continous mp3 player? because i cant figer out what would make it play continously after an splay ends? any help will be great

thanks anyways
Posted By: lammkott Re: mp3 - 20/07/03 02:12 AM
/help on MP3END
Posted By: captain_obvious Re: mp3 - 20/07/03 03:52 AM
i ahve a question, this is my first attemopt at a script taht does anything usefull but i can't seem to get it right..

here is teh code

Code:
  
alias syn {
  if (%mp3.dir == $null) { set %mp3.dir $sdir(C:/,Select Your mp3 Directory) }
  if (%rand == on) { set $rand(%mp3.dir) | syn.dis | syn.play {
      if ($insong == true) { on *:mp3end: { set %mp3 $rand(%mp3.dir) | syn.dis | syn.play } } 
      elseif ($inwave == true) { on *:mp3end: { set %mp3 $rand(%mp3.dir) | syn.dis | syn.play } } 
      else ($inmidi == true) { on *:mp3end: { set %mp3 $rand(%mp3.dir) | syn.dis | syn.play } } 
    }
  }
  else {
    syn.get
    syn.rand
    syn.dis
    syn.play
  }
}
alias syn.get {
  set %mp3 $sfile(%mp3.dir,Select a song!,ok)
}
alias syn.rand {
  set %rand $$?="Set this value to either, on or off:"
}
alias syn.dis { 
  set %mp3.name $sound(%mp3).title

  set %mp3.length $sound(%mp3).length

  set %mp3.artist $sound(%mp3).artist

  set %mp3.bit $sound(%mp3).bitrate

}

syn.play {
  //splay %mp3
  msg $active syn mp3; (%mp3.artist(%mp3.title)%mp3.length) @ (%mp3.bit)
}


and here is teh problems...

it dioesnt set the mp3.artist mp3.name... ect variables
other then that everything else works besides syn.play in which case i get this error... SYN.PLAY Unknown command
oh and also i get an error on the random part which says to many parameters are set

any help would be great.. thanks
Posted By: KingTomato Re: mp3 - 20/07/03 05:25 AM
Code:
alias syn {
  if (%mp3.dir == $null) { set %mp3.dir $sdir(C:/,Select Your mp3 Directory) }
  if (%rand == on) { set $rand(%mp3.dir) | syn.dis | syn.play [color:Red]{[/color]
  if ($insong == true) { on *:mp3end: { set %mp3 $rand(%mp3.dir) | syn.dis | syn.play } } 
  ...


Red portion needs to be flipped. >:D

Code:
...
[color:Red]alias[/color] syn.play {
...


and finally..
Code:
... $rand(%mp3.dir) ...

should be
Code:
$findfile(%mp3.dir, *.mp3, $rand(1, $findfile(%mp3.dir, *.mp3, 0)))
Posted By: lammkott Re: mp3 - 20/07/03 05:32 AM
Code:
if ($insong == true) { [color:red]on *:mp3end:[/color] { set %mp3 $rand(%mp3.dir) | syn.dis | syn.play } }


Since when have you been able to put an event inside an alias?
Posted By: Nobodi Re: mp3 - 20/07/03 06:32 AM
$rand expects a range not a directory

$rand(%mp3.dir)

$rand(v1,v2)
This works in two ways. If you supply it with numbers for v1 and v2, it returns a random number between v1 and v2. If you supply it with letters, it returns a random letter between letters v1 and v2.
Posted By: captain_obvious Re: mp3 - 20/07/03 07:30 AM
how come $sound(%mp3).title and $sound(%mp3).artist dont return the title and artist?
Posted By: LocutusofBorg Re: mp3 - 20/07/03 07:32 AM
Most likely because a] you are looking in the wrong place for the output, or b] %mp3 does not hold a existing filename (including the filepath, and if there's spaces in it, enclosed within double quotes)
Posted By: captain_obvious Re: mp3 - 20/07/03 07:49 AM
ok so the file name cant have spaces?

this is what %mp3 =

%mp3 C:\My Shared Folder\Mystikal_-_Shake_It_Fast_(Dirty).mp3
Posted By: LocutusofBorg Re: mp3 - 20/07/03 07:56 AM
(including the filepath,'and if there's spaces in it, enclosed within double quotes)
See part in blue.
Posted By: captain_obvious Re: mp3 - 20/07/03 08:10 AM
im not getting you double quotes would be "" or "
Posted By: KingTomato Re: mp3 - 20/07/03 08:12 AM
"C:\path to\file name with spaces.ext"
Posted By: captain_obvious Re: mp3 - 20/07/03 08:13 AM
sorry im slow tonight
smile
thanks for answering my stupid questions
Posted By: captain_obvious Re: mp3 - 20/07/03 08:18 AM
i still just get this


<captain_obviousaway> syn mp3; (random play) - (benefit ft eminem()235670) @ (160 kb/s) - anti SARS defense system!
<captain_obviousaway> syn mp3; (random play) - (()256170) @ (96 kb/s) - anti SARS defense system!


its not displaying the title on one and the title and the artist one the other one frown

here is the code

Code:
alias syn.dis { 
  set %mp3.name $sound(%mp3).title

  set %mp3.length $sound(%mp3).length

  set %mp3.artist $sound(%mp3).artist

  set %mp3.bit $sound(%mp3).bitrate

}

 


and then where it displays

Code:
 
alias syn.play {
  //splay %mp3
  msg $active syn mp3; (random play) - ( $+ %mp3.artist $+ ( $+ %mp3.title $+ ) $+ %mp3.length $+ ) @ ( $+ %mp3.bit kb/s) - anti SARS defense system!
}

 
Posted By: KingTomato Re: mp3 - 20/07/03 08:21 AM
First off do u know if the tags are supplied in the song? I go by file name for the reason, where song artists and names aren't always supplied int he tags of the mp3.

Also, change song length to $duration($calc(%mp3.length / 1000))
Posted By: captain_obvious Re: mp3 - 20/07/03 08:33 AM
no i don't know if its got the tags... is there any way to tell or add them?
Posted By: KingTomato Re: mp3 - 20/07/03 08:52 AM
to tell...

a good exaple, then your %mp3.song is empty >:D

To add...

Right click on the filename and use windows, or open winampe or media player and change it there.
Posted By: captain_obvious Re: mp3 - 20/07/03 09:03 AM
thanks man i figured out a different way, soory about all my newb question
© mIRC Discussion Forums