You could just do this with events. Make an item called "Ocarina". Make it so that it opens common event 1 (or whichever one you prefer) and is NON-consumable. Make the common event turn ON a switch. Make another common event, and set it to parallel process if that switch is on. Make loads of Input button conditional branches. For example:
Conditional Branch: The A button is Being Pressed
Play SE: Chime 2, 100, 100
else
Conditional Branch: The C button is Being Pressed
Play SE: Chime 2, 100, 110
else
Conditonal Branch: The X button is Being Presesd
Play SE: Chime 2, 100, 120
else
Conditional Branch: The B button is Being Pressed
Control Switch[(Whatever your switch id is)]= OFF
else
end
end
end
end
Something like that. Obviously, the more buttons you want on the Ocarina, the more conditional branches you should have. Just make sure that the conditional branch for B is always: Control Switch[(Whatever your switch id is)]= OFF.
Off-topic: Why does nobody ever use the pitch function?