Skip Navigation

How to Program Sounds

By Phuong Diep
Level
Grades 4-6
Subjects
Art,
Science and Technology,
Mathematics
components
  • Programming
  • Computing and Networks
  • Technology and Society
Tools & Languages
Block-based,
Little Robot Friends

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.

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?

Technology in Society: How can electronic devices that use sound be adapted to help people in society? Example: People with visual impairments use auditory information to help them cross roads at crosswalks. How can auditory information be used in other inventions?

Little Robot Friends
https://littlerobotfriends.com/

Teach lessons that are tied to your existing curriculum! https://bit.ly/CLClessons

r

More Lesson Plans For Grades 4-6

    View All Lesson Plans

    Explore lessons based on components

    The K-12 Computer Science Framework

    Although learning how to build digital projects is a key part of Computer Science education, students should also learn a wider set of skills and competencies that will help them to harness the power of digital technologies as both creators and consumers. A comprehensive approach to K-12 Computer Science education includes learning about the following five focus areas:

    View Framework ➝

    Programming

    By the end of high school, students should be able to create a simple computer program.

    Computing and Networks

    By the end of high school, students should understand and be able to use the tools and devices commonly used to build digital projects.

    Data

    By the end of high school, students should be able to explain how we use computers to create, store, organize, and analyze data.

    Technology and Society

    By the end of high school, students should be able to explore the ways in which technology and society have mutually shaped each other.

    Design

    By the end of high school, students should be able to apply design principles to the digital projects they create.