I solved my question.
I did some more research and figured it out. Changed html bit to:
Volume: 0%<input type="range" min="0" max="1" step="0.01" value="1" onchange="Processing.getInstanceById('spaceGame').changeVolume(this.value)">100%
(obviously I gave the canvas an id as well)
Changed function to:
void changeVolume(slideAmount){
volume = slideAmount;
alert("Volume was changed to "+volume*100+"%");//for testing
}