?
Solved

looping sound with a gap?

Posted on 1998-08-30
14
Medium Priority
?
411 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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
Are You Using the Best Web Development Editor?

The worlds of web hosting and web development are constantly evolving. Every year we see design trends change, coding standards adapt and new frameworks/CMS created. With such a quick pace of change it’s easy to get lost trying to keep up.

See if your editor made the list.

 
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
 
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 280 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

Secure Your WordPress Site: 5 Essential Approaches

WordPress is the web's most popular CMS, but its dominance also makes it a target for attackers. Our eBook will show you how to:

Prevent costly exploits of core and plugin vulnerabilities
Repel automated attacks
Lock down your dashboard, secure your code, and protect your users

Question has a verified solution.

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

This article describes how to create custom column layout styles for Bootstrap. The article uses 5 columns to illustrate the concept, but the principle can be extended to any number of columns.
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
In this Micro Tutorial viewers will learn how to create navigation buttons that change on rollover, using CSS (Continuation of the CSS Image Sprite tutorial) Create a parent ID for all the list items       - Specify position: absolute and display: block…
In this tutorial viewers will learn how to code links for mobile sites that, once clicked, send a call or text to a specified number. For a telephone link (once clicked, calls a number), begin with a normal "<a href=" link tag. For the href, specify…

764 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