Sound Effects (Classroom Controller)
Good trouble for the classroom.
What did I create?
This project uses a Novation Launchpad MK2 MIDI controller to play 64 unique sound effects in my classroom. Wanna see it working? Watch this video demo or view the code on GitHub. You can play with this web version, without the physical controller:
What problem does this solve?
I’m using purposeful and non-intrusive sound effects to…
- Enable live game shows for 11th grade MM/AN 40A: Intro to Game Design.
- Illustrate the Input-Processing-Output (IPO) Model for 10th grade AP CS Principles.
- Play music (30-sec, 3-min) for classroom routines like ‘think time’ and ‘cleanup’.
- Enhance attention, engagement, social bonding, and retention:
Neurochemical | Trigger | Function |
---|---|---|
Dopamine | Novel or rewarding sounds, success chimes | Motivation, reward learning, memory reinforcement |
Oxytocin | Social or emotionally warm sounds (e.g., laughter, approval) | Social bonding, emotional safety, collaboration |
Acetylcholine | Task-relevant cues, attention-directing sounds | Focused attention, neuroplasticity, sensory processing |
What sounds does it play?
The board uses free sounds like these, from Freesound.org:
I use this Google Sheet to map the rows thematically, and generate code for soundMap.js
:
How does it work?
A MIDI controller is like a video game controller – it sends signals to another device.
Well, the controller itself is just a bunch of buttons. As the name suggests, a controller IS NOT the same thing as a computer. Just like a game controller needs a game console (a computing device) and a game (a program) to do anything fun, a MIDI controller needs some kind of computer and program to make it do stuff.
Term | What It Means | Example |
---|---|---|
CONTROLLER | A device for telling a computer what to do. | A PlayStation controller or Launchpad MK2. |
COMPUTER | A machine that follows programs. | A phone, tablet, laptop, or game console. |
PROGRAM | A list of steps a computer follows. | A game app or a website that shows your score. |
The Input-Processing-Output (IPO) Model
So, I needed to write a program that would recognize the input (which specific button was pressed), and return a specific output (play the sound assigned to that button). When computers run programs like this (checking for a match), it’s called processing.
The Input-Processing-Output (IPO) Model describes how systems (like computing systems) work.
Term | What It Means | Example |
---|---|---|
INPUT | When you give the computer something. | Pressing a button or clicking a mouse. |
PROCESSING | What the computer does with the input. | Checking which sound is assigned to a specific button. |
OUTPUT | What the computer gives you back. | Playing a sound or showing a message on the screen. |
How did I create it?
I tried to write this program the old fashioned way, using the Web MIDI API and developer forums. Two years passed.
Finally, I wondered how quickly I could accomplish my goal, so I asked ChatGPT:
Use JavaScript and HTML to create a program that I can use in a web browser that recognizes my Novation Launchpad MK2 controller, and programs 3 unique sounds for the first 3 buttons on the top row.
By interacting with the service for a few hours, I was able to build the app I wanted. You can see the code here.
Interactions with the service
1
2
3
4
5
6
7
8
9
10
> make the button LED lights blink a pattern upon initial connection between the web browser and the controller
[...]
> the sounds are not playing in the app when i run the local server. but the buttons do light up!
[...]
> move the sounds into a directory called sounds
[...]
> why does soundMap use 81 82 83 what do the numbers mean
[...]
> add the 8x8 grid back to the ui, make colors correspond to controller device colors -- unique color for each row
[...]
What’s next?
For in-classroom game shows, I need 3-4 “buzzers” for students playing as contestants. These are the considerations:
- Contestants must stand about 4 feet apart from each other.
- Buzzer hardware must be durable (so students can buzz energetically.)
- There must be a buzzer ‘window’ triggered by the host (so contestants cannot buzz early.)
- Only 1 contestant gets the opportunity (later buzzes not valid)
Hopefully I’ll find something on Instructables or GitHub that already works. USB Keyboards will probably be the first prototype. Wireless would be great, though. Wish me luck!