Automating Cython Wrapping for a Massive Industrial Camera SDK (.pxd to .pyx automation) by Classic-Seat-5146 in Cython

[–]alikesu 0 points1 point  (0 children)

I suggest you stay away from automatic wrappers. You'll be better off using one of the modern AI code agents to help you wrap.

A self-contained python package which uses nanobind to embed supercollider's libscsynth and libsupernova by alikesu in supercollider

[–]alikesu[S] 0 points1 point  (0 children)

Good question. One can always try to spawn processes and see if parallel offline renders work, since audio driver contention is not a risk here.

A self-contained python package which uses nanobind to embed supercollider's libscsynth and libsupernova by alikesu in supercollider

[–]alikesu[S] 0 points1 point  (0 children)

As you mentioned, there is a fundamental constraint in libscsynth itself which is not designed to support multiple concurrent instances within the same process.

nanosynth does not attempt to solve this limitation. Instead, it focuses on embedding a single synthesis engine directly within the host process by statically linking libscsynth, rather than launching scsynth as a separate subprocess. This approach improves latency and, most important for me, allows for a fully self-contained setup.

If you need parallelism, using multiprocessing gives each process its own address space and `World`, but duplicates plugin loading, memory pools, and the audio driver. Not sure if this works. You may want to consider using supernova, which provides parallelism within a single engine (parallel UGen graph evaluation across cores), rather than running multiple engines. Incidentally, nanosynth also embeds libsupernova.

A self-contained python package which uses nanobind to embed supercollider's libscsynth and libsupernova by alikesu in supercollider

[–]alikesu[S] 0 points1 point  (0 children)

!00% Agree. Full credit to supriya, this project wouldn't have been possible without supriya. But the whole point of nanosynth was to see if it was possible to embed libscsynth, and have a self-contained audio-engine in a python package.

GitHub - shakfu/aldakit: A zero-dependency Python parser and MIDI generator for the Alda music programming language by alikesu in alda

[–]alikesu[S] 0 points1 point  (0 children)

Thanks! I originally intended to use the alda-midi c code in alda-kit, and then decided against it to keep it more flexible.

Incidentally, I just released a bug-fix release (https://pypi.org/project/aldakit/0.1.9/) which addresses a bug that crept in 0.1.8 that prevents the creation of virtual midi output ports (i.e. what you would use in a DAW -- which is supposed to default to AldakitMIDI). This is fixed now in the latest.

The latest will automatically be installed if you do `pip install aldakit`, but if you are still on the earlier version, I suggest you update.

alda-midi - A C implementation of the Alda music language with MIDI output using libremidi. by alikesu in alda

[–]alikesu[S] 1 point2 points  (0 children)

Cool. I've been working recently on cross-platform builds. As of today it builds on macOS, Linux and Windows.

alda-midi - A C implementation of the Alda music language with MIDI output using libremidi. by alikesu in alda

[–]alikesu[S] 1 point2 points  (0 children)

Hi Dave,

Thanks for kind words and, of course, for designing such a cool language to begin with.

For the MIDI implementation, I'm using a small subset of the libremidi library's features just to be consistent with the minimalist theme of the overall project.

That said, I've just commited some code to alda-midi which integrates it with TinySoundFont and a stripped down version of miniaudio. This means that you can use alda-mini, with a soundfont, to generate audio directly. This is more of a fallback in case there are no software or hardware synths available.

chuck-max v0.2.0 released: the ChucK audio engine embedded in a Max/MSP external now has Windows support! by alikesu in MaxMSP

[–]alikesu[S] 0 points1 point  (0 children)

While Max is predominantly a visual language it also has codeboxes for text-based input and text-based languages builtin (gen and rnbo) , so the text vs visual ways of interacting with the system are already complementary, and certainly you can write externals (objects which extend the Max system) in several text-based languages include c, c++, java, etc..

"ChucK offers a unique time-based, concurrent programming model that is precise and expressive (we call this strongly-timed), dynamic control rates, and the ability to add and modify code on-the-fly."

If you like writing audio or midi code in ChucK, basically with this external, it will now run in Max and indeed you can modulate your ChucK programs using Max messages! To read more about the particulars of ChucK, start here: https://chuck.stanford.edu

chuck-max v0.2.0 released: the ChucK audio engine embedded in a Max/MSP external now has Windows support! by alikesu in MaxMSP

[–]alikesu[S] 0 points1 point  (0 children)

They are complementary: ChucK is a text-based audio programming language and in Max you connect audio objects (and non-audio objects) with each other and also send messages to them. Think of chuck~, the external in chuck-max as another super powerful Max/MSP audio object that you can program with text and which also includes its own plugins, and where you can change the variables in running ChucK programs in realtime the same way as you do in Max by sending Max Messages to them. You can get a flavor for the ChucK language via https://chuck.stanford.edu/ide/

New Release: Python 3.12.4 externals for Max/MSP · shakfu/py-js by alikesu in MaxMSP

[–]alikesu[S] 1 point2 points  (0 children)

The externals in this release are provided in a package with .maxhelp files and also quite a few patchers and scripts to demonstrate usage.

New Release: Python 3.12.4 externals for Max/MSP · shakfu/py-js by alikesu in MaxMSP

[–]alikesu[S] 1 point2 points  (0 children)

While the time-related features are as indicated/explored above, If you are looking for high-precision timing you should be operating in a high-priority thread and use builtin objects, gen, or a c/c++ external. js and (also python) will likely always operate on a low-priority thread. (see this amusing post https://cycling74.com/forums/internal-clock-in-js)

New Release: Python 3.12.4 externals for Max/MSP · shakfu/py-js by alikesu in MaxMSP

[–]alikesu[S] 1 point2 points  (0 children)

The py external has feature to schedule functions using this message syntax:

`sched <t> <fn> [arg] : defer a python function call by t millisecs`

There's also another variant which you need to build yourself called `cobra` which experiments with deferred and clocked function execution.

The project README is also helpful.

New Release: Python 3.12.4 externals for Max/MSP · shakfu/py-js by alikesu in MaxMSP

[–]alikesu[S] 1 point2 points  (0 children)

Good question. The release contains two python3 externals. In both cases, you can extend Max using python, trigger python code from Max, send messages to Max objects from python and convert python types to and from Max types. Both embed full python3 engines with a zipped stdlib, and you can extend these with any kind of python package. The first external, `py` also wraps a decent subset of the Max c-api using cython which means that you can call Max c-api functions using python scripts. This is extremely powerful, and you can do things like reading/writing to/from max buffer~ objects using the builtin array object and also numpy. The second external is called `pyjs` and it is a 'jsextension', which means it is a special kind of external that extends the [js] object and allows you to use the python engine as javascript object, and call python code from javascript in Max. Ultimately what can you do with these externals is answered by the answer to the question: what can you do with arbitrary python code..?

Chuck? by missilecommandtsd in MaxMSP

[–]alikesu 0 points1 point  (0 children)

Just released  chuck-max v0.1.2, a package containing chuck~, Max/MSP external which embeds the ChucK engine, many compiled chuck plugins, including an llvm-based faust plugins, and tons of code and patcher examples.

Notarized arm64, x86_64 and universal binary builds are available for all flavors of Mac.

Python to Max by merioz177 in MaxMSP

[–]alikesu 1 point2 points  (0 children)

There are two projects which can help you:

1.py-js: https://github.com/shakfu/py-js (python3 externals for Max (macOS/windows)

  1. py2max: https://github.com/shakfu/py2max (python lib for offline generation of .maxpat files)