BBC micro:bit board x 1
OSOYOO Plug&Play( PnP ) board for micro:bit x 1
OSOYOO Passive Buzzer module x 1
OSOYOO 3-pin PnP cable x 1

Connect Passive buzzer module with OSOYOO PnP board for micro:bit P0 with OSOYOO 3-pin PnP cable as below;

Step 0: Go to url: https://makecode.microbit.org , click New Project , right click on start block and delete it.

Step 1. In the Toolbox, click on the Basic category and then click the show icon block over, and place it inside the on start block .  Click the  music note patterns from the block choices as following:

Step 2.Click on the Music category. Then  drag the Play tone for beat block over, and drop it down inside the on Start block .

Step 3. The Play tone (Hz) for beat block allows you to play a tone of specific frequency. The default frequency of the Play tone (Hz) for beat block is set to 262 Hz (tone), which is Middle C (note). When you click on the parameter box of the play tone block, a 21-key visual piano keyboard will display and allows you to choose a note.

When you choose a note from the visual piano keyboard, the frequency of the note will display in the parameter box of the ring tone (Hz) block. If you know the frequency of the note you want to play, just type the frequency in the parameter box without choosing it from the visual piano keyboard. The precision of the frequency of a note is ± 1 Hz. As an example, for Middle C, the valid frequencies are 261, 262, and 263 Hz.  Following picture shows the notes name in the 21-key piano keyboard   and their frequencies in Hertz .
This is Piano score for Ode to Joy :

Step 4. According the Piano score for Ode to Joy ,Choose the note click on the parameter box of the Play tone (Hz) for beat block ,then put it below the last Play tone (Hz) for beat block .Every note in one Play tone (Hz) for beat block.Click the button A ,you can check if the music note you are doing well.

Step 5. Download this “.hex” file and save it to your MICROBIT disk Driver as following picture.

Below are the full Graphic programming  code blocks   to play the music of  Ode to Joy