<html><body><div style="color:#000; background-color:#fff; font-family:arial, helvetica, sans-serif;font-size:10pt"><div><span>Kassen -</span></div><div><br><span></span></div><div><span>Thanks!  This helped me get out of the frozen VM situation, but now for some reason my loop doesn't seem to be executing after the first runthrough.  I've modified the code as follows, chucking the event to now at the end of the loop.  This works, and b3base gets added twice to the VM as it should in the first runthrough.  I have it printing out the value for pedCount at the beginning, and it only does so once...so, it prints out the value 25 for pedCount and then I never see it printing again after that, just the OSC values ticking by (I currently have my OSC sender set to send values from 25 down to 6, then resetting back to 25, every 2 seconds, and it prints to the VM every time it sends a value so I can see that that part, at least, is
 working).   Interestingly, I also don't get any response from the VM when I send it a 'chuck ^' command...the OSC values keep on ticking by, and the audio keeps playing as it should, it just doesn't send out a response.  It does, however, respond to --kill and --removeall commands.<br></span></div><div><span><br></span></div><div><span> Something's not working as it should, and pedCount never seems to get updated with the OSC value, which is strange, because I have VERY similar code (almost identical) sending and receiving float values in OSC (in other parts of this piece) and they work just fine.  I think that perhaps somewhere the loop is getting tripped up and running infinitely without doing anything, but I can't pinpoint where or why this is happening.<br></span></div><div><br></div><div>Basically, what this code should do is take an OSC value, and if it's greater than 20 and the shreds aren't already present, add them to the
 VM.  If it's less than 20 and the shreds are present, it should remove them from the VM.  I thought I had it nailed but something's wonky.<br></div><div><span><br></span></div><div><span>Thanks again for any help as I trudge through this stuff!</span></div><div><br><span></span></div><div><span>//begincode<br></span></div><div><br><span></span></div><div><span>Machine.add("justa.ck");<br>Machine.add("pedestrianSender.ck");<br><br>OscRecv receiver;<br>6449 => receiver.port;<br>receiver.listen();<br>receiver.event("weather/pedestrian, int") @=> OscEvent pedEvent;<br><br>-1 => int b3base1;<br>-1 => int b3base2;<br><br>25 => int pedCount;<br><br>while (true) {<br><br>  <<<"Pedestrian ct: ", pedCount>>>;<br><br>  if (pedCount > 20 && b3base1 == -1) {<br>    Machine.add("b3base.ck") => b3base1;<br>    Machine.add("b3base.ck") => b3base2;<br>  }<br> 
 <br>  else {<br>    if (pedCount < 20 && b3base1 != -1) {<br>      Machine.remove(b3base1);<br>      Machine.remove(b3base2);<br>      -1 => b3base1;<br>      -1 => b3base2;<br>    }<br>  }<br>  <br><br>  while( pedEvent.nextMsg() != 0) {<br>    pedEvent.getInt() => pedCount;<br>  }<br>  <br>  pedEvent => now;<br></span></div><div><span>}<br></span></div><div><br></div><div>//endcode<br> </div><div style="font-family: arial, helvetica, sans-serif; font-size: 10pt;"> </div>  </div></body></html>