What you need is a MIDI merger. You need to merge the MIDI OUT and MIDI THRU of the MD in to the TR8 then use the THRU port of that to go to the IPAD.
Alternatively you need to make your MD your MIDI master and re think how you connect everything together,