I took the sound project I previously worked on and expanded it by adding these features:
I added a slider in the pad class constructor and replaced the rate value in the update() function →
I tried several ways to include the slider and this worked and seemed the cleanest as well (compared to having the sliders in the main sketch.js).
I tried to add a button within the pad class but it didn't work as I didn't know how to access the button state... after many hours of failing to debug, I decided to "give up" on the recording feature and move on first.