UltiMusE3 File Format

****************************************************************************************************************

UltiMusE 3

/* New UltiMusE 3 File Format (OS-9 Level II)

* Revised 06/21/2012

* To show detailed note & inclusion info

* As well as new items added since last doc

*/

/* Ultimuse 3 Header */

/*********************/

Offset Type Name #Bytes Description

/*********************************************/

$0000 short scorelvl 1 /* Score Level - Used for loading old scores */

$0001 short nparts 1 /* Number of parts in the score 1-16 */

$0002 short nstaves 2 /* Number of staves in the score 1-7 */

$0004 sexy numer 2 /* Top of Time Sig no. Beats/Bar, 1 - 31 */

$0006 sexy denom 2 /* Bottom of Time Sig 2, 4, 8, or 16 */

$0008 short nevents 2 /* Number of Score Objects used

(size of score) currently limited to 32,767 */

$000A array parts[] ?? /* Array, size 4*(nparts + 1); ignore 0th Part */

/* Offset is determined by $000A+(4*nparts) */

$000A array staves[] ?? /* Array, size 10*nstaves */

/* Offset is $000A+(4*nparts)+(10*nstaves)

$000A array objects[] ?? /* Array, size 8*nevents; THIS IS THE SCORE! */

/* Offset is $000A+(4*nparts)+(10*nstaves)+(8*nevents) */

$000A sexy secmin 2 /* Speed scale factor in "seconds per minute" */

/* Instrument Arrays for old scores, kept for backwards compat */

$000A array instvals[] 16 /* 16 bytes for patch change numbers */

$000A array instnames[] 16*10 /* array of 16*10 for 10 byte incl \0

instrument names, expanded to 15+\0

in new list tagged on end of file */

$000A array chans[] 16 /* array of 16 midi channels, 1 per part */

/* Level 2 Scores end here! */

$000A array levels[] 16 /* array of 16 midi vel levels lo-hi */

/* Level 3 Scores end here! */

/* Original Titles 4 * 52 , expanded later to 9 * 52 (extra 5 tagged to end) */

$000A short ntlines 1 /* Num of Title line (4 here) */

$000A short ntlenp1 1 /* length of line 51 + \0 */

$000A char Titles[] 208 /* Actual 4 lines, 4*51 chars+\0 */

/* Level 4 & 5 scores end here */

$000A array genvols[] 8 /* GenVols[], Same as levels[]

but for General Volumes (not used, skip)

(might not come to pass) */

/* Persussion stuff */

$000A array percs[] 17 /* 17 1-byte midi notes nums for the slots

of the percussion staff */

$000A char percsynth 24 /* Synth name incl \0 */

$000A short scrclock 1 /* not real sure on this one

it has something to do with perc clock */

/* Level 6 scores end here */

/* Transposer data */

$000A sexy transp 2 /* Transposer semi-tones */

/* Level 7 & 8 scores end here */

/* Immediate Midi Events */

$000A sexy evtarsiz 2 /* Size of immediate events array */

$000A array evtarray[] evtarsiz /* load evtarray based on evtarsiz */

/* Level 9 & 10 scores end here */

/* Expanded Title lines 5 more line making 9 total */

$000A char Titles[] 0-5 /* Number of lines to highest non-blank */

/* Expanded Instrument Table - repeated for every "assigned" inst 10-64 */

$000A short instnum 1 /* inst no from 0-63 */

$000A int ptchnum 1 /* midi patch no 0-127*/

$000A char patchname 16 /* name of patch (15) + \0 */

/* EOF Ultimuse III file */

/* Breakdown of all Event Blocks in Ultimuse III */

/* Parts Block 1 per voice, per file */

* Each Part (or Voice) has 2 fields of 2 bytes: (skip 0th part)

2 Pstaff index number of the staff it's on, from 0 (user sees from 1, left zeroed)

2 Philo 0 0 0 0 0 0 0 Bit code of how to display note or rest:

| | | |_|____Bits 1 and 0 encode rest staff pos and note stem direction:

| | | 0 = Middle of staff, stems flip toward center line

| | | 1 = Top of staff, stems up

| | | 2 = Bottom of staff, stems down

| | | Other bits are individual mode controls:

| | |___________4 = display stems but not flags, for "chords"

| |_____________8 = don't show Rests, just Notes (not yet used)

|_______________16 = Percussion part, don't transpose

/* Staff Block 1 Per staff, per file - 10 bytes (5 words) */

2 StaffY Height of staff's bottom line on screen, pixels

(Note: Y-axis is positive from bottum up).

2 Clef_no Index # of Clef type used:

0=Treble, 1=Bass, 2=Guitenor, 3=Double Bass

4=Percus, 5=Alto, 6=Tenor

2 Botnote No longer used; spare

(Next two are Reserved for transposing-instrument clefs)

2 Xsharps No. of extra sharps beyond "concert" key

2 Xsemis No. of extra semitones below concert key

/* Next set of Blocks are all stored in the score Objects.*/

/* Note / Rest Block */

1 Part Voice Number 1-16 (0=non note so go to control)

2 Startime Absolute start time in ticks from beginning of score (0)

1 Dur Length of note 0=breve 1=whole 2=half 3=quarter

4=8th 5=16th 6=32nd 7=64th

1 Durmod Length modifier 0=none 1=dot 2=dbl dot 3=triplet

1 Slot Position on staff, each line/space is 1

Range: -15<>+15, 32=rest

1 Pitmod Pitch modifier 0,1=none 2=sharp 3=dbl sharp 4,5=natural

6=dbl flat 7=flat

1 Artic Articulation (pause at end of note)

0=tied 1=legato 2=none 3=marcato 4=stuccato 5=pizzacato