Music Score Feature Test

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:

Twinkle Twinkle Little Star4/4C𝄞

Mary Had a Little Lamb

Another classic children's song:

Mary Had a Little Lamb4/4C𝄞

Scale Practice

A simple C major scale:

C Major Scale4/4C𝄞

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    
    
Your Song Title4/4C𝄞

Supported Options

  • title: Display title above the music score (optional)

ABC Notation Basics

ABC notation uses simple text characters to represent music:

  • X: Index number
  • T: Title
  • M: Meter (time signature)
  • L: Default note length
  • K: 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`.