home.gif

A layout template may be seen as a list of layout instructions that will produce a certain layout effect.

layout templates may be bound to a user-button by means of the shortcuts dialog.

Laout templates may be executed from the layout template dialog, a user button or shortcut-key

 

Layout templates contain plaintext (like all MusiCAD files) so they can be edited in an ordinary texteditor (like notepad). You can edit from within MusiCAD using the layout_template.gif button in the layout template dialog of by opening template file. A template file may look like:

melodie "MyTemplate";

!%TemplateNL: Groep|MijnSjabloonOmschrijving

!%TemplateUK: Group|MyTemplateDescription

!%TemplateDE: Gruppe|MeineSchabloneBeschreibung

!# iMinDX=2;iMaxDX=16;iHeaderSize=23;iLineSpacing=0;iNBarsPerLine=4;

!# iStaffDist=0;iHdrDist=0;iResizeOrphanPct=21;iScaleHorizontal=85;

!# iScaleVertical=85;iPageLeft=15;iPageTop=10;iPageRight=15;iTempo=90;

!# bAutoBass=0;bAutoChords=0;fSelection=(Size=5, Y=7);fInfo=(Name=Arial);

!# fInfo3=(Name=Lucida Bright, Size=11, Style=fsBold, Color=clRed, Y=7);

!# fChords=(Size=14, Style=fsNarrow, Y=-12);

 

All non default style parameters are listed here. Any MusiCAD music or template file starts with a line: melodie "NAME";

Next three lines determine for supported langages (Dutch, English and German) the group to list with, and a description comment.

 

The rest of the lines list the parameters to be changed.

By the way, every MusiCAD melody lists its layout exactly the same way:

parameterName=value;.

Examples

iStaffDist=0;

that is no(extra) staff distance (default is 2)

fInfo3=(Name=Lucida Bright, Size=11, Style=fsBold, Color=clRed, Y=7);

all music informationtexts get font layout opmaak as above.

 

In layout templates a few additional constructs may be used that are not allowed in music-fiels:

     !# iScaleHorizontal=*+5;iScaleVertical=*+5;

The use of *+5 means add 5% to mentioned parameter.

Parameters that are meaningful for single parts - when used within a template - will set a value for all parts.

There is an alphabetical overview of all parameters for use in a template: templateparameters

 

Template script

Layout templates may perform a few actions like selection, transposition, addition of parts and export of files in other formats (midi, pdf).

SELECTPART( MAIN|PREV|NEXT|FULL|LAST|naam );

MODIFYPART( partmodificationname );

ADDPART( newpartname );

SETPART( part-parameter, value );

TRANSPOSE( nr-semitones );

SAVEFILE( extension )

 

A layout template that will split a double voiced part will have the following content: :

SETPART( sVoicename, upper ); ! rename to 'upper'

ADDPART( COPY1 ); ! copy current part

SETPART( sVoicename, lower ); ! rename copy to lower

MODIFYPART( RemoveHighvoice ); ! remove higest notes if multiple notes exist

SELECTPART( sVoicename, upper ); ! select original (now renamed) part

MODIFYPART( RemoveLowvoice ); !..remove lowest notes if multiple notes exist

 

Templates may be bound to shortcuts and even to a button on the button-bar

Layout template
musicad.nl
musicad.com
This is the MusiCAD 4.0 help information. See musicad.eu for most recent information.