I've been doing a very basic thing with a script in order to define random detune values. I also setup a knob that defines a time parameter for the wait function. My goal is to create a sense of gravity around the random value so that the detuning slowly (over the course of what's defined by the Time knob) moves back to zero.
I'm stuck trying to implement the 'gravity' portion of this. I don't know if anyone can help or even if this is simple to implement.
Here's where I'm at:
Code: Select all
on init
declare ui_knob $Time (1,1000,1000)
set_knob_defval($Time,10)
$Time := 10
move_control($Time,6,2)
make_persistent ($Time)
declare $fine
declare ui_label $label3 (1,1)
set_text ($label3, "Fine: 0 cent")
end on
on note
$fine := random(5,10)
change_tune ($EVENT_ID, $fine*1000,0)
set_text ($label3, "Fine: " & $fine & " cent")
end on
Thanks everyone!