
July 27th, 2004
05:59 AM
Music on my website?
I would like a small section of my website to play MIDI files when you go to it. How would I go about doing this? I am not sure if I want the track to repeat or not yet, but is there a way to do it both ways (repeat and not)?
my site is www.virtualalex.com if it matters.
___________________
www.VirtualAlex.com (Now with less carbs then ever.)

July 27th, 2004
06:31 AM
Neverside Newbie
Status: Offline!
Try this:
http://www.radioblogclub.com/
___________________
Portfolio - Blog | Posts: RSS
Join me in Neverside's Photography Discussion Channel: #photo

July 27th, 2004
06:49 AM
Hmmm this is like... streaming radio. I already have the tracks I want. I want to play specific MIDI tracks when you go to certain places. I don't want streaming radio. Unless I missed something.
___________________
www.VirtualAlex.com (Now with less carbs then ever.)

July 27th, 2004
11:33 AM
Neverside Newbie
Status: Offline!
Do you want to play them automatically, or when they click on links? If it's a link, just make the link point to the midi file. If you want it to play automatically, add this:
<?php
<embed src="PATH TO FILE.mid" loop=X">
?>
Where X = -1 for infinite looping, 0 for playing once, or any other number to repeat that many times.
___________________
Come to #linux on IRC: tc.tutorialnetwork.org!
noie.tk - No IE!
"wat" is not a word! - "ur" is not a word!

July 27th, 2004
03:19 PM
ok, can I make it so they have to click on something to make it play, but not open up a new window? because I tried something, and when you clicked it would take you to a window with a little play bar on it. I want it to be background music.
___________________
www.VirtualAlex.com (Now with less carbs then ever.)

July 29th, 2004
07:48 AM
<embed> is deprecated. I think it's Netscape-only... or something like that...
Shouldn't this be in the Client Side forum? Or is it okay in here?

July 29th, 2004
11:52 AM
loves kitties and cuddles
Status: Offline!
It's ok in here for now, but I'll move it to client-side. I'm interested in a non-deprecated solution for including sound in a page. I think you might need to use <object>. Embed works in IE, it's probably just been replaced with a better suited tag.
___________________
I've got a girlfriend! WOOT.

July 29th, 2004
03:25 PM
Neverside Newbie
Status: Offline!
IMO the best way to include sound is with a flash file. Although if you don't have flash (includes me) <object> works too i guess
___________________
Oh, yes, this is going to be wild.

August 22nd, 2004
04:19 AM

You can also use the embed and object tags together to cover any complications
So this an old post but im still replying cause I actually know this one.
this a decent no error producing solution
<embed src="sample.wav"
autostart="true"
hidden="false"
loop="false">
<noembed> <bgsound src="sample.wav" loop="1"> </noembed></embed>
just change the src="" on both object and embed
this will start it automatically, if you want them to click something to make it start just change autostart to false
either way it will display a small audio player wherever you have the code through the hidden="false" field and then obviously if you want to hide it just change it to true.
I have used this for mp3 wav works with middi though I dont liek them and I think I have even used it with m3u and swf audio files
___________________
"So your face has fallen sad now, for you know the time is nigh. Well I must remove your wings and you, you must try and fly..."
The Ship Song
Nick Cave Feat. Johnette Nepolitano

August 22nd, 2004
06:45 AM
Make sure you have play/pause buttons so your visitors can turn it on/off.
___________________
I chose to be gay because running away from homophobes keeps my weight down.