rhythmecho .. need a little help

Post your groups/layouts here

Moderators: davidv, seb@plogue

rcrath
Posts: 268
Joined: Sat Dec 16, 2006 3:41 pm
Location: Honolulu
Contact:

rhythmecho .. need a little help

Postby rcrath » Wed May 08, 2013 9:14 pm

Hi, with lots of community help, I built rhythmecho, a delay group that continually sets the delay length to the timing of your playng with no host sync.

I am stuck trying to figure out how to get the clicks out of it. If I can solve it, I have another groupI am going to work on too that needs the same fix.

the effect takes audio input and runs a signal through an envelope follower (see image for details. THe time between triggers of the envelope follower is calculated via accum and S&H and used to set the delay time in samples which is applied to the actual audio signal which then gets fed back into the delay at some set volume.


problem: When S&H sends a new delay length in samples that is shorter than the delay length previously in the delay buffer, it cuts off the old signal already in the delay buffer wherever it is, usually not on a zero crossing, resulting in clicks. THis may only happen if the new delay length is shorter than the old delay length, since if the new one were longer the signal would get padded with zeros I think.

Image

To eliminate the clicks, I need to set an envelope release on the output of the delay so that there is a short fade to zero on the the truncated signal in the delay buffer after it comes out but before it goes to the output and feedback. For example, if the delay time swiched from 10,000 to 9,000 samples and I wanted to do a 100 sample fade out out or release, release would be on the delayed output signal and start at 9000-100=8900 samples after the delay legth change. I can easily calculate the 9000-100 part from the S&H output of course, but I am unclear on how to set the envelope so that there is a fixed number of samples followed by a fade to zero with no attack setting at all. mabe I don't even need an envelope here but some maths? multiply the output of the delay by a log function applied at 8900 samples after the change and lasting 100 samples before approaching the zero crossing?

Alternately, maybe it would work to delay the change in the delay signal 9000 samples later (in the example above) to let the new audio signal with the matching envelope to get in the buffer? not sure if that would sound good or even if it makes sense.

Appreciate any input on this.
~Rich Rath
My music and sound blog: WayMusic, and my experimental improv duo:rreplay. Almost everything I record and play is tracked in Bidule.

jersmi
Posts: 3412
Joined: Tue Apr 19, 2005 4:18 pm
Location: Oakland, California

Re: rhythmecho .. need a little help

Postby jersmi » Wed May 08, 2013 11:04 pm

True, you probably need some kind of envelope because it's a time-based issue. Maybe you could try triggering an Attack/Release envelope at the designated point with an accum wrap trigger. That is, if accum value (exclusive higher bound) == 8900, then trigger envelope. To go from signal to silence (1 to 0) and back, you might need 1-env, then multiply by signal.

Another suggestion:
Swap out the delay line for a basic audio buffer setup for delay. This would allow:
1. Longer delay times and losing the tests for the Delay Line limit of 65535 (though might want some upper limit for the sound you want).
2. Using the LoopPointFade group attached (the same principle you're chasing, this is my home-brewed solution and use it a lot).
Attachments
LoopPointFade.bgrp
(16.3 KiB) Downloaded 181 times

rcrath
Posts: 268
Joined: Sat Dec 16, 2006 3:41 pm
Location: Honolulu
Contact:

Re: rhythmecho .. need a little help

Postby rcrath » Mon May 13, 2013 4:23 am

Hi Jersmi,
Thanks for the loop fader group. I tried to get it working but I do not think I am uderstanding it right. I used 0 for the low bound and the delay length in samples (output from the S&H in in the delay subgroup) as both the accum and the hi bound. The result is that any fade time other than zero results in no output, and with fade time at zero it of course does not stop the clicks. alternately
, I can set the depth below zero, but that really attenuates the output and kills the feedback loop, although it does seem to stop the clicks, but that may be from the attenuated feedback as muchas a cure. I also tried putting the 65K sample limit of the delay time as the hi bound, but then the fade time had no effect at all. Here is the layout.

I can understand what I need todo to solve it. when a delay time of x samples is triggered, I need an envelope on the output of the delay that has a short attack and release, but the release is not a real midi style release, because it needs to kick in before the end of the buffer instread of at the end. so for an attack/release time of 2000 samples. for a delay length of x samples, the release would need to kick in at x - 2000 samples.

I have been thinking about the audio buffer as a solution but have not had time to try it yet.
The weird part of the problem is that it is not that the sound is starting off a zero, but that when the delay length shortens it just chops the end of the signal, so the clicks are coming from the end of the buffer rather than the beginning I think. If feedback is st to 0, I get no clicks, so the clicking is introduced by truncating whatever is coming through the feedback loop.
~Rich Rath
My music and sound blog: WayMusic, and my experimental improv duo:rreplay. Almost everything I record and play is tracked in Bidule.

rcrath
Posts: 268
Joined: Sat Dec 16, 2006 3:41 pm
Location: Honolulu
Contact:

Re: rhythmecho .. need a little help

Postby rcrath » Mon May 13, 2013 7:16 pm

I think I am making somoe rogress, but I will have to test it out. I want to make sure I am understanding envelopes right as far as release time goes. If I have an audio signal that is 1 second long and I put a 5 ms. release on it, that release does not kick in at 995 ms but at 1 second, which is after the sound is moved on to the next repeat. So if I am thinking right, I need to have an AR envelope with short A and R times and a gate that sends 1 for 995 ms and 0 for 5 ms with the trigger popping every 1 second. Is that right? I think I can do this with an accum set to pop at 995 ms (in samples) driving the env. gate while the first accum , set to pop at 1 second, drives the env trigger so that the release kicks in at 995 to 1000 ms.

I realizze this is not the actual layout and I will have to do some fiddling to get the seceond accum to drive the env. gate but I want to check if I am on the right track.
~Rich Rath
My music and sound blog: WayMusic, and my experimental improv duo:rreplay. Almost everything I record and play is tracked in Bidule.

rcrath
Posts: 268
Joined: Sat Dec 16, 2006 3:41 pm
Location: Honolulu
Contact:

Re: rhythmecho .. need a little help

Postby rcrath » Sun Nov 17, 2013 8:45 pm

I returned to the clicking problem in the rhythmecho group and got something close. the clicking is much more manageable, and with long A/R times, it gets interesting and greatly reduces the fed-back signal, which can be kind of cool. With shorter envelopes I am still not getting the timeing right. THe envelopes still click. I think I have the right tools but the wrong timing in the feedback loop somehow. Also, weirdly, the attack and release phases seem reversed. Anyway, here is the latest and greatest. I also reworked the rest of the delay logic farther up the chain so it is much better at tracking rhythms properly. If anyone can have a look and see if they can figure out the envelope thingie here in the feedback section, I would be greatly obliged. Jersmi, I still need to try and figure out the fader points grp. Thnx for that.
the group is at
https://github.com/rcrath/rhythmecho/releases
~Rich Rath
My music and sound blog: WayMusic, and my experimental improv duo:rreplay. Almost everything I record and play is tracked in Bidule.


Return to “Bidule Layouts”

Who is online

Users browsing this forum: Bing [Bot] and 1 guest