Syntax of Tone Sequences

It is used both for the ekmelib player and for the ekmelib score. It is partly adopted from LilyPonde.g. note names, relative octave mode, reciprocal note values, scaling, ties – and extended with elements to specify proportions, cent values, frequencies etc.

A tone sequence may have any length, consisting of individual Tones, Chords, Commands, and Variables, in one or more voices (up to 16), all of which must be separated from each other by space characters1. However, space is not allowed within a tone, a proportional chord, a command, or a variable.

Tone

TONECENTDURATIONTIE

TONE is a Note, Frequency, Proportion, Rest, or Tick.

CENT, DURATION, and TIE are optional. However, DURATION and TIE are not permitted at tones inside of a chord.

Note

NOTENAME NOTENAME'… NOTENAME,

NOTENAME: See Note names in 72-EDO, i.e. for all twelfth-tone degrees. Available are English or German names depending on the used language version of ekmelib; e.g. English names: c cts cxs cqs csaqf crs cfts cs csts ctrs ctqs cssaqf cfxs cets css ….

An apostrophe ' increments the octave by one.
A comma , decrements the octave by one.

In the Absolute Octave Mode, no octave accent means the small octave, one apostrophe ' the one-line octave, two apostrophes '' the two-line octave, one comma , the great octave, two commas ,, the contra octave etc.

In the Relative Octave Mode, a note is related to the range of a fourth above and below the preceding note, possibly specified with the \relative command, ignoring the alteration by a suffix. Other tones (such as Frequency, Proportion, or Rest) between two notes do not effect the relative octave.

By default, the Absolute Octave Mode is set.

Example: \relative=c' c fisih c ges' c,
Here, all five tones lie within the same octave, but ges without ' would lie below c.

The pitch is calculated from the frequency of the concert pitch.

Frequency

FREQUENCYhz

An absolute frequency in Hz (Hertz). It may have a fractional portion. The case of hz is ignored.

Proportion

NUM/DENOM

A proportion relative to the root pitch. NUM and DENOM must be integer numbers. The pitch is calculated from the frequency of the root pitch (F): F · NUM / DENOM

+NUM/DENOM -NUM/DENOM

A proportion relative to the preceding tone. NUM and DENOM must be integer numbers preceded by a sign + or -. The pitch is calculated from the frequency of the preceding tone (F):
with +:  F · NUM / DENOM
with -:  F · DENOM / NUM

Rest

r R s

A rest. R is a full measure rest. s is an invisible rest or skip.
They are all equivalent for the player. They produce an audio signal with the gain 0.

Tick

t

A clock signal (tick). This is actually a short tone (~50ms) followed by silence up to the end of the Duration.

Examples

d' a' as' gih' d' gih' as' a'
Tone sequence in the Absolute Octave Mode (exercise for quarter tones 2).
\relative=c' d a' as gih d gih as a
Dito in the Relative Octave Mode.
1081.74586hz
Absolute frequency.
220hz +3/2 +4/3 +5/4 +6/5 +7/6
Naturetone series from 2nd thru 7th partial tone (220 - 770 Hz).
1/1 -5/4 -36/35 -28/27
Tetrachord enharmonic after Archytas (downward).

Chord

CHORDCENTDURATIONTIE

CHORD is a Regular Chord, a Proportional Chord, or a Chord Repetition.

All tones of the same chord start at the same point of time and have the same duration.

CENT, DURATION, and TIE are optional. Individual specifications of a duration or tie at the tones inside the chord are not permitted.

Regular Chord

< TONE … >

A chord with any number of tones between < and >3. These delimiters may adjoin tones directly or they may be separated by space1.

In the Relative Octave Mode, the first note after the chord (after >) is related to the first note inside the chord (after <).

Proportional Chord

NUMBER1:NUMBER2…

