LEAF
LEAF copied to clipboard
add minimal PhISEM (Shaker) physical model
This PR adds a minimal implementation of Perry Cook's PhISEM model, a statistically-derived physical model for particle synthesis.
Issue: this implementation is not complete, as there is an issue with the BiQuad filtering. However, switching to a tSVF as the model's resonator works correctly.
Thanks, Liam! I’ll check this over. I need to think about whether the resonant filter should be included in the model or be a separate thing
Composer, musician, instrument designer scattershot.org * @snyderphonics
On Fri, Mar 29, 2024 at 2:17 PM Liam Esparraguera @.***> wrote:
@.**** commented on this pull request.
In leaf/Src/leaf-physical.c https://github.com/spiricom/LEAF/pull/18#discussion_r1544747767:
- p->soundDecay = decay; +}
+void tShaker_setProbability (tShaker *const pm, Lfloat prob) +{
- _tShaker* p = *pm;
- // set gain correction for number of particles
- float nBeans = 1024.0 * prob;
- float gain = (log(nBeans) / log(4.)) * (40/nBeans);
- p->probability = prob;
- p->gain = gain; +}
+void tShaker_setResonance (tShaker *const pm, Lfloat freq, Lfloat radius) {
I think that getting rid of the resonator field entirely, and instead returning the direct output p->level * tNoise_tick(&p->noise) on each tick, would make for a better API. This is fine because there's no feedback.
If we let the user handle the filtering/resonance, they can set up and modify as many resonating stages as they like (which is used on almost all of Cook's PhISEM presets), and we don't have to expose a wrapper to tBiQuad_setResonance for tShaker.
— Reply to this email directly, view it on GitHub https://github.com/spiricom/LEAF/pull/18#pullrequestreview-1969261369, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAGAY7GIYORFUPHAFNP2RJDY2WV2XAVCNFSM6AAAAABFOYBG2GVHI2DSMVQWIX3LMV43YUDVNRWFEZLROVSXG5CSMV3GSZLXHMYTSNRZGI3DCMZWHE . You are receiving this because you are subscribed to this thread.Message ID: @.***>