|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.dixshtix.niff.ChunkLengthTable
Defines fixed-length of NIFF file chunks to allow backward compatibility.
Each NIFF file chunk has a fixed-length part and a variable length part. The fixed-length part is composed of a set of required elements described by each chunk definition. The variable length part is composed of a series of optional tags which may be used occasionally or only by certain programs.
Corrected from NIFF 6a, FONTIDX has replaced FONTPTR.
ChnkLenTable
Field Summary | |
static FourByteConstant |
Accidental
Represents an accidental symbol attached to a Notehead. |
static FourByteConstant |
AltEndingGraphic
Graphical symbols used on alternate endings. |
static FourByteConstant |
Arpeggio
The symbol in front of a chord indicating that the notes of the chord are to be played successively from lowest to highest pitch, rather than simultaneously. |
static FourByteConstant |
Articulation
Attached to a stem are various articulation symbols. |
static FourByteConstant |
AugDot
Graphic indication of lengthening of a note. |
static FourByteConstant |
Barline
Mark the end of a measure. |
static FourByteConstant |
Beam
Link note stems into a metrical unit. |
static FourByteConstant |
ChnkLenTable
The Chunk Length Table allows for future changes in the fixed length part of the chunk structures, without disturbing existing programs. |
static FourByteConstant |
ChordSymbol
The chord symbols placed above a staff. |
static FourByteConstant |
Clef
Indicates that the following musical symbols are to be interpreted in the specified clef. |
static FourByteConstant |
CustomGraphicChk
Used when a custom graphic is to be placed on the page, with no musical function or sound. |
private static java.util.List |
defaultOrder
|
private static java.util.Map |
defaultTable
|
static FourByteConstant |
DefaultValues
Default Renderings. |
static FourByteConstant |
Dynamic
Affects dynamics (velocity) of playback. |
static FourByteConstant |
EpsGraphic
Part of the Custom Graphics list which is an optional table in the Setup Section which contains fonts and graphics. |
static FourByteConstant |
FiguredBass
Used to describe the numerals and accidentals of a basso continuo. |
static FourByteConstant |
Fingering
Describe which finger is used to play. |
static FourByteConstant |
FontDescription
Font Description chunks define a particular combination of font name, font size, and font style. |
static FourByteConstant |
FontSymbol
A standard music font character that is to be placed on page or system outside of a staff, without its normal sound or function. |
static FourByteConstant |
Glissando
Used to describe a line that functions as a glissando, a rapid swoop from a lower to a higher note passing all half-steps in between. |
static FourByteConstant |
GuitarGrid
Display a fret diagram for a stringed intrument. |
static FourByteConstant |
GuitarTabNum
Used to indicate numbers to be placed on a guitar tablature staff. |
static FourByteConstant |
Hairpin
Describe dynamic changes. |
static FourByteConstant |
HarpPedal
Display a symbol indicating how a harp's strings are to be tuned, ala a Salzedo diagram. |
static FourByteConstant |
KeySignature
Standard key signatures, including cancelations. |
static FourByteConstant |
KeySignNonstandard
Indicates the start of a nonstandard key signature. |
static FourByteConstant |
Line
Add a line to a score. |
static FourByteConstant |
Lyric
Display a lyrical text syllable on one of the established verse lines. |
static FourByteConstant |
MeasureNumbering
Used to set or change the measure numbering scheme anywhere in the score. |
static FourByteConstant |
MidiDataStream
Lengthy or complex MIDI information that cannot be represented with the simple MIDI Performance tag can be supplied with the MIDI Data Stream chunk. |
static FourByteConstant |
NiffInfo
The NIFF Information chunk is the first required chunk in the Setup Section. |
static java.lang.Integer |
noDefinedChunkLength
|
static FourByteConstant |
Notehead
Display a notehead, which is usually interpreted as a note to be played. |
static FourByteConstant |
OctaveSign
Cue to play one or two octaves higher or lower. |
private java.util.List |
order
|
static FourByteConstant |
Ornament
Decorations such as trills, turns and mordents. |
static FourByteConstant |
PageHeader
Describes a physical page of the score. |
static FourByteConstant |
Parenthesis
Left or Right or Both parenthesis/es, brace/s or bracket/s. |
static FourByteConstant |
Part
Part Description Chunk, part of the Parts list which is a required part of the Setup Section. |
static FourByteConstant |
PedalOrgan
Represents equivalent of "fingering" on a chromatic, foot-operated keyboard. |
static FourByteConstant |
PedalPiano
Depressing a Pedal which alters timbre or other property of instrument. |
static FourByteConstant |
Portamento
Used to describe a line that functions as a portamento, a rapid swoop from a lower to a higher note smoothly over all intervening frequencies. |
static FourByteConstant |
PsType1Font
Part of the Custom Graphics list which is an optional table in the Setup Section which contains fonts and graphics. |
static FourByteConstant |
PsType3Font
Part of the Custom Graphics list which is an optional table in the Setup Section which contains fonts and graphics. |
static FourByteConstant |
RehearsalMark
The rehearsal letters or numbers placed above a staff. |
static FourByteConstant |
RepeatSign
Logical and graphical components of a repeat sign. |
static FourByteConstant |
Rest
Display a logical silence, which otherwise has the semantics of a note. |
static FourByteConstant |
Slur
A musical slur between two notes of different pitch. |
static FourByteConstant |
StaffGrouping
Staff Grouping chunks, part of the Staff Groupings list, an optional part of the Setup Section or Data Section. |
static FourByteConstant |
StaffHeader
Describes a logical Staff. |
static FourByteConstant |
Stem
Display a stem for creating of chords at the same time-stamp. |
static FourByteConstant |
StringTable
The String Table is a chunk containing all strings referred to elsewhere in the file. |
static FourByteConstant |
SystemHeader
Container for staffs. |
static FourByteConstant |
SystemSeparation
Used in ensemble scores to vertically separate systems. |
private java.util.Map |
table
|
static FourByteConstant |
TagActivate
This chunk can be stored at the start of a series of chunks to indicate that each of its tags are to be applied to all of the chunks appearing between it and a matching Tag Inactivate chunk. |
static FourByteConstant |
TagInactivate
This chunk is used to end the application of tags started with a Tag Activate chunk. |
static FourByteConstant |
TempoMarking
A standard tempo marking either in the form [note] = [metronome setting], or text tempo instructions. |
static FourByteConstant |
TempoMarkNonstandard
Indicates the start of a tempo marking. |
static FourByteConstant |
Text
A text string. |
static FourByteConstant |
Tie
Tie two noteheads into a composite note. |
static FourByteConstant |
TimeSignature
Represent a simple time signature. |
static FourByteConstant |
TimeSigNonstandard
Indicates the start of a nonstandard time signature. |
static FourByteConstant |
TimeSlice
Indicate Logical Start Time of various anchored tags. |
static FourByteConstant |
Tremolo
Display a tremolo marking. |
static FourByteConstant |
Tuplet
Tuplet. |
static FourByteConstant |
UserDefined
Provide for a user defined chunk for vendor-specific expansion. |
Constructor Summary | |
ChunkLengthTable()
|
Method Summary | |
(package private) static void |
|
int |
get(FourByteConstant fcc)
|
java.lang.Integer |
getNumber(FourByteConstant fcc)
|
java.util.Iterator |
iterator()
|
static ChunkLengthTable |
makeDefaultEntries()
Fill a chunk length table with "canned" entries. |
void |
put(FourByteConstant fcc)
|
void |
put(FourByteConstant fcc,
int length)
|
void |
put(FourByteConstant fcc,
java.lang.Integer length)
|
int |
size()
Return the number of entries in a chunk length table. |
java.lang.String |
verifyDefaults()
Make sure our canned CLT entries jive with a given chunk length table. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait |
Field Detail |
public static final FourByteConstant ChnkLenTable
The purpose of the chunk length table is to give programs a tool for adapting to changes in the fixed length part of the NIFF chunk structures. The chunk length table is a series of 8 byte Chunk Length Table Entries, each table entry composed of a chunk name and the offset of the first tag field for chunks of that type. There must be a table entry for each chunk type present in the file. Chunks appear in the table in alphabetical order.
This chunk is a required part of the Setup Section.
It is a series of 8 byte table entries, each one composed of a 4 byte chunk name followed by a 4 byte pointer to the first tag field to be found in chunks of that type. The pointer value is always the same as the length of the chunk's required structure. If the required structure for the chunk type is the EMPTY data type, the pointer value is zero. If no tags are allowed in that chunk, the pointer value is -1. There must be a table entry for each chunk type present in the file, including user-defined chunks. Table entries appear in alphabetical order.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
Chunk Length Table | Setup Chunk | Setup Section LIST | N/A | N/A |
Name | Type | Description | ||
ChunkLengthTableEntries | (FOURCC,LONG)[] | |||
Field Name | Type | Description | ||
chunk name | FOURCC | NIFF Chunk Name | ||
offset of first tag | LONG | A 4 byte pointer to the first tag field to be found in chunks of this type. The pointer value is always the same as the length of the required part of the chunk. If the chunk has no required structure, the pointer value is zero. If no tags are allowed in the chunk, the pointer value is -1. |
public static final FourByteConstant DefaultValues
The Defaults chunk specifies default fonts for various text categories, vertical offsets of chord symbols, guitar grids, and rehearsal marks, and a default tuplet appearance description.
The fields are "music font", "part name font", "lyric font", "chord symbol font", "measure number font", "rehearsal mark font", all of type "FONTIDX", a 2-byte pointer to a Font Description chunk in the Font Descriptions list. Next comes an pair of unsigned bytes which are interpreted as the "tuplet grouping symbol" and the "tuplet number style".
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
Default Values | Setup Chunk | Setup Section LIST | N/A | N/A |
Name | Type | Description | ||
music font | FONTIDX | |||
part name font | FONTIDX |
Used as the default font for part name and abbreviation.
See StaffHeader and Part .
| ||
lyric font | FONTIDX | |||
chord symbol font | FONTIDX | |||
measure number font | FONTIDX | |||
rehearsal mark font | FONTIDX | |||
tuplet grouping symbol | BYTE |
(Copied from Tag.tupletDesc )
0 = default | ||
tuplet number style | BYTE |
(Copied from Tag.numberStyle )
numstyleDefault = 0, |
public static final FourByteConstant EpsGraphic
EPS graphics in the Custom Graphics list table are referred to by means of the Custom Graphic Symbol chunk, which represents a symbol with no musical function, or the Custom Graphic tag, which is applied to a music symbol chunk to override the default appearance of the symbol.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
EPS Graphic | Setup Chunk | Custom Graphics LIST | N/A | N/A |
Name | Type | Description | ||
encapsulated PostScript | BYTE[] | A PostScript description of a graphic, in EPS (encapsulated PostScript) format. |
CustomGraphicChk
,
Tag.customGraphicTag
public static final FourByteConstant FontDescription
The Font Descriptions list is an optional table in the Setup Section that is composed of a series of Font Description chunks. Font Description chunks in the Font Descriptions list are referred to elsewhere in the file by means of the FONTIDX data type.
The FONTIDX data type is used in the optional Default Values chunk in the Setup Section for specifying default fonts for music symbols, lyrics, figured bass and chord symbols. FONTIDX is also used in the Font ID tag, which is applied to any music symbol or text-type chunk to specify that the same character(s) but a different font, size or style is to be used. Finally, FONTIDX is used in the Custom Font Character tag, which allows a non-default font and character to be used on a music symbol chunk.
Each Font Description chunk gives the font name, size (in both twips and absolute units), style (plain, bold, italic, underscored, or a combination), and the location where the font itself can be found, if it is stored in the file. The location is given as a pointer to the PostScript font in the Custom Graphics list, a separate Setup Section structure.
The size of text fonts is given in twips. (One twip = 1/20 of a point, or 1/1440 of an inch.) This allows for scaling of fonts between point sizes, for those who can use this feature (e.g. a 210 twip font = a 10 1/2 point font).
The size of music fonts is described in two different ways: font size (in twips) and space height (in absolute units). Since there is no agreement on the meaning of font size between different music fonts, the space height is intended to provide a clue about the intended size of the symbols on a standardized scale. It is equal to the vertical distance in absolute units between two adjacent staff lines of a staff on which the music font symbols would appear of normal size.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
Font Description | Setup Chunk | Font Descriptions LIST | N/A | N/A |
Name | Type | Description | ||
font name | STROFFSET | Offset into the string table of the font name. | ||
size | SHORT | Font size, in twips (20ths of a point) | ||
space height | SHORT | Used only for music fonts. Font size, given as the vertical distance, in absolute units, between two adjacent staff lines of a staff on which the music font symbols would normally appear. | ||
where | SHORT |
Where this font can be found.
-1 = This font or a substitute is assumed to be known and available
to the reading program. | ||
style | BYTE |
The following values are additive, in the sense of a bitmap:
0 = plain 1 = bold 2 = italic 4 = underscored |
public static final FourByteConstant NiffInfo
This includes the following information: NIFF version, writing program type, measurement units and MIDI ticks per quarter. Of these fields, all but the NIFF version can have a value of -1 to indicate "no value".
NIFF uses two different measurement systems - absolute units and staff steps.
Absolute units are the writing program's own choice of units, declared in the Setup Section NIFF Information chunk. The unit choice is expressed in two field values: the standard unit (inches, centimeters, or points), and the number of absolute units per standard unit. For example, if the resolution used by the writing program were 4000 dots per inch, the writing program would choose a standard unit of "inches" and the number of absolute units per standard unit would be 4000.
For performance playback, both start time and duration are measured in MIDI ticks, which denote some fixed amount of time using an integer. MIDI ticks are well suited to performance information because of their high resolution. The relationship between the performance and logical values is described by the field MIDI ticks per quarter note, stored in the NIFF Information chunk in the Setup Section.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
NIFF Information | Setup Chunk | Setup Section LIST | N/A | N/A |
Name | Type | Description | ||
NIF Version | BYTE[8] |
NUL-padded ASCII string. 6a or 6b for Tag.numberStyle .
| ||
writing program type | SIGNEDBYTE |
-1 = no value/other 1 = engraving program 2 = scanning program 3 = MIDI interpreter 4 = sequencer 5 = research program 6 = educational program | ||
standard units | SIGNEDBYTE |
-1 = no absolute measurements in file 1 = inches 2 = centimeters 3 = points | ||
absolute units | SHORT |
Number of absolute units per standard unit.
-1 = no absolute measurements in file | ||
MIDI ticks per quarter | SHORT | MIDI ticks per quarter note, to be used in interpreting MIDI time values. Must be a positive number if MIDI time values are present in file. -1 indicates no MIDI timing information is present. |
Tag.spacingByPart
public static final FourByteConstant Part
Each Part Description Chunk defines the Part ID, part name and part abbreviation, maximum number of staves in that part, MIDI channel and cable numbers, and the number of steps to transpose this part on playback. All fields except Part ID can be set to null values. Part ID's should be assigned sequentially starting with zero. The vertical offset of such optional items as lyrics, guitar grid symbols, and figured bass can optionally be specified by appending tags to the Part Description chunk.
The maximum number of staves field in each Part Description must
have a nonzero value. This information is used in interpreting staff
number values in the Setup
Section StaffGrouping
list.
The Part Description chunk has fields for part name and part abbreviation. These can be used by the reading program as the names to be placed to the left of the system identifying the parts. This would be easiest in simple scores, where there is a clear correspondence between parts and staves and each Staff Header chunk has a Part ID tag to identify it. The part name font in the Default Values chunk can be used by the reading program for these simple part names and abbreviations.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
Part Description | Setup Chunk | Parts LIST | N/A | Tag.chordSymbolsOffset Tag.figBassOffset Tag.guitarGridOffset Tag.lyricVerseOffset (one for each lyric line)Tag.rehearsalOffset |
Name | Type | Description | ||
part ID | SHORT | The Part ID, referred to on Data Section chunks associated with this part. Should be assigned sequentially starting with zero. | ||
name | STROFFSET | Name to be associated with the staff or staves displaying this part on the first page of the score. See General Discussion of Part and Staff Names for details about its use. | ||
abbreviation | STROFFSET | Name to be associated with the staff or staves displaying this part on all pages after the first page of the score. See General Discussion of Part and Staff Names for details about its use. | ||
number of staves | BYTE | Maximum number of simultaneous staves for this part. Used to calculate staff ID's referred to in the Setup Section Staff Groupings list. A value of zero is allowed only if the Staff Groupings list is omitted from the Setup Section. | ||
MIDI channel | SIGNEDBYTE | Use -1 to specify none. | ||
MIDI cable | SIGNEDBYTE | Use -1 to specify none. | ||
transpose | SIGNEDBYTE | Number of halfsteps to transpose this part during playback. |
Tag.staffName
public static final FourByteConstant PsType1Font
Fonts are stored as PostScript Type 1 or Type 3 font.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
PostScript Type 1 Font | Setup Chunk | Custom Graphics LIST | N/A | N/A |
Name | Type | Description | ||
Postscript data | BYTE[] | Contains a complete PostScript type 1 font. |
public static final FourByteConstant PsType3Font
Fonts are stored as PostScript Type 1 or Type 3 font.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
PostScript Type 3 Font | Setup Chunk | Custom Graphics LIST | N/A | N/A |
Name | Type | Description | ||
Postscript data | BYTE[] | Contains a complete PostScript type 3 font. |
public static final FourByteConstant StaffGrouping
Indicates some type of connection at the left end of a series of sequential staves in the score, such as vertical lines, braces or brackets. Staff groupings can be nested. When the same staff is included in more than one grouping, the grouping symbols are stored in the file in the order they are to be applied to the staff, from right to left, starting at the staff origin.
Each Staff Grouping chunk describes some type of grouping symbol at the left end of a series of sequential staves in the score, such as an initial vertical line, a brace or a bracket.
A default list of Staff Grouping chunks can optionally be supplied in the Setup Section.
In the Data Section, Staff Groupings lists can be supplied in some System lists as overrides to the default Staff Grouping. Alternatively, the Setup Section Staff Grouping list can be eliminated entirely, with Staff Groupings supplied only in Data Section System lists. Storing a default Staff Groupings list in the Setup Section makes the most sense when there is little variety among the score's staff groupings.
N.B.: In a Data Section override Staff Grouping chunk, use the Staff ID's of the staves in the system to which the grouping applies, starting with zero for the first staff and increasing sequentially. In the Setup Section default Staff Groupings, Staff ID's of the default system are assigned as follows:
A Staff ID is assigned to every staff of every part, using the maximum number of staves for each part. The ID numbers are assigned in increasing order starting with Part 0, Staff 0. Here is an example:Part 0 has maximum number of staves = 3
Part 1 has maximum number of staves = 3
Part 2 has maximum number of staves = 1
Default System Staff ID Description 0 Part 0, Staff 0 1 Part 0, Staff 1 2 Part 0, Staff 2 3 Part 1, Staff 0 4 Part 1, Staff 1 5 Part 1, Staff 2 6 Part 2, Staff 0
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
Staff Grouping | Setup/Data Chunk | Staff Groupings LIST | N/A | N/A |
Name | Type | Description | ||
grouping type | BYTE (1-3) |
1 = vertical line at start of system 2 = curly brace at start of system 3 = bracket at start of system | ||
first staff | SHORT | 0-32767. Staff ID of first staff in grouping. See note above. | ||
last staff | SHORT | 0-32767. System Staff ID of last staff in grouping. See note above. |
public static final FourByteConstant StringTable
By "offset", we have verified the NIFF authors mean a 0-based index into the array of characters of the pre-defined strings, and not the index of the strings. This may allow for compression schemes to be devised.
Name | Type | Container | Contents | Tags |
---|---|---|---|---|
String Table | Setup Chunk | Setup Section LIST | N/A | N/A |
Name | Type | Description | ||
string entries | BYTE[] | Contains one or more character strings in RIFF ZSTR format. Each ZSTR is composed of a series of ASCII characters followed by a one byte NULL (0x00) terminator. The character strings are referenced throughout the file by STROFFSET values which represent the offset into the table. 0 offset points to the first character after the chunk length. |
public static final FourByteConstant PageHeader
Page Coordinate System.
The size of a page is given as its height and width in absolute units. The origin of the page's coordinate system is the top left corner of the page (as in the lower right quadrant of a Cartesian coordinate system). Measurements are increasingly positive to the right and towards the bottom of the page.
The origin of a staff is the left end of its top line. The origin of a system is the staff origin of its top staff.
Simulated Part Ordering
For a file with simulated part ordering, use values of zero for
Width and Height. See DataSection
for more information
on Simulated Part Ordering.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Page Header | Header Chunk | N/A | Page Origin: Top left corner of page | Tag.height Tag.width |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant StaffHeader
The staff size is described by the Height tag, which contains the vertical distance between the top and bottom staff lines. The default number of staff lines is 5. If only one part is present on this staff, the Part ID tag should be appended here, so it won't have to be appended individually to each symbol in the Staff list.
For a staff name, a Text chunk with the Staff Name tag should be stored following a Staff Header chunk. Its placement, if specified, would be given relative to the staff's origin. For a grouping name, a Text chunk with the Staff Name tag should be stored following a Staff Grouping chunk in a Staff Groupings list (in either the Setup Section or the Data Section). Its placement, if specified, would then be given relative to the staff origin of the top staff of the grouping.
Guitar Tablature.
Guitar Tablature is encoded as a separate Staff list within a System list in the Data Section. It is normally the second staff of a part with two staves, and should be counted in the maximum number of staves in the Setup Section Part Description chunk. The Guitar Tablature tag, the Number of Staff Lines tag (with a value of 6), and the Part ID tag are added to the Staff Header chunk.
The standard Clef chunk is used, with its value indicating TAB. Guitar TAB Number chunks are used to place the numbers on the string lines, and standard Barline chunks are used for barlines.The tablature symbols are stored with time-slice chunks that correspond to those of the music symbols displayed on the standard notated staff above.
Ossias
An ossia is to be stored as one or more additional Staff chunks within a System list, each labelled with an Ossia tag applied to the Staff Header chunk. The presence of the Ossia tag indicates that this is an alternate performance of the symbols in one or more other staves. The part and voice of the ossia staves' symbols must be marked (individually, or by a shorthand method), to indicate which parts and voices it represents an alternative to.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Staff Header | Header Chunk | System Origin | Staff Origin: Top line of staff | Tag.height Tag.width Tag.partID Tag.numStaffLines Tag.silent (for ossias)placement tags |
Name | Type | Description | ||
EMPTY |
Tag.ossia
,
Tag.guitarTabTag
public static final FourByteConstant SystemHeader
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
System Header | Header Chunk | Page Origin | System Origin: Staff origin of first staff | Tag.height Tag.width placement tags |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant TimeSlice
An explicit start time is required because simultaneous events are not always vertically aligned - for example, a chord with seconds. Ambiguity can result for a variety of other reasons as well.
The start time of a note or rest is stored on the event Time-slice chunk associated with (most recently preceding) the note or rest symbol. The start time is represented by a fraction which is the sum of the durations of all events that have occurred within the voice since the previous measure-start time-slice.
Here is an example, showing the start times and durations for 4 quarter notes in the first measure of a score in 4/4 time.
Time-slice, type=event, start-time=0/4
Stem
Notehead, duration=1/4
Time-slice, type=event, start-time=1/4
Stem
Notehead, duration=1/4
Time-slice, type=event, start-time=2/4
Stem
Notehead, duration=1/4
Time-slice, type=event, start-time=3/4
Stem
Notehead, duration=1/4
The start time of a measure is stored on a measure-start Time-slice chunk. It is given as the cumulative duration of all events since the start of the piece. The effective start time of each event in a measure is therefore the sum of the measure start time (from the measure-start Time-slice chunk) and the event start time (from the event Time-slice chunk). In the example above, the start time on the measure-start Time-slices of the first and second measures, respectively, would be 0/4 and 4/4.
The reference back to the start of the piece permits the correspondence between events in different parts to be determined even when the parts are in different meters.
Note concerning pickup bars: NIFF has no standard "correct" way to represent such (incomplete preliminary) bars. In particular, scanning programs may not have the intelligence to distinguish a genuinely incomplete bar from a pickup measure. Therefore the writing program has the choice of representing the pickup either as simply a "normal" incomplete bar, or else of representing it "correctly" (in musical terms) as the final portion of a preceding bar. As long as the barline time slice and the following measure time slice contain the same time, it should make little difference on which beats the two pickups are placed. Implementations should be prepared to deal with either of these possible representations of time in a pickup measure.
An additional reason start time is required is that voices are not always logically complete from start to finish. If a voice were logically complete, the start time of each event within the voice would always be the exact time that the previous event in that voice finished. Logical incompleteness (gaps) can occur, however, for various reasons:
Logical gaps can be filled in with invisible rests and placeholding measure-start time-slices. Or, logical gaps can be handled by adding extra value to the start time of the event following the gap to compensate for the missing time. Either technique ensures that the event following a logical gap in one voice will not occur until its proper time among the events in all other voices and parts.
Advanced feature: using time-slice start time as a placement clue.
There are some cases when the start times on an event time-slice might be used as a clue to the proper positioning of symbols. This is an advanced feature that is not required in either reading or writing programs for successful implementation of NIFF.
There are situations in music where the proportional placement of symbols is meaningful: for example, a crescendo hairpin ending somewhere between the start and end of a whole note. When the spacing of symbols is later adjusted, the hairpin should expand or shrink proportionally to its surroundings.
When the writing program has used either logical or default placement of symbols rather than absolute, the proportion cannot be described in graphical terms. An event time-slice could be used as an anchor for the hairpin end, to precisely indicate the implied temporal relationship between it and the whole note's start and end. The program should calculate for the anchor time-slice's start time a value with the proper proportion to the start and end times of the whole note. The reading program could then use the temporal proportion of the hairpin end relative to the start and end times of the whole note to calculate the symbols' proportional placement.
In mathematical terms:
P0 = position of previous timeslice
T0 = time of previous timeslice
P1 = position of next timeslice
T1 = time of next timeslice
P = position of hairpin end
T = start time on anchor time-slice of hairpin endP = P0 + (T - T0) * (P1 - P0) / (T1 - T0).
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Time-Slice | Header Chunk | Previous measure-start time-slice, or staff origin for first time-slice in a staff. | Bottom staff line at its intersection with the time-slice. | ??? |
Name | Type | Description | ||
time slice type | BYTE |
1 = measure-start 2 = event | ||
start-time | RATIONAL |
depends on time-slice type
type 1: measure start time, relative to start of score |
public static final FourByteConstant Accidental
(Note: for triple sharps or triple flats, or for the combinations natural+sharp and natural+flat, simply use two accidental chunks.)
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Accidental | Symbol Chunk | Notehead | Hot-spot of symbol | Tag.smallSize |
Name | Type | Description | ||
shape | BYTE (1-9) |
1 = double flat 2 = flat 3 = natural 4 = sharp 5 = double sharp 6 = quarter tone flat 7 = three quarter tones flat 8 = quarter tone sharp 9 = three quarter tones sharp |
Parenthesis
public static final FourByteConstant AltEndingGraphic
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Alternate Ending Graphic | Symbol Chunk | TimeSlice | N/A | multi-node symbol tags |
Name | Type | Description | ||
bracket shape | BYTE (0-3) |
0 = no down-jog 1 = down-jog at beginning 2 = down-jog at end 3 = down-jog at beginning and end | ||
text string | STROFFSET | Number to appear at start of bracket. Normally "1." or "2." but any text string is allowed. |
public static final FourByteConstant Arpeggio
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Arpeggio | Symbol Chunk | Notehead | endpoints of the wavy line | ??? |
Name | Type | Description | ||
shape | BYTE (1-2) |
1 = wavy line 2 = vertical slur mark |
public static final FourByteConstant Articulation
For some symbols, such as the strong accent and fermata, the shape depends on the context of the symbol - a strong wedge with the point at the top is used above up-stem notes, while the point is at the bottom when it is below down-stem notes. The non-default version of the symbol can be specified with the Articulation Direction tag.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Articulation | Symbol Chunk | Stem | Center of the Symbol | Tag.articDirection |
Name | Type | Description | ||
shape | SHORT (1-15) |
1 = strong accent (vertical wedge) 2 = medium accent (>) 3 = light accent ( tenuto) 4 = staccato 5 = down bow 6 = up bow 7 = harmonic (small circle) 8 = fermata 9 = arsis sign (unstressed) 10 = thesis sign (stressed) 11= plus sign 12 = vertical filled wedge (staccatissimo) 13 = double tonguing (two dots) 14 = triple tonguing (3 dots) 15 = "snap" pizzicato |
public static final FourByteConstant AugDot
For more than one dot, store additional Augmentation Dot chunks.
When the dot is on a note or rest on a staff line, the vertical component of the Logical Placement tag can be used as follows:
1= above staff lineFor the reference point when the anchor is a rest symbol, see table (Diagram XX from Read pg. 96)
2 = below staff line
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Augmentation Dot | Symbol Chunk | Notehead | Center of the Dot | Tag.logicalPlacement |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant Barline
Any number of these chunks can appear together (normally following a measure-start time-slice), with their order of appearance in the file indicating their graphical placement from left to right. The Barline chunk has only graphical significance. Use the Barline chunk together with the Repeat Sign chunk for repeat barlines. The Repeat Sign chunk would be stored by itself in all but the first staff of the barline's number of staves.
The Barline chunk should be stored only in the topmost staff of each part. It represents a graphic line extending from the current staff to the part's bottom staff. The Width tag can be used with either value of the type field to specify line width. However, for writing programs not concerned with exact measurements, the type field should be used to to distinguish between thick and thin barlines.
The Line Quality tag can be used to indicate a dotted or dashed line.
A barline signals the end of a measure rather than the start of a measure. On the last measure of a system it is necessary to store the Barline chunk before the measure-start time-slice, which belongs in a new Staff list and a new System list. So, for consistency and logical rigor, the Barline graphical symbol chunk is to be stored between the last event in the measure and the measure-start time-slice of the next measure. A special event time-slice chunk should be stored for this purpose, to uniquely identify the sequential position of the barline. Its start time can be the same, in essence, as the start time of the next measure-start time-slice, except given in relation to the start of its measure rather than the start of the score. The only time non-unique time-slices are allowed within a Staff list are when an event time-slice duplicates a measure-start time-slice in this way.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Barline | Symbol Chunk | TimeSlice | H: center of barline, V: staff origin | Tag.lineQuality Tag.thickness Tag.width |
Name | Type | Description | ||
type | BYTE (1-2) |
1 = thin line 2 = thick line | ||
extends to | BYTE (1-3) |
1 = to bottom line of bottom staff indicated by number of staves. 2 = currently unused. (This option is a holdover from a previous version of NIFF, where the barline chunk wording was quite different. The numbering is being retained so as not to conflict with the NIFF SDK or header file.) 3 = only in spaces between staves (not through staves) | ||
number of staves | SHORT |
public static final FourByteConstant Beam
Normally a multi-node symbol. See Discussion Section, Multi-node Symbols for more details.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Beam | Symbol Chunk | Stem | Reference point of anchor | multi-node symbol tags |
Name | Type | Description | ||
beam parts to left | BYTE | |||
beam parts to right | BYTE |
public static final FourByteConstant ChordSymbol
Guitar slashes.
There are two types of guitar slashes. Those with rhythm indicators such as stems, flags and beams are encoded using standard Stem and Notehead chunks, with a special slash notehead shape. For a guitar slash indicating a simple repetition of a chord symbol, the Repeat Sign chunk should be used, most likely with a Chord Symbol chunk.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Chord Symbol | Symbol Chunk | Stem | The (lowest) baseline of the chord symbol text. | Tag.fontID |
Name | Type | Description | ||
text description | STROFFSET | A case-sensitive ASCII text string that represents the chord symbol to be printed. Special characters and their meanings are as follows: | ||
What to type | Description | |||
@ | a flat sign | |||
# | a sharp sign | |||
- | a minor sign | |||
* | a diminished symbol | |||
% | a half-diminished symbol | |||
& | a major 7 triangle | |||
6/9 | the 6/9 chord suffix | |||
/ | A diagonal slash for a hybrid chord, inversion or altered bass | |||
\ | escape character. the next character typed appears "as is" in the chord symbol, instead of being interpreted as a functional operator (for example, type "\&" to place an ampersand in the chord symbol | |||
_ | a horizontal slash for a poly chord | |||
enclose suffixes in parentheses | stacked suffixes within braces | |||
enclose suffixes in square brackets | stacked suffixes within brackets | |||
enclose suffixes in angle brackets | stacked suffixes with no braces or brackets | |||
any other text | any other text |
Part
public static final FourByteConstant Clef
Barlines are stored with a event time-slice chunk indicating the end of the current measure.
Chunks representing changes in clef, key signature and time-signature, when present at a measure boundary, should be stored in the same way, following the Barline chunk. Horizontal placement can be supplied to identify the individual placement of each symbol within this special time-slice, though most reading programs would have spacing algorithms to handle them adequately without it. When changes in clef, key signature or time signature occur in the middle of a measure, they should be stored with the time-slice which represents the following event. The horizontal placement of a symbol chunk in this situation, if specified, should have a negative value.
Chunks representing the clefs, key signatures and time signatures that appear at the start of the staff do not need to be preceded by an event-time-slice. They are stored immediately after the new measure-start time-slice. In the case where the new system starts in the middle of a measure, these chunks should be stored with the time-slice which represents the following event. The horizontal placement of a symbol chunk in this situation, if specified, should have a negative value.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Clef | Symbol Chunk | TimeSlice | H: Left of symbol, but center of symbol when anchor, V: clef hot spot | placement tags, Tag.voiceID |
Name | Type | Description | ||
shape | BYTE (1-6) |
1 = G clef 2 = F clef 3 = C clef 4 = percussion 5 = Double G clef 6 = TAB for guitar tablature | ||
staff step | SIGNEDBYTE |
Staff step of clef sign hot spot.
| ||
octave number | BYTE (1-4) |
Used to modify the shape by attaching a little "8" above or below
the clef symbol. The presence of the 8 above or below transposes
the staff an octave up or down.
0 = no number |
Barline
public static final FourByteConstant CustomGraphicChk
EPS graphics in the Custom Graphics list table are referred to by means of the Custom Graphic Symbol chunk, which represents a symbol with no musical function.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Custom Graphic Symbol | Symbol Chunk | System or Page origin, depending on context | Undefined | Undefined |
Name | Type | Description | ||
value | SHORT | The index into the Custom Graphic list of an EPS Graphic chunk containing a description of the graphic symbol. Used only within a page or system context. This chunk has no musical sound or function. |
Tag.customGraphicTag
,
CustomGraphicsList
public static final FourByteConstant Dynamic
When a change in dynamic is to occur over a range (such as with values 16 - 19), the Dynamic chunk can be a multi-node symbol, indicating the start and end of the range. The Line Quality tag can be included on the start node, normally with a value of dashes.
Note:NIFF represents only the most common subset of music words and symbols with special chunks and tags. Words and symbols not in the NIFF standard - like for example "fffff" - should be represented as generic text or graphics chunks. Note that single words implying simultaneous change in both dynamics and tempo (calando, slentando, incalzando, morendo, smorzando) can be encoded as text with attached midi.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Dynamic | Symbol Chunk | Part or TimeSlice , depending on context | Bottom left of text string | multi-node symbol tags, Tag.lineQuality |
Name | Type | Description | ||
code | SHORT (1-19) |
1 = pppp 2 = ppp 3 = pp 4 = p 5 = mp 6 = mf 7 = f 8 = ff 9 = fff 10 = ffff 11 = sp 12 = sf 13 = sfz 14 = fz 15 = fp 16 = cresc. 17 = crescendo 18 = dim. 19 = diminuendo |
public static final FourByteConstant FiguredBass
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Figured Bass | Symbol Chunk | Stem | bottom left of first symbol | ??? |
Name | Type | Description | ||
text description | STROFFSET | Each chunk is composed of an ASCII character string with the following interpretation: | ||
What to type | Description | |||
0-9 | The numerals themselves | |||
@ | a flat sign | |||
# | a sharp sign | |||
- | a natural sign | |||
\ | the previous numeral is altered with a slash (for chromatic alteration) | |||
/ | the following characters appear at the next stacking level below |
public static final FourByteConstant Fingering
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Fingering | Symbol Chunk | Notehead | Bottom left of text character | ??? |
Name | Type | Description | ||
shape | BYTE (0-5) |
0 = finger 0 1 = finger 1 2 = finger 2 3 = finger 3 4 = finger 4 5 = finger 5 |
public static final FourByteConstant Glissando
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Glissando | Symbol Chunk | Notehead | Endpoint of line | Tag.lineQuality Tag.thickness |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant GuitarGrid
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Guitar Grid | Symbol Chunk | TimeSlice | Bottom left of the grid symbol | ??? |
Name | Type | Description | ||
number of frets | BYTE | The number of frets of the guitar fingerboard represented by the grid. | ||
number of strings | BYTE | 6, for guitar. Could be another value, such as 4, for ukele. The length of the text description is the same as the number of strings (i.e., for guitar, the text description is 6 digits, ABCDEF). | ||
text description | STROFFSET | A number represented as an ASCII character string ABCD..., where A refers to the lowest string, B the next, and so on. The numbers in the text description indicate on which fret the dot is to be placed. The number 9 will create an open circle above the grid indicating a higher fret. The number 0 represents an open string. |
public static final FourByteConstant GuitarTabNum
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Guitar TAB Number | Symbol Chunk | Notehead | Center of bounding box of the number | Tag.voiceID TD> |
Name | Type | Description | ||
number | BYTE | The ASCII representation for the number, normally 0-6. | ||
staff step | SIGNEDBYTE | Indicates the string line on which the number is to be placed, specified in staff steps. For traditional guitar tablature notation, even numbers should always be used. |
StaffHeader
public static final FourByteConstant Hairpin
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Hairpin | Symbol Chunk | TimeSlice | ??? | Tag.thickness Tag.height |
Name | Type | Description | ||
direction | BYTE (0-2) |
1 = open to left 2 = open to right Normally a hairpin would be a multi-node symbol. The direction field should have a value of 0 for all nodes but the first. The Height tag can be used to specify the vertical distance between the end points on the open node. |
public static final FourByteConstant HarpPedal
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Harp Pedal Symbol | Symbol Chunk | TimeSlice | H: left side, V: center | Tag.thickness Tag.height |
Name | Type | Description | ||
pedal positions | STROFFSET | A 7 digit ASCII character string ABCDEFG representing a Salzedo diagram, where each letter represents one of the seven harp pedals, A, B, and C on the left, and D, E, F and G on the right. Each digit can have a valueof 1, 2, or 3, depending on whether the pedal is in the bottom (sharp) position, the middle (natural) position, or the top (flat) position. |
public static final FourByteConstant KeySignature
Explicit cancellation of the previous key signature is indicated with a Key Signature chunk containing a negative value, preceding the new Key Signature chunk. The key signature affects the pitch of the notes for MIDI playback.
Barlines are stored with a event time-slice chunk indicating the end of the current measure.
Chunks representing changes in clef, key signature and time-signature, when present at a measure boundary, should be stored in the same way, following the Barline chunk. Horizontal placement can be supplied to identify the individual placement of each symbol within this special time-slice, though most reading programs would have spacing algorithms to handle them adequately without it. When changes in clef, key signature or time signature occur in the middle of a measure, they should be stored with the time-slice which represents the following event. The horizontal placement of a symbol chunk in this situation, if specified, should have a negative value.
Chunks representing the clefs, key signatures and time signatures that appear at the start of the staff do not need to be preceded by an event-time-slice. They are stored immediately after the new measure-start time-slice. In the case where the new system starts in the middle of a measure, these chunks should be stored with the time-slice which represents the following event. The horizontal placement of a symbol chunk in this situation, if specified, should have a negative value.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Key Signature | Symbol Chunk | TimeSlice | H: left of leftmost symbol, V: staff origin | ??? |
Name | Type | Description | ||
standard code | SIGNEDBYTE (-14-14) |
0 = no sharps or flats 1-7 = 1-7 sharps 8-14 = 1-7 flats -1 - -7 = 1-7 naturals in the sharp positions -8 - -14 = 1-7 naturals in the flat positions |
Barline
public static final FourByteConstant KeySignNonstandard
This chunk is followed by a series of graphical chunks such as NIFF Font Symbol chunks, Custom Graphic Symbol chunks, or Text chunks, each one representing a character to be printed. The number of chunks following this one is given in the number of chunks field. The referenced chunks are to be considered only in the context of the key signature, and are otherwise devoid of function. Each referenced chunk contains its own placement information. If placement information is absent, the symbols are to be placed from left to right. The Width tag indicates the width of the entire key signature, from the left of the leftmost symbol to the right of the rightmost one.
Example: To place a sharp sign on the top line, store this chunk with a number of chunks of 1. Following it, store an Accidental chunk with a shape of sharp sign and a Staff Step tag of 8.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Key Signature - Nonstandard | Symbol Chunk | TimeSlice | H: left of leftmost symbol's bounding box, V: staff origin | ??? |
Name | Type | Description | ||
number of chunks | BYTE |
public static final FourByteConstant Line
Glissando
or Portamento
chunks.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Line | Symbol Chunk | TimeSlice | Endpoint of line at each node | Tag.anchorOverride Tag.lineQuality Tag.thickness multi-node symbol tags |
Name | Type | Description | ||
shape | BYTE (0-3) |
Used on each node, to describe the characteristics of the line at
that node.
0 = no unusual feature |
public static final FourByteConstant Lyric
When a lyric is to be left justified rather than centered, the Reference Point Override tag can be used.
An Anchor Override to Stem can be used to relate a lyric to a chord.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Lyric | Symbol Chunk | Notehead | Center of text string | Tag.anchorOverride Tag.refPtOverride Tag.fontID Tag.lineQuality |
Name | Type | Description | ||
text | STROFFSET | A text string representing a word or syllable. For a lyric which extends beyond one time-slice, a multi-node lyric should be constructed. On each node but the first, the text pointer should be given the value -1. The Line Quality tag should be used on the first node, to indicate the graphical technique used to extend the word. If the word is split into two syllables, each in a separate time-slice, the text of the first syllable can be followed by a backslash "\" and then a hyphen. This indicates that a hyphen is to be horizontally centered between the two syllables. | ||
lyric verse ID | BYTE | Associates this Lyric chunk with a particular Lyric Verse Offset tag on the Setup Section Part Description. If there is more than one Lyric within a Time-Slice, the Lyric Verse ID must be different on each. |
public static final FourByteConstant MeasureNumbering
The numbering of alternate endings is left to the default of the reading program, unless explicitly indicated by the writing program with Measure Numbering chunks.
Only logical placement options can be specified for this chunk. If precise placement of numbers is desired, use the Rehearsal Mark chunk instead.
The Measure Numbering chunk is used to assign a measure numbering scheme. It allows for choice of the numbering frequency, starting number, and logical placement of the measure numbers. The measure numbering scheme can be changed at the start of any measure in the score, by storing this chunk after the appropriate measure-start Time-Slice chunk in the first Staff list of a System list.
For precise placement of individual numbers, or to use letters instead of numbers, use the Rehearsal Mark chunk instead.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Measure Numbering | Symbol Chunk | Notehead | Center of text string | Tag.anchorOverride Tag.refPtOverride Tag.fontID Tag.lineQuality |
Name | Type | Description | ||
number which measures | BYTE (0-3) |
0 = no measure numbering 1 = use number frequency field 2 = number start of each system 3 = number start of each page | ||
number frequency | BYTE (1+) | How frequently measure numbers are to appear. 1 means every measure, 2 means every other measure, etc. | ||
starting number | SHORT | The number to be used for the measure starting with the current measure-start Time-Slice. | ||
font ID | FONTIDX | The font, size and style to be used for measure numbers. | ||
above or below | BYTE (0-1) |
0 = above top staff of system 1 = below bottom staff of system | ||
horizontal centering | BYTE (0-3) |
0 = centered at barline 1 = to left of barline 2 = to right of barline 3 = to left of start of system (number which measures = 2 or 3 only) | ||
enclosure | BYTE (0-2) |
0 = none 1 = box 2 = circle |
RehearsalMark
public static final FourByteConstant MidiDataStream
This chunk is used to record a free-form stream of MIDI events. When its sound is associated with more than one notational symbol, it is a multi-node symbol, with each node anchored to a symbol chunk. In this case, its first node contains the full MIDI data stream in the value field, and all other nodes contain a null value field. Otherwise it contains only one node. It replaces any explicit or implied MIDI Performance of the chunks to which it is anchored. If anchored to a Time-Slice, it is independent of any notational element.
A complete MIDI file can be integrated into a NIFF file.
In the Setup Section, each part can globally be assigned a MIDI channel number and cable number in the Part Description chunk. The part can be given a new set of channel and cable numbers at any point during the score by applying the Part Description Override tag. This might be used to switch to a new instrument sound, such as in a part for oboe and English horn.
In the Data Section, the MIDI Data Stream chunk and MIDI Performance tag are used. There are four possible relationships between the notation symbols and MIDI data:
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
MIDI Data Stream | Symbol Chunk | Preceeding Chunk | N/A | multi-node symbol tags |
Name | Type | Description | ||
start time | BYTE | Start time of the stream, given in MIDI ticks, as an offset from the logical start time of its anchor. | ||
value | BYTE[] | The MIDI SMF data stream. Its length is equal to the chunk size minus 1. |
Tag.midiPerformance
public static final FourByteConstant FontSymbol
For notes and stems, use the normal syntax of a stem followed by one or more notes, with the Height tag optionally added to the stem to indicate its precise length. The same tags can be added to the NIFF Font Symbol chunk as to the ordinary music symbol chunks, such as Number of Flags, and Small Size.
The NIFF Font Symbol chunk is a font-independent method of indicating the appearance of a music symbol without its musical function.
An alternative to the Custom Graphic Symbol chunk, it can be used to indicate that an ornament or clef sign, for example, is to appear in a particular place on a page such as a footnote, without specifying any particular font.
The generic "NIFF Font" is composed of the four character code for the music symbol chunk normally used to display the symbol, and the shape, if any, for the desired symbol in that chunk's definition.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
NIFF Font Symbol | Symbol Chunk | System or Page origin | Middle of symbol's bounding box | ??? |
Name | Type | Description | ||
chunk type | FOURCC | The four character chunk type of the music symbol, such as STEM, NOTE, ORNM, or ARTC. | ||
space height | SHORT | The size of the character, given as the height in absolute units of a space on a staff on which the character would appear of normal size. | ||
shape | BYTE | The value of the shape field in the chunk of type chunk type. For example, for a filled notehead, the value of shape would be 4. If there is no shape field on the referenced music symbol, leave shape 0 on this chunk. |
public static final FourByteConstant Notehead
The Notehead and Stem chunks and associated chunks and tags contain graphical features such as notehead shape, number of dots and number of flags that in printed music describe a note's duration. However, the reading program need not concern itself with the timing implications of these details. The duration field stored on the Notehead chunk should be used for the timing value, regardless of the graphical features. For example, a note with duration of 3/16 could appear visually as a dotted eighth note with either a flag or a beam. In practice, any combination of a note's graphical features, or even an invisible note on a zero length stem, could be used to represent any time value.
The performance playback values may be affected by other chunks and tags associated with the Notehead or Stem chunks, however. For example, an Accidental chunk will affect the pitch, an Articulation chunk or Silent tag might affect the performance duration, and a Grace Note tag would likely affect the start time.
An event's start time and duration are always present (each composed of a numerator and denominator component); the performance start time and duration are optional values that can be supplied on the MIDI Performance tag. If not present, it is assumed that the performance values are equivalent to the logical values.
Guitar slashes.
There are two types of guitar slashes. Those with rhythm indicators such as stems, flags and beams are encoded using standard Stem and Notehead chunks, with a special slash notehead shape. For a guitar slash indicating a simple repetition of a chord symbol, the Repeat Sign chunk should be used, most likely with a Chord Symbol chunk.
Reference points on Noteheads and Stems.
As stated earlier, the Notehead and Stem chunks both use the Time-slice as their anchor in terms of symbol placement. This means that the offsets of the Notehead and Stem chunks are both given in relation to the time-slice.
The default reference point of a Notehead is its center. A horizontal offset of zero on a note chunk thus means it is horizontally centered over the time-slice. This would also be the default position, on an individual note or on a chord without seconds. When a chord contains a second, the notes on the "correct" side of the stem are by default to be centered over the time-slice. This allows for the correct alignment of simultaneous up-stem and down-stem chords which both contain seconds.
When both a normal size notehead and a small size notehead are both present on the same stem, it is the normal size notehead that is centered over the time-slice.
Diagram D
The time-slice is centered under the two notes to the left of the up-stem, and the two notes to the right of the down-stem.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Notehead | Symbol Chunk | TimeSlice | Middle of symbol's bounding box | Tag.partID Tag.voiceID Tag.midiPerformance Tag.smallSize Tag.largeSize Tag.splitStem Tag.graceNote Tag.silent Tag.invisible placement tags |
Name | Type | Description | ||
shape | BYTE (1-14) | 1 = breve (double whole) 2 = whole 3 = half (open) 4 = filled (solid) 5 = open diamond 6 = solid diamond 7 = x notehead 8 = open x notehead 9 = filled guitar slash 10 = open guitar slash 11 = filled square 12 = open square 13 = filled triangle 14 = open triangle | ||
staff step | SIGNEDBYTE | |||
duration | RATIONAL |
public static final FourByteConstant OctaveSign
Normally a multi-node symbol indicating that all symbols in the Staff list between the first and last nodes are to be performed one or two octaves higher or lower than as written, or, in the case of coll' ottava, are to be doubled at the octave above or below. Only a starting and ending node are required, unless the octave marking extends beyond a system boundary (see multi-node symbols). One or more Voice ID or Part ID tags can be appended to the first node, indicating that only the specified voices or parts are affected. The function is active until its final node is encountered in the file. On all nodes but the first, the meaning of the fields can be ignored, and should be stored as null. Placement tags are used to indicate where the symbol appears in relation to the staff. The Line Quality tag should be used if anything besides a dashed line is desired.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Octave Sign | Symbol Chunk | Multi-node symbol | Middle of symbol's bounding box | Tag.lineQuality |
Name | Type | Description | ||
number of octaves | BYTE | Normally 1 or 2. | ||
above or below | BYTE (1-2) |
To be performed above or below the notated symbols.
1 = above | ||
type | BYTE |
1 = notated symbols to be transposed one or more octaves 2 = notated symbols to be doubled (coll' ottava) | ||
text string | STROFFSET | The text string appearing at its start, such as "8va" or 8 or "8a alta" |
public static final FourByteConstant Ornament
Accidental chunks may be anchored to an ornament, with placement tags indicating above or below, usually with a Small Size tag. The long trill symbols (shapes 10, 11, 12) are multi-node, anchored to the start and end anchors of the trill.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Ornament | Symbol Chunk | Stem or Multi-node symbol | Middle of symbol's bounding box | ??? |
Name | Type | Description | ||
shape | SHORT (1-12) |
1 = mordent 2 = inverted mordent 3 = double "long" mordent 4 = inverted double "long" mordent 5 = turn 6 = inverted turn 7 = trill (spelled "tr") 8 = trill (short symbol - 2 bumps) 9 = trill (short symbol - 3 bumps) 10 = trill (long wavy line) 11 = long trill with up-hook at start 12 = long trill with down-hook at start |
public static final FourByteConstant Parenthesis
The default size of the symbol(s) is the reading program's default for the given context. By default symbols 1, 3 and 5 should be placed to the left of the anchor, and symbols 2, 4, and 6 to the right of the anchor.
A Parenthesis can be a multi-node symbol, for instance when parentheses surround a series of staccatos over a series of notes. This would allow the sequence of staccatos to be understood as logically grouped by the parentheses.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Parenthesis | Symbol Chunk | Preceding Symbol Chunk or Multi-node symbol | Bottom left of text character | Multi-node symbol tags |
Name | Type | Description | ||
shape | BYTE |
1 = left parenthesis '(' 2 = right parenthesis ')' 3 = left curly brace '{' 4 = right curly brace '}' 5 = left bracket '[' 6 = right bracket ']' 7 = left and right parentheses surround anchor 8 = left and right braces surround anchor 9 = left and right bracket surround anchor |
public static final FourByteConstant PedalPiano
Normally a multi-node symbol with two nodes, the starting node indicating where to depress the pedal, and the ending node indicating where to release it. Each node should use the appropriate shape byte. For half-pedal markings, a node should be stored at each time-slice where the line has a notch.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Pedal (Piano) | Symbol Chunk | Multi-node symbol | Undefined | Multi-node symbol tags |
Name | Type | Description | ||
shape | BYTE (0-11) |
0 = no graphic (for last node, when no graphical symbol appears there) 1 = "Ped." (graphic) 2 = Asterisk (*) indicating end of damper pedal 3 = alternate end of damper pedal symbol (circle with cross-hairs) 4 = horizontal line with up-jog at this node 5 = horizontal line with down-jog at this node 6 = upslanted line with up-jog at this node 7 = upslanted line with down-jog at this node 8 = notch in line at this node 9 = "una corda" text 10 = "tre corde" text 11 = "S.P. " text (sostenuto pedal) |
public static final FourByteConstant PedalOrgan
This chunk is interspersed with the music symbols on the organ pedal staff. The Logical Placement tag is used to place these symbols above or below the staff, to indicate right foot or left foot. The line or slur sometimes connecting two organ pedal symbols is represented by multi-node Line or Slur chunks anchored to the organ Pedal chunks.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Pedal (Organ) | Symbol Chunk | Stem | Center | Tag.logicalPlacement |
Name | Type | Description | ||
shape | BYTE (1-4) | 1 = heel (u shape) 2 = heel (o shape) 3 = toe ( up-pointed wedge) 4 = toe (down-pointed wedge) |
public static final FourByteConstant Portamento
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Portamento | Symbol Chunk | Notehead (Multi-node) | Endpoint of line | Tag.lineQuality Tag.thickness |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant RehearsalMark
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Rehearsal Mark | Symbol Chunk | TimeSlice | Top-left of bounding box | Tag.fontID placement tags |
Name | Type | Description | ||
text string | STROFFSET | The letter(s) or number(s). | ||
enclosure | BYTE (0-2) | 0 = none 1 = box 2 = circle |
public static final FourByteConstant RepeatSign
A text chunk should be anchored to this chunk if a number over a slash repeat sign is to appear here.
For "bis" surrounded by brackets, logical codes 1 and 2 should be used at the start and end of the section, respectively, with graphical code zero. The graphical elements (brackets and the word "bis") should be constructed with Line and Text chunks.
A repeated section of a score appears in the NIFF file only once. A Repeat Sign symbol contains information about both the graphical repeat sign and its function. It follows a Time-slice chunk (either measure-start or event type) at either the beginning or the end of the section to be repeated. The Repeat Sign chunk can be used for many kinds of repetition. It can indicate the appearance of symbols, printed words, or abbreviations, and the repetition of a beat, measure or whole section.
Alternate endings introduce an apparent timing inconsistency: the start times in the measures of later endings duplicate the start times of measures in the first ending. To allow the reading program to make sense of this inconsistency, each measure-start Time-slice chunk of each ending is to have an Alternate Ending tag attached. When calculating the start time of the time-slice following a series of alternate endings, only the longest of the alternate endings should be considered.
There would normally also be an Alternate Ending Graphic chunk which indicates the appearance of the alternate ending, at least on the topmost staff. But it is the Alternate Ending tag which definitively resolves the timing conflict.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Rehearsal Mark | Symbol Chunk | TimeSlice | Top-center of symbol | ??? |
Name | Type | Description | ||
graphical code | SHORT (0-18) |
0 = no graphical symbol - this is only a logical chunk 1 = Segno symbol :S: 2 = Coda symbol (circle with crosshairs) 3 = one slash (such as with logical code 3 or 7) 4 = 2 slashes (such as with logical code 3) 5 = 3 slashes (such as with logical code 3) 6 = 2 slashes with dot on either side (such as with logical code 3) 7 = 1 slash with dot on either side (such as with logical code 4) 8 = 1 slash with dot on either side, and barline through it (such as with logical code 5) 9 = 2 slashes with dot on either side, and barline through it (such as with logical code 5) 10 = Repeat dots - use Barline chunk(s) with this 11 = "D.C." 12 = "D.C. al Fine" 13 = "D.C. al Segno" 14 = "D.C. al Segno e poi la Coda" 15 = "D.S." 16 = "D.S. al Fine" 17 = "Fine" 18 = "Coda" | ||
logical code | BYTE (0-7) |
0 = no repeat function - this is only a graphical chunk 1 = beginning of section to be repeated 2 = end of section to be repeated 3 = repeat the previous beat 4 = repeat the previous measure 5 = repeat the previous two measures 6 = function as described by words (graphical codes 11 - 18) 7 = repeat chord indicated by associated Chord Symbol for one beat |
Tag.altEnding
,
AltEndingGraphic
public static final FourByteConstant Rest
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Rest | Symbol Chunk | TimeSlice | Hot-spot of rest | ??? |
Name | Type | Description | ||
shape | BYTE (1-15) |
1 = breve (double whole) 2 = whole 3 = half 4 = quarter 5 = eighth 6 = sixteenth 7 = 32nd 8 = 64th 9 = 128th 10 = 256th 11 = multiple rest symbol - 4 measures 12 = multiple-measure rest - thick horizontal bar (normally used with dependent text chunk containing a number, and possibly with Width and Thickness tags) 13 = multiple-measure rest - thick slanted bar (same options as shape 12) 14 = vocal breath mark (comma) 15 = vocal breath mark (2 small slashes) | ||
staff step | SIGNEDBYTE | |||
duration | RATIONAL |
public static final FourByteConstant Slur
A simple slur is a multi-node symbol with start and end nodes. The Tie Direction tag can be used on the first node of the slur to indicate whether the slur is bowed up or down. The standard placement tags when used on each slur node, indicate the placement of the slur endpoint relative to its anchor. Bezier Incoming and Bezier Outgoing tags can be used to specify Bezier control points for each node. A complex slur can be built by storing any number of slur nodes, each with its own Bezier Incoming and Outgoing control points.
Note: If a dependent symbol is centered relative to a 2 node slur, the slur's horizontal reference is the center, and the vertical reference is the lowest or highest point of the arc, for slurs bowed downward or upward, respectively. Centering of dependent symbol is undefined for cross-system slurs (which have more than two nodes).
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Slur | Symbol Chunk | Stem | The slur's end point. (See Notes above.) | Tag.tieDirection Tag.bezierIncoming Tag.bezierOutgoing multi-node symbol tags |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant Stem
Multi-staff chords.
When a stem contains notes on more than one staff, the stem is represented by a multi-node symbol. Each staff on which a portion of the stem appears has its own Stem node chunk. The first node contains the tags which affect all the nodes, such as Number of Flags.
Because the ID tag is unique within the chunk type for the entire score, the ID tag is sufficient to identify the related stem nodes in the different staves.
Here is an example:
Diagram CExample:
(Staff 1) Time-slice. type=event, start-time=0/8 Rest, duration=1/8 Time-slice. type=event, start-time=1/8 Rest, duration=1/8 Time-slice. type=event, start-time=2/8 Stem, ID=1, Number of nodes=2 Notehead, staff step=2, duration=1/4 Notehead, staff step=-1, duration=1/4
(staff 2) Time-slice. type=event, start-time=0/8 Stem Notehead, staff step=6, duration=1/8 Time-slice. type=event, start-time=1/8 Stem Notehead, staff step=6, duration=1/8 Time-slice. type=event, start-time=2/8 Stem, ID=1 Notehead, staff step=7, duration=1/4
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Stem | Symbol Chunk | TimeSlice | End point of stem (where the flag or beam would be attached). | Tag.partID Tag.voiceID Tag.height Tag.smallSize Tag.largeSize Tag.graceNote Tag.silent placement tags multi-node symbol tags |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant SystemSeparation
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
System Separation Mark | Symbol Chunk | System origin | Center of symbol's bounding box | ??? |
Name | Type | Description | ||
where | BYTE (1-2) |
1 = placed at left margin 2 = placed at right margin Corrected from NIFF 6a where this field was called margin. |
public static final FourByteConstant TagActivate
When one or more tags is to be applied to a sequence of symbols in a Staff list, the Tag Activate chunk can be used to identify the start of the sequence, and the Tag Inactivate chunk to identify the end of the sequence. Each tag is activated independently of the others, but they can be grouped together on the Tag Activate/Inactivate chunks. For example, the Tag Activate may include the Font ID, Small Size and Grace Note tags, while one Tag Inactivate chunk ends the Grace Note tag long before the other two tags are ended with another Tag Inactivate chunk.
A tag on a Tag Activate chunk remains in effect until a Tag Inactivate chunk appears with the same tag, or the end of the current Staff list is found, whichever occurs first. Tag Activate chunks can also be nested.
The Tag Activate chunk is useful for saving space, but another purpose is to allow for additive applications of a particular tag - such as when a very small grace note is present within a cadenza-like passage of small notes. This example is shown below:
Time-Slice, type=event
Stem
Notehead (a)
Tag Activate, Small Size
Time-Slice, type=event
Stem
Notehead
Time-Slice, type=event
Stem, Grace Note, Small Size
Notehead (b)
Stem
Notehead (c)
Time-Slice, type=event
Stem
Notehead
Tag Inactivate, Small Size
Time-Slice, type=event
Stem
Notehead (d)
Notehead (a) before the Tag Activate chunk and Notehead (d) after the Tag Inactivate chunk are normal sized. Notehead (c) is a small note, affected by the Small Size tag on the Tag Activate chunk. Notehead (b) is a very small note, affected cumulatively by the Small Size tag on its Stem and by the Small Size tag on the Tag Activate chunk.
Tag Activate restricted by Part ID, Voice ID
Part ID and Voice ID have a special meaning on the Tag Activate chunk. When Part ID and/or Voice ID appear on the Tag Activate chunk, their purpose is to restrict the action of the Tag Activate to the subset of the intervening chunks which have matching Part ID and/or Voice ID's. If any intervening chunks have a different Part ID or Voice ID from that specified on the Tag Activate chunk, those chunks are not affected by the Tag Activate.
The following example shows use of the Voice ID to restrict the mode to one voice only:
Tag Activate, Voice ID=2, Small Size
Time-slice
Stem, Voice ID = 1
Notehead (a)
Stem, Voice ID = 2
Notehead (b)
Tag Inactivate, Voice ID=2, Small Size
Only Notehead (b) is affected by the Small Size tag on the Tag Activate chunk.
N.B. For some chunks within the Tag Activate scope, the tags would be meaningless and should be ignored by the reading program. An example is the Small Size tag as applied to a Time-Slice chunk.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Tag Activate | Symbol Chunk | N/A | N/A | ??? |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant TagInactivate
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Tag Inactivate | Symbol Chunk | N/A | N/A | ??? |
Name | Type | Description | ||
EMPTY |
TagActivate
public static final FourByteConstant TempoMarking
Example: [dotted quarter] = 72
text string: -1
note value: 3/8
beats per minute: 72
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Tempo Marking | Symbol Chunk | TimeSlice | Bottom left of bounding box | Tag.fontID |
Name | Type | Description | ||
text string | STROFFSET | Used for text instructions such as "Allegretto". If ia special font or italics are required, append the Font ID tag. | ||
note value | RATIONAL | The note value representing one beat. See discussion of Timing Representation for values. If only text is desired, leave this 0/0. | ||
beats per minute | SHORT | The metronome setting, where one beat is equal to a note with duration of note value. If only text is desired, leave this 0. |
public static final FourByteConstant TempoMarkNonstandard
Example: Allegro moderato (M.M. [dotted eighth note] = 72)
Tempo Marking Nonstandard, number of chunks = 5
Text, string="Allegro moderato (M.M."
NIFF Font [Stem]
NIFF Font [Notehead, shape=4], number of flags=1
NIFF Font [Augmentation Dot]
Text, string = "= 72)"
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Tempo Marking - Nonstandard | Symbol Chunk | TimeSlice | Bottom left of bounding box | Tag.width placement tags |
Name | Type | Description | ||
number of chunks | BYTE |
public static final FourByteConstant Text
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Text | Symbol Chunk | TimeSlice | Bottom left of bounding box | Tag.fontID placement tags |
Name | Type | Description | ||
value | STROFFSET |
public static final FourByteConstant Tie
Note: If a dependent symbol is horizontally centered relative to a tie, the tie's horizontal reference is the center, and the vertical reference is the lowest or highest point of the arc, for slurs bowed downward or upward, respectively.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Tie | Symbol Chunk | Notehead | The tie's end point. (See Notes above.) | Tag.tieDirection Tag.bezierIncoming Tag.bezierOutgoing multi-node symbol tags |
Name | Type | Description | ||
EMPTY |
public static final FourByteConstant TimeSignature
"common time" symbol: top number = -1, bottom number = -1
"cut time" symbol: top number = -2, bottom number = -1
For a single number time-signature, use the top number, and set the bottom number to -1. To place an ordinary time-signature above the staff, use the Logical Placement tag, vertical component = above. To place it between the staves, use the Logical Placement tag, vertical component = below, and omit the Time Signature chunk in the lower staff.
NIFF does not require logical adherence to time signatures.
Barlines are stored with a event time-slice chunk indicating the end of the current measure.
Chunks representing changes in clef, key signature and time-signature, when present at a measure boundary, should be stored in the same way, following the Barline chunk. Horizontal placement can be supplied to identify the individual placement of each symbol within this special time-slice, though most reading programs would have spacing algorithms to handle them adequately without it. When changes in clef, key signature or time signature occur in the middle of a measure, they should be stored with the time-slice which represents the following event. The horizontal placement of a symbol chunk in this situation, if specified, should have a negative value.
Chunks representing the clefs, key signatures and time signatures that appear at the start of the staff do not need to be preceded by an event-time-slice. They are stored immediately after the new measure-start time-slice. In the case where the new system starts in the middle of a measure, these chunks should be stored with the time-slice which represents the following event. The horizontal placement of a symbol chunk in this situation, if specified, should have a negative value.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Time Signature | Symbol Chunk | TimeSlice | H: center of bounding box, V: staff origin | Tag.smallSize Tag.largeSize placement tags |
Name | Type | Description | ||
top number | SIGNEDBYTE | |||
bottom number | SIGNEDBYTE |
Barline
public static final FourByteConstant TimeSigNonstandard
A special case of the Time-Signature - Nonstandard chunk is when it has a single text chunk starting with the backslash character "\". In this case, the ASCII string following the backslash is a string of numbers and '+', '/' and ' ', interpreted as follows:
- '+'
- represents the literal plus sign
- '/'
- means place the previous number(s) above the following number(s)
- ' '
- means leave space between the previous and following number(s).
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Time Signature - Nonstandard | Symbol Chunk | TimeSlice | H: Left or leftmost symbol's bounding box, V: staff origin | ??? |
Name | Type | Description | ||
number of chunks | BYTE |
public static final FourByteConstant Tremolo
Normally multi-node with two nodes. For a single stem tremolo with slashes through the stem, there will be a single node, with attached beam parts containing the number of slashes, and unattached beam parts zero. For whole note tremolos, set attached beam parts to zero, and use unattached beam parts. The presence of a Tremolo chunk affects the playback of the related Notehead chunk. The duration on each Notehead should be assigned such that the total duration of all Noteheads belonging to the tremolo equals the total duration of the notes on playback.
See Tag.slashedStem
Tag for other types of slashes.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Tremolo | Symbol Chunk | Stem or multi-node | Reference point of anchor | multi-node symbol tags |
Name | Type | Description | ||
attached beam parts | BYTE | The number of beams attached to the stem (primary beams). | ||
unattached beam parts | BYTE | The number of beams not attached to the stem (secondary beams). |
public static final FourByteConstant Tuplet
A tuplet is normally a multi-node symbol, represented by a series of Tuplet node chunks, each one associated with one Stem chunk. All notes on a tupletized stem must contain the same duration.
Nested tuplets are represented by an additional tuplet associated with a subset of notes already included in a tuplet. The transformation ratios are applied cumulatively to each affected note.
More than one voice or part can be included in a tuplet. For example, when all horns shown on the same staff are playing in rhythmic unison, a whole collection of chords may be tupletized. However, within each voice (or part, if there is one voice per part), the sum of the durations of the notes must equal a b-type notes.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
Tremolo | Symbol Chunk | Stem or multi-node | Undefined | Tag.tupletDesc multi-node symbol tags |
Name | Type | Description | ||
EMPTY |
Tag.tupletDesc
public static final FourByteConstant UserDefined
NIFF users such as commercial software vendors and academic researchers can define their own NIFF chunks, to provide for features of their software that are not present in the NIFF specification. NIFF users who want to define their own chunks must formally register a unique two byte NIFF User ID, using a protocol yet to be developed.
User-defined chunks are identified by the four character code "user". The two byte NIFF User ID is stored in the first two bytes of the chunkData field. The user defines the structure and value of the remainder of the data portion of the chunk tag. The presence of the size field allows reading programs to ignore unrecognized user-defined chunks.
The Chunk Length Table in the Setup Section must include an entry for each user-defined chunk type as well as for each standard NIFF chunk type used in the file.
NIFF users should clearly document the structure and function of each user-defined chunk. The details of administering a documentation library have yet to be determined.
Name | Type | Default Anchor | Reference | Tags |
---|---|---|---|---|
User Defined | NIFF Chunk | Varies | Undefined | Not allowed. |
Name | Type | Description | ||
NIFF User ID | SHORT | Assigned by the NIFF authority. |
private static java.util.Map defaultTable
private static java.util.List defaultOrder
public static final java.lang.Integer noDefinedChunkLength
private java.util.Map table
private java.util.List order
Constructor Detail |
public ChunkLengthTable()
Method Detail |
static void()
public void put(FourByteConstant fcc, int length)
public void put(FourByteConstant fcc, java.lang.Integer length)
public void put(FourByteConstant fcc)
public java.lang.Integer getNumber(FourByteConstant fcc)
public int get(FourByteConstant fcc)
public java.util.Iterator iterator()
public int size()
public java.lang.String verifyDefaults()
public static ChunkLengthTable makeDefaultEntries()
|
DixShtix | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |