Skip to content

pelikhan/pxt-rtttl

Repository files navigation

RTTTL player

Open this page at https://pelikhan.github.io/pxt-rtttl/

Ring Tone Text Transfer Language (RTTTL) was developed to be used to transfer ringtones to cellphone by Nokia. This MakeCode extension lets you convert RTTTL tunes into MakeCode melodies.

You will find a new convert RTTTL to melody block under Music > Melody.

let demo = "HauntHouse: d=4,o=5,b=108: 2a4, 2e, 2d#, 2b4, 2a4, 2c, 2d, 2a#4, 2e., e, 1f4, 1a4, 1d#, 2e., d, 2c., b4, 1a4, 1p, 2a4, 2e, 2d#, 2b4, 2a4, 2c, 2d, 2a#4, 2e., e, 1f4, 1a4, 1d#, 2e., d, 2c., b4, 1a4"
let melody = music.convertRTTLToMelody(demo)
music.playMelody(melody, 120)

Forum!

Discuss this extension in the MakeCode forums at https://forum.makecode.com/t/rtttl-tunes-extension/4193.

Use as Extension

This repository can be added as an extension in MakeCode.

<script src="https://makecode.com/gh-pages-embed.js"></script><script>makeCodeRender("{{ site.makecode.home_url }}", "{{ site.github.owner_name }}/{{ site.github.repository_name }}");</script>
pxt-rtttl=github:pelikhan/pxt-rtttl#master