Create the stroke unit:

Put a stroke alined at each side of the blue rectangle:

Select them and go to menu Object > Blend > Make
Create the Wave Path:

Select the blend ant the Wave Path and go to menu Object > Blend > Replace Spine

Menu Object > Blend > Blend Options > Specified Steps

If it is necessary to modify the distance between the sticks, regulate the vector points handles:

To replicate the waves make new blends or duplicate the original and transform the Spine Path selecting it with the Direct Selection Tool + Alt to get the whole path. In the Gif image it is flipped vertically:

—————————————————————————————————
Once you have all the waves, the recommendation is to put each of them in a different layer and continue working independently.
—————————————————————————————————
To change the strokes length, create the Cut Path, or duplicate the Spine Path from the next lower blend:

Select the blend, menu Object > Blend > Expand
Select the blend group together with the Cut Path and choose the Shape Builder Tool:

Pressing Alt delete the excess part of each path and reverse the path direction from the Stroke Panel

Select the sticks, menu Object > Ungroup
and Distribute horizontaly
