Chapter 9
The focus in chapter 9 is on modifying sounds using ranges which means that for loops won’t
always start at 1 and continue while the index is less than the length of the array.
In section 9.2 we show creating a sound clip by passing in as parameters the start and end index.
In section 9.3 we show how to splice sounds together using several for loops. The early methods
in this section are not written in a very reusable way on purpose to set up the motivation for a
general splice method near the end of the section.
In section 9.4 we show how to reverse a sound which something that the students usually enjoy.
They like to reverse music to look for hidden messages. See
In section 9.5 we show how to mirror a sound which is the same algorithm as mirroring a picture.
This is one of the reasons why we repeat concepts with sound. It gives us the chance to show
that the same algorithm can be used on different media.