Plays tunes from Ring-Tone Text Language (RTTL) libraries. This musical notation language was used before smartphones and micro:bits to allow cool ringtones. It was developed by Nokia for use on their mobile phones.
Step 1: Setting up
Plug a Loudspeaker into P2
Step 2: Starting the App
Scroll down the menu to RTTLMusicDemo and press Button B.
What is showing on the Home screen?
- Top Row: Name of app; Speaker (Spk) in P2 and Touch Sensor (Bt) in P1
- Second Row: Speaker in P2
- Third Row: The name of the selected tune
- Fourth Row: The number of the selected tune
- 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
- Select from list of 27 very short tunes by scrolling up (Button D) or down (Button C). When selected, play by pressing Button B
- To stop playing whilst in the middle of a tune, press reset (small button on rear of board)
- If reset is pushed the Kookaberry needs to be restarted and the Music Demo app selected again.
RTTL musical notation
A very good RTTL description, including a good explanation of how to convert to/from standard music notation, is contained in the Pearson InformIT online article “The world of mobile ringtones”. Alternatively, the Wikipedia entry for RTTL provides a good basic description.
The code for an RTTL tune consists of a string with three parts separated by colons.
- Part 1: Name of ringtone
- Part 2: The default values of the major characteristics of the tune. These are the note duration (d), octave (o), and beat/tempo (b) of the tune that are understood by the programme to be the required values unless otherwise specified.
- Part 3: The notes. Each note is separated by a comma and includes, in sequence: a duration specifier, a standard music note, either a, b, c, d, e, f or g, and an octave specifier. If no duration or octave specifier are present, the default applies
Viewing the RTTL musical notation
- Connect the Kookaberry to a PC and open KookaIDE. Click on Load and find the lib folder in the connected Kookaberry
- Click and open the lib folder; select songs; and click Open. The file will now open in the right hand window of the KookaIDE
- The code in the right hand window is the microbit musical notation for all the tunes in the Music Demo library
- The instructions for the first two opening notes to the Entertainer are:
- ‘Entertainer: which is the name of the ring tone
- d=4 is the default note duration is a quarter note – or crotchet.
- 0=5 is the default octave which is the fifth octave. RTTL supports playing tunes in four octaves from A below middle C, to four scales up. RTTL refers to these octaves by the numbers 5-8.
- b=140 is the default beat which is 140 beats per minute.
- 8d is an eighth note (quaver) of the note D in the default octave (5). It’s frequency is approximately 264 Hz
- 8d# is an eighth note (quaver) of the note D in the default octave (5). It’s frequency is approximately 311 Hz
The notation for a pause (p) of an eighth note length (quaver) is 8p
What are the main differences between the RTTL and micro:bit musical notations? Check out the latter in the Music Demo app description.