Lye
Jump to navigation
Jump to search
- This article is not detailed enough and needs to be expanded. Please help us by adding some more information.
| Paradigm(s) | declarative |
|---|---|
| Designed by | User:Corbin |
| Appeared in | 2011 |
| Dimensions | one-dimensional |
| Computational class | Unknown |
| Reference implementation | [1] |
Lye is a declarative language for musical expressions. It is inspired by a feature of the LilyPond toolchain which renders musical expressions to MIDI files.
Syntax
Lye's syntax is a strict subset of LilyPond which has no computational content. Notably, it lacks embedded Scheme. Supported features include:
- Notes
- Pitches
- Accidentals
- Octaves
- Durations
- Ties
- Rests
- Chords
- Voices
- Dynamics
- Tuplets
- Drums mode
- Relative mode
The following PyMeta grammar describes Lye's syntax.
relative ::= <token "\\\\relative">
begin_relative ::= <relative> <spaces>
<pitch> <accidental>? <octave>? <spaces> '{'
close_brace ::= '}'
directive ::= <begin_relative> | <close_brace>
sharp ::= 'i' 's' => "is"
flat ::= 'e' 's' => "es"
accidental ::= (<sharp> | <flat>)+
pitch ::= 'r' | 'c' | 'd' | <flat> | 'e' | 'f' | 'g' | 'a' | 'b'
octave ::= ('\ | ',')+
duration ::= <digit>+ '.'*
note ::= <spaces>? <pitch> <accidental>? <octave>? <duration>?
notes ::= <note>*
chord ::= <token '<'> <notes> <token '>'>
measure_marker ::= <token '|'>
partial_marker ::= <token "\\\\partial">
marker ::= <measure_marker> | <partial_marker>
protonote ::= <marker> | <chord> | <note>
protonote_cluster ::= <spaces>? <protonote> (<spaces>? <protonote>)*
melody ::= <directive>? <protonote_cluster> <directive>?