I am having this strange problem with this code. Yeasterday it played fine but now it stops after some bars.I am not sure what is causing it. But I am guessing the var inside the offadd but then again it worked fine the other day…
Ok this is strange. When I run the code it works for a while but then stops. If I run print(Clock.playing) and print(p4.isplaying)
it returns true but NO sound.
When I start FoxDot from the command prompt i get this error message in SC
WARNING: Called from SynthDef:buildUgenGraph, method Meta_AudioIn:ar is deprecated and will be removed. Use Meta_SoundIn:ar instead.
But not sure if that has anything to do with it.
I didn’t have this problem the first day I played around with this sequence. It started to appear when I added this sequence:
And then the problems started appearing and it wont go away even when I Ctrl + dot or close it down. But it would be strange that p5 would cause that problem permanently…
Do you have a lot of things playing at the same time and are you using a high bpm? My guess is that the Clock is losing track of p5 possibly due to a high load? Try going to the menu, selecting Help & Settings, then Clock latency, and going to “high” from the drop down. This should give your computer more time to calculate all of the values to send to SuperCollider and hopefully stop it from losing track of the player. To better test the issue, would you mind sharing the complete code that is running at when you encounter the issue?
I think I am using the standard bpm. I Changed the clock latency to high. But still problems.I think it hard to now when the problem appears because once it has appeared it doesn’t go away even if I copy the code to another document. I have to close FoxDot and SC and reboot FoxDot to get it to work again.
But maybe p5 is the problem. When I run it everything it stops. Do you get the same problem? And when I start again without the p5 the p4 quits after a few beats?
So this is weird. Using a var in the offadd schedules the event at a varying time and, so, isn’t stored as a float, but as a var. For some reason the greater than or equal to for a var that has been multiplied (or any operation for that matter) isn’t implemented correctly and returns False when it should return True. So there’s a bug when using var in offadd but only seems to occur when the scheduled event is no longer scheduled i.e. the offadd value changed in the var. Should be a simple fix but not sure I’ll be getting round to it unfortunately. If you could raise an issue on GitHub that would be useful for reminding me. Thanks.