Solved

looping sound with a gap?

Posted on 1998-08-30
14
391 Views
Last Modified: 2012-08-13
I'm trying to make a page which has a continuous sound (just for fun), but when I loop a file using embed it seems to have about a .2-.5 second gap between playing the sound again.  This causes a problem for what I am trying to do.  I tried using javascript to play the sound as well, but same problem (although the gap seemed to get shorter?).  Anyway, is there maybe a different way to loop the sound without this gap (like bgsound or an object, or a midi instead of wav)?

This needs to work for Netscape 4.x, but IE does not matter since other scripts on the page are not IE compatible (yet).

To see exactly what I am talking about goto:
http://aegis.mcs.kent.edu/~jbirk/Web/JavaScript/bees.html
Note that you need to be using Netscape 4.x to view this currently.

Thanks!
-Josh
0
Comment
Question by:jbirk
  • 7
  • 6
14 Comments
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1837227
Very cute until one discovers that there is no OFF button ;-)

Have you made sure there is no silence space at the end???

To make a seemless loop, perhaps you want to copy and reverse is since it starts high and then go low so there will always be a difference.

I think the time to rewind is what you hear <g>

Michel

Michel
0
 
LVL 8

Author Comment

by:jbirk
ID: 1837228
Yes, I know there is no off button :)
That's kind of the point.  It's supposed to be annoying, like the bees follow you around buzzing away, and the only way to get relief is to leave:)  Of course this is just a pgae for fun and will have nothing on it but these bees, I would never put something like this on a page with content!

I wanted to try exactly what you said about reversing it and copying it, so it matches up, and I know how to do it, except I no longer have my sound editor that will do that.  I tried to find one on the net, but all I found was some crappy editor with a ton of errors.  Any idea where I can get a free/shareware/demo of a sound editor which can do this?

Yes, I checked the sound for a gap, and it has sound throughout the entire wav file.  Have you even tried anything with continuous sound before Michel?

Thanks,
Josh
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1837229
Sorry, I have not... I went to www.shareware.com, searched for wav and found several nice utilities that did not want to edit the bees.wav
Perhaps you can use the wavemix 2.0 on a resampled file...

Michel
0
 
LVL 8

Author Comment

by:jbirk
ID: 1837230
OK, I found an editor to do the trick.  I searched on www.danworld.com.  There were quite a few sound editors there.  Anyway now the sound contains a reverse image of itself appended on the end (I also cut out half of the original sound to ensure that there IS no gap in the wav fiel...).  Go check it out.  It still has that annoying gap.  You can see why in this situation a gap is not desirable!

If no solution is available, I may end up just using a large file that's like 25 seconds of swarming bees, so that the gap doesn't occur very often, it just takes forever to download the stupid sound file (probably preload it in previous page).
-Josh
0
 
LVL 2

Expert Comment

by:SirCaleb
ID: 1837231
You might also want to consider using a free program called GoldWave...it is nice for editing wav files and you can even loop the wav file in the editor to see how it sounds when it is looped....here is the URL for it....

http://www.goldwave.com/


0
 
LVL 8

Author Comment

by:jbirk
ID: 1837232
Actually SirCaleb, that is one of the sound editors I downloaded from danworld!
-Josh
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1837233
Have you tried to set
LOOP=true in your embed?

Michel
0
Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

 
LVL 8

Author Comment

by:jbirk
ID: 1837234
Yeah... to same effect.
How do you loop in bgsound so I can try that?
Also, is there a way to use an <OBJECT> tag to play sounds in netscape?  I know that's supported in IE, but if it could work in Netscape, then maybe that wouldn't have the gap problem.

It looks however, that I can not get rid of that.  Also I noticed that on a machine with more RAM the gap is less, so maybe it's just the reloading of it into memory that's causing the small gap, meaning that I can't do anything, so I'll probably just use a longer wav file so the gap occurs less often, and is less noticable/annoying.

thanks,
josh
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1837235
<OBJECT would afaik only work with the ActiveX plugin
loop=1 in bgsound

Why not try a Java sound applet instead?
Should work in both (32bit) browsers and can be scripted too

Michel
0
 
LVL 8

Author Comment

by:jbirk
ID: 1837236
Never done anything like that... have such an applet lying around on your hard drive you could share (and how to use it)?
I played with Java for a short while, but gave up on it...
It was also my first intro to OOP and I really had no idea what was going on.  Now that I know C++ and understand OOP better, I could probably learn it a lot easier... but I just don't have the time, and I haven't seen that many good uses for Java other than Chat rooms, so I haven't bothered.
-josh
0
 
LVL 75

Expert Comment

by:Michel Plungjan
ID: 1837237
Sorry, nope - my Java is strictly serious <g>
There MUST be several java sound players at www.gamelan.com

Michel
0
 
LVL 8

Author Comment

by:jbirk
ID: 1837238
Well, it looks like this is a no winner...  I will try the java idea later, though I was kind of looking for a javascript technique.

Thank you for your help Michel.  Please answer the question so that I can award you the points for your help.
-Josh
0
 
LVL 75

Accepted Solution

by:
Michel Plungjan earned 70 total points
ID: 1837239
Oh, Thanks Josh!

Michel
0
 
LVL 8

Author Comment

by:jbirk
ID: 1837240
No prob, thanks for the help!
-Josh
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
In this tutorial viewers will learn how add a full-size background image to a webpage using CSS3. Create a new HTML document with an internal stylesheet.: In CSS, define the html element to have a background image. Use a high resolution image.: In t…
The viewer will receive an overview of the basics of CSS showing inline styles. In the head tags set up your style tags: (CODE) Reference the nav tag and set your properties.: (CODE) Set the reference for the UL element and styles for it to ensu…

947 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now