Skip to content

Please update your browser

Your browser version is not supported by this site. CS First may not work properly. Learn more

Transcript

In this add-on, you’ll add a song to your story and control its volume based on which part of the story is being told. To start, click the stage. You could add sound to any sprite, but because there is so much other code for the other sprites, this example will add the code to the stage. Click the "sounds" tab and "choose sound from library."

To find a song to loop, click “music loops.”

Choose music that matches the emotion of your story. If it’s an upbeat pitch, use fast, upbeat music. If it’s serious, use dramatic music.

Next, click the scripts tab and the sound menu.

Drag out a “play sound until done” block, and make sure your sound is selected in the dropdown. To play the sound repeatedly, click "control," and add a forever loop. Make the music play at the beginning of the program by adding a “when flag clicked” block to the top of this stack.

Click the flag to test it.

Great! This story now has music in the background.

Next, program the music to play at different volumes during each part of the story. In this example, the volume starts low, then rises to its full volume by the end.

To set the sound to a low volume, click the sound menu, and add a “set volume” block.

Choose a small value like 10%. Place this block after the "when flag clicked" block.

Click the flag to test.

Great, the music is quieter.

To set the music to a high volume, drag out another “set volume” block.

To tell this code to run at the end of the program, click the narrator sprite, and broadcast a new “end” message from the end of the “conclusion” block stack.

If you programmed the fireworks add-on, you’ll already have an “end” message.

Then, click back to the stage, and add a "when I receive" block, and select "end" in the dropdown menu. Test your program. The music starts at a low volume, then goes up to full volume at the end of the story.

Now, it’s your turn: Click the stage, and choose a sound from the sounds tab. Program the sound to loop at the beginning of the program with “when flag clicked” and “play sound until done” blocks and a forever loop Program the volume to start low with a “set volume” block. Program the volume to be loud at the end of the story, by broadcasting an end message, receiving that message, and setting the volume to 100%.

Erweiterung auswählen
Die Kulisse wechseln
Für jeden Teil eurer Präsentation die Kulisse verändern
Die Innovation umgestalten
Das Kostüm eurer Figur individuell gestalten, sodass es eurer Vorstellung besser entspricht
Ein Feuerwerk programmieren (Herausforderung)
Eine Feuerwerk-Figur zuerst zu eurem Lager und dann zu eurem Programm hinzufügen und entscheiden, wann der Code dieser Figur ausgeführt werden soll
Die Idee schützen
Das Publikum bitten zuzustimmen, keine der Ideen in eurer Geschichte an andere Personen weiterzugeben
Die Lautstärke einstellen
Eure Präsentation durch ein Lied ergänzen und die Lautstärke je nachdem, welcher Teil der Geschichte gerade erzählt wird, regeln
Interaktive Elemente einbauen
Das Ende eurer Präsentation interaktiv gestalten, indem ihr dem Publikum eine Frage stellt und darauf reagiert
arrow_backward Zurück
Weiter arrow_forward
Anweisungen
1. Wählt eine der Erweiterungen aus und programmiert sie!