Need help combining 2 sketches

IDK, I honestly know little to nothing about code and programming language. I am a hardware build it kinda guy, a ex coworker is the one who wrote the initial program and had a very janky setup for a test unit. I have rebuilt our control fixture and am wanting to change the melody that was originally written into the code.