# CLAP: Bug when using Reaper FX oversampling

**URL:** <https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703>\
**Category:** Uncategorized\
**Created:** [10 September 2022 17:04 UTC](https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703 "2022-09-10T17:04:27Z")\
**Posts on this page:** 6\
**Page:** 1

<div class="post-metadata">

**Author:** ![Matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Matt](https://iplug2.discourse.group/u/Matt)\
**Post date:** [10 September 2022 17:04 UTC](https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703/1 "2022-09-10T17:04:27Z")

</div>

Hi,

I seem to have come across a strange bug in iPlug2-clap.

Situation:

- Windows 10, 64-bit, everything up to date;
- Reaper latest dev build: v6.67+dev0908;
- iPlug2-clap, CLAP\_SDK, CLAP\_HELPERS, all updated to the very latest versions;
- Reaper set to 48k (but this is irrelevant, as the same bug occurs on other sampling rates as well).

I duplicated IPlugEffect.  
With no FX oversampling enabled in Reaper, everything works fine.  
With any of Reaper’s FX oversampling settings enabled, the CLAP version of the plugin goes crazy, and starts comb filtering out of the blue, _AND_ the effect is even different between left and right channels.

This happens _ONLY_ (and _ALWAYS_) on the CLAP build of the plugin, _NEVER_ on the VST3 build of the same plugin, whenever Reaper’s oversampling is enabled.

For comparison, I tried the exact same test with Surge’s CLAP effects plugin, and the bug does _NOT_ occur there, so I must conclude that the fault is not within Reaper, but within either the CLAP framework, or iPlug2-clap.

Any help appreciated! 🙂

![SmolPlugg-001](https://global.discourse-cdn.com/free1/uploads/iplug2/original/1X/5564a20affd5dbd40454e1aeaecd6107a7a21fd0.gif)

---

<div class="post-metadata">

**Author:** ![Matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Matt](https://iplug2.discourse.group/u/Matt)\
**Post date:** [10 September 2022 22:01 UTC](https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703/2 "2022-09-10T22:01:08Z")

</div>

Frequencies of the comb filter notches seem to be exactly odd multiples of sample rate / buffer size, (in the above gif, that was 48000 / 256 = 187.5 Hz and odd multiples), so I’m sure it’s got something to do with a buffer not being cleared that should, or similar.

---

<div class="post-metadata">

**Author:** ![AlexHarker](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@AlexHarker](https://iplug2.discourse.group/u/AlexHarker)\
**Post date:** [11 September 2022 13:01 UTC](https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703/3 "2022-09-11T13:01:45Z")

</div>

Thanks - for bug reports it’s best to use Github Issues (which I think has now been done, as I’ve just checked)…

---

<div class="post-metadata">

**Author:** ![Matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Matt](https://iplug2.discourse.group/u/Matt)\
**Post date:** [11 September 2022 13:04 UTC](https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703/4 "2022-09-11T13:04:51Z")

</div>

Hi Alex,

Yeah, I was very tired yesterday and forgot, sorry about that.  
Indeed, now corrected after some good strong coffee 😉

Please let me know if you need any more info 🙂

Many thanks for your fantastic hard work with iPlug2!

---

<div class="post-metadata">

**Author:** ![AlexHarker](https://avatars.discourse-cdn.com/v4/letter/a/9de053/32.png) [@AlexHarker](https://iplug2.discourse.group/u/AlexHarker)\
**Post date:** [11 September 2022 13:06 UTC](https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703/5 "2022-09-11T13:06:30Z")

</div>

No worries. I replied on the issue - if you want to investigate first that’s fine, as I’m working through a to do list on clap. Hopefully you’ve also seen the breaking parameter handling changes that were necessary to get correct parameter shaping.

---

<div class="post-metadata">

**Author:** ![Matt](https://avatars.discourse-cdn.com/v4/letter/m/a6a055/32.png) [@Matt](https://iplug2.discourse.group/u/Matt)\
**Post date:** [13 September 2022 15:28 UTC](https://iplug2.discourse.group/t/clap-bug-when-using-reaper-fx-oversampling/703/6 "2022-09-13T15:28:27Z")

</div>

Issue has been solved
