Could someone help me code review this? The main rendering loop is here:
https://github.com/yishengjiang99/sf2rend/blob/master/spin/src/spin.c
It is called from a WebAudioWorklet in a webapp.


On Mon, May 1, 2023 at 7:48 PM Yisheng Jiang <[email protected]>
wrote:

> I'm not sure. I just always had fear of doing trigonometry, asking some
> (script) to do it potentially 48000/second * several voices per channel *
> 16 channels seems demanding it alot.
>
> but i took your email as a challenge and just plugged them in the loop,
> and so far it hasn't melted down my computer.
>
> it fact it sounds much better than before, I can see the fft graph of the
> piano move to the right and hear it.
>
>
> ---------- Forwarded message ---------
> From: Stefano D'Angelo <[email protected]>
> Date: Mon, May 1, 2023 at 12:53 AM
> Subject: Re: Rendering note with dynamic low-pass filter by cross fading
> To: <[email protected]>
>
>
> Il 26/04/23 05:39, Yisheng Jiang ha scritto:
>
> > To make concrete of what I’m trying to do, here’s a (wip) code example
> >
> https://github.com/yishengjiang99/sf2rend/blob/bacca1bf2092dbd78b1affacac11155b70f1bc55/spin/mk_lpf_fade.js#L29
> >
> > Sent from my iPhone
> >
> >> On Apr 25, 2023, at 8:37 PM, Yisheng Jiang <[email protected]>
> >> wrote:
> >>
> >> I’m trying to render a note that feed into a IIR filter (2-3 poles)
> >> whose cutoff frequency following an envelope generator, and it’s not
> >> possible for me to compute the z-transform parameters every rendering
> >> block..
> >>
> >> Is it approximately the same to generate two pcm streams with the
> >> starting and ending cutoff frequencies, then cross fade them to make
> >> the resultant sound?
> >>
> >>
> May I ask why you can't compute coefficients continuously (each block/N
> samples)? What sort of platform are you targeting? The repo hints at a
> web page/app...
>
> Best,
>
> Stefano D'Angelo
>

Reply via email to