an attempt at a string-machine chorus effect

4 años 10 meses antes #1821 por quarterturn
I'd like to have a "string machine" chorus effect. There were many implementations, but the sound I like best consists of three delays modulated 120 degrees out of phase by a combination of 6.0 Hz and 0.6 Hz sinewaves. It has a springy, bouncy sound which is hard to describe but unmistakable when you hear it.

I've implemented a circular buffer for incoming audio samples. The modulation wavetable is read in at three evenly spaced offsets to provide the phasing. The modulation copies the current sample by whatever distance is read from the wavetable index to the current buffer position plus the offset. I sum the two and then bitwise-shift right by one to divide the level by two. This is to prevent clipping.

Trouble is, it sounds awful. You can hear the modulation, but there's so much noise and distortion that the overall chorus effect is inaudible. I also noticed the example chorus code sound bad too if you turn off the mixer switch on the pedalshield and just listen to the DAC output.

The code is here on github: github.com/quarterturn/due_ensenble_chorus

Any help would be appreciated!
El siguiente usuario dijo gracias: Ray, EmmaNeales

Por favor, Identificarse para unirse a la conversación.

4 años 9 meses antes #1822 por Ray

Rendering Error in layout Message/Item: array_keys(): Argument #1 ($array) must be of type array, null given. Please enable debug mode for more information.

Por favor, Identificarse para unirse a la conversación.

4 años 8 meses antes #1910 por quarterturn
I've thought about it some more and I think my problem is it's not enough to just delay the incoming audio,, you also have to stretch it by some amount.

As I read it, the chorus_vibrato code:
- fills the buffer to the current delay depth, each time playing back the current sample
- copies the last sample POT0 number of times
- increments the delay depth by POT0 max depth or decrements the delay depth by POT0

So as it goes up it plays a little more of the stretched by POT0 sample, and going down it plays less.
Beats me how this changes the pitch though other than the small part stretched by the POT0 value.

I think the key to having a wavetable LFO is to use a circular buffer for each "voice" and vary the position of the stretched sample.
El siguiente usuario dijo gracias: Ray

Por favor, Identificarse para unirse a la conversación.

4 años 8 meses antes - 4 años 8 meses antes #1911 por quarterturn
At last, an almost working version!
Here it is: github.com/quarterturn/due_ensenble_chor...e/master/chorus_test
Here's a ink to a quick video demo:


I used my Casio MT-600, since it's battery operated and easy to get close to my code desk. I chose the driest preset it has, which is "violin". There's a tiny bit of chorus in it, but you can definitely hear the springy animation of the ensemble chorus. Also you can hear how the unwanted noise tracks the LFO.

If you feed in a narrow pulse or sawtooth, you'll hear the classic triple-BBD 120-degree phased sound.I think it's pretty close to what my Oakley SRE330 in triple mode.

What remains to be fixed is some sort of periodic noise which is getting in somehow from the LFO. I'm pretty sure it's the LFO as it's in sync with the period of the LFO wavetable. I'm pretty sure it's not an overflow or wrapping problem in the circular buffer. Maybe my code is taking too long to run inside the 44.1 KHz interrupt? I doubt this, as I hear a similar noise with everything commented out down to just one buffer.

It took me a long time to wrap my head around the chorus/vibrato example. There's confusing stuff going on in there as it does not use a circular buffer. Once I started over with a circular buffer it made a lot more sense and I got it working pretty quickly.
El siguiente usuario dijo gracias: Ray, EmmaNeales

Por favor, Identificarse para unirse a la conversación.

4 años 8 meses antes #1912 por quarterturn
FIXED! I was not handling when the LFO causes the buffer indexes to roll over in reverse. It sounds great now!

Updated code is here: github.com/quarterturn/due_ensenble_chor...e/master/chorus_test
To download go here github.com/quarterturn/due_ensenble_chorus and click the button and choose "zip", or you can use "git clone" with the git:// address.
El siguiente usuario dijo gracias: Ray

Por favor, Identificarse para unirse a la conversación.

4 años 8 meses antes #1914 por Ray
Wow thats a great job!!! thanks for sharing it :woohoo:

Por favor, Identificarse para unirse a la conversación.

4 años 8 meses antes #1915 por quarterturn
New demo fixed code:


Next step is port it to the Teensy 3.x audio library as an effect so it can be part of a full string machine.
El siguiente usuario dijo gracias: Ray

Por favor, Identificarse para unirse a la conversación.

2 años 9 meses antes #2785 por EmmaNeales
Thanks for sharing this topic, i find it very helpful, that's what i was looking for! B)

Por favor, Identificarse para unirse a la conversación.

Tiempo de carga de la página: 0.107 segundos