Skip to main content

ST-language

ST-language is a plain-text music notation — notes, abstract chords, drums, dynamics, tempo changes, automations (volume, expression, pan, modulation, effect sends, with curved ramps and hairpins), several voices and lyrics — and this is its reference implementation: a pure-Python library (no dependencies) with command-line tools to check songs and export them to MIDI, MusicXML, ABC and MTXT. It also writes grace notes, chord symbols, D.C./D.S. with Coda and Fine, several lyric verses and transposing parts. It is the notation engine of SoundText, usable on its own.

▶ Learn the language with the video courses (subtitles in English, Italian, French and Spanish):

// a blues riff
Tempo: 96 BPM

Bass:
  8: 2c*2 2e*2 2g*2 2a*2 | 2a#*2 2a*2 2g*2 2e*2 |

Piano:
  4: 4C7 | 4F7 |

Install

pip install st-language

Python 3.9 or later, no other packages needed. To work on the library itself, clone this repository and install it in development mode:

git clone https://github.com/openssound/st-language.git
cd st-language
pip install -e .
python -m pytest tests            # the tests and the conformance suite

Command line

st-language check song.st          # syntax errors and warnings (bar checks, lyrics)
st-language midi song.st -o song.mid
st-language musicxml song.st       # -> song.musicxml
st-language abc song.st            # -> song.abc (ABC 2.1)
st-language mtxt song.st           # -> song.mtxt (MTXT 1.0, one event per line)
st-language mtxt take.mtxt         # MTXT -> take.mid
st-language upgrade song.st        # a file from before 2.12 -> 2.12, same sound (keeps song.st.bak)
st-language events song.st         # the events as JSON
echo "4: c d e f | 2g 2g" | st2mid - -o melody.mid --instrument Trumpet

stcheck, st2mid, st2musicxml, st2abc and st2mtxt are shortcuts. A file without track headers is a one-track song (choose the instrument with --instrument). Messages are in English, Italian, French or Spanish (--lang, or the ST_LANGUAGE/LANG environment variables).

Python

import st_language as st

events = st.parse("4: c d e f | 2g 2g")           # timed events (beats)
ok, error = st.validate("4: C Am | F G")
warnings = st.check("4: c d e | f g a b |")      # bar 1: 1 quarter note missing

song = st.load_song("song.st")                   # or st.read_song(text)
song = st.Song(name="Demo", tempo_bpm=100)
song.add_track("Bass", "Bass", "4: c*2 g*1 2c*2")
song.add_pattern("Riff", "8: c d e g")
st.to_midi(song, "demo.mid")
st.to_musicxml(song, "demo.musicxml")
st.to_abc(song, "demo.abc")

Specification

The language and the .st song format are defined in the ST-language specification (CC BY 4.0, also in Italian), with a conformance suite for other implementations.

License

GPL-3.0-or-later, © 2026 Sergio Scolaro. The MTXT-derived voice-name table is MIT (see THIRD_PARTY_NOTICES.md).


In italiano: ST-language e' la notazione musicale testuale di SoundText come libreria Python autonoma, senza dipendenze, con i comandi st-language check | midi | musicxml | abc | mtxt | events | upgrade (e le scorciatoie stcheck, st2mid, st2musicxml, st2abc, st2mtxt). Si installa con pip install st-language. La specifica, anche in italiano, e' in docs/spec/ del repository.

Metadata

Release files for st-language 2.12.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for st-language 2.12.2
File Size Uploaded Provenance Actions
st_language-2.12.2.tar.gz 254.8 kB With provenance Details for st_language-2.12.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for st-language 2.12.2
File Interpreter ABI Platform Actions
st_language-2.12.2-py3-none-any.whl Python 3 none any Details for st_language-2.12.2-py3-none-any.whl

Total release size: 434.4 kB

Release files / st_language-2.12.2.tar.gz

Download URL st_language-2.12.2.tar.gz
Size 254.8 kB
Tags Source
SHA-256 checksum
How to use checksums
64fbf469369be62e434f93eb91a94b7767f5a1d9598e011fc99e6694f12d9efb
BLAKE2b-256 checksum
How to use checksums
ef212eaa18b78a74a83c5bfdeefc5a0b91a81b988870587486e97dfa759b566e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Release files / st_language-2.12.2-py3-none-any.whl

Download URL st_language-2.12.2-py3-none-any.whl
Size 179.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d647dc82fa2656a67cbd61a4903d67a9b7c8219ce01a8a27bf9e53329f500bb8
BLAKE2b-256 checksum
How to use checksums
cf73086789d36caef0de862f2edc6701aedbdd875a46bdf12ef64291ad486753
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.16

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

Security for st-language 2.12.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

Both files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for st_language-2.12.2.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Nov 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page