I just posted Rttl to Tunes.Melody on Codeshare. Feel free to discuss and make suggestions here.
Very cool! Thanks for sharing.
Really nice! Is there a way to modify the volume?
@ RoSchmi - thanks - mmm I didnât write the Tunes module, just something to generate Tunes for it, youll have to ask GHI about volume, but since its just a pin going up and down, I doubt it
Very nice!
Thanks for sharing the codeâŚ
I have a Cerbuino Bee and a tunes module and had to make a small change:
tunes.Play( melody ); ----> tunes.Play( melody.toMelody() );
Now it works fine. Thank you very much for your example.
I tried this example with Cerberus and I get exception. (Always after x seconds playing).
The exception is:
[quote]A first chance exception of type âSystem.Exceptionâ occurred in Microsoft.SPOT.Hardware.PWM.dll
An unhandled exception of type âSystem.Exceptionâ occurred in Microsoft.SPOT.Hardware.PWM.dll
Uncaught exception
The thread ââ (0x7) has exited with code 0 (0x0).[/quote]
I figure it out if I remove al ,p from demo, it plays well.
âBarbieGirl:d=4,o=5,b=125:8g#,8e,8g#,8c#6,a,p,8f#,8d#,8f#,8b,g#,8f#,8e,p,8e,8c#,f#,c#,p,8f#,8e,g#,f#â;
@ Makla - Have you tried more than one RTTL sequence?
I found (on a Spider, IIRC) that some sequences worked OK for me, while others would throw an exception. I havenât had time to troubleshoot, so Iâve no idea why some work and others donât.
Iâm betting itâs something simple, though, so Iâd you can find an RTTL sequence that works for you, you might be able to compare the two and figure out whatâs different.