A Key Signature event (form the Midi File 1.0 specification). This event cannot be sent to external Midi devices.
typeKeySign events have 2 fields :
0
- from -7 (7 flats) to 7 (7 sharps), (8-bits field)
1
- form 0 (major key) to 1 (minor key), (8-bits field)
Creates a Key Signature event and returns a pointer to the event or NIL if there is no more memory space.
MidiEvPtr KeySign (long date, long sharpflats, long minor) { MidiEvPtr e; if ( e = MidiNewEv(typeKeySign)) /* Allocate a new event. Check not NIL */ { Date(e) = date; MidiSetField(e, 0, sharpflats); MidiSetField(e, 1, minor); } return e; }