Hey!
I have the following problem:
I would like to get the current phase position of the phasor to control a cursor in the SoundFileView.
(
a = SynthDef(\1, {|rate = 1, startPosition = 0, endPosition = 10000|
BufRd.ar(1, b, Phasor.ar(0, BufRateScale.kr(b)*rate, startPosition, endPosition));
//this is for sending the values of the phasor to the OSCFunc
SendReply.kr(Impulse.kr(3), '/cursor', Phasor.ar(0, BufRateScale.kr(b)*rate, startPosition, endPosition));
}).add
)
//I would like to get the values via an OSCFunc, to control the timeCursorPosition.
//Would that be a good approach?
//this works
o = OSCFunc({ |msg| msg[3].postln; }, '/cursor');
// this doesnt work
o = OSCFunc({ |msg| v.timeCursorPosition = msg[3] }, '/cursor');
//when I use "v.timeCursorPosition= msg[3]", I get the following error
/*ERROR: Qt: You can not use this Qt functionality in the current thread. Try scheduling on AppClock instead.
ERROR: Primitive '_QObject_SetProperty' failed.*/
// I tried to use AppClock, but I couldnt make it work