mIRC Home    About    Download    Register    News    Help

Print Thread
#37275 20/07/03 12:33 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
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


"watch the news today, so you don't have to watch the history channel tomorrow."
#37276 20/07/03 02:12 AM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
/help on MP3END


- Jason
#37277 20/07/03 03:52 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
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


"watch the news today, so you don't have to watch the history channel tomorrow."
#37278 20/07/03 05:25 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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)))


-KingTomato
#37279 20/07/03 05:32 AM
Joined: May 2003
Posts: 215
Fjord artisan
Offline
Fjord artisan
Joined: May 2003
Posts: 215
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?


- Jason
#37280 20/07/03 06:32 AM
Joined: Dec 2002
Posts: 191
N
Vogon poet
Offline
Vogon poet
N
Joined: Dec 2002
Posts: 191
$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.

#37281 20/07/03 07:30 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
how come $sound(%mp3).title and $sound(%mp3).artist dont return the title and artist?


"watch the news today, so you don't have to watch the history channel tomorrow."
#37282 20/07/03 07:32 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
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)


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#37283 20/07/03 07:49 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
ok so the file name cant have spaces?

this is what %mp3 =

%mp3 C:\My Shared Folder\Mystikal_-_Shake_It_Fast_(Dirty).mp3


"watch the news today, so you don't have to watch the history channel tomorrow."
#37284 20/07/03 07:56 AM
Joined: Mar 2003
Posts: 1,271
L
Hoopy frood
Offline
Hoopy frood
L
Joined: Mar 2003
Posts: 1,271
(including the filepath,'and if there's spaces in it, enclosed within double quotes)
See part in blue.


DALnet #Helpdesk
I hear and I forget. I see and I remember. I do and I understand. -Confucius
#37285 20/07/03 08:10 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
im not getting you double quotes would be "" or "


"watch the news today, so you don't have to watch the history channel tomorrow."
#37286 20/07/03 08:12 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
"C:\path to\file name with spaces.ext"


-KingTomato
#37287 20/07/03 08:13 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
sorry im slow tonight
smile
thanks for answering my stupid questions


"watch the news today, so you don't have to watch the history channel tomorrow."
#37288 20/07/03 08:18 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
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!
}

 


"watch the news today, so you don't have to watch the history channel tomorrow."
#37289 20/07/03 08:21 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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))


-KingTomato
#37290 20/07/03 08:33 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
no i don't know if its got the tags... is there any way to tell or add them?


"watch the news today, so you don't have to watch the history channel tomorrow."
#37291 20/07/03 08:52 AM
Joined: Jan 2003
Posts: 3,012
Hoopy frood
Offline
Hoopy frood
Joined: Jan 2003
Posts: 3,012
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.


-KingTomato
#37292 20/07/03 09:03 AM
Joined: Jul 2003
Posts: 47
C
Ameglian cow
OP Offline
Ameglian cow
C
Joined: Jul 2003
Posts: 47
thanks man i figured out a different way, soory about all my newb question


"watch the news today, so you don't have to watch the history channel tomorrow."

Link Copied to Clipboard