File Specification: CS302 Midi Note File

I assume that you have read the CS302 Midi Event File specification before you read this.

The CS302 Midi Note File starts with the word "CS302-Midi-Note-File". After that, the file should contain note or pedal event specifications. The format of these specifications are keywords followed by values. Keywords and values are words separated by whitespace. There is no concept of a line of text -- the input composed of simple words (this makes it easier to read input in C++).

Here are the two specification formats:

Times are doubles, and refer to seconds after the file has started playing. Other units and values are the same as in the CS302 Midi Event File specification.


Some Examples

As in the Event specification, the first example is a simple file that plays a C-major chord for one second, starting at time 0 and ending at time 1. The file is C-Major-MNF.txt, and its MIDI is C-Major.mid.

CS302-Midi-Note-File
NOTE 60 64 0 1
NOTE 64 64 0 1
NOTE 67 64 0 1

The second example, where we hold the damper pedal for two seconds, is in C-Major-Damper-MNF.txt (MIDI: C-Major-Damper.mid):

CS302-Midi-Note-File
NOTE 60 64 0 1
NOTE 64 64 0 1
NOTE 67 64 0 1
DAMPER 0 2

All of the Midi Event File Examples exist as Midi Note Files: