MUSC 108. Introduction to Music Technology - Fall 2013

05Lab5 - SMF Track 2 (MTrk)

[Overview] [Syllabus]

The Flute Track On MIDI Channel 1

Track 2 is the flute track and is the first track that contains NON and NOF messages.

Track chunk 2 in Excel

MTrk Header

Change the track label to "; Track 2 - Flute." The MTrk header and the Track Length data are already filled in for you.

MTrk header

The remainder of the track will be filled with MIDI messages

Track 2 MIDI Status Bytes

All status bytes for the flute are on MIDI channel 1.

Reset All Controllers Message

The first MIDI message in a track should be the Reset All Controllers control message. Use a delta time of 0 and enter the Reset All Controllers message: Bn 121 0, where n is the zero based MIDI channel number.

CC121 begin

Volume Control Message

Use a delta time of 0. Enter the Volume Control message: Bn 7 100, where n is the zero based MIDI channel number.

CC7 volume

Pan Control Message

Use a delta time of 0. Enter the Pan Control message: Bn 10 64, where n is the zero based MIDI channel number, and pp is the patch number.

CC10 pan

Patch Change Message

Use a delta time of 0. Look up the patch change number for the Flute. Enter the Patch Change message: Cn 73, where n is the zero based MIDI channel number.

Patch change

Important: The real patch change message uses only one data byte.

Here's the data so far.

Track 2 controller messages finished

Copy The PPQ Data From The Flute Tab

Open the Flute tab and copy the Flute PPQ-status-data1-dat2 messages.

Do not copy:

Return to the SMF tab and paste the data after the Patch change message.

The actual MIDI data for the flute part will write over the final Reset All Controllers message and the End of Track message. That's ok because you can still copy and paste it from the SMF Template tab. The data should be in A41:D93. Here's the beginning of the data.

Beginning of NON data

Add The Final Reset All Controllers And End Of Track Messages

Open the SMF Template tab and copy A45:D48, the final Reset All Controllers and End Of Track messages. Switch back to the SMF tab and paste at the end of the Track 2 data. Enter the Reset All Controllers message. Use a Delta Time of 480 (quarter note) and the appropriate MIDI channel. The End Of Track meta event is filled in for you.

Track 3 End of track message

Save And Save Often

Copy A1:H97. Some of the meta events extend into column H.

Export As A Standard MIDI File

Open MIDIDisplay and paste the copied data into MIDIDisplay.

Choose Export Standard MIDI File from the Options menu.

MIDIDisplay Export SMF

When the Save As dialog appears, navigate to the Desktop and save the file as 05Flute.mid. If you forget the .mid file extension, MIDIDisplay will add it for you.

Save As dialog

Save

OOPS: You may be greeted by an error message.

MIDIDisplay Error message

The message says there is an error on line 41. It's possible that the error is not line 41, but close to it. Go back to the SMF tab in Excel and look in the vicinity of line 41.

Error in Excel line 40

Can you spot the error?

Click here for solution.

Fix the error in Excel. Paste the corrected data into MIDIDisplay and export. When there are no errors, the file 05Flute.mid will appear on the Desktop.

Play The SMF

Select the icon 05Flute.mid on the Desktop. Press the space bar. You should hear the Flute part play.

Note: You can also play the file in QuickTime player (Mac), Media Player (Windows), or iTunes (both).

When it sounds correct continue with 05Lab6.

[Overview] [Syllabus]

Revised John Ellinger, January - September 2013