Manual
I want to …
… get an impression of what I have to face if I want to learn Werckmeister
… applying articulation while remaining readable
… see an overview of all commands
… see an overview of lua extensions
It’s just text
The Werckmeister language knows only a few statement types. It’s all about tracks, voices, and events. That’s it.
The remaining statements are just for configuration purposes.
A basic Werckmeister document will look like this:
Comments
Werckmeister knows two types of comments:
-- a single line comment
/*
multi line comments
...
*/
Tracks and Voices
A track in Werckmeister has exactly the same meaning as it has in a MIDI file. It is related to an instrument and contains events.
A track begins with a [ and ends with a ].
All events of a track are related at least to one voice. A voice starts with { and ends with }.
If you want to write polyphonic melody lines, you can add more voices to your track.

The melody above would be written like this:
Events
There are a few event types:
Note Events
have a pitch and a duration, to be performed by a MIDI instrument.
c d e f g
Degree Events
have a relative pitch degree and a duration. In combination with a chord, degree events can be transformed into regular note events.
I II III IV V VI VII
If you want to use degree events, you can do that either by using accompaniment tracks or setting a chord context to the current voice.
Chord Events
Events which are related to a name. They also store the information which interval is used for a degree. These informations are stored in a chord definition file.
C7 D-7 E-7 F7 Gmaj7 A-7
Meta Events
Events to set up something or loading a mod script.
Meta events are also called Commands
You can recognize meta events by its slashes at the beginning and the end.
Parameters
Meta Events or Config Statements will be configurated with parameters. Parameters can be defined in two ways:
Positional
/volume: 50/
Named
/volume: _to=50/
For sake of understanding the meaning of statements, it’s recommended to use named parameters if the meaning of a parameter isn’t obvious.
don’t
instrumentDef: piano MyMidiDevice 1 2 3;
do
instrumentDef: piano MyMidiDevice _ch=1 _pc=2 _cc=3;
Setup A Piece
Using
The first thing you want to do in a Werckmeister document, is to load include other files to your project. This may be chord definitions, accomp. templates or modulation scripts.
To include a file use the using command.
using "./chords/default.chords";
The path of your file is written between double quotes (").
The path can be absolute or relative to the current document. (It is recommended to use relative path values)
The file type is determined by its extension:
| Extension | Content |
|---|---|
.sheet |
the main document (can not be included) |
.config |
settings like device, instrumentDef or instrumentConf |
.part |
further tracks, to split a piece into several files |
.chords |
chord definitions |
.template |
accompaniment templates |
.pitchmap |
pitchmaps |
.conductions |
conduction rules |
.lua |
mods and voicing strategies |
For example, to keep your instruments in a separate file, put the instrumentDef statements into a .config file:
using "./myInstruments.config";
Devices & Instruments
Adding a device
To add a MIDI device to your project, use the device statement. With that statement, you have to choose a name and set a MIDI port for your new device.
To see which devices with what port are connected to your device run the player with the --list argument:
sheetp --list
you will get a output like this:
0: Midi Through
1: SC-8850 Part A
2: SC-8850 Part B
3: SC-8850 Part C
4: SC-8850 Part D
5: USB-Midi Port
where the first number means the port number.
So lets say we want to add the SC-8850 Part A to our project, we write:
device: MyRoland midi _usePort=1;
To add a further MIDI port, for example a DX7 on the USB-Midi Port we add another line:
device: MyRoland midi _usePort=1;
device: MyDX7 midi _usePort=5;
Imagine your USB-Midi Port is a bit cheap and laggy. Every signal to your USB-Midi port has a delay of about 20 milliseconds. We can compensate this by adding a 20 milliseconds delay to the MyRoland device, so that this device and your laggy USB-Midi Port should be in sync. We do this by using an optional offset argument.
device: MyRoland midi _usePort=1 _withOffset=20;
device: MyDX7 midi _usePort=5;
Adding instruments
To adding instruments we using the instrumentDef statement, which is constructed like this:
Let’s add an organ instrument which uses our Roland device from above:
The Roland SC-8850 offers, for example, a Farf Organ. So if I want to use this instrument on channel 0, I have to send a cc=19 pc=17 sequence to the channel on this device.
A suitable instrumentDef statement would be look as follows:
-- name device
instrumentDef: myFarfisa _onDevice=MyRoland _ch=0 _cc=19 _pc=17;
Configuring instruments
With an instrument added, there are further options to configure it. A config statement has as first argument the instrument name you want to configure, followed by several optional config aruments.
As an example we set a volume value of 80 to our Farfisa organ, also we set the pan more to the left.
(the final result of these settings is strongly dependent by your actual MIDI device)
instrumentConf: myFarfisa volume 80 pan 20;
Tempo
To set the tempo of your piece, write tempo: aNumber.
Sometimes you want to setup different tempi for for several voices. Then you have to add a tempo Meta Event to your voice.
since MIDI doesn’t support simultaneous tempo, we achieve this effect by stretching or shrinking the note durations in relation to the main tempo (Augmentation/Diminution). As an simple example: on double time we pay eights instead of fourths.
Here we play four voices on one track, with four different tempo configurations:
Also it is possible to change the tempo in between events:
Time Signatures
The time signature 4/4 by default. If you want to setup a different time signature than the default, you can achieve this by using the signature meta event. With this you are able to setup different time signatures during a piece.
Key Signatures
key signatures are not supported.
Write Melodies
Notes
The syntax is loosely inspired by the lilypond notation syntax. A note is just a letter followed by a number for its duration.
If a note has no duration, the last assigned duration will be used.
c and d will be played as quarter notes, e and f as eighth notes
the end of a bar is marked by a pipe: |
Rests
Just like with notes, you use a r to write a rest.
You can also write multimeasure rests.
Octaves
Lower octaves are marked by a comma (,) after the note, upper octaves by a single quote (').
c is the middle C (MIDI note 60).
(unlike the Helmholtz notation, where the middle C is written c')
The range goes from c,,,,, (MIDI note 0) up to g''''' (MIDI note 127).
Accidentals
# raises a pitch by a half step.
A b lowers it.
Durations
A numeric value after a note marks its duration.
Intervals and Chords
Notes that have to sound simultaneous are written in angle brackets. The duration is written after the brackets.

Augmentation Dots & Ties
To write a augmentation dot (.) append a dot after a note duration value.
For ties use a tilde (~) instead.

Tuplets
To write tuplets of any kind you just have to write notes enclosed by parentheses followed by a duration value. For example: (c c c)4.
These three notes will now be played in the time of one quarter.
It doesn’t matter if you write (c2 c2 c2)4 or (c8 c8 c8)4 because you have three notes with equal durations to be played in the time of one quarter.
The relations between the notes are vital, not their absolute durations.

Nested Tuplets
You are also able to write nested tuplets:

Repeats
Measure repeat
Repeat barline
Repeat multiple times
Volta
Mark/Jump
For more complex musical navigation you can use the mark/jump commands. In combination with its ignore argument you are able to implement - for example - a coda:
Write for drums
Pitchmaps
With pitchmaps you are able to define own note symbols. This is useful especially for drum notes.
Create a text file with the extension .pitchmap and define your note symbols like that:
"sn": c' -- snare
"bd": c, -- bass drum
"h": f#, -- high hat
(a custom note symbol is also called alias)
Include the pitchmap in your sheet with using:
using "./myDrums.pitchmap";
Now you can write the aliases like regular notes:
"bd"4 "sn" "bd" "sn" | h8 h h h h h h h |
(the example sheets come with ready to use pitchmaps, see examples/pitchmaps)
Since a delimited string like “bd” is harder to read than a single character, there are the following rules:
- every single lowercase alphabetic character is allowed as note
- a note can also have more than one character but then a delimiter is neccessary
- single character notes can be followed by the octave symbols
'or,, but every variant needs its own entry in the pitchmap (e.g."h'": a#,) - the characters c, d, e, f, g, a, b, r, t are predefined events
- predefined events can not be overwritten in a pitchmap
Conduction Rules
The Problem
A score document contains basically two informations:
- what notes to play
- and how to perform these notes
The regular score notation has a set of articulations to apply to a note.

In werckmeister you also have such options, for example: !ffff c to play the note c louder.
Unfortunately these kind of notation has the potential to destroy the readability of a source file.
A good example is this 16th note high hat figure:
(h = high hat, see Pitchmaps)
h16 h h h h h h h h h h h h h h h |
If you want to add some articulation to that, the result is much more harder to read:
!pph16 !pph !ffh !pph !pph !pph !ffh !pph !pph !pph !ffh !pph !pph !pph !ffh !pph |
Conduction Rules trying to fix that.
The conduction rules separate between what and how.
If you are familiar with HTML and CSS, you already know the concept. Conduction rules are what CSS is for HTML.
You can achieve the same result, from above, using these rules:
instrument(drums) pitch(h) {
velocity = 51;
}
instrument(drums) pitch(h) onBeat(1.5 2.5 3.5 4.5) {
velocity = 89;
}
Find the full example here.
A conduction rule starts with a list of selectors, followed by a set of declarations.
A selector defines on which notes the rule applies.
A declaration describes what needs to be changed.
Referring to the rules above the selector instrument(drums) pitch(h) selects every h pitch of the instrument drums.
The declaration velocity = 51; set the velocity to the value 51 to the selected notes.
Find here a complete list of all supported selectors and declarations.
A declaration knows 3 types of value assignment:
Assign
aDeclaration = newValue;
Add
aDeclaration = newValue;
Substract
aDeclaration -= newValue;
Follow Up
aDeclaration = & - newValue;
The Follow Up assignment allows you to refer to the prevoious event of the same pitch.
Example:
velocity = & - 10;
Means: the new velocity value is 10 units less than the velocity of its predecessor.
This usefull if you want to achieve something like this:

Find the full example here.
Accomp My Melodies
Imagine you give your bass player some chords, and he or she asks you how to play these.
You would say something like: play the 1st degree on the first beat and the 5th degree on the fourth beat.
And this is what you doing when writing style templates.
So in our example above you would write:
Instead of writing absolute notes, you use relative degrees. For example I4 means the first degree as a quarter note.
If a degree does not appear in a chord, the degree will not played.
There are the same rules as for writing absolute notes:
such as:
- use
#orbfor sharp or flat - to perform intervals use angle brackes. For example a triad:
<I III V> - use
~for tied and.for dotted notes - create tuplets using parentheses
the
templatecommand should always appear at the begining of a bar, not at the end.
Several chords in one bar
Chords have no duration value. If you write several chords in one bar, the bar is divided equally among them:
C E | F | G C |
(C and E get a half bar each, three chords would get a third each. How well this sounds depends on your template.)
Durations like C4 or C2 are not supported.
Chords
Since there are no standardized chord symbol rules you need to define your own chord symbols and their meanings.
You do that by writing a .chords file.
Here you can define your chord symbols, with its degrees and its semitones.
For example a major chord could be written as:
Xmaj: I=0 III=4 V=7
The
Xis the placeholder for the chord base name. SoXmajstands forCmaj,Dmaj,Emajand so on.
Here is an example for some chord definitions:
X7: I=0 (II=2) III=4 (IV=5) V=7 (VI=9) VII=10
X-7: I=0 (II=2) III=3 (IV=5) V=7 (VI=9) VII=10
X11: I=0 (II=2) III=4 IV=5 V=7 (VI=9) VII=10
-- to distinguish between Xb11 (Xflat and 11) and Xb11 (X and flat 11)
-- we write Xflat9 for the latter.
Xflat11: I=0 (II=2) III=3 IV=4 V=7 (VI=9) (VII=11)
Xsharp11: I=0 (II=2) III=4 IV=6 (V=7) (VI=9) VII=10
Adjunct Chord Tones
You maybe noticed in the example above, that some degrees are written in parantheses and some not.
A degree in parantheses specifies chord adjunct degrees.
Those degrees are not being rendered, unless your force them to appear using a leading !.
Here in this example we force the 6th degree to appear, even if the current chord has no 6th.
Advanced techniques
Phrases
A phrase is a sequence of events, you can use arbitary in your piece.
Define a phrase
PHRASE_NAME = PHRASE_EVENTS;
A phrase contains no bar lines (|), so it can be stretched or compressed to any duration.
To play a phrase over several bars, use ties (see the example below).
Use a phrase
There are two ways to playback an phrase:
playback streched
If the phrase duration is unequal to the target duration, the phrase will be rendered streched to fit into the target.
>"PHRASE_NAME"DURATION_VALUE
playback cut off If If the phrase duration is unequal to the target duration, the phrase will be rendered cut off or filled with rests to fit into the target.
>>"PHRASE_NAME"DURATION_VALUE
Using phrases with degree events
Mods
If you want do write your own modification you need to:
- create a lua file
- define parameters
- implement a
performor aexecutefunction - include mod file
- apply mod
find some example implementations
Create A Lua File
Since the name of the lua file is also the name of the modification in werckmeister you can not use any name you want for that file.
- don’t use special characters
- avoid naming conflicts
Define Mod Parameters
If you want to use parameters in your modification, you need to define a global parameters table in your lua file. You can make a parameter optional by adding a default value.
parameters = {
{ name="myMandatoryParameter" },
{ name="myOptionalParameter", default="50" }
}
/mod: myMod _myMandatoryParameter=100/
The Perform Function
In the perform function you can implement your modification. Werckmeister expects a table with event informations to be returned from that function. This is the most minimalistic implementation you could write:
function perform(events, params, timeinfo, context)
return events
end
The perform function has 4 arguments:
events argument
This table contains all input events.
{
{
-- a track id
-- [Read Only]
trackId = number,
-- a voice id
-- [Read Only]
voiceId = number,
-- the duration of the event
-- only relevant if type is "note" or "degree" or "rest"
duration = number,
-- whether event is tied or not
-- only relevant if type is "note" or "degree"
isTied = boolean,
-- offset in quarters, affecting the position,
-- can be used to let events appear earlier or later
offset = number,
-- a table containing event tags (see Event Tags)
-- only relevant if type is "note" or "degree"
tags = { tag1, ..., tagN },
-- a table containing the events pitches,
-- contains several if event is a chord
-- only relevant if type is "note" or "degree"
pitches = {
{
-- pitch alias if any. (see Pitchmaps)
alias = string,
-- the octave number of the pitch
octave = number,
-- the pitch number
pitch = number
},
...
},
-- if notes are tied together the tiedDuration gives you the remaining
-- duration of the current event in that "tie chain"
-- for example: "c4~c"
-- the tiedDuration here would be 2 for the first event
-- and 1 for the second
-- [Read Only]
tiedDuration = number,
-- the total duration of a "tie chain"
-- [Read Only]
totalTiedDuration = number,
-- the event type
type = "note" | "rest" | "degree" | "pitchBend" | "cc" | "sysex" | "meta" | "chord" | "werckmeisterCommand",
-- the events velocity value in a range from 0 to 1
-- only relevant if type is "note" or "degree"
velocity = number,
-- a cc number
-- only relevant if type is "cc"
ccNr = 0..127,
-- a cc value
-- only relevant if type is "cc"
ccValue = 0..127,
-- a table of byte values (excluding F0 and F7)
-- only relevant if type is "sysex"
sysexData = { byte values }
-- when working with control messages or sysex messages, sometime the order
-- of its execution is vital. For this purpose you can give a message a priorisation value.
-- 0 is the highest prio.
prio = 0 .. MAX_INT
-- the midi meta event type
-- only relevant if type is "meta"
metaType = "textEvent" | "copyright" | "sequenceOrTrackName" | "instrumentName" | "lyricText" | "markerText" | "cuePoint" ,
-- the midi meta value
-- only relevant if type is "meta"
metaValue = string,
-- the chord name,
-- only relevant if type is "chord"
chordName = string,
-- the command data,
-- only relevant if type is "werckmeisterCommand"
command = {
id = string -- the command id
args = {} -- an arguments key, value table
}
}
...
}
params argument
Contains the params if any. See Define Mod Parameters
timeinfo argument
Contains a table with informations about the current musical time.
{
-- the absolute position of the current bar in quarters
barPosition = number
-- the position of the current event in quarters
quarterPostion = number,
-- the numerator of the current time signature
signatureNumerator = number,
-- the denominator of the current time signature
sinatureDenominator = number,
-- the current tempo
tempo = number
}
context argument
Contains an interface with some context related functions.
setDate
setDate(key, stringValue)
sets a global date to exchange data between mods and “perform functions”.
getDate
getDate(key) returns the value for a key (see setDate)
getCurrentInstrument
returns information about the current instrument
{
name = string,
pan = 0..100,
volume = 0..100,
midiChannel = 0..15, -- optional
midiLsb = 0..127, -- optional
midiMsb = 0..127, -- optional
midiPc = 0..127, -- optional
children: {} -- further instrument children see instrumentSection (https://www.werckme.org/manual#instrumentsection)
}
return value
Returns a table containing events. See events
include mod file
To use your modification you need to include your lua file.
using "<<path to lua file>>"; -- path can be relative or absolute
apply mod
You have two options to apply a mod:
- apply to a voice
- apply to an instrument
apply to a voice
Use the mod command with the mod name. The mod name is also the file name of the lua script. syntax
[
{
/mod: <<modName>> [mod arguments]/
c d e f | -- these notes will be modified
}
]
apply to an instrument
syntax
instrumentConf <<instrumentName>> mod <<modName>> [mod arguments]
example
instrumentConf: myInstrument
mod myModX _modXParameter=1
mod myModY _modYParameter=2;
The Execute Function
The execute function works the same way as the perform function does. Except the peform function modifies existing events, the execute function can be used to create new events. Therefore the function signature is slightly different:
function execute(params, timeinfo, context)
return {
-- some events
}
end
[
{
/call: <<modName>> [mod arguments]/ -- creates some events
c d e f | -- will not be affected by the (execute) mod
}
]
See Example.
Performer Script
Overview
The Performer Script feature allows you to embed Lua scripts into the sheetp player to control playback behavior dynamically. Scripts can react to MIDI events, manipulate playback position, and interact with external MIDI inputs.
Usage
./sheetp ./my.sheet --script=./your-script.lua
Script Lifecycle
Init()
Called once when the player starts. Use this to set up your script’s initial state, register MIDI input listeners, or analyze the sheet’s MIDI events.
OnMidiEvent(event)
Called for each MIDI event during playback. Use this to react to events and control playback flow.
- The callback return value determines the result:
- If the return value is
nil: the event will be skipped. - If an event object is returned: it will be used (possibly modified) for further processing.
- If the return value is
- The input
eventparameter may be modified before returning it. - Meta events (such as cue points, lyrics, or other metadata events) should not be modified.
This allows you to:
- filter events (return
nilto skip) - transform events (modify and return the event)
- or pass them through unchanged
Parameters:
event(LuaMidi): The current MIDI event being processed
API Functions
GetMidiEvents()
Returns all MIDI tracks and their events from the loaded sheet.
Returns: Array of LuaMidiTrack objects
GetMidiInputs()
Returns all available MIDI input devices.
Returns: Array of LuaMidiInput objects
AddMidiInputListener(inputId, callback)
Registers a callback function to receive MIDI events from an external input device.
Parameters:
inputId(number): The ID of the MIDI input devicecallback(function): Function called withLuaMidievent when input is received
JumpToPosition(positionQuarters)
Jumps playback to a specific position in the sheet.
ReleaseAllActiveNotes(int channel)
Sends note-off events for all pending pitches on the specified channel.
Parameters:
position(number): Target position in ticks
Data Types
LuaMidi
Represents a MIDI event.
Properties:
position(number): Position in tickstype(number): MIDI event typechannel(number): MIDI channelmetaType(number): Meta event type (for meta events)data(string): Event data (e.g., text for cue points)parameter1(number): First parameter (e.g., note number, controller)parameter2(number): Second parameter (e.g., velocity, controller value)tagan arbitrary int value, can be used to mark events
LuaMidiTrack
Represents a MIDI track.
Properties:
name(string): Track nameevents(array): Array ofLuaMidievents
LuaMidiInput
Represents a MIDI input device.
Properties:
name(string): Device nameid(number): Device identifier
Event Tags
You can add additional annotations to an event in werckmeister. These informations can be used in conduction rules or modifications.
syntax
"tag1 tag2 ..."@<<event>>
example
sheet file:
c d e f | g a b "mytag"@c'
conduction rules file:
withTag(myTag) {
velocity = 127;
}
TBD
Voicing strategies
References
Commands
beginTag
parameters
| name | position | description | type |
|---|---|---|---|
| tags | 1 | a space separated list of tag names | text |
Begins a tag region where its including events will receive the given tags. See endTag.
call
parameters
| name | position | description | type |
|---|---|---|---|
| name | 1 | The name of the lua function. This is the only “unique” parameter for this command. All further parameters are specific to its related implementation (see The Execute Function). | text |
Executes a lua function.
See Example
cc
parameters
| name | position | description | type |
|---|---|---|---|
| nr | 1 | The number of the controller | 0..N |
| value | 2 | the controller values | 0..127 |
| name | 3 | a controller name, can be used instead of a number. (supported names, see list below) | [BankSelectMSB,Modulation,BreathController,FootController,PortamentoTime,MainVolume,Balance,Panorama,Expression,EffectControl1,EffectControl2,BankSelectLSB,Hold1,Portamento,Sostenuto,SoftPedal,Legato,Hold2,PortamentoControl,Effects1Depth,Effects2Depth,Effects3Depth,Effects4Depth,Effects5Depth,AllSoundsOff,ControllerReset,LocalControl,AllNotesOff,OmniOff,OmniOn,MonoOn,MonoOff] |
Adds a midi CC message.
examples
/cc: _nr=1 _value=10/ --modulation by controller number
/cc: _name="modulation" _value=10/ --modulation value by controller name
supported CC names
-
BankSelectMSB
-
Modulation
-
BreathController
-
FootController
-
PortamentoTime
-
MainVolume
-
Balance
-
Panorama
-
Expression
-
EffectControl1
-
EffectControl2
-
BankSelectLSB
-
Hold1
-
Portamento
-
Sostenuto
-
SoftPedal
-
Legato
-
Hold2
-
PortamentoControl
-
Effects1Depth
-
Effects2Depth
-
Effects3Depth
-
Effects4Depth
-
Effects5Depth
-
AllSoundsOff
-
ControllerReset
-
LocalControl
-
AllNotesOff
-
OmniOff
-
OmniOn
-
MonoOn
-
MonoOff
cue
parameters
| name | position | description | type |
|---|---|---|---|
| text | - | the text which appears in the MIDI message | text |
adds a cue MIDI meta message to the corresponding midi track
examples
/cue: cueText/
If a cue was visited several times during a repeat or jump an additional repeat index will be added. For example:
/cue: myCue/ c d e f :|will create two cue MIDI messages: “myCue” and “myCue2”
device
parameters
| name | position | description | type |
|---|---|---|---|
| setName | 1 | An arbitary name. | text |
| isType | 2 | The type of the device. | [midi,fluidSynth] |
| usePort | 3 | The midi port id of your device. You can get a list of your connected devices, by executing sheetp --list. Alternatively you can use useDevice instead. |
0..N |
| useDevice | The name of the midi port of your device. You can get a list of your connected devices, by executing sheetp --list. It is not necessary to give the full name, a subset will match. |
text | |
| withOffset | Defines an offset in milliseconds. Can be used to keep different devices in sync. | 0..N | |
| useFont | Only valid if isType=fluidsynth. Sets the location of the soundfont file, which will be used by FluidSynth |
a file path |
Defines a device which can be used when adding instruments (see instrumentDef)
see instrumentDef, instrument
example
define an device, an instrument and assign it to a track.
device: MyDevice midi 0;
instrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16;
[
instrument: organ;
{
c d e f
}
]
Fluidsynth
If you want to use fluidSynth as output device, you can achieve this with a command like this:
device: MyDevice fluidSynth _useFont="PATH OF A SOUNDFONT FILE";
On mac and linux, make sure that you have fluidsynth installed.
If you are using multiple sound fonts with multiple devices, make sure to use the program change argument “_pc” in the instrument definition, otherwise no
soundfont change will be triggered internally.
You can set an environment variable WM_SOUNDFONT_PATH or WM_SEARCH_PATH to add a search path for soundfont files. (WM_SOUNDFONT_PATH supports only one path, separated by ‘;’ otherwise)
do
parameters
| name | position | description | type |
|---|---|---|---|
| use | 1 | The name of the modification to load. This is the only “unique” parameter for this command. All further parameters are specific to its related modification. | text |
Such as mod do adds a modification to the track.
The difference is: every mod command adds a further modification to a voice.
do replaces the previous modification.
example
/do: arpeggio/
doOnce
parameters
| name | position | description | type |
|---|---|---|---|
| use | 1 | The name of the modification to load. This is the only “unique” parameter for this command. All further parameters are specific to its related modification. | text |
Like do. But with the difference, that the loaded mod will be only executed once for the following event.
example
/doOnce: arpeggio/
endTag
parameters
| name | position | description | type |
|---|---|---|---|
| tags | 1 | a space separated list of tag names | text |
Ends a tag region where its including events will receive the given tags. See beginTag.
fade
parameters
| name | position | description | type |
|---|---|---|---|
| duration | 1 | the duration in quarters. | 0..N |
| from | 2 | The source volume value. | 0..100 |
| to | 3 | The target volume value. | 0..100 |
| curve | 4 | The fade curve type. | lin,quad,cub,quart,quint,exp |
Fades the volume over a given duration in quarters.
example
fadeCC
parameters
| name | position | description | type |
|---|---|---|---|
| nr | 1 | The number of the controller | 0..N |
| from | 2 | the start value | 0..127 |
| to | 3 | the end value | 0..127 |
| name | 4 | a controller name, can be used instead of a number. (supported names, see list below) | [BankSelectMSB,Modulation,BreathController,FootController,PortamentoTime,MainVolume,Balance,Panorama,Expression,EffectControl1,EffectControl2,BankSelectLSB,Hold1,Portamento,Sostenuto,SoftPedal,Legato,Hold2,PortamentoControl,Effects1Depth,Effects2Depth,Effects3Depth,Effects4Depth,Effects5Depth,AllSoundsOff,ControllerReset,LocalControl,AllNotesOff,OmniOff,OmniOn,MonoOn,MonoOff] |
| curve | 5 | The fade curve type. | lin,quad,cub,quart,quint,exp |
Fades a CC value from a start to an end value.
examples
/fadeCC: _nr=1 _from=0 _to=100 _duration=2/ --modulation by controller number
/fadeCC: _name="Modulation" _from=0 _to=100 _duration=2/ --modulation value by controller name
supported CC names
-
BankSelectMSB
-
Modulation
-
BreathController
-
FootController
-
PortamentoTime
-
MainVolume
-
Balance
-
Panorama
-
Expression
-
EffectControl1
-
EffectControl2
-
BankSelectLSB
-
Hold1
-
Portamento
-
Sostenuto
-
SoftPedal
-
Legato
-
Hold2
-
PortamentoControl
-
Effects1Depth
-
Effects2Depth
-
Effects3Depth
-
Effects4Depth
-
Effects5Depth
-
AllSoundsOff
-
ControllerReset
-
LocalControl
-
AllNotesOff
-
OmniOff
-
OmniOn
-
MonoOn
-
MonoOff
fill
parameters
| name | position | description | type |
|---|---|---|---|
| replace | - | the name of the template to be replaced by the fill | text |
Plays a template only once. Is also able to replace the performance of another template during its playback.
Useful for fill ins.
instrument
parameters
| name | position | description | type |
|---|---|---|---|
| use | 1 | The instrument name. | text |
Set or change the instrument of a track.
examples
set an instrument for a track
[
instrument: myInstrument;
{
c d e f
}
]
change current instrument within a track
[
{
c d e f |
/instrument: myOtherInstrument/
c d e f
}
]
instrumentConf
parameters
| name | position | description | type |
|---|---|---|---|
| for | 1 | The name of the target instrument. This is the only “unique” parameter for this command. All further parameters are specific to its related setting. | - |
With instrumentConf you are able to setup a specific instrument.
Following settings can be applied:
-
volume
-
pan
-
cc
-
voicing strategy
-
mod
-
velocity remap
examples
mixed settings
instrumentConf: piano volume 100 pan 50;
setup a mod
instrumentConf: piano mod myLuaMod someValue; --the someValue argument belongs to "myLuaMod"
setup a velocity remap
With remapVelocity you are able to change the velocity values behind ppppp..fffff for a specific instrument.
In the example below the velocity for p will be set to 100 and the value for f will be set to 10.
this approach is deprecated, use conduction rules instead
The value range is 0..100. (100=127 Midi velocity)
instrumentConf: _set=remapVelocity _p=100 _f=10;
instrumentDef
parameters
| name | position | description | type |
|---|---|---|---|
| setName | 1 | An arbitary name. | text |
| onDevice | 2 | The device which to use (The name of the device, see device). | text |
| ch | 3 | The MIDI channel. | 0..15 |
| bankMsb | 4 | A MIDI bank select MSB value. |
0..127 |
| pc | 5 | A MIDI program change value. |
0..127 |
| bankLsb | - | A MIDI bank select LSB value. |
0..127 |
| cc | - | A MIDI bank select MSB. Deprecated use bankMsb instead value. |
0..127 |
| gmInstrument | - | You can use a GM instrument name instead of a pc number. It is not necessary to give the full name, a subset will match. You can find a complete list of instrument names here: GM Instruments. | text |
Adds a new MIDI instrument.
see instrument, device
example
define an device, an instrument and assign it to a track.
device: MyDevice midi 0;
instrumentDef: organ _onDevice=MyDevice _ch=0 _pc=16;
[
instrument: organ;
{
c d e f
}
]
instrumentSection
parameters
| name | position | description | type |
|---|---|---|---|
| setName | 1 | An arbitary name. | text |
Layers arbitrary instruments into one.
see instrumentDef, instrument, device
example
create 3 instruments and assign them to the section myNewInstrument.
jump
parameters
| name | position | description | type |
|---|---|---|---|
| to | 1 | the destination marker | text |
| ignore | Ignores the jump N times | 0..100 | |
| repeat | Repeats the jump N times. (A repeat value of 1 performs 2 jumps) | 0..100 |
Jumps to a previous defined mark See mark.
example
mark
parameters
| name | position | description | type |
|---|---|---|---|
| name | 1 | the name of the mark | word |
adds a mark to the voice. Use it in combination with jump.
examples
mod
parameters
| name | position | description | type |
|---|---|---|---|
| use | 1 | The name of the modification to load. This is the only “unique” parameter for this command. All further parameters are specific to its related modification. | text |
Adds a modification to the track. Every mod statement adds a further modification to the related voice.
If you want to use ony one modification at the time use do instead.
examples
/mod: arpeggio/
Mods can be external lua scripts, or one of these internal mods:
Bend
Performs a pitch bend from or to the pitch of a note. The value range is 0..100 where 50 means the pichbend center.
Arpeggio
Performs an arpeggio over a given chord.
Arpeggio is deprecated. Use the lua mod myArpeggio instead.
modOnce
parameters
| name | position | description | type |
|---|---|---|---|
| use | 1 | The name of the modification to load. This is the only “unique” parameter for this command. All further parameters are specific to its related modification. | text |
Like mod. But with the difference, that the loaded mod will be only executed once for the following event.
examples
/modOnce: arpeggio/
modval
parameters
| name | position | description | type |
|---|---|---|---|
| mod | 1 | The name of the modification to adjust. This is the only “unique” parameter for this command. All further parameters are specific to its related modification. | text |
Changes an argument value of a mod.
examples
/mod: arpeggio _direction="up"/ -- load mod
-- some music ...
/modval: arpeggio _direction="down"/ -- change mod value
pan
parameters
| name | position | description | type |
|---|---|---|---|
| to | 1 | The pan value. Where 50 means the center | 0..100 |
set the pan of the current track
example
/pan: 50/
setChord
parameters
| name | position | description | type |
|---|---|---|---|
| name | - | the chord name | text |
Sets a chord context to the current voice to be able to use relative degrees instead of absolute notes.
The given chord name must be defined in a *.chords file.
A special chord name is “null”, this unsets the current chord, wich is usefull when used within a template, to switch bewteen accomp track chord and a given chord:
https://www.werckme.org/editor?wid=release-1-4-5-chordname
example
signature
parameters
| name | position | description | type |
|---|---|---|---|
| upper | 1 | The upper value of the signature. | - |
| lower | 2 | The lower value of the signature. | - |
Set the time signature of the current track.
example
/signature: 3 4/
tempo
parameters
| name | position | description | type |
|---|---|---|---|
| bpm | 1 | The tempo bpm value. | - |
tempo defines or changes the current tempo.
example
tempo: 120;
It is also possible to set different tempo values for several tracks:
voicingStrategy
parameters
| name | position | description | type |
|---|---|---|---|
| use | 1 | The name of the strategy to load. This is the only “unique” parameter for this command. All further parameters are specific to its related strategy. | text |
Adds a modification to the track.
example
/voicingStrategy: asNotated/
Voicing strategies can be external lua scripts, or one of these internal strategies:
-
asNotated
-
simpleGuitar
volume
parameters
| name | position | description | type |
|---|---|---|---|
| to | 1 | The volume value. | 0..100 |
set the volume of the current instrument
examples
/volume: 50/
Modifications
drumRudiments
parameters
| name | position | description | type |
|---|---|---|---|
| velocityFactorAccented | - | The velocity factor for accented notes (Default=1) | 0..1 |
| velocityFactorUnaccented | - | The velocity factor for unaccented notes (Default=0.7) | 0..1 |
| velocityFactorGraceNote | - | The velocity factor for accented notes (Default=1) | 0..1 |
| flamOffset | - | The offset in quartes when to perform the grace note before the actual note (Default=0.05) | 0..N |
| dragOffset | - | The offset in quartes when to perform the two grace notes before the actual note (Default=0.05) | 0..N |
include extension
using "lua/mods/drumRudiments.lua";
Implements a collection of different drum rudiments. (see Wikipedia)
You can specify which notes are for L and R and performing duration.
This will be achieved by using an chord as source material.
The chord pitches will be used for L and R.
The length of the chord event defines over which time the rudiment will be peformed.
An event tag specifies which rudiment will be performed.
For example:
This plays one paradiddle over a length of 1 quarter
using sn1 for R and sn2 for L:
/mod: drumRudiments/
R L
"paradiddle"@<"sn1" "sn2">4
Examples:
a single paradiddle
repeating
orchestration
If you want to orchestrate a rudiment over a drum set,
you are able to define more R & L notes. (The total number of the notes has to be even.)
Supported Rudiments
- singleStrokeRoll
- doubleStrokeRoll
- trippleStrokeRoll
- fiveStrokeRoll
- singleStrokeFour
- singleStrokeSeven
- multipleBounceRoll
- sixStrokeRoll
- sevenStrokeRoll
- nineStrokeRoll
- tenStrokeRoll
- elevenStrokeRoll
- thirteenStrokeRoll
- fifteenStrokeRoll
- seventeenStrokeRoll
- paradiddle
- doubleParadiddle
- trippleParadiddle
- paradiddlediddle
- flam
- flamAccent
- flamTap
- flamacue
- flamParadiddle
- singleFlammedMill
- pataflafla
- swissArmytriplet
- invertedFlamTap
- flamDrag
- singleDragTap
- doubleDragTap
- lesson25
- singleDragadiddle
- dragParadiddle1
- dragParadiddle2
- singleRatamacue
- doubleRatamacue
- trippleRatamacue
guitarStroke
parameters
| name | position | description | type |
|---|---|---|---|
| direction | - | Specifies the start direction of the stroke | [up,down,alternate] |
| value | - | the duration of one arpeggio event. (Default=64) | [1,2,4,8,…] |
| mode | - | Deprecated: Use _direction=alternate instead. Perform only one stroke direction (normal) or alternates between up and down. (Default=normal) | [normal,alternate] |
| withTag | - | if set, only events including this tag will be processed. | tagName |
include extension
using "lua/mods/guitarStroke.lua";
Simulates guitar strokes as mini arpeggios.
Note: the alternate mode works only if this mod is set via instrumentConf.
-- does not work:
[
{
/mod: guitarStroke _mode=alternate/
}
]
-- does work:
instrumentConf: myInstrument mod guitarStroke _mode=alternate;
Example
legato
parameters
| name | position | description | type |
|---|---|---|---|
| forTag | - | Specifies a tag name. If set only events with this tag name will be affected by the legato mod. | text |
| amount | - | The ammount of the legato effect | 0..100 |
include extension
using "lua/mods/legato.lua";
Performs every note legato. It is also possible to tag single notes.
If a tag is given, only the tagged notes are performed legato.
myArpeggio
parameters
| name | position | description | type |
|---|---|---|---|
| style | - | Performs the arpeggio normal or legato | [normal,legato] |
| direction | - | the direction of the arpeggio. (Default=up) | [up,down] |
include extension
using "lua/mods/myArpeggio.lua";
A simple arpeggio implementation.
Example
slide
parameters
| name | position | description | type |
|---|---|---|---|
| forTag | - | Specifies a tag name. If set only events with this tag name will be affected by the slide mod. | text |
| numNotes | - | number of slide nodes. Can be positive or negative | 0..N |
| duration | - | the duration of the slide in quarters | 0..N |
| velocity | - | the slide velocity | 0..1 |
| velocityInc | - | a velocity incremental value | 0..1 |
include extension
using "lua/mods/slide.lua";
Performs a chromatic slide to the target note.
Works only with absolute notes, not with degree notes !
staccato
parameters
| name | position | description | type |
|---|---|---|---|
| forTag | - | Specifies a tag name. If set only events with this tag name will be affected by the staccato mod. | text |
| amount | - | The ammount of the staccato effect | 0..100 |
include extension
using "lua/mods/staccato.lua";
Performs every note staccato. It is also possible to tag single notes.
If a tag is given, only the tagged notes are performed staccato.
swing
parameters
| name | position | description | type |
|---|---|---|---|
| grid | - | Performs the swing offset either on 8th or 16th. (Default=8) | [8, 16] |
| offset | - | The ammount of the swing offset | 0..100 |
include extension
using "lua/mods/swing.lua";
Performs a swing groove.
Voicing Strategies
guitar
parameters
| name | position | description | type |
|---|---|---|---|
| range | - | If given the strategy tries to keeps the range by shifting the octave of the chord. | [contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano] |
include extension
using "lua/voicings/guitar.lua";
Tries to simulate the chord voicing of an guitar.
inversion
parameters
| name | position | description | type |
|---|---|---|---|
| level | - | level of inversion | number |
| range | - | If given the strategy tries to keeps the range by shifting the octave of the chord. | [contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano] |
include extension
using "lua/voicings/inversion.lua";
creates an inversion by moving the lowest note an octave hihgher.
simple
parameters
| name | position | description | type |
|---|---|---|---|
| range | - | If given the strategy tries to keeps the range by shifting the octave of the chord. | [contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano] |
include extension
using "lua/voicings/simple.lua";
The simple approach with no strategy.
voicelead
parameters
| name | position | description | type |
|---|---|---|---|
| range | - | If given the strategy tries to keeps the range by shifting the octave of the chord. | [contrabass,bass,baritone,tenor,alto,mezzosoprano,soprano] |
include extension
using "lua/voicings/voicelead.lua";
Tries to simulates a voice leading approach:
the octaves of a chord are rearranged, so that the actual pitch distance between the previous chord is kept minimal.
Conductor Selectors
all
Selects all events.
all() {...}
atPosition
parameters
| name | position | description | type |
|---|---|---|---|
| position | - | quarters |
Selects any event where its position is equal to a given value.
Please mind the cue behaviour in combination with repeat and jumps.
channel
parameters
| name | position | description | type |
|---|---|---|---|
| channel | - | midi channel+ |
Selects an event where its channel is equal to one the given numbers.
channel(0 1 2) {...}
chord
parameters
| name | position | description | type |
|---|---|---|---|
| chord name | - | string+ |
Selects a MIDI event which was created during rendering a specific chord.
chord(Cmaj7) {...}
It is also possible to select “chord qualities”. For example, if you want to select
every 7th chord you write:
chord(X7) {...}
degree
parameters
| name | position | description | type |
|---|---|---|---|
| degree | - | degree+ |
Selects a MIDI event which was created during rendering a template and its degrees.
Octaves of a degree will not be considered.
degree(I III) {...}
durationSelector
parameters
| name | position | description | type |
|---|---|---|---|
| duration | - | quarters |
Selects any event whitch duration matches to the given duration
see also: longerThan, shorterThan.
duration(1) {...}
expression
parameters
| name | position | description | type |
|---|---|---|---|
| expression | - | expression+ |
Select events via its applied expressions.
expression(p) {...}
expression(p f ff) {...}
fromBar
parameters
| name | position | description | type |
|---|---|---|---|
| bar | - | bar number |
Selects an event where its bar time is equal or greater.
fromBar(1) {...}
see also: toBar, onBar, nthBar.
fromBeat
parameters
| name | position | description | type |
|---|---|---|---|
| beat | - | quarters |
Selects an event where its beat time is equal or greater.
fromBeat(1) {...}
fromPitch
parameters
| name | position | description | type |
|---|---|---|---|
| pitch | - | pitch |
Selects any event where its pitch is higher or equal than the given pitch.
fromPitch(c,) {...}
fromPosition
parameters
| name | position | description | type |
|---|---|---|---|
| position | - | quarters |
Selects any event where its position is equal or after a given position.
see also: toPosition.
example, select the events postion >=8 quarters:
fromPosition(8) {...}
using cue markers instead of quarter numbers
c d e f | /cue: myMark/ g a b 'c
fromPosition(@myMark) {...}
In order to work properly, a cue name must occur only once in a document.
Please mind the cue behaviour in combination with repeat and jumps.
instrumentSelector
parameters
| name | position | description | type |
|---|---|---|---|
| instrument name | - | instrumentName+ |
Selects any event which belongs to one of the given instruments.
there is a known issue related to instrumentSection
example:
instrument(bass) {...}
instrument(bass drums) {...}
longerThan
parameters
| name | position | description | type |
|---|---|---|---|
| duration | - | quarters |
Selects any event whitch duration is longer or equal than the given duration
see also: duration, shorterThan.
longerThan(1) {...}
notOnBeat
parameters
| name | position | description | type |
|---|---|---|---|
| beat | - | quarters+ |
Selects an event which does not appear on a given beat or a list of beats
notOnBeat(1 3) {...}
nthBar
parameters
| name | position | description | type |
|---|---|---|---|
| beat | - | bar number+ |
Selects the events of every nth bar, counting from the first bar.
nthBar(3 5) {...}
see also: fromBar, toBar, onBar.
octave
parameters
| name | position | description | type |
|---|---|---|---|
| an octave number from 0 to 10 | - | number+ |
Selects any event where its pitch is in the range of a given octave. The middle c is located in octave 5.
octave(4) {...}
onBar
parameters
| name | position | description | type |
|---|---|---|---|
| beat | - | bar number+ |
Selects an event in a given bar number or a list of bar numbers.
TODO: should be renamed into inBar.
onBar(1 3) {...}
see also: fromBar, toBar, nthBar.
onBeat
parameters
| name | position | description | type |
|---|---|---|---|
| beat | - | quarters+ |
Selects an event which appears on a given beat or a list of beats
example, select the events at beat 1 and 3:
onBeat(1 3) {...}
phrase
parameters
| name | position | description | type |
|---|---|---|---|
| name | - | name(s) of a phrase | text+ |
Selects a MIDI event which was created during rendering a phrase.
phrase(myPhrase1 myPhrase2) {...}
pitch
parameters
| name | position | description | type |
|---|---|---|---|
| pitch | - | pitch+ |
Selects any event where its pitch is equal to one of the given pitches.
pitch(c) {...}
pitch(c, c c') {...}
shorterThan
parameters
| name | position | description | type |
|---|---|---|---|
| duration | - | quarters |
Selects any event whitch duration is shorter or equal than the given duration
see also: duration, longerThan.
shorterThan(1) {...}
templateSelector
parameters
| name | position | description | type |
|---|---|---|---|
| template name | - | templateName+ |
Selects any event which belongs to one of the given template names.
example:
------------ sheet file
[
template: myTemplate;
{
...
}
]
------------ conductions file
template(myTemplate) {...}
template(partI partII) {...}
toBar
parameters
| name | position | description | type |
|---|---|---|---|
| bar | - | bar number |
Selects an event where its bar time is equal or less.
toBar(4) {...}
see also: fromBar, onBar, nthBar.
toBeat
parameters
| name | position | description | type |
|---|---|---|---|
| beat | - | quarters |
Selects an event where its beat time is equal or less.
toBeat(4) {...}
toPitch
parameters
| name | position | description | type |
|---|---|---|---|
| pitch | - | pitch |
Selects any event where its pitch is lower or equal than the given pitch.
toPitch(c,) {...}
toPosition
parameters
| name | position | description | type |
|---|---|---|---|
| beat | - | quarters |
Selects any event where its position is before a given position.
see also: fromPosition.
example, select the events position < 8 quarters:
toPosition(8) {...}
using cue markers instead of quarter numbers
c d e f | /cue: myMark/ g a b 'c
toPosition(@myMark) {...}
In order to work properly, a cue name must occur only once in a document.
Please mind the cue behaviour in combination with repeat and jumps.
voiceSelector
parameters
| name | position | description | type |
|---|---|---|---|
| voice number | - | number+ |
Selects any event which is located in one of the given voice numbers.
example:
------------ sheet file
[
{
-- voice 1
}
{
-- voice 1
}
]
------------ conductions file:
voice(1) {...}
voice(1 2) {...}
withTag
parameters
| name | position | description | type |
|---|---|---|---|
| tag | - | text |
Selects any event which has a tag assigned matching to the given tag.
example, select the event with the tag “myTag” assigned:
withTag(myTag) {...}
c d e "myTag"@f |
Conductor Declarations
bend
Value Types
| name | description | type |
|---|---|---|
| bend value | 50 is the neutral position of the bend | 0..100 |
adds a pitch bend event at the same position as the selected event.
the
%unit and the+=,-=,=& +operations are not supported.
example:
onBeat(1) {
bend = 60;
}
cc-decl
Value Types
| name | description | type |
|---|---|---|
| cc type and value | a contoller name followed by the target number enlcosed by parentheses. See cc. Alternatively you can write cc0..127. | string |
adds a cc event at the same position as the selected event.
the
%unit and the+=,-=,=& +operations are not supported.
example:
onBeat(1) {
bend = "Modulation(100)";
}
onBeat(1) {
bend = "cc1(100)";
}
duration
Value Types
| name | description | type |
|---|---|---|
| absolute | 0..N | |
| percent | percent base value is the events length | 0..N% |
Changes the duration of an event.
example:
onBeat(1) {
duration += 0.125; -- 1/8 longer
}
onBeat(3) {
duration -= 25%;
}
fade-decl
Value Types
| name | description | type |
|---|---|---|
| fade options | a comma separated list of fade options. E.g. "type(Modulation), from(0) …“, | string |
| type | could be either a controller (see cc) or type(bend) | string |
| from | the fade start value, in case of a bend the range is 0..100 where 50 is the neutral position. Otherwise it is 0..127 | 0..N |
| to | Optional. the fade end value, in case of a bend the range is 0..100 where 50 is the neutral position. Otherwise it is 0..127 | 0..N |
| duration | the fade duration in quarters | 0..N |
| curve | Optional. the curve type see fade | 0..N |
| offset | an optional position offset in quarters | -N..N |
adding a fade of an cc, or pitchbend value at the position of the selected event.
the
%unit and the+=,-=,=& +operations are not supported.
example:
onBeat(1) {
fade = "from(0), to(100), type(cc2), curve(exp), offset(-1)";
}
onBeat(1) {
bend = "cc1(100)";
}
midiChannel
Value Types
| name | description | type |
|---|---|---|
| midiChannel | 0..15 |
changes the channel of the selected event.
example:
onBeat(1) {
midiChannel = 1;
}
pitch
Value Types
| name | description | type |
|---|---|---|
| absolute | 0..127 | |
| percent | percent base value is events pitch | 0%..100% |
Changes the pitch of an event.
example:
onBeat(1) {
pitch = 60;
}
onBeat(3) {
pitch += 25%;
}
timeOffset
Value Types
| name | description | type |
|---|---|---|
| absolute | 0..N | |
| percent | percent base value is the events length | 0%..N% |
Changes the time position of an event.
Since this is an offset value, the set operation(=) has the same effect as the add(+=) or substract(-=) operation.
example:
onBeat(1) {
timeOffset += 0.125; -- 1/8 offset
}
onBeat(3) {
timeOffset -= 25%;
}
velocity
Value Types
| name | description | type |
|---|---|---|
| absolute | 0..127 | |
| percent | percent base value is events velocity | 0%..100% |
Changes the velocity of an event.
example:
onBeat(1) {
velocity = 127;
}
onBeat(3) {
velocity += 25%;
}