after happily using SuperCollider for sound synthesis in emacs for a few months, today I tried to dabble with SoundIn.
As it turns out, on Mac OS Catalina (10.15.7), you need Microphone Permissions to get sound into SuperCollider. Using the IDE this works as expected, and Emacs has microphone permissions, too:
I suspect this has to do with the fact that in emacs mode, SuperCollider launches a standalone scsynth process, which does not have microphone permissions:
It is performing the string for localhost obtained from sclang. So that throws the responsibility back to sclang itself. Meaning it runs exactly the same unix command as when booting from IDE. I know of someone working with Catalina who resorted to booting emacs from the terminal in order to have root privileges. Maybe that is something to try.
I’d say this is still an issue – not with sc though, but with Emacs.
Running GUI Emacs through the Terminal might be an option but I would not say it is optimal.
I had this working on Catalina, but managed to screw it up by reinstalling Emacs. The issue seems to be that Emacs never asks for Microphone permissions.
I am not completely sure, but the issue seems to be that no Emacs distribution I have tried sets the key
<key>NSMicrophoneUsageDescription</key>
in Info.plist within the macOS app bundle (Emacs.app). Adding the key manually does not seem to work.
Last time I think I got this working by testing different versions of Emacs, but can’t remember which one actually worked…
If anyone has got GUI Emacs asking for Microphone permission on 10.15.+, please get back to me.
I think it would, but I have no idea where to post the issue. I’ve tried this with different distributions of GUI Emacs (brew, emacs-plus and I can’t really remember all of them). I’d guess microphone usage is an edge case for Emacs.
The frustrating this is that I had it working, but I can not remember how I did fix it last time.
For this to work I had to disable System Integrity Protection (but re-enabled afterwards), so usual caveats apply. No guarantees about the safety of the code linked above and so on, but so far no issues.
While suboptimal, maybe an idea is to build with the relevant key added and if that works, make a personal fork.
I have little idea how code signatures and such work, but my guess is that editing files such as the .plist after building interferes with some other security system on the mac.
I’ll maybe test this idea later, but right now I want to actually work on some music… :))