Valerie Short, 41, is alleged to have taken part in one-to-one and group sexual encounters at parties attended by members of a London college youth orchestra which she helped run.
Prosecutor Miranda Moore said: "This teacher made herself available to boys of 13, 14 and 15 for sexual favours. It was widely known amongst the youngsters she mixed with."
Judge Brian Pryor QC said: "The evidence discloses a prima facae case of sexual activities by the defendant with these young boys, quite advanced sexual activities in some instances, going on over a period of time when the defendant was a teacher - one of those helping to run the youth orchestra with quasi-parental responsibilities."
But at the end of two days of legal argument at Woolwich Crown Court in south-east London, he stayed the case, saying it would be grossly unfair to go ahead because the alleged incidents took place between 10 and 12 years ago and valuable defence evidence would have been lost.
He said Ms Short's alleged victims appeared to have been willing participants and there was no evidence that they had suffered psychological or emotional damage.
"This isn't a case where the victims have suffered in silence for years and years before being able to reveal the dreadful truth," he added.
Ms Short, of Blackheath, south-east London, was charged with five counts of indecent assault involving boys aged between 13 and 15 after a former victim contacted police last year. She was suspended from her post as music teacher at the John Roan school, Blackheath, pending the trial.
One of the alleged victims, who cannot be named for legal reasons, described one encounter with Ms Short when he was 15 after a violin lesson at her house.
Miss Moore read a statement from the boy in which he described how sexual contact between himself and Ms Short took place in the teacher's bedroom.
Defence counsel Louis French read from the same boy's evidence alleging that Ms Short had had sex with several boys at a party.
But the boy had told police: "Nothing happened that I was coerced into. I did it because I wanted to. I took advantage of it."
Judge Pryor concluded: "There's a real danger that because of the delay, valuable evidence supporting the defendant's case or weakening the prosecution case may well have been lost. In all the circumstances ...it would be grossly unjust for the case now to be pursued against her."