-
stopping a sound early causes clipping noise
I need to sequence a few sounds, one after another. Each sound's audio file lasts about 2 seconds (the files are imported into the movie and linked). I need to allow for a dynamic tempo setting, such that each sound could be cut short per the tempo setting. I've got all of this working, however I have an annoying clipping/popping sound that occurs when I stop a sound before it's naturally finished. I've tried doing stuff like setting a fast volume decreasing loop before issuing the sound.stop() command, but each volume change even has a slight pop sound.
Is there some trick to stopping a sound prematurely and silently (without the pop/clip sound)?
The relevant code is like:
//start the sound
sound1.attachSound("pianoC1"); //this sound file lasts ~2 seconds
sound1.start();
...
(timer waits 1 second)
...
//stop the sound after only one second
sound1.stop("pianoC1");
//yuck, there was a popping/clipping sound...
//start the next sound
sound1.attachSound("pianoD1"); //this sound file lasts ~2 seconds
sound1.start();
Thanks for the help!
-
2008 Man of the Year
you're going to have to put a very brief fade (milliseconds long if you want a harsh cut, or like a second if you want a longer one) where you want the clip to end.
SAMedia Blog (general bs) :: jwinmedia (my music site)
"Think of an advertisement where the product you're marketing is Jesus!"
-From a work for hire ad
-
Thanks for the reply. I assume you're suggesting that I fade out the volume with a loop, right? I've tried that already and there's still the clipping sound for fast fades. Even with long fades you can hear pops/clipping-sounds each time the volume changes.
This morning while researching various methods for volume fades, I came across the following:
http://www.sonify.org/home/feature/r...ion/page3.html
You can hear the volume changing pops in ex. 1. I downloaded the sample and changed the fade speed so it's really quick and the pop is just as bad as if I stop the sound abruptly.
So, please let me know if you meant something other than setVolume() loop, because from what I can tell, it won't really help with quick fades/stops.
Thanks.
-
I tested the sound fade script examples on my computer and do not hear any pops during fade. Perhaps this is an issue with your sound system or sound card.
-
Yep, it looks like it might be a per-machine type of thing. I've tested 3 computers myself all of which have pops. Two have good audio cards, one has a low/mid-grade card. A few other people like yourself have reported no pops at all on their machines.
Oh well, looks like I will need to live with the pops...
-
I see that this is an old thread, but I currently have the EXACT same problem on my machine. I have found no solution.. And I really hate the click/pops
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|