fbpx
Skip Navigation

How to Program Sounds

By Phuong Diep
Key Coding Concepts
  • Algorithms
  • Events
Terminology

Algorithms

A step-by-step set of operations to be performed to help solve a problem

 

Events

One thing causing another thing to happen i.e. ‘when clicked’ block

 

Sound is a type of energy. It is produced when things vibrate causing air particles to move and bump into each other. This movement is called sound waves, which can travel through air, water, and solid objects. Sound waves enter the ear canal, the eardrums vibrate, and the brain converts these impulses into what we interpret as sounds.

 

Frequency is the measurement of how fast a sound wave oscillates. It is measured in hertz. The pitch is high when a sound wave oscillates at a fast speed. The pitch is low when a sound wave oscillates at a slow speed.

 

A standard musical scale consists of seven notes: A, B, C, D, E, F, G. There are also sharp notes, which are a half step higher such as C#, D#, E# and so on. Think of a piano!

 

Octave is the pitch of a note. The prefix ‘oct’ means eight. You can program octaves on a scale from 1 to 8. Octave 1 is the lowest pitch. Octave 8 is the highest pitch.

 

Intonation is the inflection or movement of a sound. There are five types of intonation: flat, rising, falling, peaking, and dipping.

 

Duration is the length of a note.

 

Pause is the rest in-between notes.

Level Grades 4-6
Subjects Art, Science and Technology
Provinces / Territories Across Canada

Overview

In this lesson, learners will explore two different ways to program their robot’s speaker mouth. It’ll make sounds using different notes, octaves, intonation, durations, and pauses, as well as emit high and low frequencies.

Download the LRF Blocks App on each computer: learn.littlerobotfriends.com/downloads

Review the complete LRF Blocks file for this project: bit.ly/lrf-sounds-example
(Download > Open LRF Blocks app > Select “Projects” > “Import File” > Select file from your downloads folder)

Print the solution sheet: bit.ly/program-sounds-solution

This activity requires computers and Little Robot Friends robots.

Introduction

Little Robot Friends have two main outputs: light and sound. Before you start programming your robot’s speaker mouth, there are a few important questions to answer:

  • What is sound?
  • What is frequency?
  • What is a note?
  • What is an octave?
  • What is intonation?
  • What is duraton?
  • What is pause?

Duration when programming Little Robot Friends:

  • None = No duration
  • Short = Sixteenth note
  • DoubleShort = Eighth note
  • Medium = Quarter note
  • DoubleMedium = Half note
  • Long = Whole note
  • DoubleLong = Double whole note
  • VeryLong = Quad whole note

Code Along

  1. Launch the LRF Blocks App and open a new project.
  2. Explain the different categories in the blocks menu.
  3. Show students how to move and connect blocks to create a "script".
  4. Give students a few minutes to experiment with the LRF Blocks App and try to control one or more of their robot's sensors.

Activity

There are two different ways to program your robot’s speaker mouth. Let’s get started!

Use the Solution sheet to complete the following steps:

  • Create a new project
  • Play a sound
  • Experiment with sounds
  • Set the frequency

Learning Outcomes

I can set sensor events to control my robot
I can program my robot to make a sound
I can program my robot to emit high and low frequencies

Success Criteria

I experimented with high and low frequencies
I changed the note, octave, intonation, duration, and pause of the sound block
I programmed the robot to make a sound when the microphone reads a loud noise

Can students program more than one sound?

Can students figure out how to program “say some sounds”? Hint: you need an array!

Can students program a script to turn off the frequency?

Little Robot Friends
https://littlerobotfriends.com/

More Lesson Plans

View All Lesson Plans