An efficient displacement-based finite element procedure is developed to investigate sound propagation in one-dimensional acoustic systems. The systems considered involve components made up of air and accoustic porous and solid materials, with the air boundary subjected to a sinusoidal sound source. Each component is modeled using higher order three node finite elements. Continuity of acoustic velocity and force equilibrium are satisfied at the interface between the air and the porous/solid media. The global equations of motion for the acoustic systems are assembled using the Lagrange multipliers method. The finite element procedure is implemented by means of MATLAB. The code is used to calculate various acoustic parameters including the sound absorption coefficient for a representative porous material and the sound transmission loss for several materials. The predicted results presented are in excellent agreement with available analytical solutions, which have been validated by published experimental data.