The Octatrack can send MIDI Program Change messages every time its pattern changes if you activate the “PROG CH SEND” setting in the PROJECT > MIDI > SYNC menu. See page 42 of the manual for more details.
If you switch to pattern A01 it will send Program Change with a value of 0; if you switch to pattern A02 it will send Program Change with a value of 1, etc, up to H16 for a value of 127. Patterns I01 to P16 also send Program Change in the range from 0 to 127.
Another option is to set a Program Change message in the OT’s MIDI sequencer. See page 114 of the manual. The advantage is that you can specify any value of Program Change; the disadvantage is that the message is only sent when you switch to a pattern linked to another Part.
Hopefully, that will work for you. After that, we can worry about the Bank Change message. The following topic describes the problem you will face: