System Event "Playhead State Changed" vs. Ableton Link

Hi once again,

I made quiet some progress with my scripting again today but now I maybe found a bug with the (still experimental) System Event “PlayheadStateChanged”.

I´m using Ableton Link, which is generally working perfectly. But if I have the following system event in my script, the playhead control stops working and I need to restart the Ableton Link to make it work also for other rackspaces again, which don’t have that script.

on SystemEvent(x : double) Matching PlayheadStateChanged
Print("SysEvent - test - value is " + x)
//newValue (Double) – 1.0 when playhead has been started, 0.0 when stopped
If x==0.0 Then
Print(“checked SysEv state is 0.0”)
//OSC_SetAddress(mOSCT, “/Trigger”)
//OSC_AppendIntArg(mOSCT, 1)
End

If x==1.0 Then
Print(“checked SysEv state is 1.0”)
//OSC_SetAddress(mOSCT, “/Trigger”)
//OSC_AppendIntArg(mOSCT, 1)
End
end

I’m right now only using a simple print command within that function. But the result is, that I can press PLAY in GP but Ableton is not reacting anymore and doesn’t start playing.

Any idea how this can be prevented?



And here is the complete script. Everything works as intended when I remove the Matching PlayheadStateChanged function.

var mOSCP : OSCMessage
mOSCT : OSCMessage

on Activate

Print(“Song1 Activate”)

OSC_SetAddress(mOSCP, “/SelectScene”)
OSC_AppendIntArg(mOSCP, 1)

OSC_SendSpecific(mOSCP, “127.0.0.1”, 8888)
OSC_ClearArgs(mOSCP)

If IsPlayheadEnabled() Then
Print(“ifcheck - Playhead is enabled - sending trigger”)
OSC_SetAddress(mOSCT, “/Trigger”)
OSC_AppendIntArg(mOSCT, 1)
OSC_SendSpecific(mOSCT, “127.0.0.1”, 8888)
OSC_ClearArgs(mOSCT)
End

end

on SystemEvent(x : double) Matching PlayheadStateChanged
Print("SysEvent - test - value is " + x)
//newValue (Double) – 1.0 when playhead has been started, 0.0 when stopped
If x==0.0 Then
Print(“checked SysEv state is 0.0”)
//OSC_SetAddress(mOSCT, “/Trigger”)
//OSC_AppendIntArg(mOSCT, 1)
End

If x==1.0 Then
Print(“checked SysEv state is 1.0”)
//OSC_SetAddress(mOSCT, “/Trigger”)
//OSC_AppendIntArg(mOSCT, 1)
End
end