processing-sound icon indicating copy to clipboard operation
processing-sound copied to clipboard

Repeating same sound eventually starts to fail.

Open RichardEll opened this issue 6 years ago • 1 comments

If you load a sound from disk and then repeatedly call the play method at short ( < 0.25 second ) intervals, without waiting for the previous sound to complete, then it eventually starts to distort and become "scratchy". Even waiting a few seconds before replaying the sound does not solve the problem. I am using a Windows 7 computer.

RichardEll avatar Nov 18 '18 17:11 RichardEll

Have you tried adding a second silence at the end of the audio file, also make sure to call sound.stop() before you call sound.play(), so no more than one sound is playing at once, so no feedback can occur, also make sure that the audio file is signed frequency.

mekb-turtle avatar Mar 31 '19 10:03 mekb-turtle

I'm having this same issue. It looks like Kevin made a recent commit. Is there a way that I can download/pull this recent commit and compile it as a Processing library?

jwarmouth avatar Sep 23 '23 12:09 jwarmouth

@jwarmouth indeed, a much improved new library release is in the making! I have just packaged up a test build of the new release, you can download the sound.zip from here and just extract it to your Processing libraries folder (replacing the existing sound folder): https://github.com/processing/processing-sound/releases/tag/v2.4.0-preview

We are also looking for feedback on the new release before we push it to the wider public, so if you could let us know whether this version fixes your issue, or if there is anything else that you notice/run into regarding the new library we would be super grateful.

kevinstadler avatar Sep 24 '23 00:09 kevinstadler

@jwarmouth indeed, a much improved new library release is in the making! I have just packaged up a test build of the new release, you can download the sound.zip from here and just extract it to your Processing libraries folder (replacing the existing sound folder): https://github.com/processing/processing-sound/releases/tag/v2.4.0-preview

We are also looking for feedback on the new release before we push it to the wider public, so if you could let us know whether this version fixes your issue, or if there is anything else that you notice/run into regarding the new library we would be super grateful.

Thank you! I installed the test build, and it definitely seems to fix the issue. I am happy to be able to create the functionality I need with the native Sound library, rather than having to work with Beads, Minim, or another 3rd party library.

jwarmouth avatar Sep 28 '23 17:09 jwarmouth