top of page
  • Writer's pictureShuaiqi Hu

Sonic Pi and Sine waves.

Updated: Oct 11, 2022

Lesson objective: By working with Sonic Pi, students will be able to accurately describe the characteristics of waves and the transformation of waves.


  • This lesson can be an exploration and review of sine waves.


  • First, brainstorm about waves, such as: what is a wave, discuss why a wave is useful, and then list all the important vocabulary of the waves, such as period Period, and amplitude:

    • The period of a function is the smallest domain containing the complete cycle of the function.

    • The amplitude of a function is half the distance between the maximum and minimum values of the function.

    • The frequency is the number of waves that pass a fixed point in a given amount of time.

  • Then review the general information on the graphs of sines, including what a sine graph looks like, the parent function, as well as the characteristics of the sine graph. Then make a connection between sine and a wave.

    • For example, the period of a sine or cosine function is the distance between the peaks of the graph.

    • Let students complete the Trignometry function Period amplitude table. The completed table is like this:



Note that the tangent wave has a vertical asymptote, so it has an undefined amplitude.


  • Main activity: A music wave clip in the Sonic Pi.

    • Before the group activity, conduct a whole-class discussion :

      • Play the Sonic Pi clip, and ask students, What kind of the wave is it? Sine, Cosine, or tangent?

        • Anticipated answers: Sine or Cosine. They are interchangeable with the additional transformation.

        • The anwer cannot be tangent.


set :bpm , 100
live_loop :boom do
  use_bpm get(:bpm)
  with_fx :reverb, room: 1 do
    n = 60
    amp = 2000
    hwl= 10
    play n, attack: hwl, release: hwl, amp: amp
    sleep 0.1
  end
end

  • Think - Pair - Share

    • First, students think individually about what each highlighted number mean.

      • If we make each number larger or smaller, what happens to the wave? Can we make each number negative?

    • Then they pair up to discuss and compare their ideas. They are going to write a paragraph to conclude their findings.

    • Finally, they are given the chance to share their ideas in front of the classroom.


  • Explain BPM means Beats per minute, it is one way to measure the frequency of the wave.

    • Listening Challenges - Watch the video and demonstrate how BPM affects a clip of music. Let students raise their hands up if they would like to stop so students are safe: Speedcore 100000 bpm

  • Explain amp controls the amplitude of the wave.

  • Explain attack and release changes in the wavelength/ period

  • Exit ticket: Make a mathematics model. Use the Sonic Pi interface Screenshot, and let students:

    • Make a sine and a cosine wave;

    • add the x and y-axis;

    • label key points;

    • label amplitude on each.
















82 views0 comments

Recent Posts

See All
bottom of page