Forum Rule: Always post complete source code & details to reproduce any issue!
Results 1 to 12 of 12

Thread: String Ensemble Chorus Effect created!

  1. #1

    String Ensemble Chorus Effect created!

    Here's my first working version of a String Ensemble Chorus: https://github.com/quarterturn/teensy3-ensemble-chorus

    It's an emulation of the triple-delay modulated 120 degrees out of phase with a 6.0 Hz + 0.6 Hz sinewave LFO effect, like in a Roland RS-202 or a Lowrey Organ with "Symphonic Strings".

    Since it's "babby's first effect attempt" it will likely be in need of bringing up to standard with the rest of the effects in the library. I don't fully understand how multi-channel is handled via blocks in the audio library, so it might not work with more than one channel. It could also use help with how I handle the LFO. I'd wanted to re-use my wavetable from the Due version, but ran into issues with progmem, so I just create it and store it in RAM when the object is created. That too need fixing.

    Please test! You will need the .cpp, .h, and audio.h. Please note in my examples I use Blackaddr's audio interface, not the one sold on the PJRC website. It's pretty simple to edit the code to make it work with that one.

    I hope this finds use in projects. I know I'll be coding a "string machine synth" with it. No need to buy Waldorf's Steichfett (which doesn't really get the ensemble effect correct anyway).

  2. #2
    Hmm, so I had a few minutes to test this out and I could not get it working... or at least I could not get any sound out of it.

    T4, WM8731, custom hardware, but it is proven hardware at this point.

    I did edit your example sketch to use the stock WM8731 controller code, and removed BALibrary.h since I do not have that installed. I verified that it did enter the loop, so at least it's not locked up.

  3. #3
    Quote Originally Posted by wcalvert View Post
    Hmm, so I had a few minutes to test this out and I could not get it working... or at least I could not get any sound out of it.

    T4, WM8731, custom hardware, but it is proven hardware at this point.

    I did edit your example sketch to use the stock WM8731 controller code, and removed BALibrary.h since I do not have that installed. I verified that it did enter the loop, so at least it's not locked up.
    Did you replace audio.h? Also double-check the patch settings. You might want to try taking i2sin straight to ensemble and then right to i2sout.

  4. #4
    I think the updated version of audio.h just has the additional include for effect_ensemble.h, right? I just included effect_ensemble.h directly.

    Anyway I will try again today if possible, I would really like to hear how this sounds.

  5. #5
    Yes audio.h just has the include.

  6. #6
    try just this:
    // Audio Connections
    AudioConnection patchIn(i2sIn,0, ensemble, 0); // route the input to the ensemble
    AudioConnection patchOut0(ensemble, 0, i2sOut, 0); // connect the cab filter to the output.
    AudioConnection patchOut1(ensemble, 1, i2sOut, 1); // connect the cab filter to the output.

    I had:
    AudioMemory(48);

    That's probably overkill.

  7. #7
    Hello I'm trying your Ensemble Chorus effect on my synth, because I want a good stereo chorus with some kind of adjustment and a dry/wet mix. It works great in stereo. I had to change the name BUFFER_SIZE to EFFECT_BUFFER_SIZE, because it's clashing with another one somewhere.
    Heres a demo:


    I'm looking for some parameter I can change in it and create a method, so I can adjust it with my Effect Amt pot. The LFO rate is currently fixed isn't it?


    Later that day...
    Yes, I think this is a keeper. I've got the dry/wet mix pot working and it sounds great as you increase the wet level to 100%. A low detuned PWM unison note with increasing chorus is... I'm impressed. Thanks!
    Last edited by UHF; 09-20-2019 at 11:37 AM. Reason: More gushing about how good it is.

  8. #8
    Glad you like it! I will change BUFFER_SIZE to something like ENSEMBLE_BUFFER_SIZE. The LFO rate is determined by COUNTS_PER_LFO, which essentially tells the update method how many interrupts to skip when advancing the wavetable index. I can change update so it accepts a value for COUNTS_PER_LFO to allow it to be changed. In practical terms, you don't want to go too fast or it sounds like vibrato. Slower doesn't sound bad. There is a sort of sweet-spot for the effect which churns up the signal just right, and it also depends on the waveform you send it. If you want a very lively, springy animation to the sound a pulse waveform works best.

    At some point I will create a version which calculates the LFO on the fly, then you can tweak all sorts of stuff.

    Thanks for testing!

  9. #9
    I've added a method to alter COUNTS_PER_LFO and it gives a nice lfo rate effect, ranging from 500 to 50 exponentially.

  10. #10
    Quote Originally Posted by UHF View Post
    I've added a method to alter COUNTS_PER_LFO and it gives a nice lfo rate effect, ranging from 500 to 50 exponentially.
    Great! Please share here so I can add it to my repo.

  11. #11
    Here it is. Can you look at the lfoRate() method. I've assumed 100 COUNTS_PER_LFO is 6Hz and used that as the basis for converting LFO rate in Hz to countsPerLfo. This probably isn't correct but it's a way to assign some meaningful value to it.

    https://1drv.ms/u/s!Avbtf5PcDsB0ipEt..._bL_w?e=wZJath

  12. #12
    Quote Originally Posted by UHF View Post
    Here it is. Can you look at the lfoRate() method. I've assumed 100 COUNTS_PER_LFO is 6Hz and used that as the basis for converting LFO rate in Hz to countsPerLfo. This probably isn't correct but it's a way to assign some meaningful value to it.

    https://1drv.ms/u/s!Avbtf5PcDsB0ipEt..._bL_w?e=wZJath
    Thanks! I think actually COUNTS_PER_LFO should be 200 to get the slow part of the LFO to be 0.6 Hz and the fast part (which is 20x faster than the slow) to be 6.0 Hz. I just tried it and it does sound more 'correct'. There's a definite sweet spot to get it to do its magic with a sawtooth.

    Right now I'm having no problems with 16-voices running on a Teensy 3.6, so I think I'll eventually also do a version which creates the LFO on the fly. This way both parts of the LFO can be tweaked in real time. In that case it will probably make sense to allow the stereo mix to be configured, and maybe also do the ensemble the way some of the other Roland synths did, which is to say having four different LFOs split into two phase locked choruses per channel. This gives a more complex ensemble, but it doesn't have the distinct 'springy' sound of the three-phase LFO.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •