How often does the music play?


After the first music is played, one minute later, the next music will be played.
C

Is the above program statement used?
How to write this program statement?

The sound component has a built in limit to how long a sound can last.
(Check its help.)
http://ai2.appinventor.mit.edu/reference/components/media.html#Sound

Properties

MinimumInterval

Specifies the minimum interval required between calls to Play , in milliseconds. Once the sound starts playing, all further Play calls will be ignored until the interval has elapsed.

The Player component has a longer time limit.
It also has an event that can fire at the end of what is playing.

http://ai2.appinventor.mit.edu/reference/components/media.html#Player

For exactly one minute intervals, bring in a Clock from the Sensors drawer, and use its Timer event to start the next sound. (Assuming they are shorter than a minute.)

Give an example program.

https://groups.google.com/g/mitappinventortest/c/BOj2-ThEe3s/m/VlmXdcVOAgAJ?pli=1

http://ai2.appinventor.mit.edu/?galleryId=6608923263238144

1 Like

C

This app.
How to write?


Please export your project and post it here.

as it already has been said, you should use the player component
the sound component is only for very short sound snippets

and to start another sound one minute later you can use the clock component, in the designer set the time interval to 60000 milliseconds and timer enabled to false, in the Clock.Timer event stop the clock, stop the first sound and start the second

A very good way to learn App Inventor is to read the free Inventor's Manual here in the AI2 free online eBook http://www.appinventor.org/book2 ... the links are at the bottom of the Web page. The book 'teaches' users how to program with AI2 blocks.
There is a free programming course here http://www.appinventor.org/content/CourseInABox/Intro and the aia files for the projects in the book are here: http://www.appinventor.org/bookFiles
How to do a lot of basic things with App Inventor are described here: http://www.appinventor.org/content/howDoYou/eventHandling .

Also do the tutorials Our Tutorials! to learn the basics of App Inventor, then try something and follow the Top 5 Tips: How to learn App Inventor

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

1 Like

You only set the interval once - that then will be the "sound gap" between all sounds, be that two or two hundred.

Like this:

2 Likes

The Sound component can only play sounds for about 6 sec.

I think this doesn't make really sense for nature sounds. So you should use the Player component or the TaifunPlayer extension if you want to loop sounds gaplessly.

1 Like

If it is a quiz based on short sounds it makes perfect sense - there is a round in a UK TV Nature Quiz that does exactly that :koala:

1 Like

Sharpei

:sheep:TV SharPei Barking

1 Like

A

The above program refers to:
First, play the sound file: wolf.wav.
After 0.5 seconds, the sound file: Birds.wav is played again.

After the program is installed on the phone, execute it.
No sound is heard: wolf.wav.
Only the sound is heard: Birds.wav.

What is the reason?

1 Like

blocks do not wait, see also
The model of event processing in App Inventor by @Franklyn_A_Turbak
let me suggest you to use the Player component, which offers a Completed event and start the second sound in that event

Taifun


Trying to push the limits! Snippets, Tutorials and Extensions from Pura Vida Apps by icon24 Taifun.

This is now the third thread from you on the same topic.

A

An error occurred during program debugging?

error 703 means some firewall or anti virus is blocking it
vbh

1 Like

follow the suggestions which already have been provided earlier twice, I will not repeat them a third time...
Taifun

2 Likes

The computer operating system ubuntu is installed on the U disk.
The ubuntu firewall is:
sudo ufw default deny

The apk program is installed on the phone. It also has problems.

M.aia (52.0 KB)

Try this: M2.aia (53.4 KB)

1 Like

Three, or more than three sound files.
How to write a program?
Give an example.