adding sound to websites...

Discussion in 'Mac Help/Tips' started by krossfyter, Apr 29, 2003.

  1. krossfyter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #1
    okay i would like to add sound to my site. i would like to embed sound. i know how to do this.. im using dreamweaver. the problem is the file size is to large for the web even if its mp3.

    i just want to put a 30 to 40 second snipet/cilp of some music and loop it etc. or even 15 sec or whatever...something to create a sound environment that goes with my site design and layout etc. is there any way to do this? i have dreamweaver, fireworks, flash, itunes, imovie and quicktime (not pro).

    also how about adding sound to buttons etc. in dreamweaver how does one do that.



    ive searched for this info on the web. no dice.

    (havent said that chessy phrase in ages .... forgive me)


    thanks for any help.
     
  2. Eniregnat macrumors 68000

    Eniregnat

    Joined:
    Jan 22, 2003
    Location:
    In your head.
    #2
    There is a lot you can do for sound.
    1.) Clean it up. Remove anything extraneous or distracting.
    2.) Remove any the extremely low frequencies.
    3.) Drop the stereo channel, and make the file mono.
    4.) Resample (with anti-alias filtering) to a lower sample rate, keeping in mind the Nyquist Theorem (frequency).
    Choose the rate based on, Nyquist (1/2 the frequency of the highest frequency)
    Or what sounds best to your ears.
    5.) Compress using whatever format meets your needs. MP3 isn’t, in my opinion, the best for live streaming or quick spawining. Certain formats take longer to decode. Certain players also decode at different speeds. You can compress something to miniscule size using some of the teleservice compression routines (aLaw and uLaw) You can get a small file that will decode quickly- but it sounds like poop. Or you could leave it native (like .wav). Try diffrent formats.

    Here are some numbers that I ran on a simple sound file, a 419.52 second long file, human voice, dirty.

    • Native, stereo, 44,100, .wav ----------------------->72,269 kb
      Native paired down, mono, 22,050, .wav ---------> 18,068 kb
      Compressed OggVorbis, mono, 22,050, .ogg -------> 5,324 kb
      Compressed from native, mono, 22,050, VOX ------> 4,517
      Compressed from native, mono, 22,050, mp3-------> 3,280
      Compressed from MP3, mono, 22,050, .ogg --------> 5,324 kb*
      (*note- spawned larger with reduced quality-just for kicks)
     
  3. Mr. Anderson Moderator emeritus

    Mr. Anderson

    Joined:
    Nov 1, 2001
    Location:
    VA
    #3
    you can add a small flash file that dynamically loads the music - try searching for flash tutorials on music.

    But even better would be to just make it a button - on/off - in flash. if you feel even more ambitious a slider for volume, which is what I would personally want if i visited you site, since most of the time the music is too loud.

    Good luck and give us a link when you get it going.

    D
     
  4. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #4
    I concur with duke on the Flash thing. Just make sure you test it out on a bunch of browsers/platforms before you roll with it.
     
  5. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #5
    eniregnat.... wow! all i can say is wow. that was like reading a manual. i bet you are into audio theory too! :)
    thanks for the help.

    duke...

    im trying what you told me. i found some stuff...

    http://www.macromedia.com/support/dreamweaver/ts/documents/mp31.htm


    its not a music box with on and off type of thing but it works. ONLY problem I am having is cutting the file size down enough... editing my music etc. flash seems to take the whole song... and in there in theory i guess i should be able to cut it... and it does in ints editing option but when exporting the song it seems to take up the same file space as the whole song even when edited. whats up with that? i figured out how to get it mono... convert it to raw ...take out some frequencies etc. but its still to big.
    i just want to take a short clip and have it looped i guess. no more then 100kb if possible. 30kb would be perfect. also when i take it over to dreamweaver and allow for loop it doesnt loop. whats going on with that?

    i cant chop the music in itunes... or can i?
     
  6. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
  7. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #7
    este vato...

    iTunes can't edit audio files. QuickTime Pro can. :)
     
  8. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #8
    haha!


    maricon!


    thanks.
     
  9. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #9
    este fresa...:rolleyes:

    So got anything done yet?
     
  10. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #10


    [​IMG]

    HAH!


    Yeah man....

    www.krossfyter.com


    the sound on it takes up 128kb. Thats the smallest I could get it. This is not my first choice for the intro sound I would want. I am just doing this to test it out. The song or music I want I need to be able to cut down. Since this first song was short in the first place It was easier to work with. Oh yeah this is my site ..... I am trying at least to create a decent site for myself.
     
  11. caveman_uk Guest

    caveman_uk

    Joined:
    Feb 17, 2003
    Location:
    Hitchin, Herts, UK
    #11
    Am I the only person that thinks that putting sound on a website is possibly the most cheesy thing you could do? Also it's the best way to get a browser window closed if you're sneakily browsing at work ;)
     
  12. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #12
    its all relative man.


    its like everything else. if its done right the cheese factor is limited or taken away entirely. sometimes it actually helps sites... sometimes it doesnt. this is just me expierementing. my site is not a business site... i could give a flip about the traffic. plus those who do come in dont have trouble loading up the images for the most part ... the sound is last added... its not like you cant come in my site because of the sound. or is it? if so ill take that s hit of. hell i can take it of right now for the hell of it.... i will actually when i get more of an understanding of what i am trying to do and the sound i want.



    but its all relative.
     
  13. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #13
    I think the sound is subtle and doesn't really jack up the "cheese factor" too high.

    Now, on to some other feedback...

    Overall, I think the site looks really good. A couple things you need to watch out for are the text column getting long and your page background running out at the bottom. Also, there are some places where the text goes over the black in your background.

    Fix those two things and you'll be looking good, hermano! :p
     
  14. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #14

    thanks bro.


    Alright I will fix the length of the text column. What do you suggest I do? How many lines is too much or overboard? Do I add a second page when it gets to long? Where does the text go over the black in the background? How the hell is that possible? What browser are you using? I know its jacked up in safari. I am not questioning you to be argumentative... just trying to get more detailed feedback so I can fix whats broken. About the background running out at the bottom.. I really dont know how to fix that. Any suggestions? Im not using tables ... straight layers ... nested etc. so im not sure how to fit the diminsions of the page.

    Sound is a sample from a song of a band called dredg. Guys are from right around you rower.... Los Catos California.


    Puro Califas!



    thanks again for your help rower.
     
  15. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #15
    Yeah, I'm using Safari.

    Here's what I would do:
    -Set the background color to match the yellow so that when the graphic ends it will appear seamless with the background color.
    -Remove the black part at the bottom so that the text can't overlap it.

    Here's a mockup:
    http://organicallydigital.com/krossfyter/
     
  16. andrewlandry macrumors member

    Joined:
    Jul 3, 2002
    Location:
    NYC
    #16
    this is just a plea to web designers in general - please don't add sound to websites. it is more annoying than popups. i'm always listening to iTunes when browsing, and even some sort of ambient sound really kills the mood of whatever i'm listening to. also, i'm not sure who really likes listening to sounds that are compressed to hell. it's a free country and all, but damn i hate websites with sound. at the very least, learn how to put an on/off switch on the thing. there are sites that i no longer visit because i find the sound portion of the site to be so invasive (anything that is on all of the time with no off switch is invasive). just my opinion, but i felt i had to comment because unexpected sound on websites is really the most annoying "feature" of web browsing.
     
  17. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #17
    I agree. An on/off switch on the Flash would be a good idea.

    Kross, if you want to send me the audio file I can whip one up for you.
     
  18. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #18

    its not mean to be viewed in safari. should i make it that way? view it in IE ... you will get what i was truly going for.

    also how did you make the background image flush with the size of the browser window?
     
  19. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #19

    yeah i agree its a good idea too.


    however it would be more useful if your music loops through the entire time you are on the site i guess. my current sound is just limited to an intro of time.... because i cant chop huge files to the point where its as small as i want them to be.


    ill go ahead and upload a sound that i want on my site (at the moment.. till i get the other sound i want... or i am waiting to recieve) and you can retrieve it .... do what you want.. make it smaller.. more compressed or whatever and provide an on/off switch to it. because actually i would like for the music to be more of an intro.. and if i go this route i would want an on/off switch.

    thanks. ill get you the addy ones i upload it.
     
  20. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #20
    WTF!?!?! "Not meant to be viewed in Safari"?!?!? Come on, kross. :p

    Personally, I don't see the point in making a website that's going to favor one browser over another. Nothing turns a visitor off faster than seeing browser requirements all over the place.

    I used cascading style sheets (CSS) to set the background image, remove the padding, etc. Great stuff. Check out the code in the head tag.

    PHP:
    <style type="text/css">
    <!--
    body {
        
    background-color#F7B618;
        
    background-imageurl(mainlayout.gif);
        
    background-repeatno-repeat;
        
    margin0px;
        
    padding0px;
    }
    -->
    </
    style>
    Upload that file, homes.
     
  21. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #21
    that only works with tables though right?

    i need to have layers because i want a scrollable layer. i have nested layers too. layers over layers which prevents me from having tables... i guess.


    i will upload that file mang.
     
  22. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #22
    Nah, it works with layers, too. In fact, you can use CSS to position the layers. :)
     
  23. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #23
    wow okay.


    well ive been trying it but i cant get it. i guess i just dont know how to use css.
     
  24. Rower_CPU Moderator emeritus

    Rower_CPU

    Joined:
    Oct 5, 2001
    Location:
    San Diego, CA
    #24
    What are you using to make the pages?

    I know Dreamweaver has good CSS support...
     
  25. krossfyter thread starter macrumors 601

    krossfyter

    Joined:
    Jan 13, 2002
    Location:
    secret city
    #25
    yeah im using dreamweaver.

    i guess ill just figure it out like i figure out everything else... by screwing around with it.

    thanks man.
     

Share This Page