Sonic-pi: Missing Chorus FX

Created on 24 Nov 2020  Â·  4Comments  Â·  Source: sonic-pi-net/sonic-pi

It looks like there are traces of a chorus effect in the code, but it's commented out here.
What's the reason for that, and what would it take to add it back in? I think it would be quite a nice effect to have available.

question synthdefs

Most helpful comment

Yes! Chorus is a delay effect so it needs a buffer (a small space in memory to hold the delayed samples). At the time it was written, Sonic Pi didn’t have much in the way of buffer management. I remember that if you tried to allocate local buffers within the supercollider synth e.g. in a tight loop, it could lead to crashes. The better option would be to allocate the buffer beforehand and then pass the buf_id to the synth. I’m not sure but we might have some other synths that do that now

On 25 Nov 2020, at 00:22, ethancrawford notifications@github.com wrote:



I don't remember exactly, but I think there was no technical reason it couldn't now be included. @xavrileyhttps://github.com/xavriley may be able to remind me 😉

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/sonic-pi-net/sonic-pi/issues/2557#issuecomment-733351731, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAC2G574NBMEHTJ5ZLXW6FLSRRE4DANCNFSM4UBM7VKQ.

All 4 comments

I don't remember exactly, but I think there was no technical reason it couldn't now be included. @xavriley may be able to remind me 😉

Yes! Chorus is a delay effect so it needs a buffer (a small space in memory to hold the delayed samples). At the time it was written, Sonic Pi didn’t have much in the way of buffer management. I remember that if you tried to allocate local buffers within the supercollider synth e.g. in a tight loop, it could lead to crashes. The better option would be to allocate the buffer beforehand and then pass the buf_id to the synth. I’m not sure but we might have some other synths that do that now

On 25 Nov 2020, at 00:22, ethancrawford notifications@github.com wrote:



I don't remember exactly, but I think there was no technical reason it couldn't now be included. @xavrileyhttps://github.com/xavriley may be able to remind me 😉

—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHubhttps://github.com/sonic-pi-net/sonic-pi/issues/2557#issuecomment-733351731, or unsubscribehttps://github.com/notifications/unsubscribe-auth/AAC2G574NBMEHTJ5ZLXW6FLSRRE4DANCNFSM4UBM7VKQ.

I’m not sure but we might have some other synths that do that now

I can't remember off the top of my head... but it's certainly not hard. In my emergent behaviour synths, I pass in the buffer id of the random number buffer that Sonic Pi pre-allocates for rand etc...

Presumably echo, reverb and gverb are also delay effects? I don't see any buffer being passed into any of them though, so it's not really clear to me how that should be done. Also, does that mean that these fx could be made more efficient by creating the buffer outside and passing in the id?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

MoiRouhs picture MoiRouhs  Â·  3Comments

emlyn picture emlyn  Â·  7Comments

NathanMEvans picture NathanMEvans  Â·  5Comments

MegumiSoft picture MegumiSoft  Â·  7Comments

chunseoklee picture chunseoklee  Â·  4Comments