|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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."
|
|
|
|
Joined: May 2003
Posts: 215
Fjord artisan
|
Fjord artisan
Joined: May 2003
Posts: 215 |
- Jason
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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
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."
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
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
...
[color:Red]alias[/color] syn.play {
...
and finally.. should be
$findfile(%mp3.dir, *.mp3, $rand(1, $findfile(%mp3.dir, *.mp3, 0)))
-KingTomato
|
|
|
|
Joined: May 2003
Posts: 215
Fjord artisan
|
Fjord artisan
Joined: May 2003
Posts: 215 |
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
|
|
|
|
Joined: Dec 2002
Posts: 191
Vogon poet
|
Vogon poet
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.
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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."
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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."
|
|
|
|
Joined: Mar 2003
Posts: 1,271
Hoopy frood
|
Hoopy frood
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
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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."
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
Hoopy frood
Joined: Jan 2003
Posts: 3,012 |
"C:\path to\file name with spaces.ext"
-KingTomato
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
Joined: Jul 2003
Posts: 47 |
sorry im slow tonight thanks for answering my stupid questions
"watch the news today, so you don't have to watch the history channel tomorrow."
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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 here is the 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
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."
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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."
|
|
|
|
Joined: Jan 2003
Posts: 3,012
Hoopy frood
|
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
|
|
|
|
Joined: Jul 2003
Posts: 47
Ameglian cow
|
OP
Ameglian cow
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."
|
|
|
|
|