To view this content, you need to install Java from java.com

This sketch demonstrates how to use the removeEffect(int) method of an Effectable class. The class used here is AudioPlayer, but you can also remove effects from AudioInput, AudioOutput, and AudioSample objects. Effects added to an Effectable are stored in the order they are added. They are indexed starting from zero. So if you want to remove the third effect in the chain you'd call removeEffect(2). This sketch adds four low pass filters to the player. You can then remove them one at a time by pressing any key. Removing an effect means that it is completely removed from the Effectable you added it to. You will need to use addEffect to add it back, but keep in mind that it will be added at the end of the effects chain. It is not possible to insert an effect anywhere in the chain.

Source code: removeEffectByIndex waveform

Built with Processing