There's no way the author came up with this by himself
I mean, it probably had to do with him knowing beforehand about the chromesthesia thing, but it's pretty awesome.
Also one could have expected an almost supernatural twist of a way for the villain to "cheat", wich in this case looks less plausible because it's a bit like it was tailored for this game, as in, too convenient for those pipes to resonate that well through all the labyrinth.