Music Demo

An app for the Kookaberry

Developed by
Tony Strasser


Illustrating how the Kookaberry can play tunes from an indexed list and demonstrating the musical notation used on the Micro:Bit to write tunes.

Step 1: Setting up

Plug a Loudspeaker into P2

Step 2: Starting the App

Scroll down the menu to Music Demo and press Button B.

What is showing on the Home screen?

  1. Top Row: Name of app; Speaker (Spk) in P2 and Touch Sensor (Bt) in P1
  2. Second Row: Speaker in P2
  3. Third Row: The name of the selected tune
  4. Fourth Row: The number of the selected tune
  5. Fifth Row: Button A is Exit from app. Button C scrolls down the tunes menu. Button D scroll up the tunes menu. Button B plays the tune
Step 2: Running the app
  1. Select from list of very short 21 tunes by scrolling up (Button D) or down (Button C). When selected, play by pressing Button B
  2. To stop playing whilst in the middle of a tune, press reset (small button on rear of board)
  3. If reset is pushed the Kookaberry needs to be restarted and the Music Demo app selected again.

Micro:bit musical notation

Each note has a name (like C# or F), an octave (telling MicroPython how high or low the note should be played) and duration (how long it lasts through time). Octaves are indicated by a number ~ 0 is the lowest octave, 4 contains middle C and 8 is about as high as you’ll ever need unless you’re making music for dogs. Durations are also expressed as numbers. The higher the value of the duration the longer it will last. Such values are related to each other – for instance, a duration of 4 will last twice as long as a duration 2 (and so on). If you use the note name r then MicroPython will play a rest (i.e. silence) for the specified duration.

Viewing the micro:bit musical notation

  1. Connect the Kookaberry to a PC and open KookaIDE. Click on Load and find the lib folder in the connected Kookaberry

  2. Click and open the lib folder; select; and click Open. The file will now open in the right hand window of the KookaIDE

  3. The code in the right hand window is the microbit musical notation for all the tunes in the Music Demo library
  4. The first two instructions of the opening notes to Beethoven’s Fifth Symphony (DADADADUM) are:
    • ‘r4:2 which is rest in Octave 4 for 2 “ticks” duration
    • ‘g is the note G in octave 4 (392 Hz) played for a 2 tick duration. The octave and duration states are carried over from the preceding instruction.

Open Question

What are the main differences between the micro:bit and RTTL musical notations? Check out the latter in the RTTLMusicDemo App description

Peripherals used by this app

Learning plans that use this app


Last updated:1 week ago


Radio code:

App ID:...



Download on GitHub


Issues resolved in the support forum:

8 out of 11
View support forum

Leave a Reply