Melody Creation
1. Coding blocks for music in Mind+


1.1 A list comprises multiple "Tone + Duration" blocks connected by the "+" block.

1.2 A list in the format of pairs of Tone + Duration: [tone, duration, tone, duration...]

2. The Serial Protocol for generating melody
2.1 Start Token
2.2 Music Notes
2.3 Duration

2.4 Half-scale vs. Whole-scale
2.5 Command Structure
2.5.1 In the serial monitor or the mobile app's customized button console:

2.5.2 In the Python code:
2.5.3 In the Mind+ coding blocks

3. Example: Creating Twinkle, Twinkle, Little Star
3.1 Choose Your Base Tone:
3.2 Plan Your Notes:
3.3 Define Durations:
3.4 Translate to Commands:
It can be used in Arduino IDE's serial monitor or the Petoi mobile app:

The mobile app also supports the binary format with the 'B' token:
B,14,4,14,4,21,4,21,4,23,4,23,4,21,2,0,4,19,4,19,4,18,4,18,4,16,4,16,4,14,2
B,14,4,14,4,21,4,21,4,23,4,23,4,21,2,0,4,19,4,19,4,18,4,18,4,16,4,16,4,14,2
3.5 The mind+ version

3.6 The Python version:
4. Experimenting
Complete Twinkle, Twinkle, Little Star
My Love by Westlife
A very long melody for testing on the BiBoard
Using other tools

Last updated
Was this helpful?