Microsoft DirectX 8.1 (C++) |
A chordmap object represents a collection of chords that provides the foundation of the harmonic structure and the mood of the music. A chordmap contains several pathways with many interconnected chords, providing many possibilities for the composition engine to choose from in determining the chord progression in a piece of music.
For a conceptual overview, see Chordmaps.
For authored segments, applications don't normally need to concern themselves with chordmaps. The chordmap is used at the authoring stage to create a fixed chord progression. However, chordmaps can be used to compose segments at run time and to alter the chord progression of existing segments.
If a chordmap reference has been authored into a
Note DirectMusic Producer does not support authoring chordmap references into style files.
You set the chordmap for a composition when you create a segment by using either IDirectMusicComposer8::ComposeSegmentFromTemplate or IDirectMusicComposer8::ComposeSegmentFromShape. For more information, see Using Styles.
Once a segment has been created, you can change its chordmap by calling the IDirectMusicComposer8::ChangeChordMap method. This has the effect of changing the mood of the music without altering its basic rhythm and melody.
Every chordmap has an underlying scale, consisting of 24 tones. You can determine the tones of the scale by using the IDirectMusicChordMap8::GetScale method. The lower 24 bits of the variable pointed to by the pdwScale parameter of this method are set or cleared depending on whether the corresponding tone is part of the scale. The upper 8 bits give the root of the scale as an integer in the range from 0 through 23 (low C to middle B).