Microbit
Advanced
60 mins
Teacher/Student led
75 points
What you need:
Chromebook/Laptop/PC
Microbit

Music Maker

Embark on a musical journey by creating a new project named 'Music Maker'. Learn to add music code using the 'music.play' function and design your own melody. Finally, test your creation by pressing the 'A' button, either on the simulator or on your physical Microbit.
Learning Goals Learning Outcomes Teacher Notes

Live Class Feed

This is a live feed of the latest activity by your students on this lesson. It will update in real-time as they work on the lesson.
Load previous activity

    1 - Create a New Project

    Start by creating a new project. Give it a name like 'Music Maker'.

    2 - Add the Music Code

    Now it's time to add some music! We'll use the 'music.play' function. This function plays a melody when you press a button. Here's the code:

    input.onButtonPressed(Button.A, function () {
        music.play(music.stringPlayable("- - - - - - - - ", 120), music.PlaybackMode.UntilDone)
    })

    You can replace the '- - - - - - - - ' with a melody from the gallery or design your own melody using the tool. The '120' is the tempo of the music, you can change it to make the music faster or slower.

    3 - Test Your Music

    Now you can test your music! Press the 'A' button on the simulator to hear your melody. If you have a physical Microbit, this step is optional, you can download the code onto your device and press the 'A' button to hear the music.

    Unlock the Full Learning Experience

    Get ready to embark on an incredible learning journey! Get access to this lesson and hundreds more in our Digital Skills Curriculum.

    Copyright Notice
    This lesson is copyright of DigitalSkills.org. Unauthorised use, copying or distribution is not allowed.
    🍪 Our website uses cookies to make your browsing experience better. By using our website you agree to our use of cookies. Learn more