Hello it seems I am quite bad at this game since the very beginning

I found a flute and noticed there is a new icon active which starts a tune. I figured out it heals me when activated. The journal/spellbook describing the actions and abilities says I have no idea where to learn any melody, so is this some kind of default not described melody I can play from the beginning?
Then I got to this weird situation - I was playing a flute and then I met an enemy dog. The fight started but I could not attack, because spell icon was not there, I could not go to inventory to switch over to a sword and any button I tapped only caused the round to end and in next round I was attacked by the dog. The melody could not be stopped either. I could only walk around, but did not figure out what the heck to do to be able to fight back! Is it a bug or did I just click the wrong buttons? Please tell me what would you tap in this situation (see photo)