Music Engine plays Music Macro Language compositions in the background

Dependents:   RETRO_BallsAndPaddle RETRO_BallAndHoles MusicBoxForFathersDay USBSec_mbed-os_dev

Music Engine is a simply library to execute Music Macro Language sequences asynchronously. Learn more about MML on wikipedia http://en.wikipedia.org/wiki/Music_Macro_Language

The following sample plays a simple tune

#include "mbed.h"
#include "MusicEngine.h"

// Play music on MCU Pin 0.18
// The pin should support PWM
MusicEngine music(P0_18);

main()
{
    music.play("T224L8O5CL16>C<P16GP16L8EL16P16>C<GP16L8E.L16P16L8C#L16>C#<P16G#P16L8FL16P16>C#<G#P16L8F.L16P16L8CL16>C<P16GP16L8EL16P16>C<GP16L8E.L16P16D#EFP16FF#GP16GG#AP16L8>C<P8L4>C");
    
    while(1)
    {
    }
}

History

Implemented suggestion by maxint to improve the silencing of the PWM signal. default tip

2015-02-06, by taylorza [Fri, 06 Feb 2015 01:37:07 +0000] rev 2

Implemented suggestion by maxint to improve the silencing of the PWM signal.


Added library documentation

2015-02-05, by taylorza [Thu, 05 Feb 2015 04:51:11 +0000] rev 1

Added library documentation


Music Engine Library initial commit

2015-02-05, by taylorza [Thu, 05 Feb 2015 04:18:39 +0000] rev 0

Music Engine Library initial commit