[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[sc-users] MIDIFunc to control GUI elements: strange error



Hello,

I don't understand why if I evaluate this line manually,

~myButton.valueAction = 0
~myButton.valueAction = 1

it works perfectly fine, my GUI button will go off/on and my synth associated with that button will play and free.

BUT

if I do this:

~cc33 = MIDIFunc.cc({|val|
if(val == 127, {~myButton.valueAction = 1}, {~myButton.valueAction = 0})
}, 33, 0);

it gives me this:
ERROR: Qt: You can not use this Qt functionality in the current thread. Try scheduling on AppClock instead.
ERROR: Primitive '_QObject_SetProperty' failed.
Failed.

current thread? that's strange. both actions are purely SC lang side operations, no? Why AppClock? I'm not scheduling anything here, I just map a simple function to midi control.

how you guys deal with this error? it must be possible to control QT gui with midi controllers, no?

thanks!

_______________________________________________
sc-users mailing list

info (subscription, etc.): http://www.beast.bham.ac.uk/research/sc_mailing_lists.shtml
archive: https://listarc.bham.ac.uk/marchives/sc-users/
search: https://listarc.bham.ac.uk/lists/sc-users/search/