<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 ("70000")to buf.pos as a central position in my soundbuffer and i let my function LFOtoPOS circle around
it. </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 "spork" instruction has started the process i can't figure out how to addresss the argument "centralpos" to change it on the fly or by another function or parameter. 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);">
<span>me.sourceDir() + "sound.wav" => string filename;<br>
</span>
<div>if( me.args() ) me.arg(0) => filename;<br>
</div>
<div><br>
</div>
<div>SndBuf buf => dac;<br>
</div>
<div><br>
</div>
<div>filename => buf.read;<br>
</div>
<div><br>
</div>
<div>1 => buf.pos;<br>
</div>
<div>.5 => 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> TriOsc lfo => blackhole;<br>
</div>
<div> 1 => lfo.freq;<br>
</div>
<div> centralpos => buf.pos;<br>
</div>
<div> while (true)<br>
</div>
<div> {<br>
</div>
<div> 1::samp => now;<br>
</div>
<div> (10000*lfo.last())$ int => buf.pos;<br>
</div>
<div> }<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<div>// time loop <br>
</div>
<div>while( true )<br>
</div>
<div>{ <br>
</div>
<div> 1000::ms => now;<br>
</div>
<div>}<br>
</div>
<div><br>
</div>
<span></span></div>
</body>
</html>