Skip to content

Conversation

@mx
Copy link
Collaborator

@mx mx commented Nov 23, 2025

Closes #7817

@mx mx force-pushed the convolution branch 2 times, most recently from e756c2d to f4641aa Compare November 23, 2025 23:45
Copy link
Collaborator

@baconpaul baconpaul left a comment

Choose a reason for hiding this comment

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

Looks good! I think theres only one thing (the continue) which might be an actual bug but otherwise just tiny comments and questions. Happy for you to merge once you've read them.

}

// TODO: Just change this entire thing to a single copy operation?
storage.getPatch().fx[s].user_data = fxsync[s].user_data;
Copy link
Collaborator

Choose a reason for hiding this comment

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

Yeah I agree this is probably fine but the copy could take a long time - any worry about two changes in a row? I'm almost wondering if we want something like an atomic pointer swap instead.

I don't think we change it now but let's remember this. Perhaps this is just saying that I agree with your comment.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Added note about maybe an atomic pointer swap or copy-on-write instead.

It's tough to see a memcpy() of tens of megabytes taking a long time but this is a good point. At least we're not in an active audio path here.

Copy link
Collaborator

@mkruselj mkruselj Dec 7, 2025

Choose a reason for hiding this comment

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

Couldn't we store just the path to the IR sample instead of the whole sample in memory? That would be a lot faster and would take up less RAM in the undo stack. Then on redo we repeat the load from disk etc.

Copy link
Collaborator

Choose a reason for hiding this comment

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

we need the data in memory to convolve it. this point is how it gets loaded. so definitely the path here wouldn't be useful.

@mx mx merged commit 243492e into surge-synthesizer:main Dec 7, 2025
13 checks passed
@mx mx deleted the convolution branch December 7, 2025 22:44
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.

Convolution reverb

3 participants