Skip to content

Math.sh() Examples#540

Closed
everettmcarpenter wants to merge 7 commits intoccrma:mainfrom
everettmcarpenter:main
Closed

Math.sh() Examples#540
everettmcarpenter wants to merge 7 commits intoccrma:mainfrom
everettmcarpenter:main

Conversation

@everettmcarpenter
Copy link
Contributor

Adds examples for Math.sh(), including a general explanation of usage in math/ and an example using Gain[] to achieve ambisonic encoding in spatial/

I know spherical harmonic projections have applications in ML, perhaps Math.sh() could be used for something. There could be some fun experiments in ambisonic soundfield analysis with ChAI. Let me know how these examples look, happy to reduce or increase detail, and mockup more stuff related to ambisonics.

everettmcarpenter and others added 7 commits January 22, 2026 18:38
A cleaned up, minimal push of the spherical harmonic calculator designed for ChucK's math library.
This change implements a ulib_math entry which allows for the function to actually be called by users. Includes documentation of the function.
Previously, memory was allocated by SH() which would return a pointer for the ulib function to access. This meant one function allocated memory and the other deleted it. Now ulib will allocate memory and provide a pointer to SH() for it to use, meaning SH() is not responsible for management of memory.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants