TouchOSC Controlling GUI - Scheduling Issues

Hi Everyone,

I am trying to control a GUI via TouchOSC. I have written a simple OSCdef to control a toggle button. I get the follow error message:

ERROR: Qt: You can not use this Qt functionality in the current thread. Try scheduling on AppClock instead.
ERROR: Primitive ‘_QObject_SetProperty’ failed.

I know this is written about elsewhere and that the solution is to schedule the function on the AppClock I simply don’t know how or where to do that within an OSCdef.

Frankly, many of the conversations about timing and clocks quickly go beyond my current understanding of SC. So it may be that the solution to this has already been written about elsewhere but that I haven’t been able to see it.

Thanks for your help!

Inside the OSCdef function you can use the defer method of Function to schedule the gui code on the AppClock.

    // gui code here


1 Like