Problem with the "Sounds" in the loop.

44 views
Skip to first unread message

Patryk F

unread,
May 18, 2019, 4:05:52 PM5/18/19
to mitappinv...@googlegroups.com
I have a problem with the "Player" element. I have a .wav file with a length of 250ms with no silence at the beginning and end. I want to use a loop to create a uniform longer sound with different lengths. Unfortunately, there is silence and the sound is not homogenous.

TimAI2

unread,
May 18, 2019, 7:22:26 PM5/18/19
to MIT App Inventor Forum
a search on the forum for "loop sound" would have returned this:


the best it is going to be....

BodyMindPower

unread,
May 18, 2019, 8:26:16 PM5/18/19
to mitappinv...@googlegroups.com
If you want to loop a sound / music seamlessly (gaplessly), you can currently only use the TaifunPlayer extension.
In addition, there are only two audio formats that support this: wav or ogg. The Player component of AI2 basically does not support gapless looping since Android 6 (neither in uncompressed nor in compressed formats).

Anke

Patryk F

unread,
May 18, 2019, 8:35:29 PM5/18/19
to MIT App Inventor Forum
I used the TaifunPlayer extension. I have a .wav file. It is much better, but it does not finish well. There is no clear silence but there is gentle downing. What's more, the android has different limitations.

BodyMindPower

unread,
May 18, 2019, 8:44:02 PM5/18/19
to mitappinv...@googlegroups.com
Please be more specific ... what is the issue?
Try the attached, perfectly loop-able sounds with a duration of 250 ms. Recently, some devices from Chinese manufacturers (known: Xiaomi, OnePlus) have problems with the TaifunPlayer (so, I must try it with the ExoPlayer).
Which devices do you use? Attach your sound file.


The TaifunPlayer works on all non-Chinese devices.

sound_250ms.wav
sound2_250ms.wav

Patryk F

unread,
May 19, 2019, 5:48:17 PM5/19/19
to MIT App Inventor Forum
My file is attached. I use Samsung S8 from Android9. The problem is my file. It is not completely looped. I have to look for a sound imitating the car horn or somehow change my own.
Klakson200.wav

TimAI2

unread,
May 19, 2019, 6:24:03 PM5/19/19
to MIT App Inventor Forum
You may need to experiment with a longer sound, i attach one that run for @ 3 seconds, instead of 0.2 seconds for yours
carhorn.mp3

BodyMindPower

unread,
May 20, 2019, 2:34:04 AM5/20/19
to MIT App Inventor Forum
The mp3 format is basically not loopable, as it adds silence to the beginning and end of an audio track:



Use a longer sound (≥ 1sec, wav or ogg format) and create a perfect loop. I was able to loop a 1-second sound 1000 times without any issues with the TaifunPlayer (on all tested, non-Chinese devices).
As I said, some Chinese devices may experience looping issues ... for whatever reason.


Patryk F

unread,
May 20, 2019, 12:56:50 PM5/20/19
to MIT App Inventor Forum
Your sound loops well so the problem is my sound. To be the perfect loop, the sound level must be the same at the end?

BodyMindPower

unread,
May 20, 2019, 2:59:55 PM5/20/19
to MIT App Inventor Forum
This is not really the place for an Audacity tutorial ...
Cut off a short part from the beginning of the track and add it at the end. Make a short cross-fade between them.

Anke
Reply all
Reply to author
Forward
0 new messages