What's the error?
Wait, AudioManager doesn't exist in VX Ace. The module is Sound, but I'm not sure it can have its currently-playing BGM checked like that. Let me have a look.
Edit: Got it.
if (RPG::BGM.last.name != "Dungeon4")
But how do I change the volume and pitch?
nothing in your original post said anything about volume or pitch.
I suggest you give us a full description of what you want to do (instead of questions about tiny steps of how you want to do the unknownwhat), and then we can point you to how it is best done - scripts are not always the best solution for example.
Conditional Branch: If RPG::BGM.last.name != "Field3"
Conditional Branch: If Ship is Driven
Play BGM: "Ship", 105, 100
Else
Play BGM: "Field3", 105, 100
Branch End
Branch End