Platform SDK: DirectX

Chord-map Form

The following notation shows the organization of the top-level chunk, or form, of a chord-map file:

RIFF( 'DMPR'
    <perh-ck>       // Chord-map header chunk
    [ <guid-ck> ]   // GUID chunk
    [ <vers-ck> ]   // Version chunk
    [ <UNFO-list> ] // UNFO list
    <chdt-ck>       // Chord data chunk
    <chpl-list>     // Chord palette
    <cmap-list>     // Chord graph
    <spsq-list>     // Signpost list
)

Each of the items—with the exception of the GUID chunk, version chunk, and UNFO list—is required. See Common Chunks

The required chunks and their subchunks are as follows:

<perh-ck> -> perh( <DMUS_IO_CHORDMAP> )

This is the basic header information for a chord map.

<chdt-ck> -> chdt(
    <WORD>    // Size of DMUS_IO_CHORDMAP_SUBCHORD
    <DMUS_IO_CHORDMAP_SUBCHORD>... 
    )

The <chdt-ck> chunk contains a WORD, indicating the number of bytes per subchord followed by an array of unique subchords. The subchord identifiers referred to in other parts of this file all correspond directly to an index into this array.

<chpl-list> -> LIST( 'chpl' 
    <chrd-list>... 
    )

This list contains the chord palette. Currently there must be exactly 24 items in this list.

<chrd-list> -> LIST( 'chrd'
    <UNAM-ck>    // Chord name  
    <sbcn-ck>    // Subchord indexes
    )

This list contains the basic chord information. This information is the chord's name and a list of identifiers for its subchords.

<UNAM-ck> -> UNAM ( <WCHAR>... )

The UNAM chunk stores the name of the chord.

<sbcn-ck> -> sbcn( <WORD>... )

The "sbcn" chunk contains one or more subchord identifiers. These correspond directly to an index into the array found in <chdt-ck>. Currently a maximum of four chords is supported.

<cmap-list>  ->  LIST( 'cmap' 
    <choe-list>... 
    )

The "cmap" list contains the entire chord connection graph for the chord map. The bulk of the data for the chord map resides in this chunk.

<choe-list> -> LIST( 'choe'
    <cheh-ck>      // Chord entry data
    <chrd-list>    // Chord data; see above.
    <ncsq-ck>      // Next chord list
    )

The "choe" list contains data for a single entry in the chord graph, along with pointers to all the chords that can occur next in the chord graph.

<cheh-ck> -> cheh( <DMUS_IO_CHORDENTRY> )

This is the chord entry header. The identifier in the structure is the identifier for the chord connection graph, not a subchord identifier.

<ncsq-ck> -> ncsq (
    <WORD>         // Size of DMUS_IO_NEXTCHORD
    <DMUS_IO_NEXTCHORD>... 
    )

The "ncsq" chunk contains data that connects one chord in the connection graph to another. Each chord in the connection graph is represented by a 16-bit identifier.

<spsq-list> -> LIST( 'spsq' 
    <spst-list>... 
    )

The "spsq" list contains data for each of the signposts.

<spst-list>  ->  LIST( 'spst'
    <spsh-ck>
    <chrd-list>  // Chord data; see above.
    [ <cade-list> ]
    )

The "spst" list contains data for a single signpost, consisting of a header, chord information, and optional cadence chords.

<cade-list> -> LIST( 'cade' 
    <chrd-list>... 
    )

The "cade" list contains the chord information for cadence chords. Currently, there is support for up to two cadence chords in this list. Any additional chords or other information is ignored.

<spsh-ck> -> spsh(
    <DMUS_IO_CHORDMAP_SIGNPOST> 
)

Finally, the "spsh" chunk contains the signpost data.