International audienceIn this paper we consider in-domain control of distributed parameter port-Hamiltonian systems defined on a one dimensional spatial domain. Through an early lumping approach we extend the control by interconnection and energy shaping approach to the use of distributed control over the spatial domain. With the established finite dimensional controller, the closed-loop performances can be modified over a given range of frequencies while guaranteeing the closed-loop stability of the infinite dimensional system. Two cases are investigated, the ideal case where the controller acts on the complete spatial domain (infinite dimensional distributed control), and the more realistic one where the control is piecewise homogeneous (...