Applying envelope functions to a soundfile

due to my understanding of p5js.org examples, applying envelope is just acceptable to an oscillator or a wave which has been made by p5js synthesizer itself, is it any possibility to apply an envelope function to a sound file like mp3 files?

1 Like

that is indeed possible,
with:
https://p5js.org/reference/#/p5.Envelope/setInput
example:
https://editor.p5js.org/kll/sketches/Z8H-Bu7Sq

2 Likes