Solved

looping sound with a gap?

Posted on 1998-08-30
14
388 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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Actually SirCaleb, that is one of the sound editors I downloaded from danworld!
-Josh
0
 
LVL 75

Expert Comment

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

Michel
0
How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

 
LVL 8

Author Comment

by:jbirk
Comment Utility
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
Comment Utility
<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
Comment Utility
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
Comment Utility
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
Comment Utility
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
Comment Utility
Oh, Thanks Josh!

Michel
0
 
LVL 8

Author Comment

by:jbirk
Comment Utility
No prob, thanks for the help!
-Josh
0

Featured Post

How to run any project with ease

Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
- Combine task lists, docs, spreadsheets, and chat in one
- View and edit from mobile/offline
- Cut down on emails

Join & Write a Comment

Suggested Solutions

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Building a website can seem like a daunting task to the uninitiated but it really only requires knowledge of two basic languages: HTML and CSS.
In this tutorial viewers will learn how to style transparent/translucent elements using alpha transparency in CSS Start with a normal styled element, such as a div.: Define its "background-color" property as "rgba (255, 255, 255, .5): The numbers in…
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

772 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

11 Experts available now in Live!

Get 1:1 Help Now