Music Score Feature Test
Music Score Feature Test
This article demonstrates the music score rendering feature using ABC notation in RST files.
Simple Melody
Here's a simple melody using ABC notation:
Mary Had a Little Lamb
Another classic children's song:
Scale Practice
A simple C major scale:
Features
The music score renderer supports:
- ABC notation: Text-based music notation format
- Titles: Display titles above the music score
- Staff lines: Automatic rendering of 5-line staff
- Clefs: Treble clef display
- Time signatures: Displayed at the beginning of each staff
- Key signatures: Automatic key signature display
- Notes: Simplified note rendering with stems
- Bar lines: Visual separation of measures
- Download: Click the download button to save as SVG with copyright
How to Use
To add a music score to your RST content, use the musicscore directive:
RST
1
2
Supported Options
title: Display title above the music score (optional)
ABC Notation Basics
ABC notation uses simple text characters to represent music:
X: Index numberT: TitleM: Meter (time signature)L: Default note lengthK: Key signature- Notes:
C,D,E,F,G,A,B(lowercase for higher octave) - Bar lines:
| - Note lengths:
2(half note),4(quarter note),8(eighth note)
Future Enhancements
Planned features for the music score renderer:
- Full ABC notation support (chords, repeats, multi-measure rests)
- LilyPond notation support
- MusicXML import/export
- Audio playback using Web Audio API
- Transposition capabilities
- Multiple clefs (bass, alto, tenor)
- Multi-staff support for piano and orchestral scores
For more information, see the :doc:`/features/music_scores/music_scores_design_spec`.