Patterns


The music we imported from the MIDI file is incredibly simplistic. It is a single bar of a bass line and melody and hardly interesting at that. However, music often exists as the collective of small patterns like this one, which play over various chord changes. Our next step is to make this small piece of music play over a series of chord changes, using DirectMusic's transposition functionality to adjust the notes to match the new chords.

Currently, our music is stored as a Sequence Track in our Segment. Sequence Tracks do not transpose to follow chords, and play exactly as the author wrote them. To get our melody and bass line to transpose over chord changes, we need to use a Pattern Track instead.

To create a new Pattern Track:

  1. Select File>New.

  2. Set the number of measures to one.

  3. Select Pattern Track from the menu.

  4. Select the Segment1.sgp (which was created) from the menu on the left-hand side.

  5. Right-click and select Rename.

  6. Rename the Segment to BassSegment.sgp.

We need to copy the data from our old Segment into the new Segment's Pattern Track. Select the Tutorial_Bass_Melody.sgt Segment and maximize track one's window. This opens the roll editor, where you can view and edit note data.


Figure 5-3: The roll editor displays note data, which you can edit right in DirectMusic Producer.

Select the first note in the window and press Ctrl+A to select all the notes. Press Ctrl+C to copy this data. Open Pattern Track one in our new Bass pattern. Click on the first beat in the measure, and press Ctrl+V to paste the data into the track. You may have to scroll the track up or down to see the note data.

Create a new Segment named Melody.sgt with a Pattern Track, and repeat this process with track two. At the end of the process, you need to point the Pattern Track to channel two by right-clicking on the Pattern Track to bring up the properties dialog box and set the pchannel to two.




DirectX 9 Audio Exposed(c) Interactive Audio Development
DirectX 9 Audio Exposed: Interactive Audio Development
ISBN: 1556222882
EAN: 2147483647
Year: 2006
Pages: 170

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net