A device for sorting powdered, granular, or piece-form material, which device comprises an apparatus designed for separating different particles or pieces, wherein, in the device, particles, granules, or pieces of different materials are guided in separated form in the direction of the apparatus designed for separating different particles or pieces, wherein the apparatus comprises a laser beam source, a spatially resolved detector array, an electronic evaluation unit, and a controller, wherein the laser beam source comprises a plurality of diodes emitting radiation, and the apparatus is configured such that the particles, granules, or pieces are irradiated by a beam emitted by the laser beam source such that Raman or fluorescence radiation is generated at surfaces of the material of the particles or pieces, and the generated Raman or fluorescence radiation is directed toward the detector array designed for the spatially resolved detection of this radiation, and the beam emitted by the laser beam source toward the particles, granules, or pieces is at least approximately monochromatic electromagnetic radiation, the central wavelength of which is selected such that there is no influence on the Raman or fluorescence radiation during the detection, and this radiation is directed across the width of the separated particles, granules, or pieces, and the individual detectors of the detector array are designed for the spatially resolved detection of electromagnetic radiation reflected or scattered by the particles, granules, or pieces, and an optical filter or a beam splitter is arranged between the particles, granules, or pieces and the detector array and is designed such that electromagnetic radiation having the wavelength of the beam does not impinge on the detectors of the detector array; wherein the irradiation and detection are performed during a relative movement between the particles, granules, or pieces, the focal range of the beam, diodes emitting the electromagnetic radiation, and the detectors of the detector array, and at least the detectors of the detector array are connected to the electronic evaluation unit, and the electronic evaluation unit is designed for the spatially and spectrally resolved evaluation of spectral intensities of the Raman or fluorescence radiation detected by the detectors of the detector array and for performing an image analysis for determining the shape and position recognition of individual particles, granules, or pieces, and is connected to the controller for the apparatus. the particles, granules, or pieces are irradiated by a beam emitted by the laser beam source such that Raman or fluorescence radiation is generated at surfaces of the material of the particles or pieces, and the generated Raman or fluorescence radiation is directed toward the detector array designed for the spatially resolved detection of this radiation, and the beam emitted by the laser beam source toward the particles, granules, or pieces is at least approximately monochromatic electromagnetic radiation, the central wavelength of which is selected such that there is no influence on the Raman or fluorescence radiation during the detection, and this radiation is directed across the width of the separated particles, granules, or pieces, and the individual detectors of the detector array are designed for the spatially resolved detection of electromagnetic radiation reflected or scattered by the particles, granules, or pieces, and an optical filter or a beam splitter is arranged between the particles, granules, or pieces and the detector array and is designed such that electromagnetic radiation having the wavelength of the beam does not impinge on the detectors of the detector array; wherein the irradiation and detection are performed during a relative movement between the particles, granules, or pieces, the focal range of the beam, diodes emitting the electromagnetic radiation, and the detectors of the detector array, and at least the detectors of the detector array are connected to the electronic evaluation unit, and the electronic evaluation unit is designed for the spatially and spectrally resolved evaluation of spectral intensities of the Raman or fluorescence radiation detected by the detectors of the detector array and for performing an image analysis for determining the shape and position recognition of individual particles, granules, or pieces, and is connected to the controller for the apparatus.