Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement a sequenced "Reverter/Delay" effect #254

Open
JohannesLorenz opened this issue Jun 25, 2023 · 5 comments
Open

Implement a sequenced "Reverter/Delay" effect #254

JohannesLorenz opened this issue Jun 25, 2023 · 5 comments
Assignees

Comments

@JohannesLorenz
Copy link
Contributor

Motivation:

  • We have no reverter at all right now. Reverters can popular in many cases: They allow extending drumkits by fading-in counterparts, which is often used for snares and cymbals. Also, in electronic music, reversing any kind of output is quite popular, especially after Echos/Reverbs.
  • The reverter effect can easily be used as a Delay with a single boolean.

Function:

  • The effect works with time slices, specified by nominator and denominator
  • Two buffers, one records the current input, the other buffer writes its content (the previous record). At the end, both buffers are swapped. A boolean allows reverting the "write" phase.
  • Discontinuities must be resolved properly
    • Only relevant if the reverter boolean is being used
    • The fade-out might be easy, since we can continue the wave, as we knew what was before the (original, non-reverted) wave -> We can simply fade out this part
    • The fade-in: Unlike fading in notes in e.g. ADsynth, where punch at the beginning is crucial, this is not the case here, so we can go with a rather slow fade-in to avoid clicks in all cases. Also note, the fade-in is the fade-out of the original wave, so it is never punchy. Suggestion: Take the slowest fade in time that we use for ADnote notes: ~256 samples at 44100 Hz = ~5ms.
    • Probably we must try out good solutions here
@JohannesLorenz
Copy link
Contributor Author

Btw, it's not urgent, but @friedolino78 @fundamental feel free to review this concept.

@friedolino78
Copy link
Contributor

friedolino78 commented Jul 3, 2023

it seems to me that this is technically quite similar to the comb filter

at the first look only two line has to be changed:
smp[i] = smp[i]*gain + tanhX(
gainfwd * sampleLerp( input, pos) -
gainbwd * sampleLerp(output, pos));
would be:
smp[i] = sampleLerp( input, pos);

and:
float pos = float(mem_size-buffersize+i)-delay;
would be:
float pos = float(mem_size-offset-(n*offset+i)%delay);

with n++ for every buffer.

@friedolino78
Copy link
Contributor

friedolino78 commented Jul 5, 2023

the idea seems to work roughly:
#255
now there is an reverse effect. but no audio out, yet. maybe some bad copy-paste-naming jumping off from echo effect

@friedolino78
Copy link
Contributor

effect gui: mruby-zest/mruby-zest-build#105
the effect is present in the code

@friedolino78
Copy link
Contributor

friedolino78 commented Jul 9, 2023

whit the latest commits everything should be working as intended.

  • crossfade is now implemented
  • phase parameter is now implemented

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants