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

reversed delay effect #255

Open
wants to merge 24 commits into
base: master
Choose a base branch
from

Conversation

friedolino78
Copy link
Contributor

not yet synced to bpm. but the audio part seems to work

src/DSP/CombFilter.cpp Outdated Show resolved Hide resolved
@JohannesLorenz
Copy link
Contributor

The caption is a bit misleading? While this is a reverter which re-uses the Comb Filter code, it is not a comb filter? A filter would usually have a frequency and a resonance.

@friedolino78
Copy link
Contributor Author

While this is a reverter which re-uses the Comb Filter code, it is not a comb filter? A filter would usually have a frequency and a resonance.

that's right. this has only a frequency. since it cannot oscillate a resonance makes no sense. question is if the REV filter type has any use or should be removed.

@fundamental
Copy link
Member

I'd be in favor of refactoring the rev mode out of the comb filter code since I'd argue it's its own effect. At least my general expectation is that you'd only want this reverse mode as an effect and not within individual filters in add/pad/sub.

@friedolino78
Copy link
Contributor Author

I'd be in favor of refactoring the rev mode out of the comb filter code since I'd argue it's its own effect. At least my general expectation is that you'd only want this reverse mode as an effect and not within individual filters in add/pad/sub.

ok. removal it will be.

@friedolino78 friedolino78 changed the title first attempt on a reversed comb filter first attempt on a reversed delay effect Sep 23, 2023
@friedolino78
Copy link
Contributor Author

ready for review again.

@friedolino78
Copy link
Contributor Author

unfortunatelly the sound is broken now. please help

@fundamental
Copy link
Member

Here's a test that should help replicate some of the valgrind issues
quick-random-test.txt

@fundamental
Copy link
Member

I don't know if it produces the right audio, but it looks like the valgrind issues are by and large resolved via:

diff --git a/src/DSP/Reverter.cpp b/src/DSP/Reverter.cpp
index fcadd8f6..9f3061d3 100644
--- a/src/DSP/Reverter.cpp
+++ b/src/DSP/Reverter.cpp
@@ -14,7 +14,19 @@ namespace zyn{
 
 Reverter::Reverter(Allocator *alloc, float delay,
     unsigned int srate, int bufsize, float tRef)
-    :gain(1.0f), samplerate(srate), buffersize(bufsize), buffercounter(0), fading_samples((int)srate/25), memory(*alloc)
+    :input(nullptr),
+    gain(1.0f),
+    delay(0.0f),
+    phase(0.0f),
+    buffercounter(0),
+    reverse_offset(0.0f),
+    phase_offset(0.0f),
+    reverse_pos_hist(0.0f),
+    fading_samples((int)srate/25),
+    fade_counter(0),
+    memory(*alloc),
+    samplerate(srate),
+    buffersize(bufsize)
 {
     
     // (mem_size-1-buffersize)-(maxdelay-1)-2*fading_samples-maxphase > 0 

@friedolino78 friedolino78 changed the title first attempt on a reversed delay effect reversed delay effect Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants