Vibratory device (1) for compacting machine comprising a shaft (3), at least one eccentric mass (4,5,6) rotatable arranged around the shaft (3) and at least one motor (8) arranged around the shaft (3). The motor (8) is arranged for rotating drive of at least one of the eccentric masses (4,5,6) around the shaft (3). The motor (8) comprise a winding unit (9) connected to, the shaft (3) and a rotor (10) rotatable arranged around the shaft (3) and connected to at least one of the eccentric masses (4,5,6). The rotor (10) is arranged to be actuated by at least one magnetic field to rotation around the shaft (3) and the winding unit (9) is arranged to generate the magnetic fields which actuates the rotor (10) to rotation.