ledMode seems to break script??

Is this the audio board you are using? That page says it uses pin 13 as the line-in input for the R channel. Perhaps it actually checks that that pin is an input?