Since we are generating our own waves to make sound in the code, what is the best way to control the volume in the GUI?
I would recommend looking into FloatControl which is an object you can create from the javax.sound.sampled library to control the volume.