Here is my scenario: Combat starts, the bard goes first and casts Haste on the party, and starts singing inspire courage. The evil wizard goes next, and casts dominate person on the barbarian. The barbarian fails his save, and is ordered to slay his party members. The bard makes a spellcraft check while the spell is being cast to identify the spell. The bard knows how badly this is about to go. The barbarian's turn is next, and he begins his full attack on the Bard who is adjacent to him. The Barbarian rolls his 4 attack rolls, and hits all of them, he is using power attack, rage, and a greatsword. The bard has low CON and dies.
At any point in that scenario after the bards turn is over can he declare the barbarian not an ally for the sake of inspire courage so he is not providing the barbarian bonuses to kill him? Would it be a free action, immediate action, not an action?
Its maintained on the bards turn. So the barbarian is still under its effects.
That's why these spells exist. Immediate action, the barbarian either saves the second time or theres no song to boost him to murder you. A good thing to look into
Interestingly it doesn't specify an action type to end Bardic Performance, only says that you must spend a free action on your turn to maintain it.
I would argue that you can choose to end the effect on them (by choosing them as not an ally) also as a free action (which could be done not on your turn).
I feel like only a cruel GM would force you to maintain giving them a bonus to kill you.
I don't think 'Ally' is ever fully defined, but I certainly think that anyone attacking the party let alone the bard himself, even someone who was an ally seconds before, wouldn't qualify. I would expect at a minimum both the bard and the recipient would have to believe they are on the same side for it to work, and clearly that wouldn't be the case here.
Certainly there is no declaration of allies step or action. It is assumed that who is an ally and who isn't is clear to all parties.
On top of that, I'd almost rule the bonuses to apply in reverse, given the barbarian is trapped in his own mind fighting the killing urge and the song of his good friend the barbarian is affecting his mind not his body. In this way, the song should be at least neutralized because the magically possessed body shouldn't benefit from it (already being more fully controlled by the stronger spell) and in the best case the Barbarian's mind should be struggling not to hurt his allies (and gain the moral bonuses to do so, possibly throwing the swing off a little as he tries to stop himself).
RAW, there's not a good answer. RAI I think you cancel it when he fails the save. Medium route I would offer you the chance to stop playing and lose the whole parties bonuses to stop his. Generous the song makes you miss the bard easier.
It really depends on how the DM wants to run it.
There is no rule for ending the song as an action or free action when not in your turn. That isn't part of the rules.
Songs are maintained for a full turn, as a free action on the bards turn. The bard decides then when it works and who on.
The barbarian is an ally, I would say, otherwise some abilities like allowing an ally to reroll a save wouldn't work. The barbarian was certainly an ally during the maintainace of the effect.
Regardless as it says the song is maintained for a turn as a free action on the bards turn, there is no way to stop it yourself it would seem, short of being closest to that barbarians 4 attacks.
The bard decides then when it works and who on.
That isn't part of the rules either. The only rule we have on who is affected is "To be affected, an ally must be able to perceive the bard’s performance."
I would submit that if a character a) isn't an ally or b) is not able to perceive the performance at the time they wish to apply the bonus, they are not affected by the performance regardless of what the bard did on their turn.
So for example, the bard maintains their Inspire Courage (audible) on their turn, an enemy mage deafens a fighter ally on next, and then the fighter goes, being unable to perceive the bard's performance, they are not affected, and don't get the bonus.
Similarly, a barbarian gets dominated, on the Barbarians turn he is not an ally who can perceive the performance, so he is not affected by it.