<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Hi,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
I'm in big trouble. I'v been trying for a long time now to change an argument in a running function. As you can see in my script i set a certain central pos (&quot;70000&quot;)to buf.pos&nbsp; as a central position in my soundbuffer and i let my function LFOtoPOS circle around
 it.&nbsp;</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Once the &quot;spork&quot; instruction has started the process i can't figure out how to addresss the argument &quot;centralpos&quot; to change it on the fly or by another function or parameter.&nbsp; Some help please ...</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Kind regards,</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Herman</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
----------------------------------------------------------------------------------------------</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div style="font-family: Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
&nbsp;<span>me.sourceDir() &#43; &quot;sound.wav&quot; =&gt; string filename;<br>
</span>
<div>if( me.args() ) me.arg(0) =&gt; filename;<br>
</div>
<div><br>
</div>
<div>SndBuf buf =&gt; dac;<br>
</div>
<div><br>
</div>
<div>filename =&gt; buf.read;<br>
</div>
<div><br>
</div>
<div>1 =&gt; buf.pos;<br>
</div>
<div>.5 =&gt; buf.gain;<br>
</div>
<div><br>
</div>
<div>spork ~ LFOtoPOS(70000);<br>
</div>
<div><br>
</div>
<div>fun void LFOtoPOS(int centralpos)<br>
</div>
<div>{<br>
</div>
<div>&nbsp; &nbsp; &nbsp;TriOsc lfo =&gt; blackhole;<br>
</div>
<div>&nbsp; &nbsp; &nbsp;1 =&gt; lfo.freq;<br>
</div>
<div>&nbsp; &nbsp; &nbsp;centralpos =&gt; buf.pos;<br>
</div>
<div>&nbsp; &nbsp; &nbsp;while (true)<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp;{<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp;1::samp =&gt; now;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp;(10000*lfo.last())$ int =&gt; buf.pos;<br>
</div>
<div>&nbsp; &nbsp; &nbsp; &nbsp;}<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div>// time loop &nbsp; <br>
</div>
<div>while( true )<br>
</div>
<div>{ &nbsp;<br>
</div>
<div>&nbsp; &nbsp;1000::ms =&gt; now;<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<span></span></div>
</body>
</html>