void loop() {if (door = HIGH);// no need to repeat the melody.
}
Asidefromtheatrociousformatting,thereareseveralproblemswiththisfunction.
door is assigned a value of 1. door will ALWAYS be 1, unless you mistakenly overwrite it. To prevent this, door should be const, so it can not be overwritten.
The if statement assigns a value to door (which it should not be able to do), then uses the result of that assignment as the condition. Since the assignment always succeeds, the if statement will always be true.
You need to make door const, you need to use == in the if test, you need to loose the ; on the end, AND you need to compare the value read from the door pin to HIGH, NOT the value of the door pin.