Pausing/stopping performance with ICsound class

Hi everyone,

I’m still in the learning curve of working with Python, ctcsound, and the ICsound class in Csoundmagics. I got stuck on this one problem. Can you help me find a solution?

Here’s the scenario. I have a Python program that generates a Csound score. From a GUI (built with PySimpleGUI), I’d like to send the Csound score to an instance of Csound, have Csound play the score through the DAC, and be able to pause, resume play, and stop the Csound performance. Can I do this using the ICsound class? I know how to pass the score to Csound and play it back with ICsound, but the pausing and stopping is stumping me with ICsound. Part of the thing that’s confusing to me is that ICsound appears to have a CsoundPerformanceThread built in, but I’m not sure how to work with it.

Thanks!
Jason

I don’t know much about this interface, but if it use the CsoundPerformanceThread class then you should be able to stop() and restart(). @joachim or @tarmo might have a better idea?

Thanks for chiming in, Rory. I figured out how to pause/resume using the basic Csound and CsoundPerformanceThread classes, so that’s progress. I had been trying to work with ICsound because it conveniently encapsulates some of the functionality of Csound and CsoundPerformanceThread, but clearly I’m not understanding the subtleties of how ICsound works under the hood. Looking at ICsound's code, maybe I’m not compiling the orchestra or sending score events the way it wants.

I’ve got a couple more general questions about ctcsound that I’ll pose in another thread.

Thanks,
Jason

well the real expert here is françois, but in general: iCsound is built
on top of ctcsound, so all of its methods should be available. in
general …