Memory Game
The wall tells a short story — animals trying to reach the river while avoiding the lions. Each animal the story mentions is a hold that lights up with that animal’s sound. Then the lights go out and the child climbs the route from memory: a right hold glows green and plays its animal, a wrong one glows yellow and a lion growls. Reaching the river — the top row — wins.
The story is content, so the engine names every sound: narration lines go through /sample/play and are sequenced with /sample/ended, and each message below carries the sample key of the sound it should make. SuperCollider adds what content cannot: it pans each sound to its hold, ducks the jungle under the narration, and makes a growl land harder when the child is near the top.
Mode id: memory · Status: draft · Since: 0.2.0 · Spec: Prototype Use Cases, pp. 9–10
Loading
Section titled “Loading”Load this mode with /mode/load and type tags ssi:
NetAddr("127.0.0.1", 57120).sendMsg('/mode/load', "memory", "savanna", 4);Init parameters
Section titled “Init parameters”Sent in this exact order, immediately after the mode id.
| # | Name | Type | Range / default | Description |
|---|---|---|---|---|
| 1 | storyId | s | — | The story being told, e.g. “savanna”. Used for logs and to choose the ambience processing; the sounds themselves arrive as sample keys. |
| 2 | routeLength | i | 2 – 12 default 4 | Holds in the route to remember — the difficulty setting. |
Configured in the engine
Section titled “Configured in the engine”Settings from the use case that never cross the wire. The engine applies them; SuperCollider does not need them, so they are not in the protocol.
| Setting | |
|---|---|
| Story script | Which narration line plays when, and which hold each story element becomes. The engine sequences it using /sample/ended. |
| Default wall glow | Low, pulsing green chaser on every hold; pulsing blue on the top-row river. |
| Hold colours | Bright green for revealed and correct holds, yellow for mistakes. |
Messages
Section titled “Messages”/mode/memory/phase
Which stage of the game the wall is in.
s -
phases string "story" | "recall" | "complete" - story — narration and reveals. recall — lights out, the child climbs from memory. complete — the river was reached.
/mode/memory/phase recall NetAddr("127.0.0.1", 57120).sendMsg('/mode/memory/phase', "recall"); osc.Send(Osc.ModeMemoryPhase, "recall"); SuperCollider changes the mix with the phase: during recall the ambience thins out so each animal sound is easy to hear.
/mode/memory/reveal
The story mentions an element; its hold lights up.
iis -
stepIndexi int32 0 – 11 - Position of this element in the route, zero-based.
-
holdIdi int32 hold index · 0 – holdCount−1 - The hold that represents it.
-
keys string - Sample key of the element's sound, e.g. "savanna/giraffe".
/mode/memory/reveal 0 45 savanna/giraffe NetAddr("127.0.0.1", 57120).sendMsg('/mode/memory/reveal', 0, 45, "savanna/giraffe"); osc.Send(Osc.ModeMemoryReveal, 0, 45, "savanna/giraffe"); /mode/memory/correct
The child pressed a hold that is part of the route.
iis -
stepIndexi int32 0 – 11 - Which element of the route it was.
-
holdIdi int32 hold index · 0 – holdCount−1 - The hold pressed.
-
keys string - Sample key of that element's sound.
/mode/memory/correct 0 45 savanna/giraffe NetAddr("127.0.0.1", 57120).sendMsg('/mode/memory/correct', 0, 45, "savanna/giraffe"); osc.Send(Osc.ModeMemoryCorrect, 0, 45, "savanna/giraffe"); /mode/memory/mistake
The child pressed a hold that is not part of the route.
is -
holdIdi int32 hold index · 0 – holdCount−1 - The hold pressed.
-
keys string - Sample key of the warning sound, e.g. "savanna/lion".
/mode/memory/mistake 71 savanna/lion NetAddr("127.0.0.1", 57120).sendMsg('/mode/memory/mistake', 71, "savanna/lion"); osc.Send(Osc.ModeMemoryMistake, 71, "savanna/lion"); A warning, not a punishment — the game carries on. Pressing the same wrong hold again within a second or so should not growl twice; the engine debounces.
/mode/memory/goal
The child reached the river with the route completed.
fis -
elapsedf float32 seconds - Time since the recall phase began.
-
mistakesi int32 0 – 999 - Wrong holds pressed during recall.
-
keys string - Sample key of the "mission accomplished" track.
/mode/memory/goal 38.4 1 savanna/success NetAddr("127.0.0.1", 57120).sendMsg('/mode/memory/goal', 38.4, 1, "savanna/success"); osc.Send(Osc.ModeMemoryGoal, 38.4f, 1, "savanna/success");