Volume controll

whats the code to make volume go up and down is it like this or something

on(press){
volume=p
p+=1
}