Control of collective activity to crystallize an oscillator gas