Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I programmatically stop all synths?

How do I programmatically tell supercollider to stop all synths, as in the equivalent of Ctrl+. in the IDE?

like image 483
David Avatar asked Sep 10 '13 22:09

David


2 Answers

I don't have SC booted at the moment, but s.freeAll should do the job, as it frees all nodes attached to the server.

http://doc.sccode.org/Classes/Server.html#freeAll

like image 114
MrSynAckSter Avatar answered Oct 07 '22 23:10

MrSynAckSter


You can all Ctrl+. from code directly:

    CmdPeriod.run

This is more complete than s.freeAll as it also stops language-side Threads, including the one that contains this command. To see how to have threads escape CmdPeriod, check out the helpfiles for CmdPeriod and for SkipJack

like image 31
les_h Avatar answered Oct 08 '22 00:10

les_h