Thank you James,
(1) if I do not want the slider to change; (~f1.start, ~f1.stop
works):
~f1 = Task ({
var myfading1;
(m[1].size)*40.do({
~abc = fading1.next.asFloat;
[~abc, ~abc.class].postln;
//~slideSynthL1.valueAction_(~abc);
1.wait;
});
});
(2) If I want to see the slider change in the GUI:
~f1 = Task ({
var myfading1;
(m[1].size)*40.do({
~abc = fading1.next.asFloat;
[~abc, ~abc.class].postln;
~slideSynthL1.valueAction_(~abc);
1.wait;
});
});
I get this error:
a Routine
a Task
[ 0.1, class Float ]
ERROR: Primitive '_SCView_SetProperty' failed.
Operation cannot be called from this Process. Try using AppClock
instead of
SystemClock.
RECEIVER:
Instance of SCSlider { (0EA1EEF0, gc=80, fmt=00, flg=00, set=04)
instance variables [16]
dataptr : RawPointer 581910
parent : instance of SCTopView (0E951F50, size=19, set=5)
action : instance of Function (0E85E3E0, size=2, set=1)
background : instance of Color (0E910B90, size=4, set=2)
mouseDownAction : nil
mouseUpAction : nil
mouseOverAction : nil
mouseMoveAction : nil
keyDownAction : nil
keyUpAction : nil
keyTyped : nil
keyModifiersChangedAction : nil
beginDragAction : nil
canReceiveDragHandler : nil
receiveDragHandler : nil
onClose : nil
}
CALL STACK:
MethodError:reportError 0FB5D0F0
arg this = <instance of PrimitiveFailedError>
Nil:handleError 0FB5D090
arg this = nil
arg error = <instance of PrimitiveFailedError>
Thread:handleError 0FB5D030
arg this = <instance of Thread>
arg error = <instance of PrimitiveFailedError>
Thread:handleError 0FB5CFD0
arg this = <instance of Routine>
arg error = <instance of PrimitiveFailedError>
Object:throw 0FB5CDF0
arg this = <instance of PrimitiveFailedError>
Object:primitiveFailed 0FB5CD90
arg this = <instance of SCSlider>
SCView:setPropertyWithAction 0FB5CF70
arg this = <instance of SCSlider>
arg symbol = 'value'
arg obj = 0.1
SCSlider:valueAction_ 0FB5CEB0
arg this = <instance of SCSlider>
arg val = 0.1
< FunctionDef in closed FunctionDef > (no arguments or variables)
Integer:do 0FB5CAF0
arg this = 40
arg function = <instance of Function>
var i = 0
< FunctionDef in closed FunctionDef > 0FB5CA90
var myfading1 = nil
Routine:prStart 0FB5CA30
arg this = <instance of Routine>
arg inval = 524.861294358
Therefor instead of "~f1.play" I used "AppClock.play(~f1);"
Post window says:
AppClock
...but does not change the slider nor the sound.
When I get back to Routine instead of Task and use
"AppClock.play(~f1)" it
works but than I can't pause it. Well, sorry my English is not the
best:(
And I hope I did not miss anything obvious. Thanks.
K
--
View this message in context: http://www.nabble.com/Pause-a-Routine-%28AppClock%29-tp22295676p22298242.html
Sent from the Supercollider - User mailing list archive at Nabble.com.
_______________________________________________
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/