Skip to content

Conversation

@piedoom
Copy link
Contributor

@piedoom piedoom commented Oct 13, 2025

Drafting to track #16 - some things to fix, but I think this is close. Still need to fix issues with pause behavior and time change clicking, as well as smoothing filter values (done). There also may be some performance improvements to be made, especially with how I am handling interpolating between times.

I modeled this after what I presume is happening with Bitwig's delay effect, which allows for both single echos and feedback delays.

                              XFeed In
                                  ▼
                                  │
                                  │             ┌─► XFeed Out
                 ┌──────┐         │   ┌─────┐   │
              ┌─►│Filter├────►────┴──►│Delay├───┤
              │  └──────┘ Feedback    └─────┘   │
              │                               ┌─▼─┐
         In ●─┴──────────────────────────────►│Mix├───► Out
                                              └───┘

Issue criteria:

  • mix - The wet/dry mix.
  • delay - The amount of delay in seconds
  • tap_gain - I found this was redundant with the mix and feedback
  • tap lowpass - Renamed to feedback_lpf. I think feedback is more generally understood than tap (and should be more accurate in this case as well).
  • tap highpass - Renamed to feedback_hpf for above reason
  • enabled - Not needed with mix setting
  • Additionally, the node will have a custom Stop event to clear the internal buffers.

Additional features

  • Feedback - Transforms this node from a single echo into a delay effect with feedback.
  • Multi-channel supports crossfeed feedback
  • [🚧] Pause/Unpause

Tradeoffs

  • The effect uses its own buffers instead of scratch buffers, as channels above a certain amount may result in more scratch buffers being needed than available.
  • For mono versions of the node, crossfeed is still an available parameter, although changing its value does nothing.
  • From my initial findings, we may be able to simply crossfade between two delay times, and not do anything fancy like stride interpolation. However, I only tested with sine waves.

added back stopping. pause still strange, time changing still can click

smoothed filter values
@piedoom
Copy link
Contributor Author

piedoom commented Dec 14, 2025

OK, I did some additional testing, and it seems that the issue I was running into where all Notifys are immediately triggered is specific to the UI visual nodes graph example (and it happens with all nodes, and happened before this addition). Can dig in more but technically I think this is an existing "bug". The code itself should be fine

@piedoom piedoom marked this pull request as ready for review December 14, 2025 00:13

/// Read the least recent sample pushed to this delay line (the sample that
/// will be replaced with the next [`Self::write_and_advance`]).
pub fn read_last(&self) -> f64 {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

all of this can use some bikeshedding, idk if these are correct terms

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.

1 participant