A chord made of any number of proportions relative to the root pitch. NUMBER1, NUMBER2,… must be integer numbers. The pitches of NUMBER1:NUMBER2:NUMBER3 are calculated from the frequency of the root pitch (F):
1st tone:  F
2nd tone:  F · NUMBER2 / NUMBER1
3rd tone:  F · NUMBER3 / NUMBER1

< … TONE NUMBER1:NUMBER2… >

A chord made of any number of proportions relative to the preceding TONE. Further tones may also be specified between < and >. The pitches of NUMBER1:NUMBER2:NUMBER3 are calculated from the frequency of TONE (F); see above. Hence, this is the first tone of the proportions.

Chord Repetition

q

Shortcut to repeat the preceding chord. Between this and q, individual tones are also allowed.

Examples (in the Relative Octave Mode)

< d a' >4
Fifth, a above d (for a quarter note).
< d a >4
Fourth, a below d.
3:4
Perfect fourth.
4:5_1
Natural third (for a whole note).
< e 5:7 >
Tritone ekmelic.
< e aiser >
(Almost) equivalent interval.
<c gesil' her fih'>2
Four-voice chord (for a half note).
54:64:81_2s
Pythagorean minor third + pythagorean major third (for 2 seconds).
< 54:64:81 >2s
Dito in another syntax.
< d 54:64:81 >2s
Dito with d as the first tone (not 4 tones).

Cent

+CENTVALUE -CENTVALUE

Alters the pitch of the tone or of all tones inside the chord. CENTVALUE must always be specified with a sign + or - and may have a fractional portion. The pitch is calculated for the frequency of the tone (F):
F · exp(± CENTVALUE / 1200 · ln2)

Examples

g+16.67
G a twelfth-tone higher.
440.5hz+10_5s
Absolute frequency by 10 cents higher (for 5 seconds).
<e aiser>-50_2
Chord a quarter-tone lower (for a half note).

Duration

The duration is either a Note value or a Time in seconds, optionally followed by a Scaling. Without a specified duration, the one of the preceding tone is taken. The default for the very first tone (also after a \tempo command) is the duration of a whole note.

If the duration immediately follows a number, i.e. in case of a Proportion, a Proportional Chord, or Cent, it must be preceded by a _. Else _ is optional.

Note value

NOTEVALUE NOTEVALUE.

A reciprocal note value, optionally followed by one or more . for a dotted note. NOTEVALUE must be an integer number: 1 for whole note, 2 for half note, 4 for quarter note, 8 for eighth note, etc.

Time

DURATIONs

An absolute duration in seconds. It may have a fractional portion. The case of s is ignored.

Scaling

*NUM/DENOM *NUMBER

A scaling factor for the duration. NUM and DENOM must be integer numbers preceded by a *. NUMBER is equivalent to NUMBER/1. Several scaling factors can be combined.

Examples (for tempo 4=60)

c4
Quarter note, 1 second.
c4.
Quarter note dotted, 1.5 seconds.
c4s
Absolute, i.e. always 4 seconds independent of the tempo.
c4*2/3
Quarter note scaled as triplet part, 2/3 seconds.
c8*4/5
Eighth note scaled as quintuplet part, 2/5 seconds.
c1*7/8*10
Whole note scaled, 35 seconds.

Tie

~

Ties the tone or chord with the subsequent one. Both must have the same frequency (or frequencies, resp.)

Polyphony

A tone sequence can be polyphonic. Tones to be played simultaneously can be specified as a chord and/or with additional voices as follows. Up to 16 voices are supported and they can be of different length.

Voice

Tone_Sequence_Voice_1 \\ Tone_Sequence_Voice_2 …

Advent of a new voice. The tone sequence starts at the same point of time as that of the preceding voice, i.e. from the beginning of either the entire tone sequence or a section (see below).

Section

<< Tone_Sequence_Voice_1 \\ Tone_Sequence_Voice_2 … >>

Section in the tone sequence. All voices included in it start from the beginning of this section. A section must not be embedded within another section, i.e. <<<<>>>> is not allowed.

The delimiters \\, << and >>3 may adjoin tones directly or they may be separated by space1. They have no impact on the Relative Octave Mode, i.e. the first note after one of these delimiters is related to the last note before it.

Commands

\NAME=VALUE \NAME

A command affects the subsequent tones, either up to the end of the tone sequence or up to the next command of the same name. It must be preceded by a \. The commands relative and tempo have alternative forms without a NAME.
The commands relative, pitch, tempo, time, and add have corresponding attributes in the player and score which insert the respective command at the beginning of the tone sequence.
Note that variables take precedence over commands, i.e. a command can be overridden by a variable of the same name.

Octave Mode

\relative=NOTE \relative \=NOTE \=

A NOTE sets the Relative Octave Mode and specifies the reference point for the octave of the subsequent note. NOTE itself must always be specified in the Absolute Octave Mode.
Without NOTE it sets the Absolute Octave Mode. This is the default.

Concert/Root Pitch

\pitch=FREQUENCY

Sets the frequency of the concert pitch a' for notes, or the frequency of the root pitch for proportions and proportional chords. It may have a fractional portion.
The default is 440 Hz.
This command is executed only at the beginning, i.e. before the first tone.

Tempo

\tempo=NOTEVALUE=RATE \tempo=DURATION \NOTEVALUE=RATE \DURATION

NOTEVALUE=RATE sets the number of reciprocal note values per minute. The default is "4=60".
DURATION sets the absolute duration of a whole note in seconds. It may have a fractional portion.
The subsequent tone has by default the duration of a whole note.
This command is executed only at the beginning, i.e. before the first tone. It has no effect in the score.

Time/Meter

\time=NUM/DENOM \time

Sets the time (meter). NUM and DENOM must be integer numbers.
Without a value the meter is disabled, i.e. the score omits barlines. This is the default.
This command has no effect in the player.

Additional data

\add=DATA

Provides additional data for each subsequent tone which can be used e.g. in the caption of a score. See the add attribute for more details. DATA is one of the following names:

  • degree: Data related to the respective degree.
  • note: Data of the note which is nearest to the respective tone.

Gain value

\gain=GAIN

Sets the gain value, i.e. the sustain level, but only for the subsequent tones of those voice in which the command is specified. It may have a fractional portion. The nominal maximum is 1. The default is 0.95.

Mark (Rehearsal mark)

\mark \mark=NUMBER

Sets a mark ahead of a tone. In the score, it will be displayed by the next symbol in sequence A,B,C,…, skipping the letter I. NUMBER must be an integer number and sets the corresponding symbol.
Example: … \mark … \mark … \mark=8 … \mark … \mark … sets the marks A B H J K.

Possible Extensions

Though the following names are not defined as commands, they are likely to be added later (adopted from LilyPond):

  • \clef=CLEF
  • \key=PITCH_MODE
  • \bar=BARLINE
  • \ottava=OCTAVATION

Variables

\NAME

A variable NAME is an abbreviation for a predefined tone sequence. It must be preceded by a \.

Click on V in the player to show the list of the loaded and the online available variables, or to load a new variable from a local file. The list is shared by all players in the same document (Web page). A selected variable will be inserted with \ into the tone sequence.

Online Variables

The following table shows all variables which are online available (at www.ekmelic-music.org/var). They define intonation exercises2 and tunings.

VariableDescription
22 basic exercises each
\vQuarter tones
\sSixth tones
\zTwelfth tones
\wEkmelic tones in varying sequences
Welle der Nacht
\welle-der-nacht-hHarp tuning
\welle-der-nacht-o1Scale for 1st oboe
\welle-der-nacht-o2Scale for 2nd oboe
\welle-der-nacht-oExercise for both oboes
\welle-der-nacht-strExercise for strings
\welle-der-nacht-sExercise for soprano
Ekmelischer Gesang for Solo-violin
\ekmelischer-gesang-tScale
\ekmelischer-gesang-t2Scale upward
\ekmelischer-gesang-qFourths
\ekmelischer-gesangExercise for violin
Ekmelischer Satz for String quartet
\ekmelischer-satzExercise for strings
Tunings
\foehn“Föhn”: Organ push button setting
\indago-h“Indago”: Harps main tuning
\indago-o“Indago”: Organ push button base setting
\vom-leben-das-beste“Vom Leben das Beste”: Guitar tuning
Always available variables
\introa'10s r6s t4 t t t
\aa'20s r8s

Definition of Variables

Each variable is defined by a separate file. This is a plain text file with the tone sequence and with the same name as the variable and the filename suffix txt.4 The name must consist of a-z, A-Z, 0-9, _, and -, only. A sole number is allowed. The tone sequence of the variable must not contain any further embedded variables.

Variables take precedence over commands, i.e. a command is overridden by a variable of the same name.

Examples

cih ciseh hisih deseh
c+50 his+50 deses+50
cis-50 hisis-50 des-50
ceh+100 cesih+100 hih+100 hiseh+100

etc.
Enharmonically equivalent specifications for C a quarter-tone up.
\relative=c' c4 d er fih g asil hesel her c
Ekmelic series 1 on 1 (partial-tone series) with 8 degrees. Each tone takes a quarter note (4).
c'2s cis' er' fih' gesil' asil' hesel' hesil' c''
Ekmelic series 3 on 2 with 8 degrees. Each tone takes two seconds (2s).
110hz1.5s +3/2 +4/3 +5/4 +6/5 +7/6 +8/7 +9/8 +10/9 +11/10 +12/11 +13/12 +14/13 +15/14 +16/15
Naturetone series from 2nd thru 16th partial tone (110 - 880 Hz). Each tone takes one and a half seconds (1.5s).
1/1_4s -5/4 -36/35 -28/27
Enharmonic tetrachord (28:27) (36:35) (5:4) after Archytas of Tarent. Each tone takes four seconds (_4s).
t4 t d''2 a' gih' cisih'' gih' heseh' a' d''
Two tick signals (t) in quarter note distance (4); then half notes (2) with semitone and quarter tone steps (ih eh).
1/1_4s 3/2 2:3
Perfect fifth, one after the other and as a chord. Each tone takes four seconds (_4s).
\relative=c' <a' d>2 es'4 dih q es' dih gih gel2 <h, e>4 gel' q
One solo voice with fourth's (from exercise for “Ekmelischer Gesang for Solo-Violin” 2).
\relative=c' fih'2 eih es d cis c4 d fih2 c2. d4 \\ aseh2 geh fiseh e eser d1~ d2.~ d4
Two voices (\\) (from exercise for “Welle der Nacht” 2).
\relative=c' heser'2 << r1 r diser \\ r1. gil,2~ gil1 \\ r1 eih~ eih \\ r2 al,~ al1~ al \\ fil1~ fil~ fil >>
Section between << and >> with five voices separated by \\ (from exercise for “Welle der Nacht” 2).
  1. abcActually, space can be any Unicode white-space character: space, tab, line feed (LF), carriage return (CR) et al according to the JavaScript character class \s (equivalent to [ \f\n\r\t\v​\u00a0\u1680​\u180e\u2000​-\u200a​\u2028\u2029\u202f\u205f​\u3000\ufeff]).
  2. abcdeFrom “Ekmelische Musik. Aufführungspraxis und Intonationsübungen” by Franz Richter Herf, 1979. The intonation exercises are available as PDF at the Scores. They include links to the Ekmelic Player, each with one tone sequence.
  3. abAs an alternative to < and >, the delimiters /* and */ can be used. They are intended for tone sequences in the seq attribute of HTML ekmaudio and ekmscore elements to discriminate them from the HTML characters < and >.
  4. To create a plain text file, a simple text editor can be used, e.g. TextEdit on OS X, Notepad or WordPad on Windows.