What is the effect of listening to music on walking? How does music affect walking speed and attitude? What will be the effects of different pitch and tempo of music on a person's walking behavior?
Research suggests that endurance is improved when movements are synchronized with a musical beat. [1] This research also supports the idea that music has 'motivational' qualities that may enhance performance. One study measured the pace and attitudes of participants running on a treadmill. The control conditions included: 1) no music ('acoustic stimuli'), 2) a metronome condition (a sequence of beeps matching the tempo of the participant, but nothing else), and 3) synchronous motivational music matched to participants' running tempo. From the abstract:


  The beat of the stimuli -which was most salient during the metronome condition- helped runners to maintain a consistent pace by coupling cadence to the prescribed tempo. Thus, acoustic stimuli may have enhanced running performance because runners worked harder as a result of motivational aspects (most pronounced with motivational music) and more efficiently as a result of auditory-motor synchronization (most notable with metronome beeps). These findings imply that running to motivational music with a very prominent and consistent beat matched to the runner's cadence will likely yield optimal effects because it helps to elevate physiological effort at a high perceived exertion, whereas the consistent and correct cadence induced by auditory-motor synchronization helps to optimize running economy.


Another study [2] measured oxygen consumption with synchronous, fast-tempo asynchronous, and slow-tempo asynchronous music. They found that the physiological effects of exercising with synchronous music was the most effective.

You mention walking in your question, and while walking is less an exercise than running or more rigorous physical activity, the results from both studies would suggest that people tend to respond 'best' to synchronicity between their movements and the music that they are listening to. Thus, humans have a natural tendency to match their steps to the tempo of this music. 

Unsurprisingly, people also tend to move more energetically in response to louder, more aggressive music, and move less energetically to gentler, softer music. This is true regardless of the tempo of the music.



Sources used:

[1] Bood, Robert Jan et al. “The Power of Auditory-Motor Synchronization in Sports: Enhancing Running Performance by Coupling Cadence with the Right Beats.” Ed. Ramesh Balasubramaniam. PLoS ONE 8.8 (2013): e70758. PMC. Web. 24 Aug. 2015.

[2] Effect of music-movement synchrony on exercise oxygen consumption. C. J. Bacon, T. R. Myers, C. I. Karageorghis. J Sports Med Phys Fitness. 2012 August; 52(4): 359–365.