Midi filtertering of stop start messages

ArdMidi.pdf (1.7 MB)
Not sure if a schematic is needed. Simply put, midi cable connecting my master midi clock to the input of the midi shield, and from the shield's thru connection a midi cable connects to, in this instance, a midi loop pedal.
While my master clock is on, my loop pedal is synced perfectly. The problem arises when a stop message is sent from the master clock. My looper then stops even though it's still in sync receiving clock messages. Unfortunately I am unable to block these messages at the pedal and so I'm hoping that i can do that with code on the arduino. I haven't the foggiest notion on how to tell the arduino to not send those messages and just let the others through.