Closed gogins closed 1 year ago
Not familiar with running Python pieces in Visual Studio Code, but I'm sure it will work with some additional configuration. It assumes a virtual Python environment is being used, I don't know for sure how to install packages in such.
Not that hard. In the home directory:
sudo cp /System/Volumes/Data/opt/homebrew/Cellar/csound/6.18.1_4/lib/python3.12/site-packages/ctcsound.py .venv/lib/python3.12/site-packages
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip --version
python3 -m pip install numpy
Python with ctcsound works now from Visual Studio Code.
https://stackoverflow.com/questions/41022725/launch-and-attach-to-nw-js-program-from-visual-studio-code https://stackoverflow.com/questions/42017617/how-to-install-vs-code-extension-manually https://code.visualstudio.com/api/references/contribution-points
Apparently, it is not possible to add a new menu or menu item, except in context menus. That should be good enough, however.
Customizing VS Code is not intuitive. I would however prefer something that a user can simply install and that does not involve doing excessive configurationl.
I got the reference documentation working.
I got the "Render .csd as audio" command working.
Find out how to:
playpen.py
, so first Visual Studio Code spawns a subprocess to run python3 playpen.py
, and then playpen.py
spawns another subprocess to run the actual command. But I solved this simply by creating a new Terminal with a backing shell, and sending the command to the shell. The user can then manually kill the Terminal.No doubt there will be bugs and changes, but I'm going to let that happen in the course of use.
I'm resurrecting this project, based on the following observations:
HTML5 pieces must, as far as possible, make identical calls to the Csound API. I am making another attempt to use Visual Studio Code. It should be possible to reuse
playpen.ini
andplaypen.py
.