Likely that is the window chanel came loose.
There is a main chanel, where the window sits, and 2 smaller chanels, attached to this one, where the electric motor arms run in...
Mine used to do the same noise, one of the chanels came loose/snapped, the window was still opening and closing as it was being pushed/pulled by the 2nd arm/chanel, the noise was the loose channel banging around.
To solve the problem will have to be a new window chanel, or weld it.
I've welded mine.. first time with the MIG, so a bit crappy, but did the job.
Hope it helps..but only way to find out is taking the door card off..