typeProgChange (code 5)


A Program Change message with a program number.

ProgChange events have 1 field numbered 0 :

0
A program number from 0 to 127. (Field size : 1 byte)


Creates a ProgChange event and returns a pointer to the event or NIL if there is no more memory space.


MidiEvPtr ProgChange( long date, short prog, short chan, short port)
{
    MidiEvPtr e;

    if ( e = MidiNewEv( typeProgChange ) )/* Allocate a new event. Check not NIL*/ 
    {
        Date(e) = date;        /* These information are common to all */
        Chan(e) = chan;        /* kind of events */
        Port(e) = port;
        MidiSetField(e,0,prog);    /* Field particular to ProgChange */
    }
    return e;
}