# Difficulties with manually adding and removing dsps

**URL:** https://qa.fmod.com/t/difficulties-with-manually-adding-and-removing-dsps/21116
**Category:** FMOD Engine
**Tags:** csharp
**Created:** [January 18, 2024, 5:42pm UTC](https://qa.fmod.com/t/difficulties-with-manually-adding-and-removing-dsps/21116 "2024-01-18T17:42:56Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![PianoBoy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@PianoBoy](https://qa.fmod.com/u/PianoBoy)
#### Post date: [January 18, 2024, 5:42pm UTC](https://qa.fmod.com/t/difficulties-with-manually-adding-and-removing-dsps/21116/1 "2024-01-18T17:42:56Z")

</div>

Hello there! I’ve been developing some tools for Celeste modders to easily add/remove dsp effects to/from the various events that play in the background of the game. I’ve made two “triggers”, an Add/Remove Effect trigger, and an Edit Effect Param trigger.  
 ![the triggers viewable in Celeste's level editor](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/b9bb76e3f4ff0f00fef9404b299be9c64d2caf98.png)

The “Audio Effect Trigger” has various features, like defining which actions to take during specific events, such as when the level starts/ends, and when the player enters/leaves the bounds of the trigger.

 ![menu of the Audio Effect Trigger](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/d/d17505c55558eb9eb8baf30f8410d7e7cde82135.png)

In C#, I’ve made code that will “inject” a dsp into an event instance

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/d/d5b4d578e8f898fbb6eb627f8200a81218ec1b8d.png)

In another class, I then add that dsp to a list of dsps to keep track of, and remove them when they should be  
 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/7/71db67d0f30b5853c98ccff90a8b3cabf373221b.png)

Then, in the “Audio Effect Trigger” code I add/remove/do nothing with the effect based on what the user chose in the trigger options.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/fmod/original/2X/b/bb34cdf129be564f07e840b3236e76c5c95fe308.png)

The issue is that sometimes the effect won’t actually be added until the level is completely reloaded, and I don’t know why. I’m not sure if it’s an issue with the way my code is set up, or if it has to do with how Celeste manages events, or if it’s to do with how fmod handles dsps. Was thinking someone here might be able to point out where I’m going wrong.

---

<div class="post-metadata">

### Author: ![PianoBoy](https://avatars.discourse-cdn.com/v4/letter/p/e8c25b/32.png) [@PianoBoy](https://qa.fmod.com/u/PianoBoy)
#### Post date: [January 18, 2024, 6:33pm UTC](https://qa.fmod.com/t/difficulties-with-manually-adding-and-removing-dsps/21116/2 "2024-01-18T18:33:29Z")

</div>

Update: It wasn’t working because A) I misspelled “distortion” as “distoration” somewhere and B) I never specified which instance the dsp needed to be removed from so good job me lmao
