Students add a recorder to the practice tracker: a Recorder (microphone allowed), a hidden Sound that gets the recording in Mic finishes a recording and is then shown, and a line with the recording's length. Nib sets the Sound from Mic.sound when the screen starts, before anything is recorded, so it never plays. Make it yours plays the recording as soon as it's ready.
Open these in Waypoints Prepare with one click. To share a file another way, copy its address and paste it into Load URL, or download the file and import it. In Prepare, the worksheet's Teacher edition shows the answers; the student copy hides them.
Try 5 min · Build 1 5 min · Build 2 10 min · Build 3 6 min · Check 7 min · Make it yours 4 min
This lesson starts from the finished practice tracker (Level 3 for the Recorder) and completes the Pictures from the user unit: a drawing, a photo, now a recording. Each is used in the event that runs when it's ready.
Microphone: off unless Allow microphone is ticked in the Recorder's properties, and the browser asks too. Some school devices block microphones; 🎵 Choose on the recorder picks a sound file instead (MP3, M4A, WAV and similar, about 5 MB at most, with Allow microphone off too) and runs the same event, so every student can finish. Recordings stay in this browser (nothing is uploaded), up to 20 seconds each.
Record instruments, humming or clapping, not other people. Headphones help, and so does spreading out: a room of microphones picks up everyone.
Playback starts hidden because a new Sound always has a built-in tune until something replaces it; the recording event shows it.
Trimming only changes which part plays; the whole recording is kept, so the handles can be dragged back out. Playback got Mic.sound when recording finished, so it plays the recording as it was then.
On the slides at these points. Students can do the whole lesson on their own; these are for the room. In the deck, the Run, Modify and Make slides have the live playground in them (the tutorial link is the backup), and the notes above are in each slide's speaker notes.
A recording lets you listen from the outside. Today the practice tracker gets one: record, keep, play back.
Show Nib's events. Ask: when the screen starts, what is in Mic.sound? When does that change?
Nothing, until the user stops recording. That's why the recording is used in Mic finishes a recording.
Students expect to set up Playback once, at the start. The recording doesn't exist until the user stops, so ask: at the moment this action runs, has anything been recorded yet?
| What you will see | A question to ask | The fix |
|---|---|---|
| The recorder says the microphone is off for this app. | Is Allow microphone ticked in Mic's properties? Did the browser ask, and was it allowed? | Tick it, then allow the microphone when the browser asks. If it's blocked on this computer, use 🎵 Choose to pick a sound file instead. |
| Playback plays a tune, not the recording. | Which set-sound action did you use? | Use Set Playback sound to the one named, with Mic.sound. |
| Playback never appears. | Is there a Show Playback in the recording event? | Add Show Playback after setting its sound. |
One possible solution for each task. Other correct programs are fine.
{"version":1,"name":"Practice tracker (recording)","features":{"level":3},"variables":[{"name":"Minutes","value":0}],"screens":[{"id":"main","name":"Tracker","objects":[{"name":"Title","kind":"text","instanceVars":[],"instances":[{"id":"t1","x":229,"y":40,"w":342,"h":36,"text":"Practice tracker","visible":true,"vars":{}}]},{"name":"MinutesInput","kind":"input","instanceVars":[],"instances":[{"id":"t2","x":229,"y":100,"w":200,"h":42,"text":"","visible":true,"vars":{}}]},{"name":"SaveButton","kind":"button","instanceVars":[],"instances":[{"id":"t3","x":441,"y":98,"w":130,"h":46,"text":"Save","visible":true,"vars":{}}]},{"name":"TotalText","kind":"text","instanceVars":[],"instances":[{"id":"t4","x":229,"y":170,"w":342,"h":32,"text":"You've practised 0 minutes","visible":true,"vars":{}}]},{"name":"Mic","kind":"recorder","instanceVars":[],"instances":[{"id":"mic1","x":229,"y":230,"w":342,"h":104,"text":"","visible":true,"vars":{}}]},{"name":"Playback","kind":"sound","instanceVars":[],"instances":[{"id":"pb1","x":229,"y":350,"w":342,"h":52,"text":"","visible":false,"vars":{},"sound":"calm"}]},{"name":"LengthText","kind":"text","instanceVars":[],"instances":[{"id":"lt1","x":229,"y":412,"w":342,"h":30,"text":"","visible":true,"vars":{}}]}],"events":[{"id":"p1","else":false,"conds":[{"type":"onClicked","target":"SaveButton"}],"actions":[{"type":"addTo","value":"int(MinutesInput.text)","var":"Minutes"},{"type":"setText","target":"TotalText","value":"\"You've practised \" & Minutes & \" minutes\""}],"children":[]},{"id":"rec1","else":false,"conds":[{"type":"onRecorded","target":"Mic"}],"actions":[{"type":"setSoundNamed","target":"Playback","name":"Mic.sound"},{"type":"setVisible","target":"Playback","visible":"show"},{"type":"setText","target":"LengthText","value":"\"Recorded \" & round(Mic.length) & \" seconds\""},{"type":"playSound","target":"Playback"}],"children":[]}]}],"device":"web","allowMic":true}
Stretch: Keep every recording: a list Recordings, Add Mic.sound to it when a recording finishes, and a List object that shows them (each shows as 🔊 Recording). Data apps does this properly with a table and a sound field.
Support: Do Build 2 together; it's the one with the idea in it.
A language app records you saying a word, then plays it back next to the teacher's version. Where does it set up your recording to play, and why there?
In the event that runs when recording finishes, because the recording doesn't exist before then.
Next: Creature stats. Using something in the event that runs when it's ready comes back with every kind of user input.