Midi In and Scripting

I have this script to send a CC to a OSC Mini In Block
My idea was to keep incrementing the CC every 500ms and use this as a heartbeat to another instance. But I’m not getting any callbacks on CC Change
Anyone know what I’m doing wrong or an easier way to get midi out over the Relayer for a heartbeat.

///////////////////////////////////////////////////////////////////////
Heartbeat : MidiInBlock //OSC MidiIn Block
// heartbeat out to others
var myMidiMess : MidiMessage
var i:Double = 0
// Called automatically after script is loaded
Initialization
myMidiMess = MakeMidiMessage3(176,7,1)
SendNow(Heartbeat, myMidiMess)
Print(myMidiMess)
End

// Called when a parameter value has changed
On ControlChangeEvent(m: ControlChangeMessage) Matching 7 from Heartbeat
Print(“here”)
i = GetCCValue(m)
Print(i)
If i >= 127 Then i= 0 end
i = i + 1
myMidiMess = MakeMidiMessage3(176,7,i)
SendLater(Heartbeat, myMidiMess, 500)
end

When cc 7 is coming in via heartbeat you send some special values out of heartbeat.
How should the other instance get any value?

i hooked the midi. block OSC to the relayer midi to the other instance,
the problem is that the Midi OSC Block is not seeing or raising the CC callback.
I’ve a midi monitor on the OSC in block output and nothing is coming through.

When you send midi via gp script over a midi in block this sent message comes from the midi out and thetefore a callback is not triggered.

Don’t understand where it goes as a midi monitor block on the output of the OSC In Block does not show any midi coming from the block, where does the CC message go to?

Can you upload a small gig file, so I could check?

Doh,
the midi monitor window for that block was behind another from another block.
I added another OSC MIDI in and chained it off the first, set the trigger off the second and it works great, thanks for the info, I’m getting a nice incrementing value to pass over relayer to the main instance for monitoring on my Touch osc and global Rackspace.
Got the main inst to toggle a lamp for each
Thanks @pianopaul